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 2013/07/03 12:53:17 UTC

svn commit: r1499318 - in /tomcat/trunk/java/javax/el: ArrayELResolver.java BeanELResolver.java ELResolver.java ListELResolver.java MapELResolver.java ResourceBundleELResolver.java

Author: markt
Date: Wed Jul  3 10:53:17 2013
New Revision: 1499318

URL: http://svn.apache.org/r1499318
Log:
Switch to varargs for simpler code

Modified:
    tomcat/trunk/java/javax/el/ArrayELResolver.java
    tomcat/trunk/java/javax/el/BeanELResolver.java
    tomcat/trunk/java/javax/el/ELResolver.java
    tomcat/trunk/java/javax/el/ListELResolver.java
    tomcat/trunk/java/javax/el/MapELResolver.java
    tomcat/trunk/java/javax/el/ResourceBundleELResolver.java

Modified: tomcat/trunk/java/javax/el/ArrayELResolver.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/javax/el/ArrayELResolver.java?rev=1499318&r1=1499317&r2=1499318&view=diff
==============================================================================
--- tomcat/trunk/java/javax/el/ArrayELResolver.java (original)
+++ tomcat/trunk/java/javax/el/ArrayELResolver.java Wed Jul  3 10:53:17 2013
@@ -84,8 +84,7 @@ public class ArrayELResolver extends ELR
 
             if (this.readOnly) {
                 throw new PropertyNotWritableException(message(context,
-                        "resolverNotWriteable", new Object[] { base.getClass()
-                                .getName() }));
+                        "resolverNotWriteable", base.getClass().getName()));
             }
 
             int idx = coerce(property);
@@ -94,9 +93,8 @@ public class ArrayELResolver extends ELR
                     !base.getClass().getComponentType().isAssignableFrom(
                             value.getClass())) {
                 throw new ClassCastException(message(context,
-                        "objectNotAssignable",
-                        new Object[] {value.getClass().getName(),
-                        base.getClass().getComponentType().getName()}));
+                        "objectNotAssignable", value.getClass().getName(),
+                        base.getClass().getComponentType().getName()));
             }
             Array.set(base, idx, value);
         }

Modified: tomcat/trunk/java/javax/el/BeanELResolver.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/javax/el/BeanELResolver.java?rev=1499318&r1=1499317&r2=1499318&view=diff
==============================================================================
--- tomcat/trunk/java/javax/el/BeanELResolver.java (original)
+++ tomcat/trunk/java/javax/el/BeanELResolver.java Wed Jul  3 10:53:17 2013
@@ -110,8 +110,7 @@ public class BeanELResolver extends ELRe
                 throw (VirtualMachineError) cause;
             }
             throw new ELException(message(context, "propertyReadError",
-                    new Object[] { base.getClass().getName(),
-                            property.toString() }), cause);
+                    base.getClass().getName(), property.toString()), cause);
         } catch (Exception e) {
             throw new ELException(e);
         }
@@ -133,8 +132,7 @@ public class BeanELResolver extends ELRe
 
         if (this.readOnly) {
             throw new PropertyNotWritableException(message(context,
-                    "resolverNotWriteable", new Object[] { base.getClass()
-                            .getName() }));
+                    "resolverNotWriteable", base.getClass().getName()));
         }
 
         Method m = this.property(context, base, property).write(context);
@@ -151,8 +149,7 @@ public class BeanELResolver extends ELRe
                 throw (VirtualMachineError) cause;
             }
             throw new ELException(message(context, "propertyWriteError",
-                    new Object[] { base.getClass().getName(),
-                            property.toString() }), cause);
+                    base.getClass().getName(), property.toString()), cause);
         } catch (Exception e) {
             throw new ELException(e);
         }
@@ -342,8 +339,7 @@ public class BeanELResolver extends ELRe
             BeanProperty property = this.properties.get(name);
             if (property == null) {
                 throw new PropertyNotFoundException(message(ctx,
-                        "propertyNotFound",
-                        new Object[] { type.getName(), name }));
+                        "propertyNotFound", type.getName(), name));
             }
             return property;
         }

Modified: tomcat/trunk/java/javax/el/ELResolver.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/javax/el/ELResolver.java?rev=1499318&r1=1499317&r2=1499318&view=diff
==============================================================================
--- tomcat/trunk/java/javax/el/ELResolver.java (original)
+++ tomcat/trunk/java/javax/el/ELResolver.java Wed Jul  3 10:53:17 2013
@@ -29,7 +29,7 @@ import java.util.ResourceBundle;
  */
 public abstract class ELResolver {
 
-    static String message(ELContext context, String name, Object[] props) {
+    static String message(ELContext context, String name, Object... props) {
         Locale locale = null;
         if (context != null) {
             locale = context.getLocale();

Modified: tomcat/trunk/java/javax/el/ListELResolver.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/javax/el/ListELResolver.java?rev=1499318&r1=1499317&r2=1499318&view=diff
==============================================================================
--- tomcat/trunk/java/javax/el/ListELResolver.java (original)
+++ tomcat/trunk/java/javax/el/ListELResolver.java Wed Jul  3 10:53:17 2013
@@ -96,8 +96,7 @@ public class ListELResolver extends ELRe
 
             if (this.readOnly) {
                 throw new PropertyNotWritableException(message(context,
-                        "resolverNotWriteable", new Object[] { base.getClass()
-                                .getName() }));
+                        "resolverNotWriteable", base.getClass().getName()));
             }
 
             int idx = coerce(property);

Modified: tomcat/trunk/java/javax/el/MapELResolver.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/javax/el/MapELResolver.java?rev=1499318&r1=1499317&r2=1499318&view=diff
==============================================================================
--- tomcat/trunk/java/javax/el/MapELResolver.java (original)
+++ tomcat/trunk/java/javax/el/MapELResolver.java Wed Jul  3 10:53:17 2013
@@ -84,8 +84,7 @@ public class MapELResolver extends ELRes
 
             if (this.readOnly) {
                 throw new PropertyNotWritableException(message(context,
-                        "resolverNotWriteable", new Object[] { base.getClass()
-                                .getName() }));
+                        "resolverNotWriteable", base.getClass().getName()));
             }
 
             try {

Modified: tomcat/trunk/java/javax/el/ResourceBundleELResolver.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/javax/el/ResourceBundleELResolver.java?rev=1499318&r1=1499317&r2=1499318&view=diff
==============================================================================
--- tomcat/trunk/java/javax/el/ResourceBundleELResolver.java (original)
+++ tomcat/trunk/java/javax/el/ResourceBundleELResolver.java Wed Jul  3 10:53:17 2013
@@ -82,8 +82,7 @@ public class ResourceBundleELResolver ex
         if (base instanceof ResourceBundle) {
             context.setPropertyResolved(true);
             throw new PropertyNotWritableException(message(context,
-                    "resolverNotWriteable", new Object[] { base.getClass()
-                            .getName() }));
+                    "resolverNotWriteable", base.getClass().getName()));
         }
     }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org