package org.apache.el.util;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+
public class Validation {
// Java keywords, boolean literals & the null literal in alphabetical order
"throw", "throws", "transient", "true", "try", "void", "volatile",
"while" };
+ private static final boolean IS_SECURITY_ENABLED =
+ (System.getSecurityManager() != null);
+
+ private static final boolean SKIP_IDENTIFIER_CHECK;
+
+ static {
+ if (IS_SECURITY_ENABLED) {
+ SKIP_IDENTIFIER_CHECK = AccessController.doPrivileged(
+ new PrivilegedAction<Boolean>(){
+ @Override
+ public Boolean run() {
+ return Boolean.valueOf(System.getProperty(
+ "org.apache.el.parser.SKIP_IDENTIFIER_CHECK",
+ "false"));
+ }
+ }
+ ).booleanValue();
+ } else {
+ SKIP_IDENTIFIER_CHECK = Boolean.valueOf(System.getProperty(
+ "org.apache.el.parser.SKIP_IDENTIFIER_CHECK",
+ "false")).booleanValue();
+ }
+ }
+
private Validation() {
// Utility class. Hide default constructor
*/
public static boolean isIdentifier(String key) {
+ if (SKIP_IDENTIFIER_CHECK) {
+ return true;
+ }
+
// Should not be the case but check to be sure
if (key == null || key.length() == 0) {
return false;
<code>true</code> will be used.</p>
</property>
+ <property name="org.apache.el.parser.SKIP_IDENTIFIER_CHECK">
+ <p>If <code>true</code>, when parsing expressions, identifiers will not be
+ checked to ensure that they conform to the Java Language Specification for
+ Java identifiers. If not specified, the default value of
+ <code>false</code> will be used.</p>
+ </property>
+
</properties>
</section>