Object obj = this.children[0].getValue(ctx);
if (obj == null) {
- return new Long(0);
+ return Long.valueOf(0);
}
if (obj instanceof BigDecimal) {
return ((BigDecimal) obj).negate();
if (isStringFloat((String) obj)) {
return new Double(-Double.parseDouble((String) obj));
}
- return new Long(-Long.parseLong((String) obj));
+ return Long.valueOf(-Long.parseLong((String) obj));
}
if (obj instanceof Long) {
- return new Long(-((Long) obj).longValue());
+ return Long.valueOf(-((Long) obj).longValue());
}
if (obj instanceof Double) {
return new Double(-((Double) obj).doubleValue());
}
if (obj instanceof Integer) {
- return new Integer(-((Integer) obj).intValue());
+ return Integer.valueOf(-((Integer) obj).intValue());
}
if (obj instanceof Float) {
return new Float(-((Float) obj).floatValue());
}
if (obj instanceof Short) {
- return new Short((short) -((Short) obj).shortValue());
+ return Short.valueOf((short) -((Short) obj).shortValue());
}
if (obj instanceof Byte) {
- return new Byte((byte) -((Byte) obj).byteValue());
+ return Byte.valueOf((byte) -((Byte) obj).byteValue());
}
Long num = (Long) coerceToNumber(obj, Long.class);
- return new Long(-num.longValue());
+ return Long.valueOf(-num.longValue());
}
}
id = i;
}
+ @Override
public void jjtOpen() {
// NOOP by default
}
+ @Override
public void jjtClose() {
// NOOP by default
}
+ @Override
public void jjtSetParent(Node n) {
parent = n;
}
+ @Override
public Node jjtGetParent() {
return parent;
}
+ @Override
public void jjtAddChild(Node n, int i) {
if (children == null) {
children = new Node[i + 1];
children[i] = n;
}
+ @Override
public Node jjtGetChild(int i) {
return children[i];
}
+ @Override
public int jjtGetNumChildren() {
return (children == null) ? 0 : children.length;
}
return prefix + toString();
}
- /*
- * Override this method if you want to customize how the node dumps out its
- * children.
- */
-
- public void dump(String prefix) {
- System.out.println(toString(prefix));
- if (children != null) {
- for (int i = 0; i < children.length; ++i) {
- SimpleNode n = (SimpleNode) children[i];
- if (n != null) {
- n.dump(prefix + " ");
- }
- }
- }
- }
-
+ @Override
public String getImage() {
return image;
}
this.image = image;
}
+ @Override
public Class<?> getType(EvaluationContext ctx)
throws ELException {
throw new UnsupportedOperationException();
}
+ @Override
public Object getValue(EvaluationContext ctx)
throws ELException {
throw new UnsupportedOperationException();
}
+ @Override
public boolean isReadOnly(EvaluationContext ctx)
throws ELException {
return true;
}
+ @Override
public void setValue(EvaluationContext ctx, Object value)
throws ELException {
throw new PropertyNotWritableException(MessageFactory.get("error.syntax.set"));
}
+ @Override
public void accept(NodeVisitor visitor) throws Exception {
visitor.visit(this);
if (this.children != null && this.children.length > 0) {
}
}
+ @Override
public Object invoke(EvaluationContext ctx, Class<?>[] paramTypes,
Object[] paramValues) throws ELException {
throw new UnsupportedOperationException();
}
+ @Override
public MethodInfo getMethodInfo(EvaluationContext ctx,
Class<?>[] paramTypes) throws ELException {
throw new UnsupportedOperationException();
/**
* @since EL 2.2
*/
+ @Override
public ValueReference getValueReference(EvaluationContext ctx) {
return null;
}
/**
* @since EL 2.2
*/
+ @Override
public boolean isParametersProvided() {
return false;
}
<FindBugsFilter>
+ <!-- Considered to be false positives -->
<Match>
<Class name="org.apache.catalina.startup.HostConfig" />
<Method name="checkResources" />
<Bug code="SWL" />
</Match>
+ <!-- Generated code -->
+ <Match>
+ <Class name="org.apache.el.parser.ELParserTokenManager" />
+ </Match>
+ <Match>
+ <Class name="org.apache.el.parser.TokenMgrError" />
+ </Match>
+ <Match>
+ <Class name="org.apache.el.parser.ParseException" />
+ </Match>
</FindBugsFilter>
\ No newline at end of file