/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* This is pluggable context used by test for 6398614
*/
public MyContext() {
appScope = new SimpleBindings();
engineScope = new SimpleBindings();
globalScope = null;
}
switch (scope) {
case APP_SCOPE:
throw new NullPointerException("App scope cannot be null.");
}
break;
case ENGINE_SCOPE:
throw new NullPointerException("Engine scope cannot be null.");
}
break;
case GLOBAL_SCOPE:
break;
default:
throw new IllegalArgumentException("Invalid scope value.");
}
}
}
return null;
}
switch (scope) {
case APP_SCOPE:
case ENGINE_SCOPE:
case GLOBAL_SCOPE:
if (globalScope != null) {
}
return null;
default:
throw new IllegalArgumentException("Illegal scope value.");
}
}
switch (scope) {
case APP_SCOPE:
}
return null;
case ENGINE_SCOPE:
}
return null;
case GLOBAL_SCOPE:
}
return null;
default:
throw new IllegalArgumentException("Illegal scope value.");
}
}
switch (scope) {
case APP_SCOPE:
return;
case ENGINE_SCOPE:
return;
case GLOBAL_SCOPE:
if (globalScope != null) {
}
return;
default:
throw new IllegalArgumentException("Illegal scope value.");
}
}
return writer;
}
return reader;
}
}
}
return errorWriter;
}
this.errorWriter = writer;
}
return ENGINE_SCOPE;
return APP_SCOPE;
return GLOBAL_SCOPE;
} else {
return -1;
}
}
if (scope == ENGINE_SCOPE) {
return engineScope;
return appScope;
} else if (scope == GLOBAL_SCOPE) {
return globalScope;
} else {
throw new IllegalArgumentException("Illegal scope value.");
}
}
return scopes;
}
static {
}
}