You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2010/12/07 16:38:07 UTC
svn commit: r1043099 - in /tomcat/trunk/java/org/apache/el:
lang/ELArithmetic.java lang/ELSupport.java lang/ExpressionBuilder.java
util/MessageFactory.java
Author: markt
Date: Tue Dec 7 15:38:06 2010
New Revision: 1043099
URL: http://svn.apache.org/viewvc?rev=1043099&view=rev
Log:
Fix modifier order in org.apache.el.*
Modified:
tomcat/trunk/java/org/apache/el/lang/ELArithmetic.java
tomcat/trunk/java/org/apache/el/lang/ELSupport.java
tomcat/trunk/java/org/apache/el/lang/ExpressionBuilder.java
tomcat/trunk/java/org/apache/el/util/MessageFactory.java
Modified: tomcat/trunk/java/org/apache/el/lang/ELArithmetic.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/el/lang/ELArithmetic.java?rev=1043099&r1=1043098&r2=1043099&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/el/lang/ELArithmetic.java (original)
+++ tomcat/trunk/java/org/apache/el/lang/ELArithmetic.java Tue Dec 7 15:38:06 2010
@@ -30,7 +30,7 @@ import org.apache.el.util.MessageFactory
*/
public abstract class ELArithmetic {
- public final static class BigDecimalDelegate extends ELArithmetic {
+ public static final class BigDecimalDelegate extends ELArithmetic {
@Override
protected Number add(Number num0, Number num1) {
@@ -78,7 +78,7 @@ public abstract class ELArithmetic {
}
}
- public final static class BigIntegerDelegate extends ELArithmetic {
+ public static final class BigIntegerDelegate extends ELArithmetic {
@Override
protected Number add(Number num0, Number num1) {
@@ -123,7 +123,7 @@ public abstract class ELArithmetic {
}
}
- public final static class DoubleDelegate extends ELArithmetic {
+ public static final class DoubleDelegate extends ELArithmetic {
@Override
protected Number add(Number num0, Number num1) {
@@ -194,7 +194,7 @@ public abstract class ELArithmetic {
}
}
- public final static class LongDelegate extends ELArithmetic {
+ public static final class LongDelegate extends ELArithmetic {
@Override
protected Number add(Number num0, Number num1) {
@@ -239,17 +239,17 @@ public abstract class ELArithmetic {
}
}
- public final static BigDecimalDelegate BIGDECIMAL = new BigDecimalDelegate();
+ public static final BigDecimalDelegate BIGDECIMAL = new BigDecimalDelegate();
- public final static BigIntegerDelegate BIGINTEGER = new BigIntegerDelegate();
+ public static final BigIntegerDelegate BIGINTEGER = new BigIntegerDelegate();
- public final static DoubleDelegate DOUBLE = new DoubleDelegate();
+ public static final DoubleDelegate DOUBLE = new DoubleDelegate();
- public final static LongDelegate LONG = new LongDelegate();
+ public static final LongDelegate LONG = new LongDelegate();
- private final static Long ZERO = new Long(0);
+ private static final Long ZERO = new Long(0);
- public final static Number add(final Object obj0, final Object obj1) {
+ public static final Number add(final Object obj0, final Object obj1) {
if (obj0 == null && obj1 == null) {
return new Long(0);
}
@@ -270,7 +270,7 @@ public abstract class ELArithmetic {
return delegate.add(num0, num1);
}
- public final static Number mod(final Object obj0, final Object obj1) {
+ public static final Number mod(final Object obj0, final Object obj1) {
if (obj0 == null && obj1 == null) {
return new Long(0);
}
@@ -291,7 +291,7 @@ public abstract class ELArithmetic {
return delegate.mod(num0, num1);
}
- public final static Number subtract(final Object obj0, final Object obj1) {
+ public static final Number subtract(final Object obj0, final Object obj1) {
if (obj0 == null && obj1 == null) {
return new Long(0);
}
@@ -312,7 +312,7 @@ public abstract class ELArithmetic {
return delegate.subtract(num0, num1);
}
- public final static Number divide(final Object obj0, final Object obj1) {
+ public static final Number divide(final Object obj0, final Object obj1) {
if (obj0 == null && obj1 == null) {
return ZERO;
}
@@ -331,7 +331,7 @@ public abstract class ELArithmetic {
return delegate.divide(num0, num1);
}
- public final static Number multiply(final Object obj0, final Object obj1) {
+ public static final Number multiply(final Object obj0, final Object obj1) {
if (obj0 == null && obj1 == null) {
return new Long(0);
}
@@ -352,11 +352,11 @@ public abstract class ELArithmetic {
return delegate.multiply(num0, num1);
}
- public final static boolean isNumber(final Object obj) {
+ public static final boolean isNumber(final Object obj) {
return (obj != null && isNumberType(obj.getClass()));
}
- public final static boolean isNumberType(final Class<?> type) {
+ public static final boolean isNumberType(final Class<?> type) {
return type == Long.TYPE || type == Double.TYPE ||
type == Byte.TYPE || type == Short.TYPE ||
type == Integer.TYPE || type == Float.TYPE ||
Modified: tomcat/trunk/java/org/apache/el/lang/ELSupport.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/el/lang/ELSupport.java?rev=1043099&r1=1043098&r2=1043099&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/el/lang/ELSupport.java (original)
+++ tomcat/trunk/java/org/apache/el/lang/ELSupport.java Tue Dec 7 15:38:06 2010
@@ -36,9 +36,9 @@ import org.apache.el.util.MessageFactory
*/
public class ELSupport {
- private final static Long ZERO = new Long(0L);
+ private static final Long ZERO = new Long(0L);
- public final static void throwUnhandled(Object base, Object property)
+ public static final void throwUnhandled(Object base, Object property)
throws ELException {
if (base == null) {
throw new PropertyNotFoundException(MessageFactory.get(
@@ -78,7 +78,7 @@ public class ELSupport {
* @throws ELException if neither object is Comparable
* @throws ClassCastException if the objects are not mutually comparable
*/
- public final static int compare(final Object obj0, final Object obj1)
+ public static final int compare(final Object obj0, final Object obj1)
throws ELException {
if (obj0 == obj1 || equals(obj0, obj1)) {
return 0;
@@ -133,7 +133,7 @@ public class ELSupport {
* @return true if the objects are equal
* @throws ELException
*/
- public final static boolean equals(final Object obj0, final Object obj1)
+ public static final boolean equals(final Object obj0, final Object obj1)
throws ELException {
if (obj0 == obj1) {
return true;
@@ -173,7 +173,7 @@ public class ELSupport {
}
}
- public final static Enum<?> coerceToEnum(final Object obj, Class type) {
+ public static final Enum<?> coerceToEnum(final Object obj, Class type) {
if (obj == null || "".equals(obj)) {
return null;
}
@@ -203,7 +203,7 @@ public class ELSupport {
* @return the Boolean value of the object
* @throws ELException if object is not Boolean or String
*/
- public final static Boolean coerceToBoolean(final Object obj)
+ public static final Boolean coerceToBoolean(final Object obj)
throws ELException {
if (obj == null || "".equals(obj)) {
return Boolean.FALSE;
@@ -219,7 +219,7 @@ public class ELSupport {
obj, obj.getClass(), Boolean.class));
}
- public final static Character coerceToCharacter(final Object obj)
+ public static final Character coerceToCharacter(final Object obj)
throws ELException {
if (obj == null || "".equals(obj)) {
return new Character((char) 0);
@@ -239,7 +239,7 @@ public class ELSupport {
obj, objType, Character.class));
}
- public final static Number coerceToNumber(final Object obj) {
+ public static final Number coerceToNumber(final Object obj) {
if (obj == null) {
return ZERO;
} else if (obj instanceof Number) {
@@ -254,7 +254,7 @@ public class ELSupport {
}
}
- protected final static Number coerceToNumber(final Number number,
+ protected static final Number coerceToNumber(final Number number,
final Class<?> type) throws ELException {
if (Long.TYPE == type || Long.class.equals(type)) {
return new Long(number.longValue());
@@ -300,7 +300,7 @@ public class ELSupport {
number, number.getClass(), type));
}
- public final static Number coerceToNumber(final Object obj,
+ public static final Number coerceToNumber(final Object obj,
final Class<?> type) throws ELException {
if (obj == null || "".equals(obj)) {
return coerceToNumber(ZERO, type);
@@ -321,7 +321,7 @@ public class ELSupport {
obj, obj.getClass(), type));
}
- protected final static Number coerceToNumber(final String val,
+ protected static final Number coerceToNumber(final String val,
final Class<?> type) throws ELException {
if (Long.TYPE == type || Long.class.equals(type)) {
try {
@@ -397,7 +397,7 @@ public class ELSupport {
* @param obj
* @return the String value of the object
*/
- public final static String coerceToString(final Object obj) {
+ public static final String coerceToString(final Object obj) {
if (obj == null) {
return "";
} else if (obj instanceof String) {
@@ -409,7 +409,7 @@ public class ELSupport {
}
}
- public final static Object coerceToType(final Object obj,
+ public static final Object coerceToType(final Object obj,
final Class<?> type) throws ELException {
if (type == null || Object.class.equals(type) ||
(obj != null && type.isAssignableFrom(obj.getClass()))) {
@@ -452,7 +452,7 @@ public class ELSupport {
* @param obj array to be checked
* @return true if the array contains a {@code null}
*/
- public final static boolean containsNulls(final Object[] obj) {
+ public static final boolean containsNulls(final Object[] obj) {
for (int i = 0; i < obj.length; i++) {
if (obj[0] == null) {
return true;
@@ -461,30 +461,30 @@ public class ELSupport {
return false;
}
- public final static boolean isBigDecimalOp(final Object obj0,
+ public static final boolean isBigDecimalOp(final Object obj0,
final Object obj1) {
return (obj0 instanceof BigDecimal || obj1 instanceof BigDecimal);
}
- public final static boolean isBigIntegerOp(final Object obj0,
+ public static final boolean isBigIntegerOp(final Object obj0,
final Object obj1) {
return (obj0 instanceof BigInteger || obj1 instanceof BigInteger);
}
- public final static boolean isDoubleOp(final Object obj0, final Object obj1) {
+ public static final boolean isDoubleOp(final Object obj0, final Object obj1) {
return (obj0 instanceof Double
|| obj1 instanceof Double
|| obj0 instanceof Float
|| obj1 instanceof Float);
}
- public final static boolean isDoubleStringOp(final Object obj0,
+ public static final boolean isDoubleStringOp(final Object obj0,
final Object obj1) {
return (isDoubleOp(obj0, obj1)
|| (obj0 instanceof String && isStringFloat((String) obj0)) || (obj1 instanceof String && isStringFloat((String) obj1)));
}
- public final static boolean isLongOp(final Object obj0, final Object obj1) {
+ public static final boolean isLongOp(final Object obj0, final Object obj1) {
return (obj0 instanceof Long
|| obj1 instanceof Long
|| obj0 instanceof Integer
@@ -497,7 +497,7 @@ public class ELSupport {
|| obj1 instanceof Byte);
}
- public final static boolean isStringFloat(final String str) {
+ public static final boolean isStringFloat(final String str) {
int len = str.length();
if (len > 1) {
for (int i = 0; i < len; i++) {
@@ -514,7 +514,7 @@ public class ELSupport {
return false;
}
- public final static Number toFloat(final String value) {
+ public static final Number toFloat(final String value) {
try {
if (Double.parseDouble(value) > Double.MAX_VALUE) {
return new BigDecimal(value);
@@ -526,7 +526,7 @@ public class ELSupport {
}
}
- public final static Number toNumber(final String value) {
+ public static final Number toNumber(final String value) {
try {
return new Integer(Integer.parseInt(value));
} catch (NumberFormatException e0) {
Modified: tomcat/trunk/java/org/apache/el/lang/ExpressionBuilder.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/el/lang/ExpressionBuilder.java?rev=1043099&r1=1043098&r2=1043099&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/el/lang/ExpressionBuilder.java (original)
+++ tomcat/trunk/java/org/apache/el/lang/ExpressionBuilder.java Tue Dec 7 15:38:06 2010
@@ -99,12 +99,12 @@ public final class ExpressionBuilder imp
}
}
- public final static Node createNode(String expr) throws ELException {
+ public static final Node createNode(String expr) throws ELException {
Node n = createNodeInternal(expr);
return n;
}
- private final static Node createNodeInternal(String expr)
+ private static final Node createNodeInternal(String expr)
throws ELException {
if (expr == null) {
throw new ELException(MessageFactory.get("error.null"));
Modified: tomcat/trunk/java/org/apache/el/util/MessageFactory.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/el/util/MessageFactory.java?rev=1043099&r1=1043098&r2=1043099&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/el/util/MessageFactory.java (original)
+++ tomcat/trunk/java/org/apache/el/util/MessageFactory.java Tue Dec 7 15:38:06 2010
@@ -25,7 +25,7 @@ import java.util.ResourceBundle;
*/
public final class MessageFactory {
- protected final static ResourceBundle bundle = ResourceBundle
+ protected static final ResourceBundle bundle = ResourceBundle
.getBundle("org.apache.el.Messages");
/**
*
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org