Fixed IDE warnings in API types
Signed-off-by: arjantijms <arjan.tijms@gmail.com>
diff --git a/api/src/main/java/javax/el/BeanELResolver.java b/api/src/main/java/javax/el/BeanELResolver.java
index 409e0f9..c461ac8 100644
--- a/api/src/main/java/javax/el/BeanELResolver.java
+++ b/api/src/main/java/javax/el/BeanELResolver.java
@@ -17,6 +17,9 @@
package javax.el;
+import static java.lang.Boolean.TRUE;
+import static javax.el.ELUtil.getExceptionMessageString;
+
import java.beans.BeanInfo;
import java.beans.FeatureDescriptor;
import java.beans.IntrospectionException;
@@ -83,6 +86,7 @@
static private class SoftConcurrentHashMap extends ConcurrentHashMap<Class<?>, BeanProperties> {
+ private static final long serialVersionUID = -178867497897782229L;
private static final int CACHE_INIT_SIZE = 1024;
private ConcurrentHashMap<Class<?>, BPSoftReference> map = new ConcurrentHashMap<Class<?>, BPSoftReference>(CACHE_INIT_SIZE);
private ReferenceQueue<BeanProperties> refQ = new ReferenceQueue<BeanProperties>();
@@ -144,7 +148,7 @@
writeMethod = ELUtil.getMethod(baseClass, descriptor.getWriteMethod());
}
- public Class getPropertyType() {
+ public Class<?> getPropertyType() {
return descriptor.getPropertyType();
}
@@ -176,8 +180,9 @@
} catch (IntrospectionException ie) {
throw new ELException(ie);
}
- for (PropertyDescriptor pd : descriptors) {
- propertyMap.put(pd.getName(), new BeanProperty(baseClass, pd));
+
+ for (PropertyDescriptor descriptor : descriptors) {
+ propertyMap.put(descriptor.getName(), new BeanProperty(baseClass, descriptor));
}
}
@@ -231,7 +236,6 @@
*/
@Override
public Class<?> getType(ELContext context, Object base, Object property) {
-
if (context == null) {
throw new NullPointerException();
}
@@ -240,9 +244,9 @@
return null;
}
- BeanProperty bp = getBeanProperty(context, base, property);
+ BeanProperty beanProperty = getBeanProperty(context, base, property);
context.setPropertyResolved(true);
- return bp.getPropertyType();
+ return beanProperty.getPropertyType();
}
/**
@@ -274,7 +278,6 @@
*/
@Override
public Object getValue(ELContext context, Object base, Object property) {
-
if (context == null) {
throw new NullPointerException();
}
@@ -283,11 +286,10 @@
return null;
}
- BeanProperty bp = getBeanProperty(context, base, property);
- Method method = bp.getReadMethod();
+ Method method = getBeanProperty(context, base, property).getReadMethod();
if (method == null) {
throw new PropertyNotFoundException(
- ELUtil.getExceptionMessageString(context, "propertyNotReadable", new Object[] { base.getClass().getName(), property.toString() }));
+ getExceptionMessageString(context, "propertyNotReadable", new Object[] { base.getClass().getName(), property.toString() }));
}
Object value;
@@ -301,6 +303,7 @@
} catch (Exception ex) {
throw new ELException(ex);
}
+
return value;
}
@@ -339,7 +342,6 @@
*/
@Override
public void setValue(ELContext context, Object base, Object property, Object val) {
-
if (context == null) {
throw new NullPointerException();
}
@@ -349,15 +351,13 @@
}
if (isReadOnly) {
- throw new PropertyNotWritableException(
- ELUtil.getExceptionMessageString(context, "resolverNotwritable", new Object[] { base.getClass().getName() }));
+ throw new PropertyNotWritableException(getExceptionMessageString(context, "resolverNotwritable", new Object[] { base.getClass().getName() }));
}
- BeanProperty bp = getBeanProperty(context, base, property);
- Method method = bp.getWriteMethod();
+ Method method = getBeanProperty(context, base, property).getWriteMethod();
if (method == null) {
throw new PropertyNotWritableException(
- ELUtil.getExceptionMessageString(context, "propertyNotWritable", new Object[] { base.getClass().getName(), property.toString() }));
+ getExceptionMessageString(context, "propertyNotWritable", new Object[] { base.getClass().getName(), property.toString() }));
}
try {
@@ -371,8 +371,7 @@
if (null == val) {
val = "null";
}
- String message = ELUtil.getExceptionMessageString(context, "setPropertyFailed",
- new Object[] { property.toString(), base.getClass().getName(), val });
+ String message = getExceptionMessageString(context, "setPropertyFailed", new Object[] { property.toString(), base.getClass().getName(), val });
throw new ELException(message, ex);
}
}
@@ -406,7 +405,7 @@
*
* @param context The context of this evaluation.
* @param base The bean on which to invoke the method
- * @param method The simple name of the method to invoke. Will be coerced to a <code>String</code>. If method is
+ * @param methodName The simple name of the method to invoke. Will be coerced to a <code>String</code>. If method is
* "<init>"or "<clinit>" a MethodNotFoundException is thrown.
* @param paramTypes An array of Class objects identifying the method's formal parameter types, in declared order. Use
* an empty array if the method has no parameters. Can be <code>null</code>, in which case the method's formal parameter
@@ -420,23 +419,24 @@
* constructor.
* @since EL 2.2
*/
-
@Override
- public Object invoke(ELContext context, Object base, Object method, Class<?>[] paramTypes, Object[] params) {
-
- if (base == null || method == null) {
+ public Object invoke(ELContext context, Object base, Object methodName, Class<?>[] paramTypes, Object[] params) {
+ if (base == null || methodName == null) {
return null;
}
- Method m = ELUtil.findMethod(base.getClass(), method.toString(), paramTypes, params, false);
- for (Object p : params) {
+
+ Method method = ELUtil.findMethod(base.getClass(), methodName.toString(), paramTypes, params, false);
+
+ for (Object param : params) {
// If the parameters is a LambdaExpression, set the ELContext
// for its evaluation
- if (p instanceof javax.el.LambdaExpression) {
- ((javax.el.LambdaExpression) p).setELContext(context);
+ if (param instanceof LambdaExpression) {
+ ((LambdaExpression) param).setELContext(context);
}
}
- Object ret = ELUtil.invokeMethod(context, m, base, params);
- context.setPropertyResolved(base, method);
+
+ Object ret = ELUtil.invokeMethod(context, method, base, params);
+ context.setPropertyResolved(base, methodName);
return ret;
}
@@ -473,7 +473,6 @@
*/
@Override
public boolean isReadOnly(ELContext context, Object base, Object property) {
-
if (context == null) {
throw new NullPointerException();
}
@@ -487,8 +486,7 @@
return true;
}
- BeanProperty bp = getBeanProperty(context, base, property);
- return bp.isReadOnly();
+ return getBeanProperty(context, base, property).isReadOnly();
}
/**
@@ -524,16 +522,19 @@
info = Introspector.getBeanInfo(base.getClass());
} catch (Exception ex) {
}
+
if (info == null) {
return null;
}
- ArrayList<FeatureDescriptor> list = new ArrayList<FeatureDescriptor>(info.getPropertyDescriptors().length);
- for (PropertyDescriptor pd : info.getPropertyDescriptors()) {
- pd.setValue("type", pd.getPropertyType());
- pd.setValue("resolvableAtDesignTime", Boolean.TRUE);
- list.add(pd);
+
+ ArrayList<FeatureDescriptor> featureDescriptors = new ArrayList<FeatureDescriptor>(info.getPropertyDescriptors().length);
+ for (PropertyDescriptor propertyDescriptor : info.getPropertyDescriptors()) {
+ propertyDescriptor.setValue("type", propertyDescriptor.getPropertyType());
+ propertyDescriptor.setValue("resolvableAtDesignTime", TRUE);
+ featureDescriptors.add(propertyDescriptor);
}
- return list.iterator();
+
+ return featureDescriptors.iterator();
}
/**
@@ -559,18 +560,20 @@
}
private BeanProperty getBeanProperty(ELContext context, Object base, Object prop) {
-
String property = prop.toString();
- Class baseClass = base.getClass();
- BeanProperties bps = properties.get(baseClass);
- if (bps == null) {
- bps = new BeanProperties(baseClass);
- properties.put(baseClass, bps);
+ Class<?> baseClass = base.getClass();
+
+ BeanProperties beanProperties = properties.get(baseClass);
+ if (beanProperties == null) {
+ beanProperties = new BeanProperties(baseClass);
+ properties.put(baseClass, beanProperties);
}
- BeanProperty bp = bps.getBeanProperty(property);
- if (bp == null) {
- throw new PropertyNotFoundException(ELUtil.getExceptionMessageString(context, "propertyNotFound", new Object[] { baseClass.getName(), property }));
+
+ BeanProperty beanProperty = beanProperties.getBeanProperty(property);
+ if (beanProperty == null) {
+ throw new PropertyNotFoundException(getExceptionMessageString(context, "propertyNotFound", new Object[] { baseClass.getName(), property }));
}
- return bp;
+
+ return beanProperty;
}
}
diff --git a/api/src/main/java/javax/el/BeanNameELResolver.java b/api/src/main/java/javax/el/BeanNameELResolver.java
index 03bfe23..61961fd 100644
--- a/api/src/main/java/javax/el/BeanNameELResolver.java
+++ b/api/src/main/java/javax/el/BeanNameELResolver.java
@@ -79,12 +79,14 @@
if (context == null) {
throw new NullPointerException();
}
+
if (base == null && property instanceof String) {
if (beanNameResolver.isNameResolved((String) property)) {
context.setPropertyResolved(base, property);
return beanNameResolver.getBean((String) property);
}
}
+
return null;
}
@@ -143,7 +145,6 @@
*/
@Override
public Class<?> getType(ELContext context, Object base, Object property) {
-
if (context == null) {
throw new NullPointerException();
}
@@ -154,6 +155,7 @@
return beanNameResolver.getBean((String) property).getClass();
}
}
+
return null;
}
@@ -188,6 +190,7 @@
return beanNameResolver.isReadOnly((String) property);
}
}
+
return false;
}
diff --git a/api/src/main/java/javax/el/BeanNameResolver.java b/api/src/main/java/javax/el/BeanNameResolver.java
index f56d1e0..5a6e861 100644
--- a/api/src/main/java/javax/el/BeanNameResolver.java
+++ b/api/src/main/java/javax/el/BeanNameResolver.java
@@ -25,6 +25,7 @@
* @since EL 3.0
*/
public abstract class BeanNameResolver {
+
/**
* Returns whether the given name is resolved by the BeanNameResolver
*
diff --git a/api/src/main/java/javax/el/CompositeELResolver.java b/api/src/main/java/javax/el/CompositeELResolver.java
index 8da1b21..a95aa66 100644
--- a/api/src/main/java/javax/el/CompositeELResolver.java
+++ b/api/src/main/java/javax/el/CompositeELResolver.java
@@ -71,7 +71,6 @@
* @throws NullPointerException If the provided resolver is <code>null</code>.
*/
public void add(ELResolver elResolver) {
-
if (elResolver == null) {
throw new NullPointerException();
}
@@ -129,7 +128,6 @@
*/
@Override
public Object getValue(ELContext context, Object base, Object property) {
-
context.setPropertyResolved(false);
Object value = null;
@@ -139,11 +137,12 @@
return value;
}
}
+
return null;
}
/**
- * Attemps to resolve and invoke the given <code>method</code> on the given <code>base</code> object by querying all
+ * Attempts to resolve and invoke the given <code>method</code> on the given <code>base</code> object by querying all
* component resolvers.
*
* <p>
@@ -189,7 +188,6 @@
*/
@Override
public Object invoke(ELContext context, Object base, Object method, Class<?>[] paramTypes, Object[] params) {
-
context.setPropertyResolved(false);
Object value;
@@ -199,6 +197,7 @@
return value;
}
}
+
return null;
}
@@ -230,9 +229,9 @@
*
* <p>
* If none of the component resolvers were able to perform this operation, the value <code>null</code> is returned and
- * the <code>propertyResolved</code> flag remains set to <code>false</code>
+ * the <code>propertyResolved</code> flag remains set to <code>false</code>.
* </p>
- * .
+ *
*
* <p>
* Any exception thrown by component resolvers during the iteration is propagated to the caller of this method.
@@ -252,7 +251,6 @@
*/
@Override
public Class<?> getType(ELContext context, Object base, Object property) {
-
context.setPropertyResolved(false);
Class<?> type;
@@ -262,6 +260,7 @@
return type;
}
}
+
return null;
}
@@ -308,7 +307,6 @@
*/
@Override
public void setValue(ELContext context, Object base, Object property, Object val) {
-
context.setPropertyResolved(false);
for (int i = 0; i < size; i++) {
@@ -368,7 +366,6 @@
*/
@Override
public boolean isReadOnly(ELContext context, Object base, Object property) {
-
context.setPropertyResolved(false);
boolean readOnly;
@@ -378,6 +375,7 @@
return readOnly;
}
}
+
return false; // Does not matter
}
@@ -447,6 +445,7 @@
return null;
}
}
+
return commonPropertyType;
}
@@ -466,7 +465,6 @@
*/
@Override
public Object convertToType(ELContext context, Object obj, Class<?> targetType) {
-
context.setPropertyResolved(false);
Object value = null;
@@ -476,6 +474,7 @@
return value;
}
}
+
return null;
}
diff --git a/api/src/main/java/javax/el/ELClass.java b/api/src/main/java/javax/el/ELClass.java
index 964ea87..93792af 100644
--- a/api/src/main/java/javax/el/ELClass.java
+++ b/api/src/main/java/javax/el/ELClass.java
@@ -27,7 +27,6 @@
*
* @since EL 3.0
*/
-
public class ELClass {
private Class<?> klass;
diff --git a/api/src/main/java/javax/el/ELContext.java b/api/src/main/java/javax/el/ELContext.java
index 982f52d..9432451 100644
--- a/api/src/main/java/javax/el/ELContext.java
+++ b/api/src/main/java/javax/el/ELContext.java
@@ -76,6 +76,13 @@
*/
public abstract class ELContext {
+ private boolean resolved;
+ private HashMap<Class<?>, Object> map = new HashMap<Class<?>, Object>();
+ private transient List<EvaluationListener> listeners;
+ private Stack<Map<String, Object>> lambdaArgs;
+ private ImportHandler importHandler;
+ private Locale locale;
+
/**
* Called to indicate that a <code>ELResolver</code> has successfully resolved a given (base, property) pair. Use
* {@link #setPropertyResolved(Object, Object)} if resolved is true and to notify {@link EvaluationListener}s.
@@ -147,9 +154,10 @@
* @throws NullPointerException if key is null or contextObject is null.
*/
public void putContext(Class key, Object contextObject) {
- if ((key == null) || (contextObject == null)) {
+ if (key == null || contextObject == null) {
throw new NullPointerException();
}
+
map.put(key, contextObject);
}
@@ -175,6 +183,7 @@
if (key == null) {
throw new NullPointerException();
}
+
return map.get(key);
}
@@ -205,6 +214,7 @@
if (importHandler == null) {
importHandler = new ImportHandler();
}
+
return importHandler;
}
@@ -216,11 +226,6 @@
public abstract FunctionMapper getFunctionMapper();
/**
- * Holds value of property locale.
- */
- private Locale locale;
-
- /**
* Get the <code>Locale</code> stored by a previous invocation to {@link #setLocale}. If this method returns non
* <code>null</code>, this <code>Locale</code> must be used for all localization needs in the implementation. The
* <code>Locale</code> must not be cached to allow for applications that change <code>Locale</code> dynamically.
@@ -229,8 +234,7 @@
*/
public Locale getLocale() {
-
- return this.locale;
+ return locale;
}
/**
@@ -244,7 +248,6 @@
* @param locale the locale for this instance
*/
public void setLocale(Locale locale) {
-
this.locale = locale;
}
@@ -266,6 +269,7 @@
if (listeners == null) {
listeners = new ArrayList<EvaluationListener>();
}
+
listeners.add(listener);
}
@@ -286,8 +290,10 @@
* @param expr The EL expression string to be evaluated
*/
public void notifyBeforeEvaluation(String expr) {
- if (getEvaluationListeners() == null)
+ if (getEvaluationListeners() == null) {
return;
+ }
+
for (EvaluationListener listener : getEvaluationListeners()) {
listener.beforeEvaluation(this, expr);
}
@@ -299,8 +305,10 @@
* @param expr The EL expression string that has been evaluated
*/
public void notifyAfterEvaluation(String expr) {
- if (getEvaluationListeners() == null)
+ if (getEvaluationListeners() == null) {
return;
+ }
+
for (EvaluationListener listener : getEvaluationListeners()) {
listener.afterEvaluation(this, expr);
}
@@ -313,8 +321,10 @@
* @param property The property Object
*/
public void notifyPropertyResolved(Object base, Object property) {
- if (getEvaluationListeners() == null)
+ if (getEvaluationListeners() == null) {
return;
+ }
+
for (EvaluationListener listener : getEvaluationListeners()) {
listener.propertyResolved(this, base, property);
}
@@ -337,6 +347,7 @@
return true;
}
}
+
return false;
}
@@ -361,6 +372,7 @@
return v;
}
}
+
return null;
}
@@ -375,6 +387,7 @@
if (lambdaArgs == null) {
lambdaArgs = new Stack<Map<String, Object>>();
}
+
lambdaArgs.push(args);
}
@@ -426,12 +439,8 @@
if (exprFactory == null) {
exprFactory = ELUtil.getExpressionFactory();
}
+
return exprFactory.coerceToType(obj, targetType);
}
- private boolean resolved;
- private HashMap<Class<?>, Object> map = new HashMap<Class<?>, Object>();
- private transient List<EvaluationListener> listeners = null;
- private Stack<Map<String, Object>> lambdaArgs;
- private ImportHandler importHandler;
}
diff --git a/api/src/main/java/javax/el/ELContextEvent.java b/api/src/main/java/javax/el/ELContextEvent.java
index 4294221..1829f4d 100644
--- a/api/src/main/java/javax/el/ELContextEvent.java
+++ b/api/src/main/java/javax/el/ELContextEvent.java
@@ -17,6 +17,8 @@
package javax.el;
+import java.util.EventObject;
+
/**
* An event which indicates that an {@link ELContext} has been created. The source object is the ELContext that was
* created.
@@ -25,7 +27,9 @@
* @see ELContextListener
* @since JSP 2.1
*/
-public class ELContextEvent extends java.util.EventObject {
+public class ELContextEvent extends EventObject {
+
+ private static final long serialVersionUID = 1255131906285426769L;
/**
* Constructs an ELContextEvent object to indicate that an <code>ELContext</code> has been created.
diff --git a/api/src/main/java/javax/el/ELContextListener.java b/api/src/main/java/javax/el/ELContextListener.java
index 5508887..7c76ea7 100644
--- a/api/src/main/java/javax/el/ELContextListener.java
+++ b/api/src/main/java/javax/el/ELContextListener.java
@@ -31,6 +31,6 @@
*
* @param ece the notification event.
*/
- public void contextCreated(ELContextEvent ece);
+ void contextCreated(ELContextEvent ece);
}
diff --git a/api/src/main/java/javax/el/ELException.java b/api/src/main/java/javax/el/ELException.java
index 8cc0344..7ec0ab5 100644
--- a/api/src/main/java/javax/el/ELException.java
+++ b/api/src/main/java/javax/el/ELException.java
@@ -24,6 +24,8 @@
*/
public class ELException extends RuntimeException {
+ private static final long serialVersionUID = -2161386187282690885L;
+
// -------------------------------------
/**
* Creates an <code>ELException</code> with no detail message.
diff --git a/api/src/main/java/javax/el/ELManager.java b/api/src/main/java/javax/el/ELManager.java
index 65fe987..2415797 100644
--- a/api/src/main/java/javax/el/ELManager.java
+++ b/api/src/main/java/javax/el/ELManager.java
@@ -49,6 +49,7 @@
if (elContext == null) {
elContext = new StandardELContext(getExpressionFactory());
}
+
return elContext;
}
@@ -60,30 +61,30 @@
* @return The previous ELContext, null if none.
*/
public ELContext setELContext(ELContext context) {
- ELContext prev = elContext;
+ ELContext prevELContext = elContext;
elContext = new StandardELContext(context);
- return prev;
+ return prevELContext;
}
/**
* Register a BeanNameResolver. Construct a BeanNameELResolver with the BeanNameResolver and add it to the list of
* ELResolvers. Once registered, the BeanNameResolver cannot be removed.
*
- * @param bnr The BeanNameResolver to be registered.
+ * @param beanNameResolver The BeanNameResolver to be registered.
*/
- public void addBeanNameResolver(BeanNameResolver bnr) {
- getELContext().addELResolver(new BeanNameELResolver(bnr));
+ public void addBeanNameResolver(BeanNameResolver beanNameResolver) {
+ getELContext().addELResolver(new BeanNameELResolver(beanNameResolver));
}
/**
* Add an user defined ELResolver to the list of ELResolvers. Can be called multiple times. The new ELResolver is placed
* ahead of the default ELResolvers. The list of the ELResolvers added this way are ordered chronologically.
*
- * @param elr The ELResolver to be added to the list of ELResolvers in ELContext.
+ * @param elResolver The ELResolver to be added to the list of ELResolvers in ELContext.
* @see StandardELContext#addELResolver
*/
- public void addELResolver(ELResolver elr) {
- getELContext().addELResolver(elr);
+ public void addELResolver(ELResolver elResolver) {
+ getELContext().addELResolver(elResolver);
}
/**
@@ -91,10 +92,10 @@
*
* @param prefix The namespace of the functions, can be "".
* @param function The name of the function.
- * @param meth The static method to be invoked when the function is used.
+ * @param method The static method to be invoked when the function is used.
*/
- public void mapFunction(String prefix, String function, Method meth) {
- getELContext().getFunctionMapper().mapFunction(prefix, function, meth);
+ public void mapFunction(String prefix, String function, Method method) {
+ getELContext().getFunctionMapper().mapFunction(prefix, function, method);
}
/**
@@ -147,9 +148,9 @@
* @return the previous bean (if any) mapped to <code>name</code>
*/
public Object defineBean(String name, Object bean) {
- Object ret = getELContext().getBeans().get(name);
+ Object previousBean = getELContext().getBeans().get(name);
getELContext().getBeans().put(name, bean);
- return ret;
+ return previousBean;
}
/**
diff --git a/api/src/main/java/javax/el/ELProcessor.java b/api/src/main/java/javax/el/ELProcessor.java
index 1dd0199..77fc68a 100644
--- a/api/src/main/java/javax/el/ELProcessor.java
+++ b/api/src/main/java/javax/el/ELProcessor.java
@@ -16,6 +16,7 @@
package javax.el;
+import java.lang.reflect.Array;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
@@ -78,7 +79,7 @@
public class ELProcessor {
private ELManager elManager = new ELManager();
- private ExpressionFactory factory = elManager.getExpressionFactory();
+ private ExpressionFactory factory = ELManager.getExpressionFactory();
/**
* Return the ELManager used for EL processing.
@@ -159,15 +160,16 @@
* if the method signature is not valid, or if the method is not a static method.
*/
public void defineFunction(String prefix, String function, String className, String method) throws ClassNotFoundException, NoSuchMethodException {
-
if (prefix == null || function == null || className == null || method == null) {
throw new NullPointerException("Null argument for defineFunction");
}
Method meth = null;
ClassLoader loader = Thread.currentThread().getContextClassLoader();
- if (loader == null)
+ if (loader == null) {
loader = getClass().getClassLoader();
+ }
+
Class<?> klass = Class.forName(className, false, loader);
int j = method.indexOf('(');
if (j < 0) {
@@ -187,7 +189,9 @@
if (p < 0) {
throw new NoSuchMethodException("Bad method singnature: " + method);
}
+
String methodName = method.substring(p + 1, j).trim();
+
// Extract parameter types
p = method.indexOf(')', j + 1);
if (p < 0) {
@@ -203,9 +207,11 @@
if (!Modifier.isStatic(meth.getModifiers())) {
throw new NoSuchMethodException("The method specified in defineFunction must be static: " + meth);
}
+
if (function.equals("")) {
function = method;
}
+
elManager.mapFunction(prefix, function, meth);
}
@@ -228,6 +234,7 @@
if (function.equals("")) {
function = method.getName();
}
+
elManager.mapFunction(prefix, function, method);
}
@@ -246,46 +253,49 @@
* Return the Class object associated with the class or interface with the given name.
*/
private static Class<?> toClass(String type, ClassLoader loader) throws ClassNotFoundException {
-
Class<?> c = null;
int i0 = type.indexOf('[');
int dims = 0;
if (i0 > 0) {
// This is an array. Count the dimensions
for (int i = 0; i < type.length(); i++) {
- if (type.charAt(i) == '[')
+ if (type.charAt(i) == '[') {
dims++;
+ }
}
type = type.substring(0, i0);
}
- if ("boolean".equals(type))
+ if ("boolean".equals(type)) {
c = boolean.class;
- else if ("char".equals(type))
+ } else if ("char".equals(type)) {
c = char.class;
- else if ("byte".equals(type))
+ } else if ("byte".equals(type)) {
c = byte.class;
- else if ("short".equals(type))
+ } else if ("short".equals(type)) {
c = short.class;
- else if ("int".equals(type))
+ } else if ("int".equals(type)) {
c = int.class;
- else if ("long".equals(type))
+ } else if ("long".equals(type)) {
c = long.class;
- else if ("float".equals(type))
+ } else if ("float".equals(type)) {
c = float.class;
- else if ("double".equals(type))
+ } else if ("double".equals(type)) {
c = double.class;
- else
+ } else {
c = loader.loadClass(type);
+ }
- if (dims == 0)
+ if (dims == 0) {
return c;
+ }
- if (dims == 1)
+ if (dims == 1) {
return java.lang.reflect.Array.newInstance(c, 1).getClass();
+ }
// Array of more than i dimension
- return java.lang.reflect.Array.newInstance(c, new int[dims]).getClass();
+ return Array.newInstance(c, new int[dims]).getClass();
}
private String bracket(String expression) {
diff --git a/api/src/main/java/javax/el/ELUtil.java b/api/src/main/java/javax/el/ELUtil.java
index f532c77..e9da385 100644
--- a/api/src/main/java/javax/el/ELUtil.java
+++ b/api/src/main/java/javax/el/ELUtil.java
@@ -55,7 +55,6 @@
* This class may not be constructed.
* </p>
*/
-
private ELUtil() {
}
@@ -85,39 +84,33 @@
private static Map<String, ResourceBundle> getCurrentInstance() {
Map<String, ResourceBundle> result = instance.get();
- if (null == result) {
+ if (result == null) {
result = new HashMap<String, ResourceBundle>();
setCurrentInstance(result);
}
+
return result;
}
/**
- * <p>
* Replace the Map with the argument context.
- * </p>
*
* @param context the Map to be stored in ThreadLocal storage.
*/
-
private static void setCurrentInstance(Map<String, ResourceBundle> context) {
-
instance.set(context);
-
}
- /*
- * <p>Convenience method, calls through to {@link #getExceptionMessageString(javax.el.ELContext,java.lang.String,Object
- * []). </p>
+ /**
+ * Convenience method, calls through to getExceptionMessageString(javax.el.ELContext,java.lang.String,Object
+ * []).
*
* @param context the ELContext from which the Locale for this message is extracted.
- *
* @param messageId the messageId String in the ResourceBundle
*
* @return a localized String for the argument messageId
*/
-
public static String getExceptionMessageString(ELContext context, String messageId) {
return getExceptionMessageString(context, messageId, null);
}
@@ -140,7 +133,6 @@
*
* @return a localized String for the argument messageId
*/
-
public static String getExceptionMessageString(ELContext context, String messageId, Object[] params) {
String result = "";
Locale locale = null;
@@ -152,16 +144,18 @@
if (null == (locale = context.getLocale())) {
locale = Locale.getDefault();
}
- if (null != locale) {
+
+ if (locale != null) {
Map<String, ResourceBundle> threadMap = getCurrentInstance();
- ResourceBundle rb = null;
- if (null == (rb = threadMap.get(locale.toString()))) {
- rb = ResourceBundle.getBundle("javax.el.PrivateMessages", locale);
- threadMap.put(locale.toString(), rb);
+ ResourceBundle resourceBundle = null;
+ if (null == (resourceBundle = threadMap.get(locale.toString()))) {
+ resourceBundle = ResourceBundle.getBundle("javax.el.PrivateMessages", locale);
+ threadMap.put(locale.toString(), resourceBundle);
}
- if (null != rb) {
+
+ if (null != resourceBundle) {
try {
- result = rb.getString(messageId);
+ result = resourceBundle.getString(messageId);
if (null != params) {
result = MessageFormat.format(result, params);
}
@@ -202,14 +196,15 @@
if (result == null) {
return null;
}
+
return getConstructor(klass, (Constructor<?>) result.unWrap());
}
- static Object invokeConstructor(ELContext context, Constructor<?> c, Object[] params) {
- Object[] parameters = buildParameters(context, c.getParameterTypes(), c.isVarArgs(), params);
+ static Object invokeConstructor(ELContext context, Constructor<?> constructor, Object[] params) {
+ Object[] parameters = buildParameters(context, constructor.getParameterTypes(), constructor.isVarArgs(), params);
;
try {
- return c.newInstance(parameters);
+ return constructor.newInstance(parameters);
} catch (IllegalAccessException iae) {
throw new ELException(iae);
} catch (IllegalArgumentException iae) {
@@ -221,23 +216,23 @@
}
}
- static Method findMethod(Class<?> klass, String method, Class<?>[] paramTypes, Object[] params, boolean staticOnly) {
- Method m = findMethod(klass, method, paramTypes, params);
- if (staticOnly && !Modifier.isStatic(m.getModifiers())) {
- throw new MethodNotFoundException("Method " + method + "for class " + klass + " not found or accessible");
+ static Method findMethod(Class<?> klass, String methodName, Class<?>[] paramTypes, Object[] params, boolean staticOnly) {
+ Method method = findMethod(klass, methodName, paramTypes, params);
+ if (staticOnly && !Modifier.isStatic(method.getModifiers())) {
+ throw new MethodNotFoundException("Method " + methodName + "for class " + klass + " not found or accessible");
}
- return m;
+ return method;
}
/*
* This method duplicates code in com.sun.el.util.ReflectionUtil. When making changes keep the code in sync.
*/
- static Object invokeMethod(ELContext context, Method m, Object base, Object[] params) {
+ static Object invokeMethod(ELContext context, Method method, Object base, Object[] params) {
- Object[] parameters = buildParameters(context, m.getParameterTypes(), m.isVarArgs(), params);
+ Object[] parameters = buildParameters(context, method.getParameterTypes(), method.isVarArgs(), params);
try {
- return m.invoke(base, parameters);
+ return method.invoke(base, parameters);
} catch (IllegalAccessException iae) {
throw new ELException(iae);
} catch (IllegalArgumentException iae) {
@@ -251,7 +246,6 @@
* This method duplicates code in com.sun.el.util.ReflectionUtil. When making changes keep the code in sync.
*/
static Method findMethod(Class<?> clazz, String methodName, Class<?>[] paramTypes, Object[] paramValues) {
-
if (clazz == null || methodName == null) {
throw new MethodNotFoundException("Method not found: " + clazz + "." + methodName + "(" + paramString(paramTypes) + ")");
}
@@ -269,6 +263,7 @@
if (result == null) {
return null;
}
+
return getMethod(clazz, (Method) result.unWrap());
}
@@ -276,7 +271,6 @@
* This method duplicates code in com.sun.el.util.ReflectionUtil. When making changes keep the code in sync.
*/
private static Wrapper findWrapper(Class<?> clazz, List<Wrapper> wrappers, String name, Class<?>[] paramTypes, Object[] paramValues) {
-
List<Wrapper> assignableCandidates = new ArrayList<Wrapper>();
List<Wrapper> coercibleCandidates = new ArrayList<Wrapper>();
List<Wrapper> varArgsCandidates = new ArrayList<Wrapper>();
@@ -500,25 +494,30 @@
if (clazz.isPrimitive()) {
if (clazz == Boolean.TYPE) {
return Boolean.class;
- } else if (clazz == Character.TYPE) {
- return Character.class;
- } else if (clazz == Byte.TYPE) {
- return Byte.class;
- } else if (clazz == Short.TYPE) {
- return Short.class;
- } else if (clazz == Integer.TYPE) {
- return Integer.class;
- } else if (clazz == Long.TYPE) {
- return Long.class;
- } else if (clazz == Float.TYPE) {
- return Float.class;
- } else {
- return Double.class;
}
+ if (clazz == Character.TYPE) {
+ return Character.class;
+ }
+ if (clazz == Byte.TYPE) {
+ return Byte.class;
+ }
+ if (clazz == Short.TYPE) {
+ return Short.class;
+ }
+ if (clazz == Integer.TYPE) {
+ return Integer.class;
+ }
+ if (clazz == Long.TYPE) {
+ return Long.class;
+ }
+ if (clazz == Float.TYPE) {
+ return Float.class;
+ }
+
+ return Double.class;
} else {
return clazz;
}
-
}
/*
@@ -583,6 +582,7 @@
} catch (Exception e) {
return false;
}
+
return true;
}
@@ -602,6 +602,7 @@
result[i] = values[i].getClass();
}
}
+
return result;
}
diff --git a/api/src/main/java/javax/el/Expression.java b/api/src/main/java/javax/el/Expression.java
index ae63041..eaf2b71 100644
--- a/api/src/main/java/javax/el/Expression.java
+++ b/api/src/main/java/javax/el/Expression.java
@@ -41,7 +41,8 @@
* @since JSP 2.1
*/
public abstract class Expression implements Serializable {
- // Debugging
+
+ private static final long serialVersionUID = -6663767980471823812L;
/**
* Returns the original String used to create this <code>Expression</code>, unmodified.
diff --git a/api/src/main/java/javax/el/FactoryFinder.java b/api/src/main/java/javax/el/FactoryFinder.java
index c0aa2d1..caab388 100644
--- a/api/src/main/java/javax/el/FactoryFinder.java
+++ b/api/src/main/java/javax/el/FactoryFinder.java
@@ -17,6 +17,8 @@
package javax.el;
+import static java.io.File.separator;
+
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
@@ -40,12 +42,14 @@
} else {
spiClass = classLoader.loadClass(className);
}
+
if (properties != null) {
- Constructor constr = null;
+ Constructor<?> constr = null;
try {
constr = spiClass.getConstructor(Properties.class);
} catch (Exception ex) {
}
+
if (constr != null) {
return constr.newInstance(properties);
}
@@ -81,6 +85,7 @@
}
String serviceId = "META-INF/services/" + factoryId;
+
// try to find services in CLASSPATH
try {
InputStream is = null;
@@ -91,10 +96,10 @@
}
if (is != null) {
- BufferedReader rd = new BufferedReader(new InputStreamReader(is, "UTF-8"));
+ BufferedReader reader = new BufferedReader(new InputStreamReader(is, "UTF-8"));
- String factoryClassName = rd.readLine();
- rd.close();
+ String factoryClassName = reader.readLine();
+ reader.close();
if (factoryClassName != null && !"".equals(factoryClassName)) {
return newInstance(factoryClassName, classLoader, properties);
@@ -103,15 +108,17 @@
} catch (Exception ex) {
}
- // try to read from $java.home/lib/el.properties
+ // Try to read from $java.home/lib/el.properties
try {
String javah = System.getProperty("java.home");
- String configFile = javah + File.separator + "lib" + File.separator + "el.properties";
- File f = new File(configFile);
- if (f.exists()) {
+ String configFileName = javah + separator + "lib" + separator + "el.properties";
+
+ File configFile = new File(configFileName);
+ if (configFile.exists()) {
Properties props = new Properties();
- props.load(new FileInputStream(f));
+ props.load(new FileInputStream(configFile));
String factoryClassName = props.getProperty(factoryId);
+
return newInstance(factoryClassName, classLoader, properties);
}
} catch (Exception ex) {
diff --git a/api/src/main/java/javax/el/ImportHandler.java b/api/src/main/java/javax/el/ImportHandler.java
index 2897ac6..8fe479f 100644
--- a/api/src/main/java/javax/el/ImportHandler.java
+++ b/api/src/main/java/javax/el/ImportHandler.java
@@ -16,7 +16,10 @@
package javax.el;
-import java.lang.reflect.Modifier;
+import static java.lang.reflect.Modifier.isAbstract;
+import static java.lang.reflect.Modifier.isInterface;
+import static java.lang.reflect.Modifier.isPublic;
+
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
@@ -51,8 +54,10 @@
if (i <= 0) {
throw new ELException("The name " + name + " is not a full static member name");
}
+
String memberName = name.substring(i + 1);
String className = name.substring(0, i);
+
staticNameMap.put(memberName, className);
}
@@ -67,7 +72,9 @@
if (i <= 0) {
throw new ELException("The name " + name + " is not a full class name");
}
+
String className = name.substring(i + 1);
+
classNameMap.put(className, name);
}
@@ -89,7 +96,6 @@
* @throws ELException if the class is abstract or is an interface, or not public.
*/
public Class<?> resolveClass(String name) {
-
String className = classNameMap.get(name);
if (className != null) {
return resolveClassFor(className);
@@ -103,6 +109,7 @@
return c;
}
}
+
return null;
}
@@ -122,6 +129,7 @@
return c;
}
}
+
return null;
}
@@ -130,11 +138,13 @@
if (c != null) {
return c;
}
+
c = getClassFor(className);
if (c != null) {
checkModifiers(c.getModifiers());
classMap.put(className, c);
}
+
return c;
}
@@ -146,11 +156,12 @@
notAClass.add(className);
}
}
+
return null;
}
private void checkModifiers(int modifiers) {
- if (Modifier.isAbstract(modifiers) || Modifier.isInterface(modifiers) || !Modifier.isPublic((modifiers))) {
+ if (isAbstract(modifiers) || isInterface(modifiers) || !isPublic((modifiers))) {
throw new ELException("Imported class must be public, and cannot be abstract or an interface");
}
}
diff --git a/api/src/main/java/javax/el/LambdaExpression.java b/api/src/main/java/javax/el/LambdaExpression.java
index 3438d25..618527a 100644
--- a/api/src/main/java/javax/el/LambdaExpression.java
+++ b/api/src/main/java/javax/el/LambdaExpression.java
@@ -51,7 +51,7 @@
private ValueExpression expression;
private ELContext context;
// Arguments from nesting lambdas, when the body is another lambda
- private Map<String, Object> envirArgs = null;
+ private Map<String, Object> envirArgs;
/**
* Creates a new LambdaExpression.
@@ -123,6 +123,7 @@
((LambdaExpression) ret).envirArgs.putAll(lambdaArgs);
}
elContext.exitLambdaScope();
+
return ret;
}
@@ -147,6 +148,6 @@
* @throws ELException if not enough arguments are provided
*/
public Object invoke(Object... args) {
- return invoke(this.context, args);
+ return invoke(context, args);
}
}
diff --git a/api/src/main/java/javax/el/ListELResolver.java b/api/src/main/java/javax/el/ListELResolver.java
index 76fae90..a93e2f7 100644
--- a/api/src/main/java/javax/el/ListELResolver.java
+++ b/api/src/main/java/javax/el/ListELResolver.java
@@ -48,11 +48,14 @@
*/
public class ListELResolver extends ELResolver {
+ static private Class<?> theUnmodifiableListClass = Collections.unmodifiableList(new ArrayList<Object>()).getClass();
+ private boolean isReadOnly;
+
/**
* Creates a new read/write <code>ListELResolver</code>.
*/
public ListELResolver() {
- this.isReadOnly = false;
+ isReadOnly = false;
}
/**
@@ -91,20 +94,21 @@
*/
@Override
public Class<?> getType(ELContext context, Object base, Object property) {
-
if (context == null) {
throw new NullPointerException();
}
if (base != null && base instanceof List) {
context.setPropertyResolved(true);
- List list = (List) base;
+ List<?> list = (List<?>) base;
int index = toInteger(property);
if (index < 0 || index >= list.size()) {
throw new PropertyNotFoundException();
}
+
return Object.class;
}
+
return null;
}
@@ -131,20 +135,21 @@
*/
@Override
public Object getValue(ELContext context, Object base, Object property) {
-
if (context == null) {
throw new NullPointerException();
}
if (base != null && base instanceof List) {
context.setPropertyResolved(base, property);
- List list = (List) base;
+ List<?> list = (List<?>) base;
int index = toInteger(property);
if (index < 0 || index >= list.size()) {
return null;
}
+
return list.get(index);
}
+
return null;
}
@@ -189,7 +194,6 @@
*/
@Override
public void setValue(ELContext context, Object base, Object property, Object val) {
-
if (context == null) {
throw new NullPointerException();
}
@@ -198,11 +202,12 @@
context.setPropertyResolved(base, property);
// Safe cast
@SuppressWarnings("unchecked")
- List<Object> list = (List) base;
+ List<Object> list = (List<Object>) base;
int index = toInteger(property);
if (isReadOnly) {
throw new PropertyNotWritableException();
}
+
try {
list.set(index, val);
} catch (UnsupportedOperationException ex) {
@@ -219,8 +224,6 @@
}
}
- static private Class<?> theUnmodifiableListClass = Collections.unmodifiableList(new ArrayList<Object>()).getClass();
-
/**
* If the base object is a list, returns whether a call to {@link #setValue} will always fail.
*
@@ -255,20 +258,21 @@
*/
@Override
public boolean isReadOnly(ELContext context, Object base, Object property) {
-
if (context == null) {
throw new NullPointerException();
}
if (base != null && base instanceof List) {
context.setPropertyResolved(true);
- List list = (List) base;
+ List<?> list = (List<?>) base;
int index = toInteger(property);
if (index < 0 || index >= list.size()) {
throw new PropertyNotFoundException();
}
+
return list.getClass() == theUnmodifiableListClass || isReadOnly;
}
+
return false;
}
@@ -306,6 +310,7 @@
if (base != null && base instanceof List) {
return Integer.class;
}
+
return null;
}
@@ -324,6 +329,4 @@
}
throw new IllegalArgumentException();
}
-
- private boolean isReadOnly;
}
diff --git a/api/src/main/java/javax/el/MapELResolver.java b/api/src/main/java/javax/el/MapELResolver.java
index fadc0dd..07cc967 100644
--- a/api/src/main/java/javax/el/MapELResolver.java
+++ b/api/src/main/java/javax/el/MapELResolver.java
@@ -17,6 +17,8 @@
package javax.el;
+import static java.lang.Boolean.TRUE;
+
import java.beans.FeatureDescriptor;
import java.util.ArrayList;
import java.util.Collections;
@@ -50,11 +52,14 @@
*/
public class MapELResolver extends ELResolver {
+ static private Class<?> theUnmodifiableMapClass = Collections.unmodifiableMap(new HashMap<Object, Object>()).getClass();
+ private boolean isReadOnly;
+
/**
* Creates a new read/write <code>MapELResolver</code>.
*/
public MapELResolver() {
- this.isReadOnly = false;
+ isReadOnly = false;
}
/**
@@ -91,7 +96,6 @@
*/
@Override
public Class<?> getType(ELContext context, Object base, Object property) {
-
if (context == null) {
throw new NullPointerException();
}
@@ -100,6 +104,7 @@
context.setPropertyResolved(true);
return Object.class;
}
+
return null;
}
@@ -132,21 +137,19 @@
*/
@Override
public Object getValue(ELContext context, Object base, Object property) {
-
if (context == null) {
throw new NullPointerException();
}
if (base != null && base instanceof Map) {
context.setPropertyResolved(base, property);
- Map map = (Map) base;
+ Map<?, ?> map = (Map<?, ?>) base;
return map.get(property);
}
+
return null;
}
- static private Class<?> theUnmodifiableMapClass = Collections.unmodifiableMap(new HashMap<Object, Object>()).getClass();
-
/**
* If the base object is a map, attempts to set the value associated with the given key, as specified by the
* <code>property</code> argument.
@@ -184,19 +187,20 @@
*/
@Override
public void setValue(ELContext context, Object base, Object property, Object val) {
-
if (context == null) {
throw new NullPointerException();
}
if (base != null && base instanceof Map) {
context.setPropertyResolved(base, property);
+
// The cast is safe
@SuppressWarnings("unchecked")
- Map<Object, Object> map = (Map) base;
+ Map<Object, Object> map = (Map<Object, Object>) base;
if (isReadOnly || map.getClass() == theUnmodifiableMapClass) {
throw new PropertyNotWritableException();
}
+
try {
map.put(property, val);
} catch (UnsupportedOperationException ex) {
@@ -237,16 +241,16 @@
*/
@Override
public boolean isReadOnly(ELContext context, Object base, Object property) {
-
if (context == null) {
throw new NullPointerException();
}
if (base != null && base instanceof Map) {
context.setPropertyResolved(true);
- Map map = (Map) base;
+ Map<?,?> map = (Map<?,?>) base;
return isReadOnly || map.getClass() == theUnmodifiableMapClass;
}
+
return false;
}
@@ -283,29 +287,33 @@
*/
@Override
public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context, Object base) {
-
if (base != null && base instanceof Map) {
- Map map = (Map) base;
- Iterator iter = map.keySet().iterator();
+ Map<?,?> map = (Map<?,?>) base;
+ Iterator<?> iter = map.keySet().iterator();
List<FeatureDescriptor> list = new ArrayList<FeatureDescriptor>();
+
while (iter.hasNext()) {
Object key = iter.next();
FeatureDescriptor descriptor = new FeatureDescriptor();
- String name = (key == null) ? null : key.toString();
+ String name = key == null ? null : key.toString();
descriptor.setName(name);
descriptor.setDisplayName(name);
descriptor.setShortDescription("");
descriptor.setExpert(false);
descriptor.setHidden(false);
descriptor.setPreferred(true);
+
if (key != null) {
descriptor.setValue("type", key.getClass());
}
- descriptor.setValue("resolvableAtDesignTime", Boolean.TRUE);
+
+ descriptor.setValue("resolvableAtDesignTime", TRUE);
list.add(descriptor);
}
+
return list.iterator();
}
+
return null;
}
@@ -327,8 +335,8 @@
if (base != null && base instanceof Map) {
return Object.class;
}
+
return null;
}
- private boolean isReadOnly;
}
diff --git a/api/src/main/java/javax/el/MethodExpression.java b/api/src/main/java/javax/el/MethodExpression.java
index 60c765e..9e2fe67 100644
--- a/api/src/main/java/javax/el/MethodExpression.java
+++ b/api/src/main/java/javax/el/MethodExpression.java
@@ -48,6 +48,9 @@
* @since JSP 2.1
*/
public abstract class MethodExpression extends Expression {
+
+ private static final long serialVersionUID = -1151639017737837708L;
+
// Evaluation
/**
diff --git a/api/src/main/java/javax/el/MethodInfo.java b/api/src/main/java/javax/el/MethodInfo.java
index 352b8b4..00be7a7 100644
--- a/api/src/main/java/javax/el/MethodInfo.java
+++ b/api/src/main/java/javax/el/MethodInfo.java
@@ -24,6 +24,10 @@
*/
public class MethodInfo {
+ private String name;
+ private Class<?> returnType;
+ private Class<?>[] paramTypes;
+
/**
* Creates a new instance of <code>MethodInfo</code> with the given information.
*
@@ -43,7 +47,7 @@
* @return the name of the method
*/
public String getName() {
- return this.name;
+ return name;
}
/**
@@ -52,7 +56,7 @@
* @return the return type of the method
*/
public Class<?> getReturnType() {
- return this.returnType;
+ return returnType;
}
/**
@@ -61,10 +65,7 @@
* @return the parameter types of the method
*/
public Class<?>[] getParamTypes() {
- return this.paramTypes;
+ return paramTypes;
}
- private String name;
- private Class<?> returnType;
- private Class<?>[] paramTypes;
}
diff --git a/api/src/main/java/javax/el/MethodNotFoundException.java b/api/src/main/java/javax/el/MethodNotFoundException.java
index abbce74..ae7faff 100644
--- a/api/src/main/java/javax/el/MethodNotFoundException.java
+++ b/api/src/main/java/javax/el/MethodNotFoundException.java
@@ -25,6 +25,8 @@
*/
public class MethodNotFoundException extends ELException {
+ private static final long serialVersionUID = 7727548537051164640L;
+
/**
* Creates a <code>MethodNotFoundException</code> with no detail message.
*/
diff --git a/api/src/main/java/javax/el/PropertyNotFoundException.java b/api/src/main/java/javax/el/PropertyNotFoundException.java
index 26a33c9..26d5279 100644
--- a/api/src/main/java/javax/el/PropertyNotFoundException.java
+++ b/api/src/main/java/javax/el/PropertyNotFoundException.java
@@ -29,6 +29,8 @@
*/
public class PropertyNotFoundException extends ELException {
+ private static final long serialVersionUID = 7876728153282609955L;
+
// -------------------------------------
/**
* Creates a <code>PropertyNotFoundException</code> with no detail message.
diff --git a/api/src/main/java/javax/el/PropertyNotWritableException.java b/api/src/main/java/javax/el/PropertyNotWritableException.java
index 468f76e..c62e5db 100644
--- a/api/src/main/java/javax/el/PropertyNotWritableException.java
+++ b/api/src/main/java/javax/el/PropertyNotWritableException.java
@@ -28,7 +28,8 @@
*/
public class PropertyNotWritableException extends ELException {
- // -------------------------------------
+ private static final long serialVersionUID = 4511862414551151572L;
+
/**
* Creates a <code>PropertyNotWritableException</code> with no detail message.
*/
@@ -36,7 +37,6 @@
super();
}
- // -------------------------------------
/**
* Creates a <code>PropertyNotWritableException</code> with the provided detail message.
*
@@ -46,7 +46,6 @@
super(pMessage);
}
- // -------------------------------------
/**
* Creates a <code>PropertyNotWritableException</code> with the given root cause.
*
@@ -56,7 +55,6 @@
super(exception);
}
- // -------------------------------------
/**
* Creates a <code>PropertyNotWritableException</code> with the given detail message and root cause.
*
diff --git a/api/src/main/java/javax/el/ResourceBundleELResolver.java b/api/src/main/java/javax/el/ResourceBundleELResolver.java
index febc585..a69b14f 100644
--- a/api/src/main/java/javax/el/ResourceBundleELResolver.java
+++ b/api/src/main/java/javax/el/ResourceBundleELResolver.java
@@ -17,6 +17,8 @@
package javax.el;
+import static java.lang.Boolean.TRUE;
+
import java.beans.FeatureDescriptor;
import java.util.ArrayList;
import java.util.Enumeration;
@@ -87,6 +89,7 @@
}
}
}
+
return null;
}
@@ -116,6 +119,7 @@
if (base instanceof ResourceBundle) {
context.setPropertyResolved(true);
}
+
return null;
}
@@ -156,10 +160,12 @@
if (context == null) {
throw new NullPointerException();
}
+
if (base instanceof ResourceBundle) {
context.setPropertyResolved(true);
return true;
}
+
return false;
}
@@ -199,6 +205,7 @@
List<FeatureDescriptor> features = new ArrayList<FeatureDescriptor>();
String key = null;
FeatureDescriptor desc = null;
+
for (Enumeration<String> e = bundle.getKeys(); e.hasMoreElements();) {
key = e.nextElement();
desc = new FeatureDescriptor();
@@ -208,11 +215,13 @@
desc.setName(key);
desc.setPreferred(true);
desc.setValue(TYPE, String.class);
- desc.setValue(RESOLVABLE_AT_DESIGN_TIME, Boolean.TRUE);
+ desc.setValue(RESOLVABLE_AT_DESIGN_TIME, TRUE);
features.add(desc);
}
+
return features.iterator();
}
+
return null;
}
@@ -232,6 +241,7 @@
if (base instanceof ResourceBundle) {
return String.class;
}
+
return null;
}
}
diff --git a/api/src/main/java/javax/el/StandardELContext.java b/api/src/main/java/javax/el/StandardELContext.java
index aafca13..a3ef8b5 100644
--- a/api/src/main/java/javax/el/StandardELContext.java
+++ b/api/src/main/java/javax/el/StandardELContext.java
@@ -52,7 +52,7 @@
private FunctionMapper functionMapper;
/*
- * The pre-confured init function map;
+ * The pre-configured init function map;
*/
private Map<String, Method> initFunctionMap;
@@ -65,7 +65,7 @@
* If non-null, indicates the presence of a delegate ELContext. When a Standard is constructed from another ELContext,
* there is no easy way to get its private context map, therefore delegation is needed.
*/
- private ELContext delegate = null;
+ private ELContext delegate;
/**
* A bean repository local to this context
@@ -78,7 +78,7 @@
* @param factory The ExpressionFactory
*/
public StandardELContext(ExpressionFactory factory) {
- this.streamELResolver = factory.getStreamELResolver();
+ streamELResolver = factory.getStreamELResolver();
initFunctionMap = factory.getInitFunctionMap();
}
@@ -88,14 +88,16 @@
* @param context The ELContext that acts as a delegate in most cases
*/
public StandardELContext(ELContext context) {
- this.delegate = context;
+ delegate = context;
+
// Copy all attributes except map and resolved
- CompositeELResolver elr = new CompositeELResolver();
- elr.add(new BeanNameELResolver(new LocalBeanNameResolver()));
+ CompositeELResolver compositeELResolver = new CompositeELResolver();
+ compositeELResolver.add(new BeanNameELResolver(new LocalBeanNameResolver()));
customResolvers = new CompositeELResolver();
- elr.add(customResolvers);
- elr.add(context.getELResolver());
- elResolver = elr;
+
+ compositeELResolver.add(customResolvers);
+ compositeELResolver.add(context.getELResolver());
+ elResolver = compositeELResolver;
functionMapper = context.getFunctionMapper();
variableMapper = context.getVariableMapper();
@@ -113,11 +115,11 @@
@Override
public Object getContext(Class key) {
- if (delegate != null) {
- return delegate.getContext(key);
- } else {
+ if (delegate == null) {
return super.getContext(key);
}
+
+ return delegate.getContext(key);
}
/**
@@ -159,6 +161,7 @@
resolver.add(new BeanELResolver());
elResolver = resolver;
}
+
return elResolver;
}
@@ -192,6 +195,7 @@
if (functionMapper == null) {
functionMapper = new DefaultFunctionMapper(initFunctionMap);
}
+
return functionMapper;
}
@@ -205,12 +209,13 @@
if (variableMapper == null) {
variableMapper = new DefaultVariableMapper();
}
+
return variableMapper;
}
private static class DefaultFunctionMapper extends FunctionMapper {
- private Map<String, Method> functions = null;
+ private Map<String, Method> functions;
DefaultFunctionMapper(Map<String, Method> initMap) {
functions = (initMap == null) ? new HashMap<String, Method>() : new HashMap<String, Method>(initMap);
@@ -229,13 +234,14 @@
private static class DefaultVariableMapper extends VariableMapper {
- private Map<String, ValueExpression> variables = null;
+ private Map<String, ValueExpression> variables;
@Override
public ValueExpression resolveVariable(String variable) {
if (variables == null) {
return null;
}
+
return variables.get(variable);
}
@@ -244,12 +250,14 @@
if (variables == null) {
variables = new HashMap<String, ValueExpression>();
}
+
ValueExpression prev = null;
if (expression == null) {
prev = variables.remove(variable);
} else {
prev = variables.put(variable, expression);
}
+
return prev;
}
}
diff --git a/api/src/main/java/javax/el/StaticFieldELResolver.java b/api/src/main/java/javax/el/StaticFieldELResolver.java
index 384d90c..0d9a670 100644
--- a/api/src/main/java/javax/el/StaticFieldELResolver.java
+++ b/api/src/main/java/javax/el/StaticFieldELResolver.java
@@ -16,6 +16,10 @@
package javax.el;
+import static java.lang.reflect.Modifier.isPublic;
+import static java.lang.reflect.Modifier.isStatic;
+import static javax.el.ELUtil.getExceptionMessageString;
+
import java.beans.FeatureDescriptor;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
@@ -62,7 +66,6 @@
*/
@Override
public Object getValue(ELContext context, Object base, Object property) {
-
if (context == null) {
throw new NullPointerException();
}
@@ -73,6 +76,7 @@
try {
context.setPropertyResolved(base, property);
Field field = klass.getField(fieldName);
+
int mod = field.getModifiers();
if (Modifier.isPublic(mod) && Modifier.isStatic(mod)) {
return field.get(null);
@@ -80,8 +84,10 @@
} catch (NoSuchFieldException ex) {
} catch (IllegalAccessException ex) {
}
+
throw new PropertyNotFoundException(ELUtil.getExceptionMessageString(context, "staticFieldReadError", new Object[] { klass.getName(), fieldName }));
}
+
return null;
}
@@ -106,11 +112,12 @@
if (context == null) {
throw new NullPointerException();
}
+
if (base instanceof ELClass && property instanceof String) {
Class<?> klass = ((ELClass) base).getKlass();
String fieldName = (String) property;
throw new PropertyNotWritableException(
- ELUtil.getExceptionMessageString(context, "staticFieldWriteError", new Object[] { klass.getName(), fieldName }));
+ getExceptionMessageString(context, "staticFieldWriteError", new Object[] { klass.getName(), fieldName }));
}
}
@@ -133,7 +140,7 @@
* As a special case, if the name of the method is "<init>", the constructor for the class will be invoked.
*
* @param base An <code>ELClass</code>
- * @param method When coerced to a <code>String</code>, the simple name of the method.
+ * @param methodName When coerced to a <code>String</code>, the simple name of the method.
* @param paramTypes An array of Class objects identifying the method's formal parameter types, in declared order. Use
* an empty array if the method has no parameters. Can be <code>null</code>, in which case the method's formal parameter
* types are assumed to be unknown.
@@ -146,28 +153,28 @@
* constructor.
*/
@Override
- public Object invoke(ELContext context, Object base, Object method, Class<?>[] paramTypes, Object[] params) {
-
+ public Object invoke(ELContext context, Object base, Object methodName, Class<?>[] paramTypes, Object[] params) {
if (context == null) {
throw new NullPointerException();
}
- if (!(base instanceof ELClass && method instanceof String)) {
+ if (!(base instanceof ELClass && methodName instanceof String)) {
return null;
}
Class<?> klass = ((ELClass) base).getKlass();
- String name = (String) method;
+ String name = (String) methodName;
Object ret;
if ("<init>".equals(name)) {
Constructor<?> constructor = ELUtil.findConstructor(klass, paramTypes, params);
ret = ELUtil.invokeConstructor(context, constructor, params);
} else {
- Method meth = ELUtil.findMethod(klass, name, paramTypes, params, true);
- ret = ELUtil.invokeMethod(context, meth, null, params);
+ Method method = ELUtil.findMethod(klass, name, paramTypes, params, true);
+ ret = ELUtil.invokeMethod(context, method, null, params);
}
- context.setPropertyResolved(base, method);
+ context.setPropertyResolved(base, methodName);
+
return ret;
}
@@ -194,7 +201,6 @@
*/
@Override
public Class<?> getType(ELContext context, Object base, Object property) {
-
if (context == null) {
throw new NullPointerException();
}
@@ -205,14 +211,16 @@
try {
context.setPropertyResolved(true);
Field field = klass.getField(fieldName);
+
int mod = field.getModifiers();
- if (Modifier.isPublic(mod) && Modifier.isStatic(mod)) {
+ if (isPublic(mod) && isStatic(mod)) {
return field.getType();
}
} catch (NoSuchFieldException ex) {
}
- throw new PropertyNotFoundException(ELUtil.getExceptionMessageString(context, "staticFieldReadError", new Object[] { klass.getName(), fieldName }));
+ throw new PropertyNotFoundException(getExceptionMessageString(context, "staticFieldReadError", new Object[] { klass.getName(), fieldName }));
}
+
return null;
}
@@ -244,9 +252,10 @@
}
if (base instanceof ELClass && property instanceof String) {
- Class<?> klass = ((ELClass) base).getKlass();
+ ((ELClass) base).getKlass();
context.setPropertyResolved(true);
}
+
return true;
}
diff --git a/api/src/main/java/javax/el/ValueExpression.java b/api/src/main/java/javax/el/ValueExpression.java
index 6fe1cd7..535ebe0 100644
--- a/api/src/main/java/javax/el/ValueExpression.java
+++ b/api/src/main/java/javax/el/ValueExpression.java
@@ -59,6 +59,8 @@
*/
public abstract class ValueExpression extends Expression {
+ private static final long serialVersionUID = -8466802188968516519L;
+
/**
* Evaluates the expression relative to the provided context, and returns the resulting value.
*
diff --git a/api/src/main/java/javax/el/ValueReference.java b/api/src/main/java/javax/el/ValueReference.java
index b5e5ce7..2869514 100644
--- a/api/src/main/java/javax/el/ValueReference.java
+++ b/api/src/main/java/javax/el/ValueReference.java
@@ -23,14 +23,14 @@
*
* @since EL 2.2
*/
-
public class ValueReference implements Serializable {
+ private static final long serialVersionUID = -4076659531951367109L;
+
private Object base;
private Object property;
public ValueReference(Object base, Object property) {
-
this.base = base;
this.property = property;
}
diff --git a/impl/src/main/java/com/sun/el/ExpressionFactoryImpl.java b/impl/src/main/java/com/sun/el/ExpressionFactoryImpl.java
index af354a3..69e7250 100644
--- a/impl/src/main/java/com/sun/el/ExpressionFactoryImpl.java
+++ b/impl/src/main/java/com/sun/el/ExpressionFactoryImpl.java
@@ -94,8 +94,9 @@
}
public String getProperty(String key) {
- if (properties == null)
+ if (properties == null) {
return null;
+ }
return properties.getProperty(key);
}
diff --git a/impl/src/main/java/com/sun/el/lang/ELArithmetic.java b/impl/src/main/java/com/sun/el/lang/ELArithmetic.java
index c75afdf..ee1bc55 100644
--- a/impl/src/main/java/com/sun/el/lang/ELArithmetic.java
+++ b/impl/src/main/java/com/sun/el/lang/ELArithmetic.java
@@ -16,6 +16,8 @@
package com.sun.el.lang;
+import static java.math.BigDecimal.ROUND_HALF_UP;
+
import java.math.BigDecimal;
import java.math.BigInteger;
@@ -23,7 +25,7 @@
/**
* A helper class of Arithmetic defined by the EL Specification
- *
+ *
* @author Jacob Hookom [jacob@hookom.net]
* @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: kchung $
*/
@@ -38,10 +40,13 @@
@Override
protected Number coerce(Number num) {
- if (num instanceof BigDecimal)
+ if (num instanceof BigDecimal) {
return num;
- if (num instanceof BigInteger)
+ }
+ if (num instanceof BigInteger) {
return new BigDecimal((BigInteger) num);
+ }
+
return new BigDecimal(num.doubleValue());
}
@@ -52,7 +57,7 @@
@Override
protected Number divide(Number num0, Number num1) {
- return ((BigDecimal) num0).divide((BigDecimal) num1, BigDecimal.ROUND_HALF_UP);
+ return ((BigDecimal) num0).divide((BigDecimal) num1, ROUND_HALF_UP);
}
@Override
@@ -85,8 +90,10 @@
@Override
protected Number coerce(Number num) {
- if (num instanceof BigInteger)
+ if (num instanceof BigInteger) {
return num;
+ }
+
return new BigInteger(num.toString());
}
@@ -97,7 +104,7 @@
@Override
protected Number divide(Number num0, Number num1) {
- return (new BigDecimal((BigInteger) num0)).divide(new BigDecimal((BigInteger) num1), BigDecimal.ROUND_HALF_UP);
+ return (new BigDecimal((BigInteger) num0)).divide(new BigDecimal((BigInteger) num1), ROUND_HALF_UP);
}
@Override
@@ -117,7 +124,7 @@
@Override
public boolean matches(Object obj0, Object obj1) {
- return (obj0 instanceof BigInteger || obj1 instanceof BigInteger);
+ return obj0 instanceof BigInteger || obj1 instanceof BigInteger;
}
}
@@ -128,18 +135,23 @@
// could only be one of these
if (num0 instanceof BigDecimal) {
return ((BigDecimal) num0).add(new BigDecimal(num1.doubleValue()));
- } else if (num1 instanceof BigDecimal) {
+ }
+ if (num1 instanceof BigDecimal) {
return ((new BigDecimal(num0.doubleValue()).add((BigDecimal) num1)));
}
+
return Double.valueOf(num0.doubleValue() + num1.doubleValue());
}
@Override
protected Number coerce(Number num) {
- if (num instanceof Double)
+ if (num instanceof Double) {
return num;
- if (num instanceof BigInteger)
+ }
+ if (num instanceof BigInteger) {
return new BigDecimal((BigInteger) num);
+ }
+
return Double.valueOf(num.doubleValue());
}
@@ -163,9 +175,12 @@
// could only be one of these
if (num0 instanceof BigDecimal) {
return ((BigDecimal) num0).subtract(new BigDecimal(num1.doubleValue()));
- } else if (num1 instanceof BigDecimal) {
+ }
+
+ if (num1 instanceof BigDecimal) {
return ((new BigDecimal(num0.doubleValue()).subtract((BigDecimal) num1)));
}
+
return Double.valueOf(num0.doubleValue() - num1.doubleValue());
}
@@ -174,9 +189,11 @@
// could only be one of these
if (num0 instanceof BigDecimal) {
return ((BigDecimal) num0).multiply(new BigDecimal(num1.doubleValue()));
- } else if (num1 instanceof BigDecimal) {
+ }
+ if (num1 instanceof BigDecimal) {
return ((new BigDecimal(num0.doubleValue()).multiply((BigDecimal) num1)));
}
+
return Double.valueOf(num0.doubleValue() * num1.doubleValue());
}
@@ -199,8 +216,10 @@
@Override
protected Number coerce(Number num) {
- if (num instanceof Long)
+ if (num instanceof Long) {
return num;
+ }
+
return Long.valueOf(num.longValue());
}
@@ -231,19 +250,15 @@
@Override
public boolean matches(Object obj0, Object obj1) {
- return (obj0 instanceof Long || obj1 instanceof Long);
+ return obj0 instanceof Long || obj1 instanceof Long;
}
}
- public final static BigDecimalDelegate BIGDECIMAL = new BigDecimalDelegate();
-
- public final static BigIntegerDelegate BIGINTEGER = new BigIntegerDelegate();
-
- public final static DoubleDelegate DOUBLE = new DoubleDelegate();
-
- public final static LongDelegate LONG = new LongDelegate();
-
- private final static Long ZERO = Long.valueOf(0);
+ public static final BigDecimalDelegate BIGDECIMAL = new BigDecimalDelegate();
+ public static final BigIntegerDelegate BIGINTEGER = new BigIntegerDelegate();
+ public static final DoubleDelegate DOUBLE = new DoubleDelegate();
+ public static final LongDelegate LONG = new LongDelegate();
+ private static final Long ZERO = Long.valueOf(0);
public final static Number add(final Object obj0, final Object obj1) {
if (obj0 == null && obj1 == null) {
@@ -251,14 +266,15 @@
}
final ELArithmetic delegate;
- if (BIGDECIMAL.matches(obj0, obj1))
+ if (BIGDECIMAL.matches(obj0, obj1)) {
delegate = BIGDECIMAL;
- else if (DOUBLE.matches(obj0, obj1))
+ } else if (DOUBLE.matches(obj0, obj1)) {
delegate = DOUBLE;
- else if (BIGINTEGER.matches(obj0, obj1))
+ } else if (BIGINTEGER.matches(obj0, obj1)) {
delegate = BIGINTEGER;
- else
+ } else {
delegate = LONG;
+ }
Number num0 = delegate.coerce(obj0);
Number num1 = delegate.coerce(obj1);
@@ -272,14 +288,15 @@
}
final ELArithmetic delegate;
- if (BIGDECIMAL.matches(obj0, obj1))
+ if (BIGDECIMAL.matches(obj0, obj1)) {
delegate = BIGDECIMAL;
- else if (DOUBLE.matches(obj0, obj1))
+ } else if (DOUBLE.matches(obj0, obj1)) {
delegate = DOUBLE;
- else if (BIGINTEGER.matches(obj0, obj1))
+ } else if (BIGINTEGER.matches(obj0, obj1)) {
delegate = BIGINTEGER;
- else
+ } else {
delegate = LONG;
+ }
Number num0 = delegate.coerce(obj0);
Number num1 = delegate.coerce(obj1);
@@ -293,14 +310,15 @@
}
final ELArithmetic delegate;
- if (BIGDECIMAL.matches(obj0, obj1))
+ if (BIGDECIMAL.matches(obj0, obj1)) {
delegate = BIGDECIMAL;
- else if (DOUBLE.matches(obj0, obj1))
+ } else if (DOUBLE.matches(obj0, obj1)) {
delegate = DOUBLE;
- else if (BIGINTEGER.matches(obj0, obj1))
+ } else if (BIGINTEGER.matches(obj0, obj1)) {
delegate = BIGINTEGER;
- else
+ } else {
delegate = LONG;
+ }
Number num0 = delegate.coerce(obj0);
Number num1 = delegate.coerce(obj1);
@@ -314,12 +332,13 @@
}
final ELArithmetic delegate;
- if (BIGDECIMAL.matches(obj0, obj1))
+ if (BIGDECIMAL.matches(obj0, obj1)) {
delegate = BIGDECIMAL;
- else if (BIGINTEGER.matches(obj0, obj1))
+ } else if (BIGINTEGER.matches(obj0, obj1)) {
delegate = BIGDECIMAL;
- else
+ } else {
delegate = DOUBLE;
+ }
Number num0 = delegate.coerce(obj0);
Number num1 = delegate.coerce(obj1);
@@ -333,14 +352,15 @@
}
final ELArithmetic delegate;
- if (BIGDECIMAL.matches(obj0, obj1))
+ if (BIGDECIMAL.matches(obj0, obj1)) {
delegate = BIGDECIMAL;
- else if (DOUBLE.matches(obj0, obj1))
+ } else if (DOUBLE.matches(obj0, obj1)) {
delegate = DOUBLE;
- else if (BIGINTEGER.matches(obj0, obj1))
+ } else if (BIGINTEGER.matches(obj0, obj1)) {
delegate = BIGINTEGER;
- else
+ } else {
delegate = LONG;
+ }
Number num0 = delegate.coerce(obj0);
Number num1 = delegate.coerce(obj1);
diff --git a/impl/src/main/java/com/sun/el/lang/ELSupport.java b/impl/src/main/java/com/sun/el/lang/ELSupport.java
index ad4dc75..a82901c 100644
--- a/impl/src/main/java/com/sun/el/lang/ELSupport.java
+++ b/impl/src/main/java/com/sun/el/lang/ELSupport.java
@@ -371,8 +371,9 @@
}
if (obj instanceof String) {
- if ("".equals(obj))
+ if ("".equals(obj)) {
return null;
+ }
PropertyEditor editor = PropertyEditorManager.findEditor(type);
if (editor != null) {
editor.setAsText((String) obj);
diff --git a/impl/src/main/java/com/sun/el/lang/ExpressionBuilder.java b/impl/src/main/java/com/sun/el/lang/ExpressionBuilder.java
index f8de729..9fc2ec9 100644
--- a/impl/src/main/java/com/sun/el/lang/ExpressionBuilder.java
+++ b/impl/src/main/java/com/sun/el/lang/ExpressionBuilder.java
@@ -128,12 +128,12 @@
}
}
- public final static Node createNode(String expr) throws ELException {
+ public static Node createNode(String expr) throws ELException {
Node n = createNodeInternal(expr);
return n;
}
- private final static Node createNodeInternal(String expr) throws ELException {
+ private static Node createNodeInternal(String expr) throws ELException {
if (expr == null) {
throw new ELException(MessageFactory.get("error.null"));
}
@@ -155,11 +155,12 @@
Node child = null;
for (int i = 0; i < numChildren; i++) {
child = n.jjtGetChild(i);
- if (child instanceof AstLiteralExpression)
+ if (child instanceof AstLiteralExpression) {
continue;
- if (type == null)
+ }
+ if (type == null) {
type = child.getClass();
- else {
+ } else {
if (!type.equals(child.getClass())) {
throw new ELException(MessageFactory.get("error.mixed", expr));
}
diff --git a/impl/src/main/java/com/sun/el/lang/FunctionMapperFactory.java b/impl/src/main/java/com/sun/el/lang/FunctionMapperFactory.java
index bac102b..3bb0157 100644
--- a/impl/src/main/java/com/sun/el/lang/FunctionMapperFactory.java
+++ b/impl/src/main/java/com/sun/el/lang/FunctionMapperFactory.java
@@ -38,7 +38,7 @@
/*
* (non-Javadoc)
- *
+ *
* @see javax.el.FunctionMapper#resolveFunction(java.lang.String, java.lang.String)
*/
@Override
diff --git a/impl/src/main/java/com/sun/el/lang/FunctionMapperImpl.java b/impl/src/main/java/com/sun/el/lang/FunctionMapperImpl.java
index 871f028..970bc0e 100644
--- a/impl/src/main/java/com/sun/el/lang/FunctionMapperImpl.java
+++ b/impl/src/main/java/com/sun/el/lang/FunctionMapperImpl.java
@@ -149,8 +149,9 @@
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
this.prefix = in.readUTF();
- if ("".equals(this.prefix))
+ if ("".equals(this.prefix)) {
this.prefix = null;
+ }
this.localName = in.readUTF();
this.owner = in.readUTF();
this.name = in.readUTF();
@@ -172,17 +173,19 @@
public boolean matches(String prefix, String localName) {
if (this.prefix != null) {
- if (prefix == null)
+ if (prefix == null) {
return false;
- if (!this.prefix.equals(prefix))
+ }
+ if (!this.prefix.equals(prefix)) {
return false;
+ }
}
return this.localName.equals(localName);
}
/*
* (non-Javadoc)
- *
+ *
* @see java.lang.Object#equals(java.lang.Object)
*/
@Override
@@ -195,7 +198,7 @@
/*
* (non-Javadoc)
- *
+ *
* @see java.lang.Object#hashCode()
*/
@Override
diff --git a/impl/src/main/java/com/sun/el/parser/AstIdentifier.java b/impl/src/main/java/com/sun/el/parser/AstIdentifier.java
index e009e57..a5a149b 100644
--- a/impl/src/main/java/com/sun/el/parser/AstIdentifier.java
+++ b/impl/src/main/java/com/sun/el/parser/AstIdentifier.java
@@ -145,7 +145,7 @@
}
}
- private final Object invokeTarget(EvaluationContext ctx, Object target, Object[] paramValues) throws ELException {
+ private Object invokeTarget(EvaluationContext ctx, Object target, Object[] paramValues) throws ELException {
if (target instanceof MethodExpression) {
MethodExpression me = (MethodExpression) target;
return me.invoke(ctx.getELContext(), paramValues);
@@ -167,7 +167,7 @@
return this.getMethodExpression(ctx).getMethodInfo(ctx.getELContext());
}
- private final MethodExpression getMethodExpression(EvaluationContext ctx) throws ELException {
+ private MethodExpression getMethodExpression(EvaluationContext ctx) throws ELException {
Object obj = null;
// case A: ValueExpression exists, getValue which must
diff --git a/impl/src/main/java/com/sun/el/parser/AstMethodArguments.java b/impl/src/main/java/com/sun/el/parser/AstMethodArguments.java
index ff0efa9..24ef021 100644
--- a/impl/src/main/java/com/sun/el/parser/AstMethodArguments.java
+++ b/impl/src/main/java/com/sun/el/parser/AstMethodArguments.java
@@ -34,8 +34,9 @@
public Object[] getParameters(EvaluationContext ctx) throws ELException {
- if (this.children == null)
+ if (this.children == null) {
return new Object[] {};
+ }
Object[] obj = new Object[this.children.length];
for (int i = 0; i < obj.length; i++) {
diff --git a/impl/src/main/java/com/sun/el/parser/AstValue.java b/impl/src/main/java/com/sun/el/parser/AstValue.java
index d306c44..dfe0f82 100644
--- a/impl/src/main/java/com/sun/el/parser/AstValue.java
+++ b/impl/src/main/java/com/sun/el/parser/AstValue.java
@@ -120,7 +120,7 @@
return value;
}
- private final Object getBase(EvaluationContext ctx) {
+ private Object getBase(EvaluationContext ctx) {
try {
return this.children[0].getValue(ctx);
} catch (PropertyNotFoundException ex) {
@@ -139,7 +139,7 @@
}
}
- private final Target getTarget(EvaluationContext ctx) throws ELException {
+ private Target getTarget(EvaluationContext ctx) throws ELException {
// evaluate expr-a to value-a
Object base = getBase(ctx);
diff --git a/impl/src/main/java/com/sun/el/parser/ELParser.java b/impl/src/main/java/com/sun/el/parser/ELParser.java
index ac13340..37d0c91 100644
--- a/impl/src/main/java/com/sun/el/parser/ELParser.java
+++ b/impl/src/main/java/com/sun/el/parser/ELParser.java
@@ -72,8 +72,9 @@
jjtree.closeNodeScope(jjtn000, true);
jjtc000 = false;
{
- if (true)
+ if (true) {
return jjtn000;
+ }
}
} catch (Throwable jjte000) {
if (jjtc000) {
@@ -84,19 +85,22 @@
}
if (jjte000 instanceof RuntimeException) {
{
- if (true)
+ if (true) {
throw (RuntimeException) jjte000;
+ }
}
}
if (jjte000 instanceof ParseException) {
{
- if (true)
+ if (true) {
throw (ParseException) jjte000;
+ }
}
}
{
- if (true)
+ if (true) {
throw (Error) jjte000;
+ }
}
} finally {
if (jjtc000) {
@@ -148,19 +152,22 @@
}
if (jjte000 instanceof RuntimeException) {
{
- if (true)
+ if (true) {
throw (RuntimeException) jjte000;
+ }
}
}
if (jjte000 instanceof ParseException) {
{
- if (true)
+ if (true) {
throw (ParseException) jjte000;
+ }
}
}
{
- if (true)
+ if (true) {
throw (Error) jjte000;
+ }
}
} finally {
if (jjtc000) {
@@ -190,19 +197,22 @@
}
if (jjte000 instanceof RuntimeException) {
{
- if (true)
+ if (true) {
throw (RuntimeException) jjte000;
+ }
}
}
if (jjte000 instanceof ParseException) {
{
- if (true)
+ if (true) {
throw (ParseException) jjte000;
+ }
}
}
{
- if (true)
+ if (true) {
throw (Error) jjte000;
+ }
}
} finally {
if (jjtc000) {
@@ -247,19 +257,22 @@
}
if (jjte001 instanceof RuntimeException) {
{
- if (true)
+ if (true) {
throw (RuntimeException) jjte001;
+ }
}
}
if (jjte001 instanceof ParseException) {
{
- if (true)
+ if (true) {
throw (ParseException) jjte001;
+ }
}
}
{
- if (true)
+ if (true) {
throw (Error) jjte001;
+ }
}
} finally {
if (jjtc001) {
@@ -309,19 +322,22 @@
}
if (jjte001 instanceof RuntimeException) {
{
- if (true)
+ if (true) {
throw (RuntimeException) jjte001;
+ }
}
}
if (jjte001 instanceof ParseException) {
{
- if (true)
+ if (true) {
throw (ParseException) jjte001;
+ }
}
}
{
- if (true)
+ if (true) {
throw (Error) jjte001;
+ }
}
} finally {
if (jjtc001) {
@@ -388,19 +404,22 @@
}
if (jjte000 instanceof RuntimeException) {
{
- if (true)
+ if (true) {
throw (RuntimeException) jjte000;
+ }
}
}
if (jjte000 instanceof ParseException) {
{
- if (true)
+ if (true) {
throw (ParseException) jjte000;
+ }
}
}
{
- if (true)
+ if (true) {
throw (Error) jjte000;
+ }
}
} finally {
if (jjtc000) {
@@ -457,19 +476,22 @@
}
if (jjte000 instanceof RuntimeException) {
{
- if (true)
+ if (true) {
throw (RuntimeException) jjte000;
+ }
}
}
if (jjte000 instanceof ParseException) {
{
- if (true)
+ if (true) {
throw (ParseException) jjte000;
+ }
}
}
{
- if (true)
+ if (true) {
throw (Error) jjte000;
+ }
}
} finally {
if (jjtc000) {
@@ -502,19 +524,22 @@
}
if (jjte001 instanceof RuntimeException) {
{
- if (true)
+ if (true) {
throw (RuntimeException) jjte001;
+ }
}
}
if (jjte001 instanceof ParseException) {
{
- if (true)
+ if (true) {
throw (ParseException) jjte001;
+ }
}
}
{
- if (true)
+ if (true) {
throw (Error) jjte001;
+ }
}
} finally {
if (jjtc001) {
@@ -569,19 +594,22 @@
}
if (jjte001 instanceof RuntimeException) {
{
- if (true)
+ if (true) {
throw (RuntimeException) jjte001;
+ }
}
}
if (jjte001 instanceof ParseException) {
{
- if (true)
+ if (true) {
throw (ParseException) jjte001;
+ }
}
}
{
- if (true)
+ if (true) {
throw (Error) jjte001;
+ }
}
} finally {
if (jjtc001) {
@@ -632,19 +660,22 @@
}
if (jjte001 instanceof RuntimeException) {
{
- if (true)
+ if (true) {
throw (RuntimeException) jjte001;
+ }
}
}
if (jjte001 instanceof ParseException) {
{
- if (true)
+ if (true) {
throw (ParseException) jjte001;
+ }
}
}
{
- if (true)
+ if (true) {
throw (Error) jjte001;
+ }
}
} finally {
if (jjtc001) {
@@ -700,19 +731,22 @@
}
if (jjte001 instanceof RuntimeException) {
{
- if (true)
+ if (true) {
throw (RuntimeException) jjte001;
+ }
}
}
if (jjte001 instanceof ParseException) {
{
- if (true)
+ if (true) {
throw (ParseException) jjte001;
+ }
}
}
{
- if (true)
+ if (true) {
throw (Error) jjte001;
+ }
}
} finally {
if (jjtc001) {
@@ -748,19 +782,22 @@
}
if (jjte002 instanceof RuntimeException) {
{
- if (true)
+ if (true) {
throw (RuntimeException) jjte002;
+ }
}
}
if (jjte002 instanceof ParseException) {
{
- if (true)
+ if (true) {
throw (ParseException) jjte002;
+ }
}
}
{
- if (true)
+ if (true) {
throw (Error) jjte002;
+ }
}
} finally {
if (jjtc002) {
@@ -826,19 +863,22 @@
}
if (jjte001 instanceof RuntimeException) {
{
- if (true)
+ if (true) {
throw (RuntimeException) jjte001;
+ }
}
}
if (jjte001 instanceof ParseException) {
{
- if (true)
+ if (true) {
throw (ParseException) jjte001;
+ }
}
}
{
- if (true)
+ if (true) {
throw (Error) jjte001;
+ }
}
} finally {
if (jjtc001) {
@@ -874,19 +914,22 @@
}
if (jjte002 instanceof RuntimeException) {
{
- if (true)
+ if (true) {
throw (RuntimeException) jjte002;
+ }
}
}
if (jjte002 instanceof ParseException) {
{
- if (true)
+ if (true) {
throw (ParseException) jjte002;
+ }
}
}
{
- if (true)
+ if (true) {
throw (Error) jjte002;
+ }
}
} finally {
if (jjtc002) {
@@ -922,19 +965,22 @@
}
if (jjte003 instanceof RuntimeException) {
{
- if (true)
+ if (true) {
throw (RuntimeException) jjte003;
+ }
}
}
if (jjte003 instanceof ParseException) {
{
- if (true)
+ if (true) {
throw (ParseException) jjte003;
+ }
}
}
{
- if (true)
+ if (true) {
throw (Error) jjte003;
+ }
}
} finally {
if (jjtc003) {
@@ -970,19 +1016,22 @@
}
if (jjte004 instanceof RuntimeException) {
{
- if (true)
+ if (true) {
throw (RuntimeException) jjte004;
+ }
}
}
if (jjte004 instanceof ParseException) {
{
- if (true)
+ if (true) {
throw (ParseException) jjte004;
+ }
}
}
{
- if (true)
+ if (true) {
throw (Error) jjte004;
+ }
}
} finally {
if (jjtc004) {
@@ -1027,19 +1076,22 @@
}
if (jjte001 instanceof RuntimeException) {
{
- if (true)
+ if (true) {
throw (RuntimeException) jjte001;
+ }
}
}
if (jjte001 instanceof ParseException) {
{
- if (true)
+ if (true) {
throw (ParseException) jjte001;
+ }
}
}
{
- if (true)
+ if (true) {
throw (Error) jjte001;
+ }
}
} finally {
if (jjtc001) {
@@ -1081,19 +1133,22 @@
}
if (jjte001 instanceof RuntimeException) {
{
- if (true)
+ if (true) {
throw (RuntimeException) jjte001;
+ }
}
}
if (jjte001 instanceof ParseException) {
{
- if (true)
+ if (true) {
throw (ParseException) jjte001;
+ }
}
}
{
- if (true)
+ if (true) {
throw (Error) jjte001;
+ }
}
} finally {
if (jjtc001) {
@@ -1117,19 +1172,22 @@
}
if (jjte002 instanceof RuntimeException) {
{
- if (true)
+ if (true) {
throw (RuntimeException) jjte002;
+ }
}
}
if (jjte002 instanceof ParseException) {
{
- if (true)
+ if (true) {
throw (ParseException) jjte002;
+ }
}
}
{
- if (true)
+ if (true) {
throw (Error) jjte002;
+ }
}
} finally {
if (jjtc002) {
@@ -1180,19 +1238,22 @@
}
if (jjte001 instanceof RuntimeException) {
{
- if (true)
+ if (true) {
throw (RuntimeException) jjte001;
+ }
}
}
if (jjte001 instanceof ParseException) {
{
- if (true)
+ if (true) {
throw (ParseException) jjte001;
+ }
}
}
{
- if (true)
+ if (true) {
throw (Error) jjte001;
+ }
}
} finally {
if (jjtc001) {
@@ -1228,19 +1289,22 @@
}
if (jjte002 instanceof RuntimeException) {
{
- if (true)
+ if (true) {
throw (RuntimeException) jjte002;
+ }
}
}
if (jjte002 instanceof ParseException) {
{
- if (true)
+ if (true) {
throw (ParseException) jjte002;
+ }
}
}
{
- if (true)
+ if (true) {
throw (Error) jjte002;
+ }
}
} finally {
if (jjtc002) {
@@ -1276,19 +1340,22 @@
}
if (jjte003 instanceof RuntimeException) {
{
- if (true)
+ if (true) {
throw (RuntimeException) jjte003;
+ }
}
}
if (jjte003 instanceof ParseException) {
{
- if (true)
+ if (true) {
throw (ParseException) jjte003;
+ }
}
}
{
- if (true)
+ if (true) {
throw (Error) jjte003;
+ }
}
} finally {
if (jjtc003) {
@@ -1325,19 +1392,22 @@
}
if (jjte001 instanceof RuntimeException) {
{
- if (true)
+ if (true) {
throw (RuntimeException) jjte001;
+ }
}
}
if (jjte001 instanceof ParseException) {
{
- if (true)
+ if (true) {
throw (ParseException) jjte001;
+ }
}
}
{
- if (true)
+ if (true) {
throw (Error) jjte001;
+ }
}
} finally {
if (jjtc001) {
@@ -1373,19 +1443,22 @@
}
if (jjte002 instanceof RuntimeException) {
{
- if (true)
+ if (true) {
throw (RuntimeException) jjte002;
+ }
}
}
if (jjte002 instanceof ParseException) {
{
- if (true)
+ if (true) {
throw (ParseException) jjte002;
+ }
}
}
{
- if (true)
+ if (true) {
throw (Error) jjte002;
+ }
}
} finally {
if (jjtc002) {
@@ -1409,19 +1482,22 @@
}
if (jjte003 instanceof RuntimeException) {
{
- if (true)
+ if (true) {
throw (RuntimeException) jjte003;
+ }
}
}
if (jjte003 instanceof ParseException) {
{
- if (true)
+ if (true) {
throw (ParseException) jjte003;
+ }
}
}
{
- if (true)
+ if (true) {
throw (Error) jjte003;
+ }
}
} finally {
if (jjtc003) {
@@ -1478,19 +1554,22 @@
}
if (jjte001 instanceof RuntimeException) {
{
- if (true)
+ if (true) {
throw (RuntimeException) jjte001;
+ }
}
}
if (jjte001 instanceof ParseException) {
{
- if (true)
+ if (true) {
throw (ParseException) jjte001;
+ }
}
}
{
- if (true)
+ if (true) {
throw (Error) jjte001;
+ }
}
} finally {
if (jjtc001) {
@@ -1573,19 +1652,22 @@
}
if (jjte000 instanceof RuntimeException) {
{
- if (true)
+ if (true) {
throw (RuntimeException) jjte000;
+ }
}
}
if (jjte000 instanceof ParseException) {
{
- if (true)
+ if (true) {
throw (ParseException) jjte000;
+ }
}
}
{
- if (true)
+ if (true) {
throw (Error) jjte000;
+ }
}
} finally {
if (jjtc000) {
@@ -1623,19 +1705,22 @@
}
if (jjte000 instanceof RuntimeException) {
{
- if (true)
+ if (true) {
throw (RuntimeException) jjte000;
+ }
}
}
if (jjte000 instanceof ParseException) {
{
- if (true)
+ if (true) {
throw (ParseException) jjte000;
+ }
}
}
{
- if (true)
+ if (true) {
throw (Error) jjte000;
+ }
}
} finally {
if (jjtc000) {
@@ -1697,19 +1782,22 @@
}
if (jjte000 instanceof RuntimeException) {
{
- if (true)
+ if (true) {
throw (RuntimeException) jjte000;
+ }
}
}
if (jjte000 instanceof ParseException) {
{
- if (true)
+ if (true) {
throw (ParseException) jjte000;
+ }
}
}
{
- if (true)
+ if (true) {
throw (Error) jjte000;
+ }
}
} finally {
if (jjtc000) {
@@ -1777,19 +1865,22 @@
}
if (jjte000 instanceof RuntimeException) {
{
- if (true)
+ if (true) {
throw (RuntimeException) jjte000;
+ }
}
}
if (jjte000 instanceof ParseException) {
{
- if (true)
+ if (true) {
throw (ParseException) jjte000;
+ }
}
}
{
- if (true)
+ if (true) {
throw (Error) jjte000;
+ }
}
} finally {
if (jjtc000) {
@@ -1886,19 +1977,22 @@
}
if (jjte000 instanceof RuntimeException) {
{
- if (true)
+ if (true) {
throw (RuntimeException) jjte000;
+ }
}
}
if (jjte000 instanceof ParseException) {
{
- if (true)
+ if (true) {
throw (ParseException) jjte000;
+ }
}
}
{
- if (true)
+ if (true) {
throw (Error) jjte000;
+ }
}
} finally {
if (jjtc000) {
@@ -1932,19 +2026,22 @@
}
if (jjte000 instanceof RuntimeException) {
{
- if (true)
+ if (true) {
throw (RuntimeException) jjte000;
+ }
}
}
if (jjte000 instanceof ParseException) {
{
- if (true)
+ if (true) {
throw (ParseException) jjte000;
+ }
}
}
{
- if (true)
+ if (true) {
throw (Error) jjte000;
+ }
}
} finally {
if (jjtc000) {
@@ -2003,19 +2100,22 @@
}
if (jjte000 instanceof RuntimeException) {
{
- if (true)
+ if (true) {
throw (RuntimeException) jjte000;
+ }
}
}
if (jjte000 instanceof ParseException) {
{
- if (true)
+ if (true) {
throw (ParseException) jjte000;
+ }
}
}
{
- if (true)
+ if (true) {
throw (Error) jjte000;
+ }
}
} finally {
if (jjtc000) {
@@ -2092,19 +2192,22 @@
}
if (jjte000 instanceof RuntimeException) {
{
- if (true)
+ if (true) {
throw (RuntimeException) jjte000;
+ }
}
}
if (jjte000 instanceof ParseException) {
{
- if (true)
+ if (true) {
throw (ParseException) jjte000;
+ }
}
}
{
- if (true)
+ if (true) {
throw (Error) jjte000;
+ }
}
} finally {
if (jjtc000) {
@@ -2318,26 +2421,31 @@
}
private boolean jj_3R_89() {
- if (jj_scan_token(LBRACK))
+ if (jj_scan_token(LBRACK)) {
return true;
+ }
Token xsp;
xsp = jj_scanpos;
- if (jj_3R_102())
+ if (jj_3R_102()) {
jj_scanpos = xsp;
- if (jj_scan_token(RBRACK))
+ }
+ if (jj_scan_token(RBRACK)) {
return true;
+ }
return false;
}
private boolean jj_3R_33() {
- if (jj_scan_token(COMMA))
+ if (jj_scan_token(COMMA)) {
return true;
+ }
return false;
}
private boolean jj_3R_31() {
- if (jj_3R_34())
+ if (jj_3R_34()) {
return true;
+ }
Token xsp;
while (true) {
xsp = jj_scanpos;
@@ -2350,72 +2458,85 @@
}
private boolean jj_3R_47() {
- if (jj_scan_token(QUESTIONMARK))
+ if (jj_scan_token(QUESTIONMARK)) {
return true;
+ }
return false;
}
private boolean jj_3R_103() {
- if (jj_3R_35())
+ if (jj_3R_35()) {
return true;
+ }
return false;
}
private boolean jj_3R_101() {
- if (jj_3R_103())
+ if (jj_3R_103()) {
return true;
+ }
return false;
}
private boolean jj_3R_27() {
- if (jj_3R_31())
+ if (jj_3R_31()) {
return true;
+ }
Token xsp;
xsp = jj_scanpos;
- if (jj_3R_47())
+ if (jj_3R_47()) {
jj_scanpos = xsp;
+ }
return false;
}
private boolean jj_3R_79() {
- if (jj_3R_89())
+ if (jj_3R_89()) {
return true;
+ }
return false;
}
private boolean jj_3R_88() {
- if (jj_scan_token(START_MAP))
+ if (jj_scan_token(START_MAP)) {
return true;
+ }
Token xsp;
xsp = jj_scanpos;
- if (jj_3R_101())
+ if (jj_3R_101()) {
jj_scanpos = xsp;
- if (jj_scan_token(RCURL))
+ }
+ if (jj_scan_token(RCURL)) {
return true;
+ }
return false;
}
private boolean jj_3R_78() {
- if (jj_3R_88())
+ if (jj_3R_88()) {
return true;
+ }
return false;
}
private boolean jj_3R_77() {
- if (jj_3R_29())
+ if (jj_3R_29()) {
return true;
+ }
return false;
}
private boolean jj_3_5() {
- if (jj_3R_19())
+ if (jj_3R_19()) {
return true;
+ }
return false;
}
private boolean jj_3R_30() {
- if (jj_3R_29())
+ if (jj_3R_29()) {
return true;
+ }
Token xsp;
while (true) {
xsp = jj_scanpos;
@@ -2428,22 +2549,26 @@
}
private boolean jj_3R_76() {
- if (jj_scan_token(LPAREN))
+ if (jj_scan_token(LPAREN)) {
return true;
- if (jj_3R_35())
+ }
+ if (jj_3R_35()) {
return true;
+ }
return false;
}
private boolean jj_3R_36() {
- if (jj_scan_token(COMMA))
+ if (jj_scan_token(COMMA)) {
return true;
+ }
return false;
}
private boolean jj_3_4() {
- if (jj_3R_18())
+ if (jj_3R_18()) {
return true;
+ }
return false;
}
@@ -2460,8 +2585,9 @@
jj_scanpos = xsp;
if (jj_3R_78()) {
jj_scanpos = xsp;
- if (jj_3R_79())
+ if (jj_3R_79()) {
return true;
+ }
}
}
}
@@ -2471,14 +2597,17 @@
}
private boolean jj_3R_26() {
- if (jj_scan_token(LPAREN))
+ if (jj_scan_token(LPAREN)) {
return true;
+ }
Token xsp;
xsp = jj_scanpos;
- if (jj_3R_30())
+ if (jj_3R_30()) {
jj_scanpos = xsp;
- if (jj_scan_token(RPAREN))
+ }
+ if (jj_scan_token(RPAREN)) {
return true;
+ }
return false;
}
@@ -2487,54 +2616,63 @@
xsp = jj_scanpos;
if (jj_3R_25()) {
jj_scanpos = xsp;
- if (jj_3R_26())
+ if (jj_3R_26()) {
return true;
+ }
}
return false;
}
private boolean jj_3R_25() {
- if (jj_3R_29())
+ if (jj_3R_29()) {
return true;
+ }
return false;
}
private boolean jj_3R_45() {
- if (jj_scan_token(ASSIGN))
+ if (jj_scan_token(ASSIGN)) {
return true;
+ }
return false;
}
private boolean jj_3_2() {
- if (jj_3R_17())
+ if (jj_3R_17()) {
return true;
+ }
return false;
}
private boolean jj_3_3() {
- if (jj_3R_17())
+ if (jj_3R_17()) {
return true;
+ }
return false;
}
private boolean jj_3R_17() {
- if (jj_3R_20())
+ if (jj_3R_20()) {
return true;
- if (jj_scan_token(ARROW))
+ }
+ if (jj_scan_token(ARROW)) {
return true;
+ }
Token xsp;
xsp = jj_scanpos;
if (jj_3_2()) {
jj_scanpos = xsp;
- if (jj_3R_21())
+ if (jj_3R_21()) {
return true;
+ }
}
return false;
}
private boolean jj_3R_32() {
- if (jj_3R_35())
+ if (jj_3R_35()) {
return true;
+ }
Token xsp;
while (true) {
xsp = jj_scanpos;
@@ -2547,35 +2685,42 @@
}
private boolean jj_3R_41() {
- if (jj_scan_token(SEMICOLON))
+ if (jj_scan_token(SEMICOLON)) {
return true;
+ }
return false;
}
private boolean jj_3R_18() {
- if (jj_scan_token(LPAREN))
+ if (jj_scan_token(LPAREN)) {
return true;
- if (jj_3R_20())
+ }
+ if (jj_3R_20()) {
return true;
- if (jj_scan_token(ARROW))
+ }
+ if (jj_scan_token(ARROW)) {
return true;
+ }
Token xsp;
xsp = jj_scanpos;
if (jj_3_3()) {
jj_scanpos = xsp;
- if (jj_3R_22())
+ if (jj_3R_22()) {
return true;
+ }
}
return false;
}
private boolean jj_3R_43() {
- if (jj_3R_27())
+ if (jj_3R_27()) {
return true;
+ }
Token xsp;
xsp = jj_scanpos;
- if (jj_3R_45())
+ if (jj_3R_45()) {
jj_scanpos = xsp;
+ }
return false;
}
@@ -2584,33 +2729,39 @@
xsp = jj_scanpos;
if (jj_3_1()) {
jj_scanpos = xsp;
- if (jj_3R_43())
+ if (jj_3R_43()) {
return true;
+ }
}
return false;
}
private boolean jj_3_1() {
- if (jj_3R_17())
+ if (jj_3R_17()) {
return true;
+ }
return false;
}
private boolean jj_3R_28() {
- if (jj_scan_token(LPAREN))
+ if (jj_scan_token(LPAREN)) {
return true;
+ }
Token xsp;
xsp = jj_scanpos;
- if (jj_3R_32())
+ if (jj_3R_32()) {
jj_scanpos = xsp;
- if (jj_scan_token(RPAREN))
+ }
+ if (jj_scan_token(RPAREN)) {
return true;
+ }
return false;
}
private boolean jj_3R_38() {
- if (jj_3R_40())
+ if (jj_3R_40()) {
return true;
+ }
Token xsp;
while (true) {
xsp = jj_scanpos;
@@ -2623,32 +2774,37 @@
}
private boolean jj_3R_100() {
- if (jj_scan_token(LBRACK))
+ if (jj_scan_token(LBRACK)) {
return true;
+ }
return false;
}
private boolean jj_3R_35() {
- if (jj_3R_38())
+ if (jj_3R_38()) {
return true;
+ }
return false;
}
private boolean jj_3R_98() {
- if (jj_3R_100())
+ if (jj_3R_100()) {
return true;
+ }
return false;
}
private boolean jj_3R_99() {
- if (jj_scan_token(DOT))
+ if (jj_scan_token(DOT)) {
return true;
+ }
return false;
}
private boolean jj_3R_97() {
- if (jj_3R_99())
+ if (jj_3R_99()) {
return true;
+ }
return false;
}
@@ -2657,21 +2813,24 @@
xsp = jj_scanpos;
if (jj_3R_97()) {
jj_scanpos = xsp;
- if (jj_3R_98())
+ if (jj_3R_98()) {
return true;
+ }
}
return false;
}
private boolean jj_3R_95() {
- if (jj_3R_96())
+ if (jj_3R_96()) {
return true;
+ }
return false;
}
private boolean jj_3R_62() {
- if (jj_3R_69())
+ if (jj_3R_69()) {
return true;
+ }
return false;
}
@@ -2680,21 +2839,24 @@
xsp = jj_scanpos;
if (jj_3R_61()) {
jj_scanpos = xsp;
- if (jj_3R_62())
+ if (jj_3R_62()) {
return true;
+ }
}
return false;
}
private boolean jj_3R_61() {
- if (jj_3R_68())
+ if (jj_3R_68()) {
return true;
+ }
return false;
}
private boolean jj_3R_55() {
- if (jj_3R_57())
+ if (jj_3R_57()) {
return true;
+ }
Token xsp;
while (true) {
xsp = jj_scanpos;
@@ -2707,16 +2869,19 @@
}
private boolean jj_3R_53() {
- if (jj_3R_55())
+ if (jj_3R_55()) {
return true;
+ }
return false;
}
private boolean jj_3R_52() {
- if (jj_scan_token(EMPTY))
+ if (jj_scan_token(EMPTY)) {
return true;
- if (jj_3R_48())
+ }
+ if (jj_3R_48()) {
return true;
+ }
return false;
}
@@ -2725,17 +2890,20 @@
xsp = jj_scanpos;
if (jj_scan_token(39)) {
jj_scanpos = xsp;
- if (jj_scan_token(40))
+ if (jj_scan_token(40)) {
return true;
+ }
}
- if (jj_3R_48())
+ if (jj_3R_48()) {
return true;
+ }
return false;
}
private boolean jj_3R_87() {
- if (jj_scan_token(NULL))
+ if (jj_scan_token(NULL)) {
return true;
+ }
return false;
}
@@ -2748,8 +2916,9 @@
jj_scanpos = xsp;
if (jj_3R_52()) {
jj_scanpos = xsp;
- if (jj_3R_53())
+ if (jj_3R_53()) {
return true;
+ }
}
}
}
@@ -2757,16 +2926,19 @@
}
private boolean jj_3R_50() {
- if (jj_scan_token(MINUS))
+ if (jj_scan_token(MINUS)) {
return true;
- if (jj_3R_48())
+ }
+ if (jj_3R_48()) {
return true;
+ }
return false;
}
private boolean jj_3R_86() {
- if (jj_scan_token(STRING_LITERAL))
+ if (jj_scan_token(STRING_LITERAL)) {
return true;
+ }
return false;
}
@@ -2775,8 +2947,9 @@
xsp = jj_scanpos;
if (jj_scan_token(53)) {
jj_scanpos = xsp;
- if (jj_scan_token(54))
+ if (jj_scan_token(54)) {
return true;
+ }
}
return false;
}
@@ -2786,15 +2959,17 @@
xsp = jj_scanpos;
if (jj_scan_token(51)) {
jj_scanpos = xsp;
- if (jj_scan_token(52))
+ if (jj_scan_token(52)) {
return true;
+ }
}
return false;
}
private boolean jj_3R_90() {
- if (jj_scan_token(MULT))
+ if (jj_scan_token(MULT)) {
return true;
+ }
return false;
}
@@ -2805,22 +2980,25 @@
jj_scanpos = xsp;
if (jj_3R_91()) {
jj_scanpos = xsp;
- if (jj_3R_92())
+ if (jj_3R_92()) {
return true;
+ }
}
}
return false;
}
private boolean jj_3R_85() {
- if (jj_scan_token(INTEGER_LITERAL))
+ if (jj_scan_token(INTEGER_LITERAL)) {
return true;
+ }
return false;
}
private boolean jj_3R_46() {
- if (jj_3R_48())
+ if (jj_3R_48()) {
return true;
+ }
Token xsp;
while (true) {
xsp = jj_scanpos;
@@ -2833,14 +3011,16 @@
}
private boolean jj_3R_84() {
- if (jj_scan_token(FLOATING_POINT_LITERAL))
+ if (jj_scan_token(FLOATING_POINT_LITERAL)) {
return true;
+ }
return false;
}
private boolean jj_3R_82() {
- if (jj_scan_token(MINUS))
+ if (jj_scan_token(MINUS)) {
return true;
+ }
return false;
}
@@ -2849,27 +3029,31 @@
xsp = jj_scanpos;
if (jj_3R_81()) {
jj_scanpos = xsp;
- if (jj_3R_82())
+ if (jj_3R_82()) {
return true;
+ }
}
return false;
}
private boolean jj_3R_81() {
- if (jj_scan_token(PLUS))
+ if (jj_scan_token(PLUS)) {
return true;
+ }
return false;
}
private boolean jj_3R_94() {
- if (jj_scan_token(FALSE))
+ if (jj_scan_token(FALSE)) {
return true;
+ }
return false;
}
private boolean jj_3R_93() {
- if (jj_scan_token(TRUE))
+ if (jj_scan_token(TRUE)) {
return true;
+ }
return false;
}
@@ -2878,15 +3062,17 @@
xsp = jj_scanpos;
if (jj_3R_93()) {
jj_scanpos = xsp;
- if (jj_3R_94())
+ if (jj_3R_94()) {
return true;
+ }
}
return false;
}
private boolean jj_3R_44() {
- if (jj_3R_46())
+ if (jj_3R_46()) {
return true;
+ }
Token xsp;
while (true) {
xsp = jj_scanpos;
@@ -2899,38 +3085,44 @@
}
private boolean jj_3R_63() {
- if (jj_scan_token(CONCAT))
+ if (jj_scan_token(CONCAT)) {
return true;
+ }
return false;
}
private boolean jj_3R_75() {
- if (jj_3R_87())
+ if (jj_3R_87()) {
return true;
+ }
return false;
}
private boolean jj_3R_74() {
- if (jj_3R_86())
+ if (jj_3R_86()) {
return true;
+ }
return false;
}
private boolean jj_3R_73() {
- if (jj_3R_85())
+ if (jj_3R_85()) {
return true;
+ }
return false;
}
private boolean jj_3R_72() {
- if (jj_3R_84())
+ if (jj_3R_84()) {
return true;
+ }
return false;
}
private boolean jj_3R_42() {
- if (jj_3R_44())
+ if (jj_3R_44()) {
return true;
+ }
Token xsp;
while (true) {
xsp = jj_scanpos;
@@ -2947,8 +3139,9 @@
xsp = jj_scanpos;
if (jj_scan_token(31)) {
jj_scanpos = xsp;
- if (jj_scan_token(32))
+ if (jj_scan_token(32)) {
return true;
+ }
}
return false;
}
@@ -2964,8 +3157,9 @@
jj_scanpos = xsp;
if (jj_3R_74()) {
jj_scanpos = xsp;
- if (jj_3R_75())
+ if (jj_3R_75()) {
return true;
+ }
}
}
}
@@ -2974,8 +3168,9 @@
}
private boolean jj_3R_71() {
- if (jj_3R_83())
+ if (jj_3R_83()) {
return true;
+ }
return false;
}
@@ -2984,17 +3179,20 @@
xsp = jj_scanpos;
if (jj_scan_token(33)) {
jj_scanpos = xsp;
- if (jj_scan_token(34))
+ if (jj_scan_token(34)) {
return true;
+ }
}
return false;
}
private boolean jj_3R_23() {
- if (jj_scan_token(COLON))
+ if (jj_scan_token(COLON)) {
return true;
- if (jj_scan_token(IDENTIFIER))
+ }
+ if (jj_scan_token(IDENTIFIER)) {
return true;
+ }
return false;
}
@@ -3003,8 +3201,9 @@
xsp = jj_scanpos;
if (jj_scan_token(27)) {
jj_scanpos = xsp;
- if (jj_scan_token(28))
+ if (jj_scan_token(28)) {
return true;
+ }
}
return false;
}
@@ -3018,8 +3217,9 @@
jj_scanpos = xsp;
if (jj_3R_66()) {
jj_scanpos = xsp;
- if (jj_3R_67())
+ if (jj_3R_67()) {
return true;
+ }
}
}
}
@@ -3031,21 +3231,24 @@
xsp = jj_scanpos;
if (jj_scan_token(29)) {
jj_scanpos = xsp;
- if (jj_scan_token(30))
+ if (jj_scan_token(30)) {
return true;
+ }
}
return false;
}
private boolean jj_3R_24() {
- if (jj_3R_28())
+ if (jj_3R_28()) {
return true;
+ }
return false;
}
private boolean jj_3R_39() {
- if (jj_3R_42())
+ if (jj_3R_42()) {
return true;
+ }
Token xsp;
while (true) {
xsp = jj_scanpos;
@@ -3062,21 +3265,25 @@
xsp = jj_scanpos;
if (jj_scan_token(37)) {
jj_scanpos = xsp;
- if (jj_scan_token(38))
+ if (jj_scan_token(38)) {
return true;
+ }
}
return false;
}
private boolean jj_3R_19() {
- if (jj_scan_token(IDENTIFIER))
+ if (jj_scan_token(IDENTIFIER)) {
return true;
+ }
Token xsp;
xsp = jj_scanpos;
- if (jj_3R_23())
+ if (jj_3R_23()) {
jj_scanpos = xsp;
- if (jj_3R_24())
+ }
+ if (jj_3R_24()) {
return true;
+ }
while (true) {
xsp = jj_scanpos;
if (jj_3R_24()) {
@@ -3092,8 +3299,9 @@
xsp = jj_scanpos;
if (jj_3R_59()) {
jj_scanpos = xsp;
- if (jj_3R_60())
+ if (jj_3R_60()) {
return true;
+ }
}
return false;
}
@@ -3103,8 +3311,9 @@
xsp = jj_scanpos;
if (jj_scan_token(35)) {
jj_scanpos = xsp;
- if (jj_scan_token(36))
+ if (jj_scan_token(36)) {
return true;
+ }
}
return false;
}
@@ -3114,15 +3323,17 @@
xsp = jj_scanpos;
if (jj_scan_token(41)) {
jj_scanpos = xsp;
- if (jj_scan_token(42))
+ if (jj_scan_token(42)) {
return true;
+ }
}
return false;
}
private boolean jj_3R_37() {
- if (jj_3R_39())
+ if (jj_3R_39()) {
return true;
+ }
Token xsp;
while (true) {
xsp = jj_scanpos;
@@ -3135,14 +3346,16 @@
}
private boolean jj_3R_29() {
- if (jj_scan_token(IDENTIFIER))
+ if (jj_scan_token(IDENTIFIER)) {
return true;
+ }
return false;
}
private boolean jj_3R_34() {
- if (jj_3R_37())
+ if (jj_3R_37()) {
return true;
+ }
Token xsp;
while (true) {
xsp = jj_scanpos;
@@ -3155,14 +3368,16 @@
}
private boolean jj_3R_102() {
- if (jj_3R_35())
+ if (jj_3R_35()) {
return true;
+ }
return false;
}
private boolean jj_3R_21() {
- if (jj_3R_27())
+ if (jj_3R_27()) {
return true;
+ }
return false;
}
@@ -3171,15 +3386,17 @@
xsp = jj_scanpos;
if (jj_scan_token(43)) {
jj_scanpos = xsp;
- if (jj_scan_token(44))
+ if (jj_scan_token(44)) {
return true;
+ }
}
return false;
}
private boolean jj_3R_22() {
- if (jj_3R_27())
+ if (jj_3R_27()) {
return true;
+ }
return false;
}
@@ -3235,10 +3452,12 @@
token = new Token();
jj_ntk = -1;
jj_gen = 0;
- for (int i = 0; i < 53; i++)
+ for (int i = 0; i < 53; i++) {
jj_la1[i] = -1;
- for (int i = 0; i < jj_2_rtns.length; i++)
+ }
+ for (int i = 0; i < jj_2_rtns.length; i++) {
jj_2_rtns[i] = new JJCalls();
+ }
}
/** Reinitialise. */
@@ -3258,10 +3477,12 @@
jj_ntk = -1;
jjtree.reset();
jj_gen = 0;
- for (int i = 0; i < 53; i++)
+ for (int i = 0; i < 53; i++) {
jj_la1[i] = -1;
- for (int i = 0; i < jj_2_rtns.length; i++)
+ }
+ for (int i = 0; i < jj_2_rtns.length; i++) {
jj_2_rtns[i] = new JJCalls();
+ }
}
/** Constructor. */
@@ -3271,10 +3492,12 @@
token = new Token();
jj_ntk = -1;
jj_gen = 0;
- for (int i = 0; i < 53; i++)
+ for (int i = 0; i < 53; i++) {
jj_la1[i] = -1;
- for (int i = 0; i < jj_2_rtns.length; i++)
+ }
+ for (int i = 0; i < jj_2_rtns.length; i++) {
jj_2_rtns[i] = new JJCalls();
+ }
}
/** Reinitialise. */
@@ -3285,10 +3508,12 @@
jj_ntk = -1;
jjtree.reset();
jj_gen = 0;
- for (int i = 0; i < 53; i++)
+ for (int i = 0; i < 53; i++) {
jj_la1[i] = -1;
- for (int i = 0; i < jj_2_rtns.length; i++)
+ }
+ for (int i = 0; i < jj_2_rtns.length; i++) {
jj_2_rtns[i] = new JJCalls();
+ }
}
/** Constructor with generated Token Manager. */
@@ -3297,10 +3522,12 @@
token = new Token();
jj_ntk = -1;
jj_gen = 0;
- for (int i = 0; i < 53; i++)
+ for (int i = 0; i < 53; i++) {
jj_la1[i] = -1;
- for (int i = 0; i < jj_2_rtns.length; i++)
+ }
+ for (int i = 0; i < jj_2_rtns.length; i++) {
jj_2_rtns[i] = new JJCalls();
+ }
}
/** Reinitialise. */
@@ -3310,18 +3537,21 @@
jj_ntk = -1;
jjtree.reset();
jj_gen = 0;
- for (int i = 0; i < 53; i++)
+ for (int i = 0; i < 53; i++) {
jj_la1[i] = -1;
- for (int i = 0; i < jj_2_rtns.length; i++)
+ }
+ for (int i = 0; i < jj_2_rtns.length; i++) {
jj_2_rtns[i] = new JJCalls();
+ }
}
private Token jj_consume_token(int kind) throws ParseException {
Token oldToken;
- if ((oldToken = token).next != null)
+ if ((oldToken = token).next != null) {
token = token.next;
- else
+ } else {
token = token.next = token_source.getNextToken();
+ }
jj_ntk = -1;
if (token.kind == kind) {
jj_gen++;
@@ -3330,8 +3560,9 @@
for (int i = 0; i < jj_2_rtns.length; i++) {
JJCalls c = jj_2_rtns[i];
while (c != null) {
- if (c.gen < jj_gen)
+ if (c.gen < jj_gen) {
c.first = null;
+ }
c = c.next;
}
}
@@ -3366,22 +3597,26 @@
i++;
tok = tok.next;
}
- if (tok != null)
+ if (tok != null) {
jj_add_error_token(kind, i);
+ }
}
- if (jj_scanpos.kind != kind)
+ if (jj_scanpos.kind != kind) {
return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos)
+ }
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) {
throw jj_ls;
+ }
return false;
}
/** Get the next Token. */
final public Token getNextToken() {
- if (token.next != null)
+ if (token.next != null) {
token = token.next;
- else
+ } else {
token = token.next = token_source.getNextToken();
+ }
jj_ntk = -1;
jj_gen++;
return token;
@@ -3391,19 +3626,21 @@
final public Token getToken(int index) {
Token t = token;
for (int i = 0; i < index; i++) {
- if (t.next != null)
+ if (t.next != null) {
t = t.next;
- else
+ } else {
t = t.next = token_source.getNextToken();
+ }
}
return t;
}
private int jj_ntk() {
- if ((jj_nt = token.next) == null)
+ if ((jj_nt = token.next) == null) {
return (jj_ntk = (token.next = token_source.getNextToken()).kind);
- else
+ } else {
return (jj_ntk = jj_nt.kind);
+ }
}
private java.util.List<int[]> jj_expentries = new java.util.ArrayList<int[]>();
@@ -3413,8 +3650,9 @@
private int jj_endpos;
private void jj_add_error_token(int kind, int pos) {
- if (pos >= 100)
+ if (pos >= 100) {
return;
+ }
if (pos == jj_endpos + 1) {
jj_lasttokens[jj_endpos++] = kind;
} else if (jj_endpos != 0) {
@@ -3434,8 +3672,9 @@
break jj_entries_loop;
}
}
- if (pos != 0)
+ if (pos != 0) {
jj_lasttokens[(jj_endpos = pos) - 1] = kind;
+ }
}
}
diff --git a/impl/src/main/java/com/sun/el/parser/ELParserTokenManager.java b/impl/src/main/java/com/sun/el/parser/ELParserTokenManager.java
index 455269b..0c59560 100644
--- a/impl/src/main/java/com/sun/el/parser/ELParserTokenManager.java
+++ b/impl/src/main/java/com/sun/el/parser/ELParserTokenManager.java
@@ -32,8 +32,9 @@
private final int jjStopStringLiteralDfa_0(int pos, long active0) {
switch (pos) {
case 0:
- if ((active0 & 0x10L) != 0L)
+ if ((active0 & 0x10L) != 0L) {
return 2;
+ }
if ((active0 & 0xcL) != 0L) {
jjmatchedKind = 1;
return 4;
@@ -76,10 +77,11 @@
}
switch (curChar) {
case 123:
- if ((active0 & 0x4L) != 0L)
+ if ((active0 & 0x4L) != 0L) {
return jjStopAtPos(1, 2);
- else if ((active0 & 0x8L) != 0L)
+ } else if ((active0 & 0x8L) != 0L) {
return jjStopAtPos(1, 3);
+ }
break;
default:
break;
@@ -108,48 +110,58 @@
jjstateSet[0] = startState;
int kind = 0x7fffffff;
for (;;) {
- if (++jjround == 0x7fffffff)
+ if (++jjround == 0x7fffffff) {
ReInitRounds();
+ }
if (curChar < 64) {
long l = 1L << curChar;
do {
switch (jjstateSet[--i]) {
case 6:
if ((0xffffffe7ffffffffL & l) != 0L) {
- if (kind > 1)
+ if (kind > 1) {
kind = 1;
+ }
jjCheckNAddStates(0, 3);
} else if ((0x1800000000L & l) != 0L) {
- if (kind > 1)
+ if (kind > 1) {
kind = 1;
+ }
}
- if (curChar == 35)
+ if (curChar == 35) {
jjCheckNAdd(4);
- else if (curChar == 36)
+ } else if (curChar == 36) {
jjCheckNAdd(4);
+ }
break;
case 0:
case 4:
- if ((0xffffffe7ffffffffL & l) == 0L)
+ if ((0xffffffe7ffffffffL & l) == 0L) {
break;
- if (kind > 1)
+ }
+ if (kind > 1) {
kind = 1;
+ }
jjCheckNAddStates(0, 3);
break;
case 2:
- if ((0x1800000000L & l) == 0L)
+ if ((0x1800000000L & l) == 0L) {
break;
- if (kind > 1)
+ }
+ if (kind > 1) {
kind = 1;
+ }
jjCheckNAddStates(0, 3);
break;
case 3:
- if (curChar == 36)
+ if (curChar == 36) {
jjCheckNAdd(4);
+ }
break;
case 5:
- if (curChar == 35)
+ if (curChar == 35) {
jjCheckNAdd(4);
+ }
break;
default:
break;
@@ -161,35 +173,44 @@
switch (jjstateSet[--i]) {
case 6:
if ((0xffffffffefffffffL & l) != 0L) {
- if (kind > 1)
+ if (kind > 1) {
kind = 1;
+ }
jjCheckNAddStates(0, 3);
- } else if (curChar == 92)
+ } else if (curChar == 92) {
jjstateSet[jjnewStateCnt++] = 2;
+ }
break;
case 0:
- if ((0xffffffffefffffffL & l) == 0L)
+ if ((0xffffffffefffffffL & l) == 0L) {
break;
- if (kind > 1)
+ }
+ if (kind > 1) {
kind = 1;
+ }
jjCheckNAddStates(0, 3);
break;
case 1:
- if (curChar == 92)
+ if (curChar == 92) {
jjstateSet[jjnewStateCnt++] = 2;
+ }
break;
case 2:
- if (curChar != 92)
+ if (curChar != 92) {
break;
- if (kind > 1)
+ }
+ if (kind > 1) {
kind = 1;
+ }
jjCheckNAddStates(0, 3);
break;
case 4:
- if ((0xf7ffffffffffffffL & l) == 0L)
+ if ((0xf7ffffffffffffffL & l) == 0L) {
break;
- if (kind > 1)
+ }
+ if (kind > 1) {
kind = 1;
+ }
jjCheckNAddStates(0, 3);
break;
default:
@@ -207,10 +228,12 @@
case 6:
case 0:
case 4:
- if (!jjCanMove_0(hiByte, i1, i2, l1, l2))
+ if (!jjCanMove_0(hiByte, i1, i2, l1, l2)) {
break;
- if (kind > 1)
+ }
+ if (kind > 1) {
kind = 1;
+ }
jjCheckNAddStates(0, 3);
break;
default:
@@ -224,8 +247,9 @@
kind = 0x7fffffff;
}
++curPos;
- if ((i = jjnewStateCnt) == (startsAt = 7 - (jjnewStateCnt = startsAt)))
+ if ((i = jjnewStateCnt) == (startsAt = 7 - (jjnewStateCnt = startsAt))) {
return curPos;
+ }
try {
curChar = input_stream.readChar();
} catch (java.io.IOException e) {
@@ -237,16 +261,18 @@
private final int jjStopStringLiteralDfa_2(int pos, long active0) {
switch (pos) {
case 0:
- if ((active0 & 0x80000L) != 0L)
+ if ((active0 & 0x80000L) != 0L) {
return 1;
+ }
if ((active0 & 0x50755550070000L) != 0L) {
jjmatchedKind = 58;
return 6;
}
return -1;
case 1:
- if ((active0 & 0x105550000000L) != 0L)
+ if ((active0 & 0x105550000000L) != 0L) {
return 6;
+ }
if ((active0 & 0x50650000070000L) != 0L) {
jjmatchedKind = 58;
jjmatchedPos = 1;
@@ -254,8 +280,9 @@
}
return -1;
case 2:
- if ((active0 & 0x50050000000000L) != 0L)
+ if ((active0 & 0x50050000000000L) != 0L) {
return 6;
+ }
if ((active0 & 0x600000070000L) != 0L) {
jjmatchedKind = 58;
jjmatchedPos = 2;
@@ -263,8 +290,9 @@
}
return -1;
case 3:
- if ((active0 & 0x50000L) != 0L)
+ if ((active0 & 0x50000L) != 0L) {
return 6;
+ }
if ((active0 & 0x600000020000L) != 0L) {
jjmatchedKind = 58;
jjmatchedPos = 3;
@@ -277,8 +305,9 @@
jjmatchedPos = 4;
return 6;
}
- if ((active0 & 0x200000020000L) != 0L)
+ if ((active0 & 0x200000020000L) != 0L) {
return 6;
+ }
return -1;
case 5:
if ((active0 & 0x400000000000L) != 0L) {
@@ -405,34 +434,38 @@
}
switch (curChar) {
case 38:
- if ((active0 & 0x20000000000L) != 0L)
+ if ((active0 & 0x20000000000L) != 0L) {
return jjStopAtPos(1, 41);
+ }
break;
case 61:
- if ((active0 & 0x80000000L) != 0L)
+ if ((active0 & 0x80000000L) != 0L) {
return jjStopAtPos(1, 31);
- else if ((active0 & 0x200000000L) != 0L)
+ } else if ((active0 & 0x200000000L) != 0L) {
return jjStopAtPos(1, 33);
- else if ((active0 & 0x800000000L) != 0L)
+ } else if ((active0 & 0x800000000L) != 0L) {
return jjStopAtPos(1, 35);
- else if ((active0 & 0x2000000000L) != 0L)
+ } else if ((active0 & 0x2000000000L) != 0L) {
return jjStopAtPos(1, 37);
- else if ((active0 & 0x80000000000000L) != 0L)
+ } else if ((active0 & 0x80000000000000L) != 0L) {
return jjStopAtPos(1, 55);
+ }
break;
case 62:
- if ((active0 & 0x200000000000000L) != 0L)
+ if ((active0 & 0x200000000000000L) != 0L) {
return jjStopAtPos(1, 57);
+ }
break;
case 97:
return jjMoveStringLiteralDfa2_2(active0, 0x20000L);
case 101:
- if ((active0 & 0x100000000L) != 0L)
+ if ((active0 & 0x100000000L) != 0L) {
return jjStartNfaWithStates_2(1, 32, 6);
- else if ((active0 & 0x400000000L) != 0L)
+ } else if ((active0 & 0x400000000L) != 0L) {
return jjStartNfaWithStates_2(1, 34, 6);
- else if ((active0 & 0x4000000000L) != 0L)
+ } else if ((active0 & 0x4000000000L) != 0L) {
return jjStartNfaWithStates_2(1, 38, 6);
+ }
break;
case 105:
return jjMoveStringLiteralDfa2_2(active0, 0x10000000000000L);
@@ -443,24 +476,28 @@
case 111:
return jjMoveStringLiteralDfa2_2(active0, 0x40010000000000L);
case 113:
- if ((active0 & 0x1000000000L) != 0L)
+ if ((active0 & 0x1000000000L) != 0L) {
return jjStartNfaWithStates_2(1, 36, 6);
+ }
break;
case 114:
- if ((active0 & 0x100000000000L) != 0L)
+ if ((active0 & 0x100000000000L) != 0L) {
return jjStartNfaWithStates_2(1, 44, 6);
+ }
return jjMoveStringLiteralDfa2_2(active0, 0x10000L);
case 116:
- if ((active0 & 0x10000000L) != 0L)
+ if ((active0 & 0x10000000L) != 0L) {
return jjStartNfaWithStates_2(1, 28, 6);
- else if ((active0 & 0x40000000L) != 0L)
+ } else if ((active0 & 0x40000000L) != 0L) {
return jjStartNfaWithStates_2(1, 30, 6);
+ }
break;
case 117:
return jjMoveStringLiteralDfa2_2(active0, 0x40000L);
case 124:
- if ((active0 & 0x80000000000L) != 0L)
+ if ((active0 & 0x80000000000L) != 0L) {
return jjStopAtPos(1, 43);
+ }
break;
default:
break;
@@ -469,8 +506,9 @@
}
private int jjMoveStringLiteralDfa2_2(long old0, long active0) {
- if (((active0 &= old0)) == 0L)
+ if (((active0 &= old0)) == 0L) {
return jjStartNfa_2(0, old0);
+ }
try {
curChar = input_stream.readChar();
} catch (java.io.IOException e) {
@@ -479,10 +517,11 @@
}
switch (curChar) {
case 100:
- if ((active0 & 0x40000000000L) != 0L)
+ if ((active0 & 0x40000000000L) != 0L) {
return jjStartNfaWithStates_2(2, 42, 6);
- else if ((active0 & 0x40000000000000L) != 0L)
+ } else if ((active0 & 0x40000000000000L) != 0L) {
return jjStartNfaWithStates_2(2, 54, 6);
+ }
break;
case 108:
return jjMoveStringLiteralDfa3_2(active0, 0x60000L);
@@ -491,14 +530,16 @@
case 115:
return jjMoveStringLiteralDfa3_2(active0, 0x400000000000L);
case 116:
- if ((active0 & 0x10000000000L) != 0L)
+ if ((active0 & 0x10000000000L) != 0L) {
return jjStartNfaWithStates_2(2, 40, 6);
+ }
break;
case 117:
return jjMoveStringLiteralDfa3_2(active0, 0x10000L);
case 118:
- if ((active0 & 0x10000000000000L) != 0L)
+ if ((active0 & 0x10000000000000L) != 0L) {
return jjStartNfaWithStates_2(2, 52, 6);
+ }
break;
default:
break;
@@ -507,8 +548,9 @@
}
private int jjMoveStringLiteralDfa3_2(long old0, long active0) {
- if (((active0 &= old0)) == 0L)
+ if (((active0 &= old0)) == 0L) {
return jjStartNfa_2(1, old0);
+ }
try {
curChar = input_stream.readChar();
} catch (java.io.IOException e) {
@@ -517,12 +559,14 @@
}
switch (curChar) {
case 101:
- if ((active0 & 0x10000L) != 0L)
+ if ((active0 & 0x10000L) != 0L) {
return jjStartNfaWithStates_2(3, 16, 6);
+ }
break;
case 108:
- if ((active0 & 0x40000L) != 0L)
+ if ((active0 & 0x40000L) != 0L) {
return jjStartNfaWithStates_2(3, 18, 6);
+ }
break;
case 115:
return jjMoveStringLiteralDfa4_2(active0, 0x20000L);
@@ -535,8 +579,9 @@
}
private int jjMoveStringLiteralDfa4_2(long old0, long active0) {
- if (((active0 &= old0)) == 0L)
+ if (((active0 &= old0)) == 0L) {
return jjStartNfa_2(2, old0);
+ }
try {
curChar = input_stream.readChar();
} catch (java.io.IOException e) {
@@ -547,12 +592,14 @@
case 97:
return jjMoveStringLiteralDfa5_2(active0, 0x400000000000L);
case 101:
- if ((active0 & 0x20000L) != 0L)
+ if ((active0 & 0x20000L) != 0L) {
return jjStartNfaWithStates_2(4, 17, 6);
+ }
break;
case 121:
- if ((active0 & 0x200000000000L) != 0L)
+ if ((active0 & 0x200000000000L) != 0L) {
return jjStartNfaWithStates_2(4, 45, 6);
+ }
break;
default:
break;
@@ -561,8 +608,9 @@
}
private int jjMoveStringLiteralDfa5_2(long old0, long active0) {
- if (((active0 &= old0)) == 0L)
+ if (((active0 &= old0)) == 0L) {
return jjStartNfa_2(3, old0);
+ }
try {
curChar = input_stream.readChar();
} catch (java.io.IOException e) {
@@ -579,8 +627,9 @@
}
private int jjMoveStringLiteralDfa6_2(long old0, long active0) {
- if (((active0 &= old0)) == 0L)
+ if (((active0 &= old0)) == 0L) {
return jjStartNfa_2(4, old0);
+ }
try {
curChar = input_stream.readChar();
} catch (java.io.IOException e) {
@@ -597,8 +646,9 @@
}
private int jjMoveStringLiteralDfa7_2(long old0, long active0) {
- if (((active0 &= old0)) == 0L)
+ if (((active0 &= old0)) == 0L) {
return jjStartNfa_2(5, old0);
+ }
try {
curChar = input_stream.readChar();
} catch (java.io.IOException e) {
@@ -615,8 +665,9 @@
}
private int jjMoveStringLiteralDfa8_2(long old0, long active0) {
- if (((active0 &= old0)) == 0L)
+ if (((active0 &= old0)) == 0L) {
return jjStartNfa_2(6, old0);
+ }
try {
curChar = input_stream.readChar();
} catch (java.io.IOException e) {
@@ -633,8 +684,9 @@
}
private int jjMoveStringLiteralDfa9_2(long old0, long active0) {
- if (((active0 &= old0)) == 0L)
+ if (((active0 &= old0)) == 0L) {
return jjStartNfa_2(7, old0);
+ }
try {
curChar = input_stream.readChar();
} catch (java.io.IOException e) {
@@ -643,8 +695,9 @@
}
switch (curChar) {
case 102:
- if ((active0 & 0x400000000000L) != 0L)
+ if ((active0 & 0x400000000000L) != 0L) {
return jjStartNfaWithStates_2(9, 46, 6);
+ }
break;
default:
break;
@@ -677,165 +730,206 @@
jjstateSet[0] = startState;
int kind = 0x7fffffff;
for (;;) {
- if (++jjround == 0x7fffffff)
+ if (++jjround == 0x7fffffff) {
ReInitRounds();
+ }
if (curChar < 64) {
long l = 1L << curChar;
do {
switch (jjstateSet[--i]) {
case 0:
if ((0x3ff000000000000L & l) != 0L) {
- if (kind > 11)
+ if (kind > 11) {
kind = 11;
+ }
jjCheckNAddStates(4, 8);
} else if ((0x1800000000L & l) != 0L) {
- if (kind > 58)
+ if (kind > 58) {
kind = 58;
+ }
jjCheckNAdd(6);
- } else if (curChar == 39)
+ } else if (curChar == 39) {
jjCheckNAddStates(9, 13);
- else if (curChar == 34)
+ } else if (curChar == 34) {
jjCheckNAddStates(14, 18);
- else if (curChar == 46)
+ } else if (curChar == 46) {
jjCheckNAdd(1);
+ }
break;
case 1:
- if ((0x3ff000000000000L & l) == 0L)
+ if ((0x3ff000000000000L & l) == 0L) {
break;
- if (kind > 12)
+ }
+ if (kind > 12) {
kind = 12;
+ }
jjCheckNAddTwoStates(1, 2);
break;
case 3:
- if ((0x280000000000L & l) != 0L)
+ if ((0x280000000000L & l) != 0L) {
jjCheckNAdd(4);
+ }
break;
case 4:
- if ((0x3ff000000000000L & l) == 0L)
+ if ((0x3ff000000000000L & l) == 0L) {
break;
- if (kind > 12)
+ }
+ if (kind > 12) {
kind = 12;
+ }
jjCheckNAdd(4);
break;
case 5:
- if ((0x1800000000L & l) == 0L)
+ if ((0x1800000000L & l) == 0L) {
break;
- if (kind > 58)
+ }
+ if (kind > 58) {
kind = 58;
+ }
jjCheckNAdd(6);
break;
case 6:
- if ((0x3ff001000000000L & l) == 0L)
+ if ((0x3ff001000000000L & l) == 0L) {
break;
- if (kind > 58)
+ }
+ if (kind > 58) {
kind = 58;
+ }
jjCheckNAdd(6);
break;
case 7:
- if ((0x3ff000000000000L & l) == 0L)
+ if ((0x3ff000000000000L & l) == 0L) {
break;
- if (kind > 11)
+ }
+ if (kind > 11) {
kind = 11;
+ }
jjCheckNAddStates(4, 8);
break;
case 8:
- if ((0x3ff000000000000L & l) == 0L)
+ if ((0x3ff000000000000L & l) == 0L) {
break;
- if (kind > 11)
+ }
+ if (kind > 11) {
kind = 11;
+ }
jjCheckNAdd(8);
break;
case 9:
- if ((0x3ff000000000000L & l) != 0L)
+ if ((0x3ff000000000000L & l) != 0L) {
jjCheckNAddTwoStates(9, 10);
+ }
break;
case 10:
- if (curChar != 46)
+ if (curChar != 46) {
break;
- if (kind > 12)
+ }
+ if (kind > 12) {
kind = 12;
+ }
jjCheckNAddTwoStates(11, 12);
break;
case 11:
- if ((0x3ff000000000000L & l) == 0L)
+ if ((0x3ff000000000000L & l) == 0L) {
break;
- if (kind > 12)
+ }
+ if (kind > 12) {
kind = 12;
+ }
jjCheckNAddTwoStates(11, 12);
break;
case 13:
- if ((0x280000000000L & l) != 0L)
+ if ((0x280000000000L & l) != 0L) {
jjCheckNAdd(14);
+ }
break;
case 14:
- if ((0x3ff000000000000L & l) == 0L)
+ if ((0x3ff000000000000L & l) == 0L) {
break;
- if (kind > 12)
+ }
+ if (kind > 12) {
kind = 12;
+ }
jjCheckNAdd(14);
break;
case 15:
- if ((0x3ff000000000000L & l) != 0L)
+ if ((0x3ff000000000000L & l) != 0L) {
jjCheckNAddTwoStates(15, 16);
+ }
break;
case 17:
- if ((0x280000000000L & l) != 0L)
+ if ((0x280000000000L & l) != 0L) {
jjCheckNAdd(18);
+ }
break;
case 18:
- if ((0x3ff000000000000L & l) == 0L)
+ if ((0x3ff000000000000L & l) == 0L) {
break;
- if (kind > 12)
+ }
+ if (kind > 12) {
kind = 12;
+ }
jjCheckNAdd(18);
break;
case 19:
- if (curChar == 34)
+ if (curChar == 34) {
jjCheckNAddStates(14, 18);
+ }
break;
case 20:
- if ((0xfffffffbffffffffL & l) != 0L)
+ if ((0xfffffffbffffffffL & l) != 0L) {
jjCheckNAddStates(19, 21);
+ }
break;
case 22:
- if (curChar == 34)
+ if (curChar == 34) {
jjCheckNAddStates(19, 21);
+ }
break;
case 23:
- if (curChar == 34 && kind > 14)
+ if (curChar == 34 && kind > 14) {
kind = 14;
+ }
break;
case 24:
- if ((0xfffffffbffffffffL & l) != 0L)
+ if ((0xfffffffbffffffffL & l) != 0L) {
jjCheckNAddTwoStates(24, 25);
+ }
break;
case 26:
- if ((0xfffffffbffffffffL & l) != 0L && kind > 15)
+ if ((0xfffffffbffffffffL & l) != 0L && kind > 15) {
kind = 15;
+ }
break;
case 27:
- if (curChar == 39)
+ if (curChar == 39) {
jjCheckNAddStates(9, 13);
+ }
break;
case 28:
- if ((0xffffff7fffffffffL & l) != 0L)
+ if ((0xffffff7fffffffffL & l) != 0L) {
jjCheckNAddStates(22, 24);
+ }
break;
case 30:
- if (curChar == 39)
+ if (curChar == 39) {
jjCheckNAddStates(22, 24);
+ }
break;
case 31:
- if (curChar == 39 && kind > 14)
+ if (curChar == 39 && kind > 14) {
kind = 14;
+ }
break;
case 32:
- if ((0xffffff7fffffffffL & l) != 0L)
+ if ((0xffffff7fffffffffL & l) != 0L) {
jjCheckNAddTwoStates(32, 33);
+ }
break;
case 34:
- if ((0xffffff7fffffffffL & l) != 0L && kind > 15)
+ if ((0xffffff7fffffffffL & l) != 0L && kind > 15) {
kind = 15;
+ }
break;
default:
break;
@@ -847,68 +941,84 @@
switch (jjstateSet[--i]) {
case 0:
case 6:
- if ((0x7fffffe87fffffeL & l) == 0L)
+ if ((0x7fffffe87fffffeL & l) == 0L) {
break;
- if (kind > 58)
+ }
+ if (kind > 58) {
kind = 58;
+ }
jjCheckNAdd(6);
break;
case 2:
- if ((0x2000000020L & l) != 0L)
+ if ((0x2000000020L & l) != 0L) {
jjAddStates(25, 26);
+ }
break;
case 12:
- if ((0x2000000020L & l) != 0L)
+ if ((0x2000000020L & l) != 0L) {
jjAddStates(27, 28);
+ }
break;
case 16:
- if ((0x2000000020L & l) != 0L)
+ if ((0x2000000020L & l) != 0L) {
jjAddStates(29, 30);
+ }
break;
case 20:
- if ((0xffffffffefffffffL & l) != 0L)
+ if ((0xffffffffefffffffL & l) != 0L) {
jjCheckNAddStates(19, 21);
+ }
break;
case 21:
- if (curChar == 92)
+ if (curChar == 92) {
jjstateSet[jjnewStateCnt++] = 22;
+ }
break;
case 22:
- if (curChar == 92)
+ if (curChar == 92) {
jjCheckNAddStates(19, 21);
+ }
break;
case 24:
- if ((0xffffffffefffffffL & l) != 0L)
+ if ((0xffffffffefffffffL & l) != 0L) {
jjAddStates(31, 32);
+ }
break;
case 25:
- if (curChar == 92)
+ if (curChar == 92) {
jjstateSet[jjnewStateCnt++] = 26;
+ }
break;
case 26:
case 34:
- if ((0xffffffffefffffffL & l) != 0L && kind > 15)
+ if ((0xffffffffefffffffL & l) != 0L && kind > 15) {
kind = 15;
+ }
break;
case 28:
- if ((0xffffffffefffffffL & l) != 0L)
+ if ((0xffffffffefffffffL & l) != 0L) {
jjCheckNAddStates(22, 24);
+ }
break;
case 29:
- if (curChar == 92)
+ if (curChar == 92) {
jjstateSet[jjnewStateCnt++] = 30;
+ }
break;
case 30:
- if (curChar == 92)
+ if (curChar == 92) {
jjCheckNAddStates(22, 24);
+ }
break;
case 32:
- if ((0xffffffffefffffffL & l) != 0L)
+ if ((0xffffffffefffffffL & l) != 0L) {
jjAddStates(33, 34);
+ }
break;
case 33:
- if (curChar == 92)
+ if (curChar == 92) {
jjstateSet[jjnewStateCnt++] = 34;
+ }
break;
default:
break;
@@ -924,32 +1034,39 @@
switch (jjstateSet[--i]) {
case 0:
case 6:
- if (!jjCanMove_1(hiByte, i1, i2, l1, l2))
+ if (!jjCanMove_1(hiByte, i1, i2, l1, l2)) {
break;
- if (kind > 58)
+ }
+ if (kind > 58) {
kind = 58;
+ }
jjCheckNAdd(6);
break;
case 20:
- if (jjCanMove_0(hiByte, i1, i2, l1, l2))
+ if (jjCanMove_0(hiByte, i1, i2, l1, l2)) {
jjAddStates(19, 21);
+ }
break;
case 24:
- if (jjCanMove_0(hiByte, i1, i2, l1, l2))
+ if (jjCanMove_0(hiByte, i1, i2, l1, l2)) {
jjAddStates(31, 32);
+ }
break;
case 26:
case 34:
- if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 15)
+ if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 15) {
kind = 15;
+ }
break;
case 28:
- if (jjCanMove_0(hiByte, i1, i2, l1, l2))
+ if (jjCanMove_0(hiByte, i1, i2, l1, l2)) {
jjAddStates(22, 24);
+ }
break;
case 32:
- if (jjCanMove_0(hiByte, i1, i2, l1, l2))
+ if (jjCanMove_0(hiByte, i1, i2, l1, l2)) {
jjAddStates(33, 34);
+ }
break;
default:
break;
@@ -962,8 +1079,9 @@
kind = 0x7fffffff;
}
++curPos;
- if ((i = jjnewStateCnt) == (startsAt = 35 - (jjnewStateCnt = startsAt)))
+ if ((i = jjnewStateCnt) == (startsAt = 35 - (jjnewStateCnt = startsAt))) {
return curPos;
+ }
try {
curChar = input_stream.readChar();
} catch (java.io.IOException e) {
@@ -975,16 +1093,18 @@
private final int jjStopStringLiteralDfa_1(int pos, long active0) {
switch (pos) {
case 0:
- if ((active0 & 0x80000L) != 0L)
+ if ((active0 & 0x80000L) != 0L) {
return 1;
+ }
if ((active0 & 0x50755550070000L) != 0L) {
jjmatchedKind = 58;
return 6;
}
return -1;
case 1:
- if ((active0 & 0x105550000000L) != 0L)
+ if ((active0 & 0x105550000000L) != 0L) {
return 6;
+ }
if ((active0 & 0x50650000070000L) != 0L) {
jjmatchedKind = 58;
jjmatchedPos = 1;
@@ -992,8 +1112,9 @@
}
return -1;
case 2:
- if ((active0 & 0x50050000000000L) != 0L)
+ if ((active0 & 0x50050000000000L) != 0L) {
return 6;
+ }
if ((active0 & 0x600000070000L) != 0L) {
jjmatchedKind = 58;
jjmatchedPos = 2;
@@ -1001,8 +1122,9 @@
}
return -1;
case 3:
- if ((active0 & 0x50000L) != 0L)
+ if ((active0 & 0x50000L) != 0L) {
return 6;
+ }
if ((active0 & 0x600000020000L) != 0L) {
jjmatchedKind = 58;
jjmatchedPos = 3;
@@ -1015,8 +1137,9 @@
jjmatchedPos = 4;
return 6;
}
- if ((active0 & 0x200000020000L) != 0L)
+ if ((active0 & 0x200000020000L) != 0L) {
return 6;
+ }
return -1;
case 5:
if ((active0 & 0x400000000000L) != 0L) {
@@ -1143,34 +1266,38 @@
}
switch (curChar) {
case 38:
- if ((active0 & 0x20000000000L) != 0L)
+ if ((active0 & 0x20000000000L) != 0L) {
return jjStopAtPos(1, 41);
+ }
break;
case 61:
- if ((active0 & 0x80000000L) != 0L)
+ if ((active0 & 0x80000000L) != 0L) {
return jjStopAtPos(1, 31);
- else if ((active0 & 0x200000000L) != 0L)
+ } else if ((active0 & 0x200000000L) != 0L) {
return jjStopAtPos(1, 33);
- else if ((active0 & 0x800000000L) != 0L)
+ } else if ((active0 & 0x800000000L) != 0L) {
return jjStopAtPos(1, 35);
- else if ((active0 & 0x2000000000L) != 0L)
+ } else if ((active0 & 0x2000000000L) != 0L) {
return jjStopAtPos(1, 37);
- else if ((active0 & 0x80000000000000L) != 0L)
+ } else if ((active0 & 0x80000000000000L) != 0L) {
return jjStopAtPos(1, 55);
+ }
break;
case 62:
- if ((active0 & 0x200000000000000L) != 0L)
+ if ((active0 & 0x200000000000000L) != 0L) {
return jjStopAtPos(1, 57);
+ }
break;
case 97:
return jjMoveStringLiteralDfa2_1(active0, 0x20000L);
case 101:
- if ((active0 & 0x100000000L) != 0L)
+ if ((active0 & 0x100000000L) != 0L) {
return jjStartNfaWithStates_1(1, 32, 6);
- else if ((active0 & 0x400000000L) != 0L)
+ } else if ((active0 & 0x400000000L) != 0L) {
return jjStartNfaWithStates_1(1, 34, 6);
- else if ((active0 & 0x4000000000L) != 0L)
+ } else if ((active0 & 0x4000000000L) != 0L) {
return jjStartNfaWithStates_1(1, 38, 6);
+ }
break;
case 105:
return jjMoveStringLiteralDfa2_1(active0, 0x10000000000000L);
@@ -1181,24 +1308,28 @@
case 111:
return jjMoveStringLiteralDfa2_1(active0, 0x40010000000000L);
case 113:
- if ((active0 & 0x1000000000L) != 0L)
+ if ((active0 & 0x1000000000L) != 0L) {
return jjStartNfaWithStates_1(1, 36, 6);
+ }
break;
case 114:
- if ((active0 & 0x100000000000L) != 0L)
+ if ((active0 & 0x100000000000L) != 0L) {
return jjStartNfaWithStates_1(1, 44, 6);
+ }
return jjMoveStringLiteralDfa2_1(active0, 0x10000L);
case 116:
- if ((active0 & 0x10000000L) != 0L)
+ if ((active0 & 0x10000000L) != 0L) {
return jjStartNfaWithStates_1(1, 28, 6);
- else if ((active0 & 0x40000000L) != 0L)
+ } else if ((active0 & 0x40000000L) != 0L) {
return jjStartNfaWithStates_1(1, 30, 6);
+ }
break;
case 117:
return jjMoveStringLiteralDfa2_1(active0, 0x40000L);
case 124:
- if ((active0 & 0x80000000000L) != 0L)
+ if ((active0 & 0x80000000000L) != 0L) {
return jjStopAtPos(1, 43);
+ }
break;
default:
break;
@@ -1207,8 +1338,9 @@
}
private int jjMoveStringLiteralDfa2_1(long old0, long active0) {
- if (((active0 &= old0)) == 0L)
+ if (((active0 &= old0)) == 0L) {
return jjStartNfa_1(0, old0);
+ }
try {
curChar = input_stream.readChar();
} catch (java.io.IOException e) {
@@ -1217,10 +1349,11 @@
}
switch (curChar) {
case 100:
- if ((active0 & 0x40000000000L) != 0L)
+ if ((active0 & 0x40000000000L) != 0L) {
return jjStartNfaWithStates_1(2, 42, 6);
- else if ((active0 & 0x40000000000000L) != 0L)
+ } else if ((active0 & 0x40000000000000L) != 0L) {
return jjStartNfaWithStates_1(2, 54, 6);
+ }
break;
case 108:
return jjMoveStringLiteralDfa3_1(active0, 0x60000L);
@@ -1229,14 +1362,16 @@
case 115:
return jjMoveStringLiteralDfa3_1(active0, 0x400000000000L);
case 116:
- if ((active0 & 0x10000000000L) != 0L)
+ if ((active0 & 0x10000000000L) != 0L) {
return jjStartNfaWithStates_1(2, 40, 6);
+ }
break;
case 117:
return jjMoveStringLiteralDfa3_1(active0, 0x10000L);
case 118:
- if ((active0 & 0x10000000000000L) != 0L)
+ if ((active0 & 0x10000000000000L) != 0L) {
return jjStartNfaWithStates_1(2, 52, 6);
+ }
break;
default:
break;
@@ -1245,8 +1380,9 @@
}
private int jjMoveStringLiteralDfa3_1(long old0, long active0) {
- if (((active0 &= old0)) == 0L)
+ if (((active0 &= old0)) == 0L) {
return jjStartNfa_1(1, old0);
+ }
try {
curChar = input_stream.readChar();
} catch (java.io.IOException e) {
@@ -1255,12 +1391,14 @@
}
switch (curChar) {
case 101:
- if ((active0 & 0x10000L) != 0L)
+ if ((active0 & 0x10000L) != 0L) {
return jjStartNfaWithStates_1(3, 16, 6);
+ }
break;
case 108:
- if ((active0 & 0x40000L) != 0L)
+ if ((active0 & 0x40000L) != 0L) {
return jjStartNfaWithStates_1(3, 18, 6);
+ }
break;
case 115:
return jjMoveStringLiteralDfa4_1(active0, 0x20000L);
@@ -1273,8 +1411,9 @@
}
private int jjMoveStringLiteralDfa4_1(long old0, long active0) {
- if (((active0 &= old0)) == 0L)
+ if (((active0 &= old0)) == 0L) {
return jjStartNfa_1(2, old0);
+ }
try {
curChar = input_stream.readChar();
} catch (java.io.IOException e) {
@@ -1285,12 +1424,14 @@
case 97:
return jjMoveStringLiteralDfa5_1(active0, 0x400000000000L);
case 101:
- if ((active0 & 0x20000L) != 0L)
+ if ((active0 & 0x20000L) != 0L) {
return jjStartNfaWithStates_1(4, 17, 6);
+ }
break;
case 121:
- if ((active0 & 0x200000000000L) != 0L)
+ if ((active0 & 0x200000000000L) != 0L) {
return jjStartNfaWithStates_1(4, 45, 6);
+ }
break;
default:
break;
@@ -1299,8 +1440,9 @@
}
private int jjMoveStringLiteralDfa5_1(long old0, long active0) {
- if (((active0 &= old0)) == 0L)
+ if (((active0 &= old0)) == 0L) {
return jjStartNfa_1(3, old0);
+ }
try {
curChar = input_stream.readChar();
} catch (java.io.IOException e) {
@@ -1317,8 +1459,9 @@
}
private int jjMoveStringLiteralDfa6_1(long old0, long active0) {
- if (((active0 &= old0)) == 0L)
+ if (((active0 &= old0)) == 0L) {
return jjStartNfa_1(4, old0);
+ }
try {
curChar = input_stream.readChar();
} catch (java.io.IOException e) {
@@ -1335,8 +1478,9 @@
}
private int jjMoveStringLiteralDfa7_1(long old0, long active0) {
- if (((active0 &= old0)) == 0L)
+ if (((active0 &= old0)) == 0L) {
return jjStartNfa_1(5, old0);
+ }
try {
curChar = input_stream.readChar();
} catch (java.io.IOException e) {
@@ -1353,8 +1497,9 @@
}
private int jjMoveStringLiteralDfa8_1(long old0, long active0) {
- if (((active0 &= old0)) == 0L)
+ if (((active0 &= old0)) == 0L) {
return jjStartNfa_1(6, old0);
+ }
try {
curChar = input_stream.readChar();
} catch (java.io.IOException e) {
@@ -1371,8 +1516,9 @@
}
private int jjMoveStringLiteralDfa9_1(long old0, long active0) {
- if (((active0 &= old0)) == 0L)
+ if (((active0 &= old0)) == 0L) {
return jjStartNfa_1(7, old0);
+ }
try {
curChar = input_stream.readChar();
} catch (java.io.IOException e) {
@@ -1381,8 +1527,9 @@
}
switch (curChar) {
case 102:
- if ((active0 & 0x400000000000L) != 0L)
+ if ((active0 & 0x400000000000L) != 0L) {
return jjStartNfaWithStates_1(9, 46, 6);
+ }
break;
default:
break;
@@ -1408,165 +1555,206 @@
jjstateSet[0] = startState;
int kind = 0x7fffffff;
for (;;) {
- if (++jjround == 0x7fffffff)
+ if (++jjround == 0x7fffffff) {
ReInitRounds();
+ }
if (curChar < 64) {
long l = 1L << curChar;
do {
switch (jjstateSet[--i]) {
case 0:
if ((0x3ff000000000000L & l) != 0L) {
- if (kind > 11)
+ if (kind > 11) {
kind = 11;
+ }
jjCheckNAddStates(4, 8);
} else if ((0x1800000000L & l) != 0L) {
- if (kind > 58)
+ if (kind > 58) {
kind = 58;
+ }
jjCheckNAdd(6);
- } else if (curChar == 39)
+ } else if (curChar == 39) {
jjCheckNAddStates(9, 13);
- else if (curChar == 34)
+ } else if (curChar == 34) {
jjCheckNAddStates(14, 18);
- else if (curChar == 46)
+ } else if (curChar == 46) {
jjCheckNAdd(1);
+ }
break;
case 1:
- if ((0x3ff000000000000L & l) == 0L)
+ if ((0x3ff000000000000L & l) == 0L) {
break;
- if (kind > 12)
+ }
+ if (kind > 12) {
kind = 12;
+ }
jjCheckNAddTwoStates(1, 2);
break;
case 3:
- if ((0x280000000000L & l) != 0L)
+ if ((0x280000000000L & l) != 0L) {
jjCheckNAdd(4);
+ }
break;
case 4:
- if ((0x3ff000000000000L & l) == 0L)
+ if ((0x3ff000000000000L & l) == 0L) {
break;
- if (kind > 12)
+ }
+ if (kind > 12) {
kind = 12;
+ }
jjCheckNAdd(4);
break;
case 5:
- if ((0x1800000000L & l) == 0L)
+ if ((0x1800000000L & l) == 0L) {
break;
- if (kind > 58)
+ }
+ if (kind > 58) {
kind = 58;
+ }
jjCheckNAdd(6);
break;
case 6:
- if ((0x3ff001000000000L & l) == 0L)
+ if ((0x3ff001000000000L & l) == 0L) {
break;
- if (kind > 58)
+ }
+ if (kind > 58) {
kind = 58;
+ }
jjCheckNAdd(6);
break;
case 7:
- if ((0x3ff000000000000L & l) == 0L)
+ if ((0x3ff000000000000L & l) == 0L) {
break;
- if (kind > 11)
+ }
+ if (kind > 11) {
kind = 11;
+ }
jjCheckNAddStates(4, 8);
break;
case 8:
- if ((0x3ff000000000000L & l) == 0L)
+ if ((0x3ff000000000000L & l) == 0L) {
break;
- if (kind > 11)
+ }
+ if (kind > 11) {
kind = 11;
+ }
jjCheckNAdd(8);
break;
case 9:
- if ((0x3ff000000000000L & l) != 0L)
+ if ((0x3ff000000000000L & l) != 0L) {
jjCheckNAddTwoStates(9, 10);
+ }
break;
case 10:
- if (curChar != 46)
+ if (curChar != 46) {
break;
- if (kind > 12)
+ }
+ if (kind > 12) {
kind = 12;
+ }
jjCheckNAddTwoStates(11, 12);
break;
case 11:
- if ((0x3ff000000000000L & l) == 0L)
+ if ((0x3ff000000000000L & l) == 0L) {
break;
- if (kind > 12)
+ }
+ if (kind > 12) {
kind = 12;
+ }
jjCheckNAddTwoStates(11, 12);
break;
case 13:
- if ((0x280000000000L & l) != 0L)
+ if ((0x280000000000L & l) != 0L) {
jjCheckNAdd(14);
+ }
break;
case 14:
- if ((0x3ff000000000000L & l) == 0L)
+ if ((0x3ff000000000000L & l) == 0L) {
break;
- if (kind > 12)
+ }
+ if (kind > 12) {
kind = 12;
+ }
jjCheckNAdd(14);
break;
case 15:
- if ((0x3ff000000000000L & l) != 0L)
+ if ((0x3ff000000000000L & l) != 0L) {
jjCheckNAddTwoStates(15, 16);
+ }
break;
case 17:
- if ((0x280000000000L & l) != 0L)
+ if ((0x280000000000L & l) != 0L) {
jjCheckNAdd(18);
+ }
break;
case 18:
- if ((0x3ff000000000000L & l) == 0L)
+ if ((0x3ff000000000000L & l) == 0L) {
break;
- if (kind > 12)
+ }
+ if (kind > 12) {
kind = 12;
+ }
jjCheckNAdd(18);
break;
case 19:
- if (curChar == 34)
+ if (curChar == 34) {
jjCheckNAddStates(14, 18);
+ }
break;
case 20:
- if ((0xfffffffbffffffffL & l) != 0L)
+ if ((0xfffffffbffffffffL & l) != 0L) {
jjCheckNAddStates(19, 21);
+ }
break;
case 22:
- if (curChar == 34)
+ if (curChar == 34) {
jjCheckNAddStates(19, 21);
+ }
break;
case 23:
- if (curChar == 34 && kind > 14)
+ if (curChar == 34 && kind > 14) {
kind = 14;
+ }
break;
case 24:
- if ((0xfffffffbffffffffL & l) != 0L)
+ if ((0xfffffffbffffffffL & l) != 0L) {
jjCheckNAddTwoStates(24, 25);
+ }
break;
case 26:
- if ((0xfffffffbffffffffL & l) != 0L && kind > 15)
+ if ((0xfffffffbffffffffL & l) != 0L && kind > 15) {
kind = 15;
+ }
break;
case 27:
- if (curChar == 39)
+ if (curChar == 39) {
jjCheckNAddStates(9, 13);
+ }
break;
case 28:
- if ((0xffffff7fffffffffL & l) != 0L)
+ if ((0xffffff7fffffffffL & l) != 0L) {
jjCheckNAddStates(22, 24);
+ }
break;
case 30:
- if (curChar == 39)
+ if (curChar == 39) {
jjCheckNAddStates(22, 24);
+ }
break;
case 31:
- if (curChar == 39 && kind > 14)
+ if (curChar == 39 && kind > 14) {
kind = 14;
+ }
break;
case 32:
- if ((0xffffff7fffffffffL & l) != 0L)
+ if ((0xffffff7fffffffffL & l) != 0L) {
jjCheckNAddTwoStates(32, 33);
+ }
break;
case 34:
- if ((0xffffff7fffffffffL & l) != 0L && kind > 15)
+ if ((0xffffff7fffffffffL & l) != 0L && kind > 15) {
kind = 15;
+ }
break;
default:
break;
@@ -1578,68 +1766,84 @@
switch (jjstateSet[--i]) {
case 0:
case 6:
- if ((0x7fffffe87fffffeL & l) == 0L)
+ if ((0x7fffffe87fffffeL & l) == 0L) {
break;
- if (kind > 58)
+ }
+ if (kind > 58) {
kind = 58;
+ }
jjCheckNAdd(6);
break;
case 2:
- if ((0x2000000020L & l) != 0L)
+ if ((0x2000000020L & l) != 0L) {
jjAddStates(25, 26);
+ }
break;
case 12:
- if ((0x2000000020L & l) != 0L)
+ if ((0x2000000020L & l) != 0L) {
jjAddStates(27, 28);
+ }
break;
case 16:
- if ((0x2000000020L & l) != 0L)
+ if ((0x2000000020L & l) != 0L) {
jjAddStates(29, 30);
+ }
break;
case 20:
- if ((0xffffffffefffffffL & l) != 0L)
+ if ((0xffffffffefffffffL & l) != 0L) {
jjCheckNAddStates(19, 21);
+ }
break;
case 21:
- if (curChar == 92)
+ if (curChar == 92) {
jjstateSet[jjnewStateCnt++] = 22;
+ }
break;
case 22:
- if (curChar == 92)
+ if (curChar == 92) {
jjCheckNAddStates(19, 21);
+ }
break;
case 24:
- if ((0xffffffffefffffffL & l) != 0L)
+ if ((0xffffffffefffffffL & l) != 0L) {
jjAddStates(31, 32);
+ }
break;
case 25:
- if (curChar == 92)
+ if (curChar == 92) {
jjstateSet[jjnewStateCnt++] = 26;
+ }
break;
case 26:
case 34:
- if ((0xffffffffefffffffL & l) != 0L && kind > 15)
+ if ((0xffffffffefffffffL & l) != 0L && kind > 15) {
kind = 15;
+ }
break;
case 28:
- if ((0xffffffffefffffffL & l) != 0L)
+ if ((0xffffffffefffffffL & l) != 0L) {
jjCheckNAddStates(22, 24);
+ }
break;
case 29:
- if (curChar == 92)
+ if (curChar == 92) {
jjstateSet[jjnewStateCnt++] = 30;
+ }
break;
case 30:
- if (curChar == 92)
+ if (curChar == 92) {
jjCheckNAddStates(22, 24);
+ }
break;
case 32:
- if ((0xffffffffefffffffL & l) != 0L)
+ if ((0xffffffffefffffffL & l) != 0L) {
jjAddStates(33, 34);
+ }
break;
case 33:
- if (curChar == 92)
+ if (curChar == 92) {
jjstateSet[jjnewStateCnt++] = 34;
+ }
break;
default:
break;
@@ -1655,32 +1859,39 @@
switch (jjstateSet[--i]) {
case 0:
case 6:
- if (!jjCanMove_1(hiByte, i1, i2, l1, l2))
+ if (!jjCanMove_1(hiByte, i1, i2, l1, l2)) {
break;
- if (kind > 58)
+ }
+ if (kind > 58) {
kind = 58;
+ }
jjCheckNAdd(6);
break;
case 20:
- if (jjCanMove_0(hiByte, i1, i2, l1, l2))
+ if (jjCanMove_0(hiByte, i1, i2, l1, l2)) {
jjAddStates(19, 21);
+ }
break;
case 24:
- if (jjCanMove_0(hiByte, i1, i2, l1, l2))
+ if (jjCanMove_0(hiByte, i1, i2, l1, l2)) {
jjAddStates(31, 32);
+ }
break;
case 26:
case 34:
- if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 15)
+ if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 15) {
kind = 15;
+ }
break;
case 28:
- if (jjCanMove_0(hiByte, i1, i2, l1, l2))
+ if (jjCanMove_0(hiByte, i1, i2, l1, l2)) {
jjAddStates(22, 24);
+ }
break;
case 32:
- if (jjCanMove_0(hiByte, i1, i2, l1, l2))
+ if (jjCanMove_0(hiByte, i1, i2, l1, l2)) {
jjAddStates(33, 34);
+ }
break;
default:
break;
@@ -1693,8 +1904,9 @@
kind = 0x7fffffff;
}
++curPos;
- if ((i = jjnewStateCnt) == (startsAt = 35 - (jjnewStateCnt = startsAt)))
+ if ((i = jjnewStateCnt) == (startsAt = 35 - (jjnewStateCnt = startsAt))) {
return curPos;
+ }
try {
curChar = input_stream.readChar();
} catch (java.io.IOException e) {
@@ -1711,8 +1923,9 @@
case 0:
return ((jjbitVec2[i2] & l2) != 0L);
default:
- if ((jjbitVec0[i1] & l1) != 0L)
+ if ((jjbitVec0[i1] & l1) != 0L) {
return true;
+ }
return false;
}
}
@@ -1730,8 +1943,9 @@
case 61:
return ((jjbitVec8[i2] & l2) != 0L);
default:
- if ((jjbitVec3[i1] & l1) != 0L)
+ if ((jjbitVec3[i1] & l1) != 0L) {
return true;
+ }
return false;
}
}
@@ -1762,8 +1976,9 @@
/** Constructor. */
public ELParserTokenManager(SimpleCharStream stream) {
- if (SimpleCharStream.staticFlag)
+ if (SimpleCharStream.staticFlag) {
throw new Error("ERROR: Cannot use a static CharStream class with a non-static lexical analyzer.");
+ }
input_stream = stream;
}
@@ -1784,8 +1999,9 @@
private void ReInitRounds() {
int i;
jjround = 0x80000001;
- for (i = 35; i-- > 0;)
+ for (i = 35; i-- > 0;) {
jjrounds[i] = 0x80000000;
+ }
}
/** Reinitialise parser. */
@@ -1796,10 +2012,11 @@
/** Switch to specified lex state. */
public void SwitchTo(int lexState) {
- if (lexState >= 3 || lexState < 0)
+ if (lexState >= 3 || lexState < 0) {
throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE);
- else
+ } else {
curLexState = lexState;
+ }
}
protected Token jjFillToken() {
@@ -1860,8 +2077,9 @@
case 1:
try {
input_stream.backup(0);
- while (curChar <= 32 && (0x100002600L & (1L << curChar)) != 0L)
+ while (curChar <= 32 && (0x100002600L & (1L << curChar)) != 0L) {
curChar = input_stream.BeginToken();
+ }
} catch (java.io.IOException e1) {
continue EOFLoop;
}
@@ -1875,8 +2093,9 @@
case 2:
try {
input_stream.backup(0);
- while (curChar <= 32 && (0x100002600L & (1L << curChar)) != 0L)
+ while (curChar <= 32 && (0x100002600L & (1L << curChar)) != 0L) {
curChar = input_stream.BeginToken();
+ }
} catch (java.io.IOException e1) {
continue EOFLoop;
}
@@ -1889,17 +2108,20 @@
break;
}
if (jjmatchedKind != 0x7fffffff) {
- if (jjmatchedPos + 1 < curPos)
+ if (jjmatchedPos + 1 < curPos) {
input_stream.backup(curPos - jjmatchedPos - 1);
+ }
if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) {
matchedToken = jjFillToken();
TokenLexicalActions(matchedToken);
- if (jjnewLexState[jjmatchedKind] != -1)
+ if (jjnewLexState[jjmatchedKind] != -1) {
curLexState = jjnewLexState[jjmatchedKind];
+ }
return matchedToken;
} else {
- if (jjnewLexState[jjmatchedKind] != -1)
+ if (jjnewLexState[jjmatchedKind] != -1) {
curLexState = jjnewLexState[jjmatchedKind];
+ }
continue EOFLoop;
}
}
@@ -1916,8 +2138,9 @@
if (curChar == '\n' || curChar == '\r') {
error_line++;
error_column = 0;
- } else
+ } else {
error_column++;
+ }
}
if (!EOFSeen) {
input_stream.backup(1);
diff --git a/impl/src/main/java/com/sun/el/parser/ELParserTreeConstants.java b/impl/src/main/java/com/sun/el/parser/ELParserTreeConstants.java
index 937ccfc..8a2762f 100644
--- a/impl/src/main/java/com/sun/el/parser/ELParserTreeConstants.java
+++ b/impl/src/main/java/com/sun/el/parser/ELParserTreeConstants.java
@@ -18,50 +18,50 @@
package com.sun.el.parser;
public interface ELParserTreeConstants {
- public int JJTCOMPOSITEEXPRESSION = 0;
- public int JJTLITERALEXPRESSION = 1;
- public int JJTDEFERREDEXPRESSION = 2;
- public int JJTDYNAMICEXPRESSION = 3;
- public int JJTVOID = 4;
- public int JJTSEMICOLON = 5;
- public int JJTASSIGN = 6;
- public int JJTLAMBDAEXPRESSION = 7;
- public int JJTLAMBDAPARAMETERS = 8;
- public int JJTCHOICE = 9;
- public int JJTOR = 10;
- public int JJTAND = 11;
- public int JJTEQUAL = 12;
- public int JJTNOTEQUAL = 13;
- public int JJTLESSTHAN = 14;
- public int JJTGREATERTHAN = 15;
- public int JJTLESSTHANEQUAL = 16;
- public int JJTGREATERTHANEQUAL = 17;
- public int JJTCONCAT = 18;
- public int JJTPLUS = 19;
- public int JJTMINUS = 20;
- public int JJTMULT = 21;
- public int JJTDIV = 22;
- public int JJTMOD = 23;
- public int JJTNEGATIVE = 24;
- public int JJTNOT = 25;
- public int JJTEMPTY = 26;
- public int JJTVALUE = 27;
- public int JJTDOTSUFFIX = 28;
- public int JJTBRACKETSUFFIX = 29;
- public int JJTMETHODARGUMENTS = 30;
- public int JJTMAPDATA = 31;
- public int JJTMAPENTRY = 32;
- public int JJTLISTDATA = 33;
- public int JJTIDENTIFIER = 34;
- public int JJTFUNCTION = 35;
- public int JJTTRUE = 36;
- public int JJTFALSE = 37;
- public int JJTFLOATINGPOINT = 38;
- public int JJTINTEGER = 39;
- public int JJTSTRING = 40;
- public int JJTNULL = 41;
+ int JJTCOMPOSITEEXPRESSION = 0;
+ int JJTLITERALEXPRESSION = 1;
+ int JJTDEFERREDEXPRESSION = 2;
+ int JJTDYNAMICEXPRESSION = 3;
+ int JJTVOID = 4;
+ int JJTSEMICOLON = 5;
+ int JJTASSIGN = 6;
+ int JJTLAMBDAEXPRESSION = 7;
+ int JJTLAMBDAPARAMETERS = 8;
+ int JJTCHOICE = 9;
+ int JJTOR = 10;
+ int JJTAND = 11;
+ int JJTEQUAL = 12;
+ int JJTNOTEQUAL = 13;
+ int JJTLESSTHAN = 14;
+ int JJTGREATERTHAN = 15;
+ int JJTLESSTHANEQUAL = 16;
+ int JJTGREATERTHANEQUAL = 17;
+ int JJTCONCAT = 18;
+ int JJTPLUS = 19;
+ int JJTMINUS = 20;
+ int JJTMULT = 21;
+ int JJTDIV = 22;
+ int JJTMOD = 23;
+ int JJTNEGATIVE = 24;
+ int JJTNOT = 25;
+ int JJTEMPTY = 26;
+ int JJTVALUE = 27;
+ int JJTDOTSUFFIX = 28;
+ int JJTBRACKETSUFFIX = 29;
+ int JJTMETHODARGUMENTS = 30;
+ int JJTMAPDATA = 31;
+ int JJTMAPENTRY = 32;
+ int JJTLISTDATA = 33;
+ int JJTIDENTIFIER = 34;
+ int JJTFUNCTION = 35;
+ int JJTTRUE = 36;
+ int JJTFALSE = 37;
+ int JJTFLOATINGPOINT = 38;
+ int JJTINTEGER = 39;
+ int JJTSTRING = 40;
+ int JJTNULL = 41;
- public String[] jjtNodeName = { "CompositeExpression", "LiteralExpression", "DeferredExpression", "DynamicExpression", "void", "SemiColon", "Assign",
+ String[] jjtNodeName = { "CompositeExpression", "LiteralExpression", "DeferredExpression", "DynamicExpression", "void", "SemiColon", "Assign",
"LambdaExpression", "LambdaParameters", "Choice", "Or", "And", "Equal", "NotEqual", "LessThan", "GreaterThan", "LessThanEqual", "GreaterThanEqual",
"Concat", "Plus", "Minus", "Mult", "Div", "Mod", "Negative", "Not", "Empty", "Value", "DotSuffix", "BracketSuffix", "MethodArguments", "MapData",
"MapEntry", "ListData", "Identifier", "Function", "True", "False", "FloatingPoint", "Integer", "String", "Null", };
diff --git a/impl/src/main/java/com/sun/el/parser/Node.java b/impl/src/main/java/com/sun/el/parser/Node.java
index c84aa75..be71187 100644
--- a/impl/src/main/java/com/sun/el/parser/Node.java
+++ b/impl/src/main/java/com/sun/el/parser/Node.java
@@ -36,56 +36,56 @@
* This method is called after the node has been made the current node. It indicates that child nodes can now be added
* to it.
*/
- public void jjtOpen();
+ void jjtOpen();
/**
* This method is called after all the child nodes have been added.
*/
- public void jjtClose();
+ void jjtClose();
/**
* This pair of methods are used to inform the node of its parent.
*/
- public void jjtSetParent(Node n);
+ void jjtSetParent(Node n);
- public Node jjtGetParent();
+ Node jjtGetParent();
/**
* This method tells the node to add its argument to the node's list of children.
*/
- public void jjtAddChild(Node n, int i);
+ void jjtAddChild(Node n, int i);
/**
* This method returns a child node. The children are numbered from zero, left to right.
*/
- public Node jjtGetChild(int i);
+ Node jjtGetChild(int i);
/** Return the number of children the node has. */
- public int jjtGetNumChildren();
+ int jjtGetNumChildren();
- public String getImage();
+ String getImage();
- public Object getValue(EvaluationContext ctx) throws ELException;
+ Object getValue(EvaluationContext ctx) throws ELException;
- public void setValue(EvaluationContext ctx, Object value) throws ELException;
+ void setValue(EvaluationContext ctx, Object value) throws ELException;
- public Class getType(EvaluationContext ctx) throws ELException;
+ Class getType(EvaluationContext ctx) throws ELException;
- public ValueReference getValueReference(EvaluationContext ctx) throws ELException;
+ ValueReference getValueReference(EvaluationContext ctx) throws ELException;
- public boolean isReadOnly(EvaluationContext ctx) throws ELException;
+ boolean isReadOnly(EvaluationContext ctx) throws ELException;
- public void accept(NodeVisitor visitor) throws ELException;
+ void accept(NodeVisitor visitor) throws ELException;
- public MethodInfo getMethodInfo(EvaluationContext ctx, Class[] paramTypes) throws ELException;
+ MethodInfo getMethodInfo(EvaluationContext ctx, Class[] paramTypes) throws ELException;
- public Object invoke(EvaluationContext ctx, Class[] paramTypes, Object[] paramValues) throws ELException;
+ Object invoke(EvaluationContext ctx, Class[] paramTypes, Object[] paramValues) throws ELException;
@Override
- public boolean equals(Object n);
+ boolean equals(Object n);
@Override
- public int hashCode();
+ int hashCode();
- public boolean isParametersProvided();
+ boolean isParametersProvided();
}
diff --git a/impl/src/main/java/com/sun/el/parser/NodeVisitor.java b/impl/src/main/java/com/sun/el/parser/NodeVisitor.java
index d71a2ec..e18922c 100644
--- a/impl/src/main/java/com/sun/el/parser/NodeVisitor.java
+++ b/impl/src/main/java/com/sun/el/parser/NodeVisitor.java
@@ -23,5 +23,5 @@
* @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: kchung $
*/
public interface NodeVisitor {
- public void visit(Node node) throws ELException;
+ void visit(Node node) throws ELException;
}
diff --git a/impl/src/main/java/com/sun/el/parser/ParseException.java b/impl/src/main/java/com/sun/el/parser/ParseException.java
index 108a060..ac9dee3 100644
--- a/impl/src/main/java/com/sun/el/parser/ParseException.java
+++ b/impl/src/main/java/com/sun/el/parser/ParseException.java
@@ -108,8 +108,9 @@
String retval = "Encountered \"";
Token tok = currentToken.next;
for (int i = 0; i < maxSize; i++) {
- if (i != 0)
+ if (i != 0) {
retval += " ";
+ }
if (tok.kind == 0) {
retval += tokenImage[0];
break;
diff --git a/impl/src/main/java/com/sun/el/parser/SimpleCharStream.java b/impl/src/main/java/com/sun/el/parser/SimpleCharStream.java
index bd5c677..4b0b619 100644
--- a/impl/src/main/java/com/sun/el/parser/SimpleCharStream.java
+++ b/impl/src/main/java/com/sun/el/parser/SimpleCharStream.java
@@ -102,16 +102,18 @@
if (tokenBegin > 2048) {
bufpos = maxNextCharInd = 0;
available = tokenBegin;
- } else if (tokenBegin < 0)
+ } else if (tokenBegin < 0) {
bufpos = maxNextCharInd = 0;
- else
+ } else {
ExpandBuff(false);
- } else if (available > tokenBegin)
+ }
+ } else if (available > tokenBegin) {
available = bufsize;
- else if ((tokenBegin - available) < 2048)
+ } else if ((tokenBegin - available) < 2048) {
ExpandBuff(true);
- else
+ } else {
available = tokenBegin;
+ }
}
int i;
@@ -119,14 +121,16 @@
if ((i = inputStream.read(buffer, maxNextCharInd, available - maxNextCharInd)) == -1) {
inputStream.close();
throw new java.io.IOException();
- } else
+ } else {
maxNextCharInd += i;
+ }
return;
} catch (java.io.IOException e) {
--bufpos;
backup(0);
- if (tokenBegin == -1)
+ if (tokenBegin == -1) {
tokenBegin = bufpos;
+ }
throw e;
}
}
@@ -150,8 +154,9 @@
prevCharIsCR = false;
if (c == '\n') {
prevCharIsLF = true;
- } else
+ } else {
line += (column = 1);
+ }
}
switch (c) {
@@ -178,14 +183,16 @@
if (inBuf > 0) {
--inBuf;
- if (++bufpos == bufsize)
+ if (++bufpos == bufsize) {
bufpos = 0;
+ }
return buffer[bufpos];
}
- if (++bufpos >= maxNextCharInd)
+ if (++bufpos >= maxNextCharInd) {
FillBuff();
+ }
char c = buffer[bufpos];
@@ -237,8 +244,9 @@
public void backup(int amount) {
inBuf += amount;
- if ((bufpos -= amount) < 0)
+ if ((bufpos -= amount) < 0) {
bufpos += bufsize;
+ }
}
/** Constructor. */
@@ -355,19 +363,20 @@
/** Get token literal value. */
public String GetImage() {
- if (bufpos >= tokenBegin)
+ if (bufpos >= tokenBegin) {
return new String(buffer, tokenBegin, bufpos - tokenBegin + 1);
- else
+ } else {
return new String(buffer, tokenBegin, bufsize - tokenBegin) + new String(buffer, 0, bufpos + 1);
+ }
}
/** Get the suffix. */
public char[] GetSuffix(int len) {
char[] ret = new char[len];
- if ((bufpos + 1) >= len)
+ if ((bufpos + 1) >= len) {
System.arraycopy(buffer, bufpos - len + 1, ret, 0, len);
- else {
+ } else {
System.arraycopy(buffer, bufsize - (len - bufpos - 1), ret, 0, len - bufpos - 1);
System.arraycopy(buffer, 0, ret, len - bufpos - 1, bufpos + 1);
}
@@ -411,10 +420,11 @@
bufcolumn[j] = newCol + columnDiff;
while (i++ < len) {
- if (bufline[j = start % bufsize] != bufline[++start % bufsize])
+ if (bufline[j = start % bufsize] != bufline[++start % bufsize]) {
bufline[j] = newLine++;
- else
+ } else {
bufline[j] = newLine;
+ }
}
}
diff --git a/impl/src/main/java/com/sun/el/util/ReflectionUtil.java b/impl/src/main/java/com/sun/el/util/ReflectionUtil.java
index fbb22ff..3e4e48e 100644
--- a/impl/src/main/java/com/sun/el/util/ReflectionUtil.java
+++ b/impl/src/main/java/com/sun/el/util/ReflectionUtil.java
@@ -87,14 +87,15 @@
/**
* Converts an array of Class names to Class types
- *
+ *
* @param s
* @return The array of Classes
* @throws ClassNotFoundException
*/
public static Class[] toTypeArray(String[] s) throws ClassNotFoundException {
- if (s == null)
+ if (s == null) {
return null;
+ }
Class[] c = new Class[s.length];
for (int i = 0; i < s.length; i++) {
c[i] = forName(s[i]);
@@ -104,13 +105,14 @@
/**
* Converts an array of Class types to Class names
- *
+ *
* @param c
* @return The array of Classes
*/
public static String[] toTypeNameArray(Class[] c) {
- if (c == null)
+ if (c == null) {
return null;
+ }
String[] s = new String[c.length];
for (int i = 0; i < c.length; i++) {
s[i] = c[i].getName();