geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xuhaih...@apache.org
Subject svn commit: r1024536 - /geronimo/specs/trunk/geronimo-el_2.2_spec/src/main/java/javax/el/
Date Wed, 20 Oct 2010 06:40:04 GMT
Author: xuhaihong
Date: Wed Oct 20 06:40:04 2010
New Revision: 1024536

URL: http://svn.apache.org/viewvc?rev=1024536&view=rev
Log:
Replace tab key with four while spaces

Modified:
    geronimo/specs/trunk/geronimo-el_2.2_spec/src/main/java/javax/el/ArrayELResolver.java
    geronimo/specs/trunk/geronimo-el_2.2_spec/src/main/java/javax/el/BeanELResolver.java
    geronimo/specs/trunk/geronimo-el_2.2_spec/src/main/java/javax/el/CompositeELResolver.java
    geronimo/specs/trunk/geronimo-el_2.2_spec/src/main/java/javax/el/ELException.java
    geronimo/specs/trunk/geronimo-el_2.2_spec/src/main/java/javax/el/ELResolver.java
    geronimo/specs/trunk/geronimo-el_2.2_spec/src/main/java/javax/el/ListELResolver.java
    geronimo/specs/trunk/geronimo-el_2.2_spec/src/main/java/javax/el/MapELResolver.java
    geronimo/specs/trunk/geronimo-el_2.2_spec/src/main/java/javax/el/PropertyNotFoundException.java
    geronimo/specs/trunk/geronimo-el_2.2_spec/src/main/java/javax/el/ResourceBundleELResolver.java

Modified: geronimo/specs/trunk/geronimo-el_2.2_spec/src/main/java/javax/el/ArrayELResolver.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-el_2.2_spec/src/main/java/javax/el/ArrayELResolver.java?rev=1024536&r1=1024535&r2=1024536&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-el_2.2_spec/src/main/java/javax/el/ArrayELResolver.java (original)
+++ geronimo/specs/trunk/geronimo-el_2.2_spec/src/main/java/javax/el/ArrayELResolver.java Wed Oct 20 06:40:04 2010
@@ -24,141 +24,141 @@ import java.util.Iterator;
 
 public class ArrayELResolver extends ELResolver {
 
-	private final boolean readOnly;
+    private final boolean readOnly;
 
-	public ArrayELResolver() {
-		this.readOnly = false;
-	}
-
-	public ArrayELResolver(boolean readOnly) {
-		this.readOnly = readOnly;
-	}
-
-	public Object getValue(ELContext context, Object base, Object property)
-			throws NullPointerException, PropertyNotFoundException, ELException {
-		if (context == null) {
-			throw new NullPointerException();
-		}
-
-		if (base != null && base.getClass().isArray()) {
-			context.setPropertyResolved(true);
-			int idx = coerce(property);
+    public ArrayELResolver() {
+        this.readOnly = false;
+    }
+
+    public ArrayELResolver(boolean readOnly) {
+        this.readOnly = readOnly;
+    }
+
+    public Object getValue(ELContext context, Object base, Object property)
+            throws NullPointerException, PropertyNotFoundException, ELException {
+        if (context == null) {
+            throw new NullPointerException();
+        }
+
+        if (base != null && base.getClass().isArray()) {
+            context.setPropertyResolved(true);
+            int idx = coerce(property);
             if (idx < 0 || idx >= Array.getLength(base)) {
                 return null;
             } else {
                 return Array.get(base, idx);
             }
-		}
+        }
+
+        return null;
+    }
+
+    public Class<?> getType(ELContext context, Object base, Object property)
+            throws NullPointerException, PropertyNotFoundException, ELException {
+        if (context == null) {
+            throw new NullPointerException();
+        }
+
+        if (base != null && base.getClass().isArray()) {
+            context.setPropertyResolved(true);
+            int idx = coerce(property);
+            checkBounds(base, idx);
+            return base.getClass().getComponentType();
+        }
+
+        return null;
+    }
+
+    public void setValue(ELContext context, Object base, Object property,
+            Object value) throws NullPointerException,
+            PropertyNotFoundException, PropertyNotWritableException,
+            ELException {
+        if (context == null) {
+            throw new NullPointerException();
+        }
+
+        if (base != null && base.getClass().isArray()) {
+            context.setPropertyResolved(true);
+
+            if (this.readOnly) {
+                throw new PropertyNotWritableException(message(context,
+                        "resolverNotWriteable", new Object[] { base.getClass()
+                                .getName() }));
+            }
 
-		return null;
-	}
+            int idx = coerce(property);
+            checkBounds(base, idx);
+            try {
+                Array.set(base, idx, value);
+            } catch (IllegalArgumentException e) {
+                ClassCastException ex = new ClassCastException(e.getMessage());
+                ex.initCause(e);
+                throw ex;
+            }
+        }
+    }
 
-	public Class<?> getType(ELContext context, Object base, Object property)
-			throws NullPointerException, PropertyNotFoundException, ELException {
-		if (context == null) {
-			throw new NullPointerException();
-		}
-
-		if (base != null && base.getClass().isArray()) {
-			context.setPropertyResolved(true);
-			int idx = coerce(property);
-			checkBounds(base, idx);
-			return base.getClass().getComponentType();
-		}
-
-		return null;
-	}
-
-	public void setValue(ELContext context, Object base, Object property,
-			Object value) throws NullPointerException,
-			PropertyNotFoundException, PropertyNotWritableException,
-			ELException {
-		if (context == null) {
-			throw new NullPointerException();
-		}
-
-		if (base != null && base.getClass().isArray()) {
-			context.setPropertyResolved(true);
-
-			if (this.readOnly) {
-				throw new PropertyNotWritableException(message(context,
-						"resolverNotWriteable", new Object[] { base.getClass()
-								.getName() }));
-			}
-
-			int idx = coerce(property);
-			checkBounds(base, idx);
-			try {
-			    Array.set(base, idx, value);
-			} catch (IllegalArgumentException e) {
-			    ClassCastException ex = new ClassCastException(e.getMessage());
-			    ex.initCause(e);
-			    throw ex;
-			}
-		}
-	}
-
-	public boolean isReadOnly(ELContext context, Object base, Object property)
-			throws NullPointerException, PropertyNotFoundException, ELException {
-		if (context == null) {
-			throw new NullPointerException();
-		}
-
-		if (base != null && base.getClass().isArray()) {
-			context.setPropertyResolved(true);
-			int idx = coerce(property);
-			checkBounds(base, idx);
-		}
-
-		return this.readOnly;
-	}
-
-	public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context, Object base) {
-		if (base != null && base.getClass().isArray()) {
-			FeatureDescriptor[] descs = new FeatureDescriptor[Array.getLength(base)];
-			for (int i = 0; i < descs.length; i++) {
-				descs[i] = new FeatureDescriptor();
-				descs[i].setDisplayName("["+i+"]");
-				descs[i].setExpert(false);
-				descs[i].setHidden(false);
-				descs[i].setName(""+i);
-				descs[i].setPreferred(true);
-				descs[i].setValue(RESOLVABLE_AT_DESIGN_TIME, Boolean.FALSE);
-				descs[i].setValue(TYPE, Integer.class);
-			}
-			return Arrays.asList(descs).iterator();
-		}
-		return null;
-	}
-
-	public Class<?> getCommonPropertyType(ELContext context, Object base) {
-		if (base != null && base.getClass().isArray()) {
-			return Integer.class;
-		}
-		return null;
-	}
-
-	private final static void checkBounds(Object base, int idx) {
-		if (idx < 0 || idx >= Array.getLength(base)) {
-			throw new PropertyNotFoundException(
-					new ArrayIndexOutOfBoundsException(idx).getMessage());
-		}
-	}
-
-	private final static int coerce(Object property) {
-		if (property instanceof Number) {
-			return ((Number) property).intValue();
-		}
-		if (property instanceof Character) {
-			return ((Character) property).charValue();
-		}
-		if (property instanceof Boolean) {
-			return (((Boolean) property).booleanValue() ? 1 : 0);
-		}
+    public boolean isReadOnly(ELContext context, Object base, Object property)
+            throws NullPointerException, PropertyNotFoundException, ELException {
+        if (context == null) {
+            throw new NullPointerException();
+        }
+
+        if (base != null && base.getClass().isArray()) {
+            context.setPropertyResolved(true);
+            int idx = coerce(property);
+            checkBounds(base, idx);
+        }
+
+        return this.readOnly;
+    }
+
+    public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context, Object base) {
+        if (base != null && base.getClass().isArray()) {
+            FeatureDescriptor[] descs = new FeatureDescriptor[Array.getLength(base)];
+            for (int i = 0; i < descs.length; i++) {
+                descs[i] = new FeatureDescriptor();
+                descs[i].setDisplayName("["+i+"]");
+                descs[i].setExpert(false);
+                descs[i].setHidden(false);
+                descs[i].setName(""+i);
+                descs[i].setPreferred(true);
+                descs[i].setValue(RESOLVABLE_AT_DESIGN_TIME, Boolean.FALSE);
+                descs[i].setValue(TYPE, Integer.class);
+            }
+            return Arrays.asList(descs).iterator();
+        }
+        return null;
+    }
+
+    public Class<?> getCommonPropertyType(ELContext context, Object base) {
+        if (base != null && base.getClass().isArray()) {
+            return Integer.class;
+        }
+        return null;
+    }
+
+    private final static void checkBounds(Object base, int idx) {
+        if (idx < 0 || idx >= Array.getLength(base)) {
+            throw new PropertyNotFoundException(
+                    new ArrayIndexOutOfBoundsException(idx).getMessage());
+        }
+    }
+
+    private final static int coerce(Object property) {
+        if (property instanceof Number) {
+            return ((Number) property).intValue();
+        }
+        if (property instanceof Character) {
+            return ((Character) property).charValue();
+        }
+        if (property instanceof Boolean) {
+            return (((Boolean) property).booleanValue() ? 1 : 0);
+        }
         if (property instanceof String) {
             return Integer.parseInt((String) property);
         }
-		throw new IllegalArgumentException(property != null ? property
-				.toString() : "null");
-	}
+        throw new IllegalArgumentException(property != null ? property
+                .toString() : "null");
+    }
 }

Modified: geronimo/specs/trunk/geronimo-el_2.2_spec/src/main/java/javax/el/BeanELResolver.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-el_2.2_spec/src/main/java/javax/el/BeanELResolver.java?rev=1024536&r1=1024535&r2=1024536&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-el_2.2_spec/src/main/java/javax/el/BeanELResolver.java (original)
+++ geronimo/specs/trunk/geronimo-el_2.2_spec/src/main/java/javax/el/BeanELResolver.java Wed Oct 20 06:40:04 2010
@@ -36,168 +36,168 @@ import java.util.concurrent.ConcurrentHa
 
 public class BeanELResolver extends ELResolver {
 
-	private final boolean readOnly;
+    private final boolean readOnly;
 
-	private final ConcurrentCache<String, BeanProperties> cache = new ConcurrentCache<String, BeanProperties>(
-			1000);
+    private final ConcurrentCache<String, BeanProperties> cache = new ConcurrentCache<String, BeanProperties>(
+            1000);
 
-	public BeanELResolver() {
-		this.readOnly = false;
-	}
-
-	public BeanELResolver(boolean readOnly) {
-		this.readOnly = readOnly;
-	}
-
-	public Object getValue(ELContext context, Object base, Object property)
-			throws NullPointerException, PropertyNotFoundException, ELException {
-		if (context == null) {
-			throw new NullPointerException();
-		}
-		if (base == null || property == null) {
-			return null;
-		}
-
-		context.setPropertyResolved(true);
-		Method m = this.property(context, base, property).read(context);
-		try {
-			return m.invoke(base, (Object[]) null);
-		} catch (IllegalAccessException e) {
-			throw new ELException(e);
-		} catch (InvocationTargetException e) {
-			throw new ELException(message(context, "propertyReadError",
-					new Object[] { base.getClass().getName(),
-							property.toString() }), e.getCause());
-		} catch (Exception e) {
-			throw new ELException(e);
-		}
-	}
-
-	public Class<?> getType(ELContext context, Object base, Object property)
-			throws NullPointerException, PropertyNotFoundException, ELException {
-		if (context == null) {
-			throw new NullPointerException();
-		}
-		if (base == null || property == null) {
-			return null;
-		}
-
-		context.setPropertyResolved(true);
-		return this.property(context, base, property).getPropertyType();
-	}
-
-	public void setValue(ELContext context, Object base, Object property,
-			Object value) throws NullPointerException,
-			PropertyNotFoundException, PropertyNotWritableException,
-			ELException {
-		if (context == null) {
-			throw new NullPointerException();
-		}
-		if (base == null || property == null) {
-			return;
-		}
-
-		context.setPropertyResolved(true);
-
-		if (this.readOnly) {
-			throw new PropertyNotWritableException(message(context,
-					"resolverNotWriteable", new Object[] { base.getClass()
-							.getName() }));
-		}
-
-		Method m = this.property(context, base, property).write(context);
-		try {
-			m.invoke(base, value);
-		} catch (IllegalAccessException e) {
-			throw new ELException(e);
-		} catch (InvocationTargetException e) {
-			throw new ELException(message(context, "propertyWriteError",
-					new Object[] { base.getClass().getName(),
-							property.toString() }), e.getCause());
-		} catch (Exception e) {
-			throw new ELException(e);
-		}
-	}
-
-	public boolean isReadOnly(ELContext context, Object base, Object property)
-			throws NullPointerException, PropertyNotFoundException, ELException {
-		if (context == null) {
-			throw new NullPointerException();
-		}
-		if (base == null || property == null) {
-			return false;
-		}
-
-		context.setPropertyResolved(true);
-		return this.readOnly
-				|| this.property(context, base, property).isReadOnly();
-	}
-
-	public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context, Object base) {
-		if (context == null) {
-			throw new NullPointerException();
-		}
-
-		if (base == null) {
-			return null;
-		}
-
-		try {
-			BeanInfo info = Introspector.getBeanInfo(base.getClass());
-			PropertyDescriptor[] pds = info.getPropertyDescriptors();
+    public BeanELResolver() {
+        this.readOnly = false;
+    }
+
+    public BeanELResolver(boolean readOnly) {
+        this.readOnly = readOnly;
+    }
+
+    public Object getValue(ELContext context, Object base, Object property)
+            throws NullPointerException, PropertyNotFoundException, ELException {
+        if (context == null) {
+            throw new NullPointerException();
+        }
+        if (base == null || property == null) {
+            return null;
+        }
+
+        context.setPropertyResolved(true);
+        Method m = this.property(context, base, property).read(context);
+        try {
+            return m.invoke(base, (Object[]) null);
+        } catch (IllegalAccessException e) {
+            throw new ELException(e);
+        } catch (InvocationTargetException e) {
+            throw new ELException(message(context, "propertyReadError",
+                    new Object[] { base.getClass().getName(),
+                            property.toString() }), e.getCause());
+        } catch (Exception e) {
+            throw new ELException(e);
+        }
+    }
+
+    public Class<?> getType(ELContext context, Object base, Object property)
+            throws NullPointerException, PropertyNotFoundException, ELException {
+        if (context == null) {
+            throw new NullPointerException();
+        }
+        if (base == null || property == null) {
+            return null;
+        }
+
+        context.setPropertyResolved(true);
+        return this.property(context, base, property).getPropertyType();
+    }
+
+    public void setValue(ELContext context, Object base, Object property,
+            Object value) throws NullPointerException,
+            PropertyNotFoundException, PropertyNotWritableException,
+            ELException {
+        if (context == null) {
+            throw new NullPointerException();
+        }
+        if (base == null || property == null) {
+            return;
+        }
+
+        context.setPropertyResolved(true);
+
+        if (this.readOnly) {
+            throw new PropertyNotWritableException(message(context,
+                    "resolverNotWriteable", new Object[] { base.getClass()
+                            .getName() }));
+        }
+
+        Method m = this.property(context, base, property).write(context);
+        try {
+            m.invoke(base, value);
+        } catch (IllegalAccessException e) {
+            throw new ELException(e);
+        } catch (InvocationTargetException e) {
+            throw new ELException(message(context, "propertyWriteError",
+                    new Object[] { base.getClass().getName(),
+                            property.toString() }), e.getCause());
+        } catch (Exception e) {
+            throw new ELException(e);
+        }
+    }
+
+    public boolean isReadOnly(ELContext context, Object base, Object property)
+            throws NullPointerException, PropertyNotFoundException, ELException {
+        if (context == null) {
+            throw new NullPointerException();
+        }
+        if (base == null || property == null) {
+            return false;
+        }
+
+        context.setPropertyResolved(true);
+        return this.readOnly
+                || this.property(context, base, property).isReadOnly();
+    }
+
+    public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context, Object base) {
+        if (context == null) {
+            throw new NullPointerException();
+        }
+
+        if (base == null) {
+            return null;
+        }
+
+        try {
+            BeanInfo info = Introspector.getBeanInfo(base.getClass());
+            PropertyDescriptor[] pds = info.getPropertyDescriptors();
             for (PropertyDescriptor pd : pds) {
                 pd.setValue(RESOLVABLE_AT_DESIGN_TIME, Boolean.TRUE);
                 pd.setValue(TYPE, pd.getPropertyType());
             }
             return Arrays.asList((FeatureDescriptor[]) pds).iterator();
-		} catch (IntrospectionException e) {
-			//
-		}
-
-		return null;
-	}
-
-	public Class<?> getCommonPropertyType(ELContext context, Object base) {
-		if (context == null) {
-			throw new NullPointerException();
-		}
-
-		if (base != null) {
-			return Object.class;
-		}
-
-		return null;
-	}
-
-	protected final static class BeanProperties {
-		private final Map<String, BeanProperty> properties;
-
-		private final Class<?> type;
-
-		public BeanProperties(Class<?> type) throws ELException {
-			this.type = type;
-			this.properties = new HashMap<String, BeanProperty>();
-			try {
-				BeanInfo info = Introspector.getBeanInfo(this.type);
-				PropertyDescriptor[] pds = info.getPropertyDescriptors();
+        } catch (IntrospectionException e) {
+            //
+        }
+
+        return null;
+    }
+
+    public Class<?> getCommonPropertyType(ELContext context, Object base) {
+        if (context == null) {
+            throw new NullPointerException();
+        }
+
+        if (base != null) {
+            return Object.class;
+        }
+
+        return null;
+    }
+
+    protected final static class BeanProperties {
+        private final Map<String, BeanProperty> properties;
+
+        private final Class<?> type;
+
+        public BeanProperties(Class<?> type) throws ELException {
+            this.type = type;
+            this.properties = new HashMap<String, BeanProperty>();
+            try {
+                BeanInfo info = Introspector.getBeanInfo(this.type);
+                PropertyDescriptor[] pds = info.getPropertyDescriptors();
                 for (PropertyDescriptor pd : pds) {
                     this.properties.put(pd.getName(), new BeanProperty(
                             type, pd));
                 }
             } catch (IntrospectionException ie) {
-				throw new ELException(ie);
-			}
-		}
-
-		private BeanProperty get(ELContext ctx, String name) {
-			BeanProperty property = this.properties.get(name);
-			if (property == null) {
-				throw new PropertyNotFoundException(message(ctx,
-						"propertyNotFound",
-						new Object[] { type.getName(), name }));
-			}
-			return property;
-		}
+                throw new ELException(ie);
+            }
+        }
+
+        private BeanProperty get(ELContext ctx, String name) {
+            BeanProperty property = this.properties.get(name);
+            if (property == null) {
+                throw new PropertyNotFoundException(message(ctx,
+                        "propertyNotFound",
+                        new Object[] { type.getName(), name }));
+            }
+            return property;
+        }
 
         public BeanProperty getBeanProperty(String name) {
             return get(null, name);
@@ -206,87 +206,87 @@ public class BeanELResolver extends ELRe
         private Class<?> getType() {
             return type;
         }
-	}
+    }
 
     protected final static class BeanProperty {
-		private final Class<?> type;
+        private final Class<?> type;
 
-		private final Class<?> owner;
+        private final Class<?> owner;
 
-		private final PropertyDescriptor descriptor;
+        private final PropertyDescriptor descriptor;
 
-		private Method read;
+        private Method read;
 
-		private Method write;
+        private Method write;
 
-		public BeanProperty(Class<?> owner, PropertyDescriptor descriptor) {
-			this.owner = owner;
-			this.descriptor = descriptor;
-			this.type = descriptor.getPropertyType();
-		}
+        public BeanProperty(Class<?> owner, PropertyDescriptor descriptor) {
+            this.owner = owner;
+            this.descriptor = descriptor;
+            this.type = descriptor.getPropertyType();
+        }
 
-		public Class getPropertyType() {
-			return this.type;
-		}
+        public Class getPropertyType() {
+            return this.type;
+        }
 
-		public boolean isReadOnly() {
-		    return this.write == null
-		        && (null == (this.write = getMethod(this.owner, descriptor.getWriteMethod())));
-		}
+        public boolean isReadOnly() {
+            return this.write == null
+                && (null == (this.write = getMethod(this.owner, descriptor.getWriteMethod())));
+        }
 
-		public Method getWriteMethod() {
-			return write(null);
-		}
+        public Method getWriteMethod() {
+            return write(null);
+        }
 
-		public Method getReadMethod() {
-			return this.read(null);
-		}
+        public Method getReadMethod() {
+            return this.read(null);
+        }
 
         private Method write(ELContext ctx) {
-			if (this.write == null) {
-				this.write = getMethod(this.owner, descriptor.getWriteMethod());
-				if (this.write == null) {
-					throw new PropertyNotFoundException(message(ctx,
-							"propertyNotWritable", new Object[] {
-									type.getName(), descriptor.getName() }));
-				}
-			}
-			return this.write;
-		}
-
-		private Method read(ELContext ctx) {
-			if (this.read == null) {
-				this.read = getMethod(this.owner, descriptor.getReadMethod());
-				if (this.read == null) {
-					throw new PropertyNotFoundException(message(ctx,
-							"propertyNotReadable", new Object[] {
-									type.getName(), descriptor.getName() }));
-				}
-			}
-			return this.read;
-		}
-	}
-
-	private BeanProperty property(ELContext ctx, Object base,
-			Object property) {
-		Class<?> type = base.getClass();
-		String prop = property.toString();
-
-		BeanProperties props = this.cache.get(type.getName());
-		if (props == null || type != props.getType()) {
-			props = new BeanProperties(type);
-			this.cache.put(type.getName(), props);
-		}
-
-		return props.get(ctx, prop);
-	}
-
-	private static Method getMethod(Class type, Method m) {
-		if (m == null || Modifier.isPublic(type.getModifiers())) {
-			return m;
-		}
-		Class[] inf = type.getInterfaces();
-		Method mp;
+            if (this.write == null) {
+                this.write = getMethod(this.owner, descriptor.getWriteMethod());
+                if (this.write == null) {
+                    throw new PropertyNotFoundException(message(ctx,
+                            "propertyNotWritable", new Object[] {
+                                    type.getName(), descriptor.getName() }));
+                }
+            }
+            return this.write;
+        }
+
+        private Method read(ELContext ctx) {
+            if (this.read == null) {
+                this.read = getMethod(this.owner, descriptor.getReadMethod());
+                if (this.read == null) {
+                    throw new PropertyNotFoundException(message(ctx,
+                            "propertyNotReadable", new Object[] {
+                                    type.getName(), descriptor.getName() }));
+                }
+            }
+            return this.read;
+        }
+    }
+
+    private BeanProperty property(ELContext ctx, Object base,
+            Object property) {
+        Class<?> type = base.getClass();
+        String prop = property.toString();
+
+        BeanProperties props = this.cache.get(type.getName());
+        if (props == null || type != props.getType()) {
+            props = new BeanProperties(type);
+            this.cache.put(type.getName(), props);
+        }
+
+        return props.get(ctx, prop);
+    }
+
+    private static Method getMethod(Class type, Method m) {
+        if (m == null || Modifier.isPublic(type.getModifiers())) {
+            return m;
+        }
+        Class[] inf = type.getInterfaces();
+        Method mp;
         for (Class anInf : inf) {
             try {
                 mp = anInf.getMethod(m.getName(), m.getParameterTypes());
@@ -299,52 +299,52 @@ public class BeanELResolver extends ELRe
             }
         }
         Class sup = type.getSuperclass();
-		if (sup != null) {
-			try {
-				mp = sup.getMethod(m.getName(), m.getParameterTypes());
-				mp = getMethod(mp.getDeclaringClass(), mp);
-				if (mp != null) {
-					return mp;
-				}
-			} catch (NoSuchMethodException e) {
+        if (sup != null) {
+            try {
+                mp = sup.getMethod(m.getName(), m.getParameterTypes());
+                mp = getMethod(mp.getDeclaringClass(), mp);
+                if (mp != null) {
+                    return mp;
+                }
+            } catch (NoSuchMethodException e) {
                 //continue
             }
-		}
-		return null;
-	}
-
-	private final static class ConcurrentCache<K,V> {
-
-		private final int size;
-		private final Map<K,V> eden;
-		private final Map<K,V> longterm;
-
-		public ConcurrentCache(int size) {
-			this.size = size;
-			this.eden = new ConcurrentHashMap<K,V>(size);
-			this.longterm = new WeakHashMap<K,V>(size);
-		}
-
-		public V get(K key) {
-			V value = this.eden.get(key);
-			if (value == null) {
-				value = this.longterm.get(key);
-				if (value != null) {
-					this.eden.put(key, value);
-				}
-			}
-			return value;
-		}
-
-		public void put(K key, V value) {
-			if (this.eden.size() >= this.size) {
-				this.longterm.putAll(this.eden);
-				this.eden.clear();
-			}
-			this.eden.put(key, value);
-		}
+        }
+        return null;
+    }
 
-	}
+    private final static class ConcurrentCache<K,V> {
+
+        private final int size;
+        private final Map<K,V> eden;
+        private final Map<K,V> longterm;
+
+        public ConcurrentCache(int size) {
+            this.size = size;
+            this.eden = new ConcurrentHashMap<K,V>(size);
+            this.longterm = new WeakHashMap<K,V>(size);
+        }
+
+        public V get(K key) {
+            V value = this.eden.get(key);
+            if (value == null) {
+                value = this.longterm.get(key);
+                if (value != null) {
+                    this.eden.put(key, value);
+                }
+            }
+            return value;
+        }
+
+        public void put(K key, V value) {
+            if (this.eden.size() >= this.size) {
+                this.longterm.putAll(this.eden);
+                this.eden.clear();
+            }
+            this.eden.put(key, value);
+        }
+
+    }
 
     public Object invoke(ELContext context, Object base, Object method, Class<?>[] paramTypes, Object[] params) {
         if (context == null) {

Modified: geronimo/specs/trunk/geronimo-el_2.2_spec/src/main/java/javax/el/CompositeELResolver.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-el_2.2_spec/src/main/java/javax/el/CompositeELResolver.java?rev=1024536&r1=1024535&r2=1024536&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-el_2.2_spec/src/main/java/javax/el/CompositeELResolver.java (original)
+++ geronimo/specs/trunk/geronimo-el_2.2_spec/src/main/java/javax/el/CompositeELResolver.java Wed Oct 20 06:40:04 2010
@@ -22,181 +22,181 @@ import java.util.Iterator;
 
 public class CompositeELResolver extends ELResolver {
 
-	private int size;
+    private int size;
 
-	private ELResolver[] resolvers;
+    private ELResolver[] resolvers;
 
-	public CompositeELResolver() {
-		this.size = 0;
-		this.resolvers = new ELResolver[2];
-	}
-
-	synchronized public void add(ELResolver elResolver) {
-		if (elResolver == null) {
-			throw new NullPointerException();
-		}
-
-		if (this.size >= this.resolvers.length) {
-			ELResolver[] nr = new ELResolver[this.size * 2];
-			System.arraycopy(this.resolvers, 0, nr, 0, this.size);
-			this.resolvers = nr;
-		}
-		this.resolvers[this.size++] = elResolver;
-	}
-
-	public Object getValue(ELContext context, Object base, Object property)
-			throws NullPointerException, PropertyNotFoundException, ELException {
-		context.setPropertyResolved(false);
+    public CompositeELResolver() {
+        this.size = 0;
+        this.resolvers = new ELResolver[2];
+    }
+
+    synchronized public void add(ELResolver elResolver) {
+        if (elResolver == null) {
+            throw new NullPointerException();
+        }
+
+        if (this.size >= this.resolvers.length) {
+            ELResolver[] nr = new ELResolver[this.size * 2];
+            System.arraycopy(this.resolvers, 0, nr, 0, this.size);
+            this.resolvers = nr;
+        }
+        this.resolvers[this.size++] = elResolver;
+    }
+
+    public Object getValue(ELContext context, Object base, Object property)
+            throws NullPointerException, PropertyNotFoundException, ELException {
+        context.setPropertyResolved(false);
                 int sz;
                 ELResolver[] rslvrs;
                 synchronized (this) {
                     sz = this.size;
                     rslvrs = this.resolvers;
                 }
-		Object result = null;
-		for (int i = 0; i < sz; i++) {
-			result = rslvrs[i].getValue(context, base, property);
-			if (context.isPropertyResolved()) {
-				return result;
-			}
-		}
-		return null;
-	}
-
-	public void setValue(ELContext context, Object base, Object property,
-			Object value) throws NullPointerException,
-			PropertyNotFoundException, PropertyNotWritableException,
-			ELException {
-		context.setPropertyResolved(false);
+        Object result = null;
+        for (int i = 0; i < sz; i++) {
+            result = rslvrs[i].getValue(context, base, property);
+            if (context.isPropertyResolved()) {
+                return result;
+            }
+        }
+        return null;
+    }
+
+    public void setValue(ELContext context, Object base, Object property,
+            Object value) throws NullPointerException,
+            PropertyNotFoundException, PropertyNotWritableException,
+            ELException {
+        context.setPropertyResolved(false);
                 int sz;
                 ELResolver[] rslvrs;
                 synchronized (this) {
                     sz = this.size;
                     rslvrs = this.resolvers;
                 }
-		for (int i = 0; i < sz; i++) {
-			rslvrs[i].setValue(context, base, property, value);
-			if (context.isPropertyResolved()) {
-				return;
-			}
-		}
-	}
-
-	public boolean isReadOnly(ELContext context, Object base, Object property)
-			throws NullPointerException, PropertyNotFoundException, ELException {
-		context.setPropertyResolved(false);
+        for (int i = 0; i < sz; i++) {
+            rslvrs[i].setValue(context, base, property, value);
+            if (context.isPropertyResolved()) {
+                return;
+            }
+        }
+    }
+
+    public boolean isReadOnly(ELContext context, Object base, Object property)
+            throws NullPointerException, PropertyNotFoundException, ELException {
+        context.setPropertyResolved(false);
                 int sz;
                 ELResolver[] rslvrs;
                 synchronized (this) {
                     sz = this.size;
                     rslvrs = this.resolvers;
                 }
-		boolean readOnly = false;
-		for (int i = 0; i < sz; i++) {
-			readOnly = rslvrs[i].isReadOnly(context, base, property);
-			if (context.isPropertyResolved()) {
-				return readOnly;
-			}
-		}
-		return false;
-	}
-
-	synchronized public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context, Object base) {
-		return new FeatureIterator(context, base, this.resolvers, this.size);
-	}
+        boolean readOnly = false;
+        for (int i = 0; i < sz; i++) {
+            readOnly = rslvrs[i].isReadOnly(context, base, property);
+            if (context.isPropertyResolved()) {
+                return readOnly;
+            }
+        }
+        return false;
+    }
+
+    synchronized public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context, Object base) {
+        return new FeatureIterator(context, base, this.resolvers, this.size);
+    }
 
-	public Class<?> getCommonPropertyType(ELContext context, Object base) {
+    public Class<?> getCommonPropertyType(ELContext context, Object base) {
                 int sz;
                 ELResolver[] rslvrs;
                 synchronized (this) {
                     sz = this.size;
                     rslvrs = this.resolvers;
                 }
-		Class<?> commonType = null, type = null;
-		for (int i = 0; i < sz; i++) {
-			type = rslvrs[i].getCommonPropertyType(context, base);
-			if (type != null
-					&& (commonType == null || commonType.isAssignableFrom(type))) {
-				commonType = type;
-			}
-		}
-		return commonType;
-	}
-
-	public Class<?> getType(ELContext context, Object base, Object property)
-			throws NullPointerException, PropertyNotFoundException, ELException {
-		context.setPropertyResolved(false);
+        Class<?> commonType = null, type = null;
+        for (int i = 0; i < sz; i++) {
+            type = rslvrs[i].getCommonPropertyType(context, base);
+            if (type != null
+                    && (commonType == null || commonType.isAssignableFrom(type))) {
+                commonType = type;
+            }
+        }
+        return commonType;
+    }
+
+    public Class<?> getType(ELContext context, Object base, Object property)
+            throws NullPointerException, PropertyNotFoundException, ELException {
+        context.setPropertyResolved(false);
                 int sz;
                 ELResolver[] rslvrs;
                 synchronized (this) {
                     sz = this.size;
                     rslvrs = this.resolvers;
                 }
-		Class<?> type;
-		for (int i = 0; i < sz; i++) {
-			type = rslvrs[i].getType(context, base, property);
-			if (context.isPropertyResolved()) {
-				return type;
-			}
-		}
-		return null;
-	}
-
-	private final static class FeatureIterator implements Iterator<FeatureDescriptor> {
-
-		private final ELContext context;
-
-		private final Object base;
-
-		private final ELResolver[] resolvers;
-
-		private final int size;
-
-		private Iterator itr;
-
-		private int idx;
-
-		public FeatureIterator(ELContext context, Object base,
-				ELResolver[] resolvers, int size) {
-			this.context = context;
-			this.base = base;
-			this.resolvers = resolvers;
-			this.size = size;
-
-			this.idx = 0;
-			this.guaranteeIterator();
-		}
-
-		private void guaranteeIterator() {
-			while (this.itr == null && this.idx < this.size) {
-				this.itr = this.resolvers[this.idx].getFeatureDescriptors(
-						this.context, this.base);
-				this.idx++;
-			}
-		}
-
-		public boolean hasNext() {
-			return this.itr != null;
-		}
-
-		public FeatureDescriptor next() {
-			Object result = null;
-			if (this.itr != null) {
-				if (this.itr.hasNext()) {
-					result = this.itr.next();
-					if (!this.itr.hasNext()) {
-						this.itr = null;
-						this.guaranteeIterator();
-					}
-				}
-			}
-			return (FeatureDescriptor) result;
-		}
-
-		public void remove() {
-			throw new UnsupportedOperationException();
-		}
-	}
+        Class<?> type;
+        for (int i = 0; i < sz; i++) {
+            type = rslvrs[i].getType(context, base, property);
+            if (context.isPropertyResolved()) {
+                return type;
+            }
+        }
+        return null;
+    }
+
+    private final static class FeatureIterator implements Iterator<FeatureDescriptor> {
+
+        private final ELContext context;
+
+        private final Object base;
+
+        private final ELResolver[] resolvers;
+
+        private final int size;
+
+        private Iterator itr;
+
+        private int idx;
+
+        public FeatureIterator(ELContext context, Object base,
+                ELResolver[] resolvers, int size) {
+            this.context = context;
+            this.base = base;
+            this.resolvers = resolvers;
+            this.size = size;
+
+            this.idx = 0;
+            this.guaranteeIterator();
+        }
+
+        private void guaranteeIterator() {
+            while (this.itr == null && this.idx < this.size) {
+                this.itr = this.resolvers[this.idx].getFeatureDescriptors(
+                        this.context, this.base);
+                this.idx++;
+            }
+        }
+
+        public boolean hasNext() {
+            return this.itr != null;
+        }
+
+        public FeatureDescriptor next() {
+            Object result = null;
+            if (this.itr != null) {
+                if (this.itr.hasNext()) {
+                    result = this.itr.next();
+                    if (!this.itr.hasNext()) {
+                        this.itr = null;
+                        this.guaranteeIterator();
+                    }
+                }
+            }
+            return (FeatureDescriptor) result;
+        }
+
+        public void remove() {
+            throw new UnsupportedOperationException();
+        }
+    }
 
     public Object invoke(ELContext context, Object base, Object method, Class<?>[] paramTypes, Object[] params) {
         if (context == null) {

Modified: geronimo/specs/trunk/geronimo-el_2.2_spec/src/main/java/javax/el/ELException.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-el_2.2_spec/src/main/java/javax/el/ELException.java?rev=1024536&r1=1024535&r2=1024536&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-el_2.2_spec/src/main/java/javax/el/ELException.java (original)
+++ geronimo/specs/trunk/geronimo-el_2.2_spec/src/main/java/javax/el/ELException.java Wed Oct 20 06:40:04 2010
@@ -25,42 +25,42 @@ package javax.el;
  */
 public class ELException extends RuntimeException {
 
-	/**
-	 * Creates an ELException with no detail message
-	 */
-	public ELException() {
-		super();
-	}
+    /**
+     * Creates an ELException with no detail message
+     */
+    public ELException() {
+        super();
+    }
 
-	/**
-	 * Creates an ELException with the provided detail message.
-	 * 
-	 * @param message
-	 *            the detail message
-	 */
-	public ELException(String message) {
-		super(message);
-	}
+    /**
+     * Creates an ELException with the provided detail message.
+     * 
+     * @param message
+     *            the detail message
+     */
+    public ELException(String message) {
+        super(message);
+    }
 
-	/**
-	 * Creates an ELException with the given detail message and root cause.
-	 * 
-	 * @param message
-	 *            the detail message
-	 * @param cause
-	 *            the originating cause of this exception
-	 */
-	public ELException(String message, Throwable cause) {
-		super(message, cause);
-	}
+    /**
+     * Creates an ELException with the given detail message and root cause.
+     * 
+     * @param message
+     *            the detail message
+     * @param cause
+     *            the originating cause of this exception
+     */
+    public ELException(String message, Throwable cause) {
+        super(message, cause);
+    }
 
-	/**
-	 * Creates an ELException with the given cause
-	 * 
-	 * @param cause
-	 *            the originating cause of this exception
-	 */
-	public ELException(Throwable cause) {
-		super(cause);
-	}
+    /**
+     * Creates an ELException with the given cause
+     * 
+     * @param cause
+     *            the originating cause of this exception
+     */
+    public ELException(Throwable cause) {
+        super(cause);
+    }
 }

Modified: geronimo/specs/trunk/geronimo-el_2.2_spec/src/main/java/javax/el/ELResolver.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-el_2.2_spec/src/main/java/javax/el/ELResolver.java?rev=1024536&r1=1024535&r2=1024536&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-el_2.2_spec/src/main/java/javax/el/ELResolver.java (original)
+++ geronimo/specs/trunk/geronimo-el_2.2_spec/src/main/java/javax/el/ELResolver.java Wed Oct 20 06:40:04 2010
@@ -29,27 +29,27 @@ import java.util.ResourceBundle;
  */
 public abstract class ELResolver {
 
-	static String message(ELContext context, String name, Object[] props) {
-		Locale locale = context == null? null: context.getLocale();
-		if (locale == null) {
-			locale = Locale.getDefault();
-			if (locale == null) {
-				return "";
-			}
-		}
-		ResourceBundle bundle = ResourceBundle.getBundle(
-				"javax.el.LocalStrings", locale);
-		try {
-			String template = bundle.getString(name);
-			if (props != null) {
-				template = MessageFormat.format(template, props);
-			}
-			return template;
-		} catch (MissingResourceException e) {
-			return "Missing Resource: '" + name + "' for Locale "
-					+ locale.getDisplayName();
-		}
-	}
+    static String message(ELContext context, String name, Object[] props) {
+        Locale locale = context == null? null: context.getLocale();
+        if (locale == null) {
+            locale = Locale.getDefault();
+            if (locale == null) {
+                return "";
+            }
+        }
+        ResourceBundle bundle = ResourceBundle.getBundle(
+                "javax.el.LocalStrings", locale);
+        try {
+            String template = bundle.getString(name);
+            if (props != null) {
+                template = MessageFormat.format(template, props);
+            }
+            return template;
+        } catch (MissingResourceException e) {
+            return "Missing Resource: '" + name + "' for Locale "
+                    + locale.getDisplayName();
+        }
+    }
 
     public final static String RESOLVABLE_AT_DESIGN_TIME = "resolvableAtDesignTime";
 

Modified: geronimo/specs/trunk/geronimo-el_2.2_spec/src/main/java/javax/el/ListELResolver.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-el_2.2_spec/src/main/java/javax/el/ListELResolver.java?rev=1024536&r1=1024535&r2=1024536&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-el_2.2_spec/src/main/java/javax/el/ListELResolver.java (original)
+++ geronimo/specs/trunk/geronimo-el_2.2_spec/src/main/java/javax/el/ListELResolver.java Wed Oct 20 06:40:04 2010
@@ -26,150 +26,150 @@ import java.util.List;
 
 public class ListELResolver extends ELResolver {
 
-	private final boolean readOnly;
+    private final boolean readOnly;
 
-	private final static Class UNMODIFIABLE = Collections.unmodifiableList(
-			new ArrayList()).getClass();
+    private final static Class UNMODIFIABLE = Collections.unmodifiableList(
+            new ArrayList()).getClass();
 
-	public ListELResolver() {
-		this.readOnly = false;
-	}
-
-	public ListELResolver(boolean readOnly) {
-		this.readOnly = readOnly;
-	}
-
-	public Object getValue(ELContext context, Object base, Object property)
-			throws NullPointerException, PropertyNotFoundException, ELException {
-		if (context == null) {
-			throw new NullPointerException();
-		}
-
-		if (base instanceof List) {
-			context.setPropertyResolved(true);
-			List list = (List) base;
-			int idx = coerce(property);
-			if (idx < 0 || idx >= list.size()) {
-				return null;
-			}
-			return list.get(idx);
-		}
-
-		return null;
-	}
-
-	public Class<?> getType(ELContext context, Object base, Object property)
-			throws NullPointerException, PropertyNotFoundException, ELException {
-		if (context == null) {
-			throw new NullPointerException();
-		}
-
-		if (base instanceof List) {
-			context.setPropertyResolved(true);
-			List list = (List) base;
-			int idx = coerce(property);
-			checkBounds(list, idx);
-			Object obj = list.get(idx);
-			return (obj != null) ? obj.getClass() : null;
-		}
-
-		return null;
-	}
-
-	public void setValue(ELContext context, Object base, Object property,
-			Object value) throws NullPointerException,
-			PropertyNotFoundException, PropertyNotWritableException,
-			ELException {
-		if (context == null) {
-			throw new NullPointerException();
-		}
-
-		if (base instanceof List) {
-			context.setPropertyResolved(true);
-			List list = (List) base;
-
-			if (this.readOnly) {
-				throw new PropertyNotWritableException(message(context,
-						"resolverNotWriteable", new Object[] { base.getClass()
-								.getName() }));
-			}
-
-			int idx = coerce(property);
-			checkBounds(list, idx);
-			try {
-				list.set(idx, value);
-			} catch (UnsupportedOperationException e) {
-				throw new PropertyNotWritableException(e);
-			} catch (IndexOutOfBoundsException e) {
-				throw new PropertyNotFoundException(e);
-			}
-		}
-	}
-
-	public boolean isReadOnly(ELContext context, Object base, Object property)
-			throws NullPointerException, PropertyNotFoundException, ELException {
-		if (context == null) {
-			throw new NullPointerException();
-		}
-
-		if (base instanceof List) {
-			context.setPropertyResolved(true);
-			List list = (List) base;
-			int idx = coerce(property);
-			checkBounds(list, idx);
-			return this.readOnly || UNMODIFIABLE.equals(list.getClass());
-		}
-
-		return this.readOnly;
-	}
-
-	public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context, Object base) {
-		if (base instanceof List) {
-			FeatureDescriptor[] descs = new FeatureDescriptor[((List) base).size()];
-			for (int i = 0; i < descs.length; i++) {
-				descs[i] = new FeatureDescriptor();
-				descs[i].setDisplayName("["+i+"]");
-				descs[i].setExpert(false);
-				descs[i].setHidden(false);
-				descs[i].setName(""+i);
-				descs[i].setPreferred(true);
-				descs[i].setValue(RESOLVABLE_AT_DESIGN_TIME, Boolean.FALSE);
-				descs[i].setValue(TYPE, Integer.class);
-			}
-			return Arrays.asList(descs).iterator();
-		}
-		return null;
-	}
-
-	public Class<?> getCommonPropertyType(ELContext context, Object base) {
-		if (base != null && base instanceof List) {
-			return Integer.class;
-		}
-		return null;
-	}
-
-	private final static void checkBounds(List base, int idx) {
-	    if (idx < 0 || idx >= base.size()) {
-	        throw new PropertyNotFoundException(
-	                new ArrayIndexOutOfBoundsException(idx).getMessage());
-	    }
-	}
-	   
-	private final static int coerce(Object property) {
-		if (property instanceof Number) {
-			return ((Number) property).intValue();
-		}
-		if (property instanceof Character) {
-			return ((Character) property).charValue();
-		}
-		if (property instanceof Boolean) {
-			return (((Boolean) property).booleanValue() ? 1 : 0);
-		}
+    public ListELResolver() {
+        this.readOnly = false;
+    }
+
+    public ListELResolver(boolean readOnly) {
+        this.readOnly = readOnly;
+    }
+
+    public Object getValue(ELContext context, Object base, Object property)
+            throws NullPointerException, PropertyNotFoundException, ELException {
+        if (context == null) {
+            throw new NullPointerException();
+        }
+
+        if (base instanceof List) {
+            context.setPropertyResolved(true);
+            List list = (List) base;
+            int idx = coerce(property);
+            if (idx < 0 || idx >= list.size()) {
+                return null;
+            }
+            return list.get(idx);
+        }
+
+        return null;
+    }
+
+    public Class<?> getType(ELContext context, Object base, Object property)
+            throws NullPointerException, PropertyNotFoundException, ELException {
+        if (context == null) {
+            throw new NullPointerException();
+        }
+
+        if (base instanceof List) {
+            context.setPropertyResolved(true);
+            List list = (List) base;
+            int idx = coerce(property);
+            checkBounds(list, idx);
+            Object obj = list.get(idx);
+            return (obj != null) ? obj.getClass() : null;
+        }
+
+        return null;
+    }
+
+    public void setValue(ELContext context, Object base, Object property,
+            Object value) throws NullPointerException,
+            PropertyNotFoundException, PropertyNotWritableException,
+            ELException {
+        if (context == null) {
+            throw new NullPointerException();
+        }
+
+        if (base instanceof List) {
+            context.setPropertyResolved(true);
+            List list = (List) base;
+
+            if (this.readOnly) {
+                throw new PropertyNotWritableException(message(context,
+                        "resolverNotWriteable", new Object[] { base.getClass()
+                                .getName() }));
+            }
+
+            int idx = coerce(property);
+            checkBounds(list, idx);
+            try {
+                list.set(idx, value);
+            } catch (UnsupportedOperationException e) {
+                throw new PropertyNotWritableException(e);
+            } catch (IndexOutOfBoundsException e) {
+                throw new PropertyNotFoundException(e);
+            }
+        }
+    }
+
+    public boolean isReadOnly(ELContext context, Object base, Object property)
+            throws NullPointerException, PropertyNotFoundException, ELException {
+        if (context == null) {
+            throw new NullPointerException();
+        }
+
+        if (base instanceof List) {
+            context.setPropertyResolved(true);
+            List list = (List) base;
+            int idx = coerce(property);
+            checkBounds(list, idx);
+            return this.readOnly || UNMODIFIABLE.equals(list.getClass());
+        }
+
+        return this.readOnly;
+    }
+
+    public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context, Object base) {
+        if (base instanceof List) {
+            FeatureDescriptor[] descs = new FeatureDescriptor[((List) base).size()];
+            for (int i = 0; i < descs.length; i++) {
+                descs[i] = new FeatureDescriptor();
+                descs[i].setDisplayName("["+i+"]");
+                descs[i].setExpert(false);
+                descs[i].setHidden(false);
+                descs[i].setName(""+i);
+                descs[i].setPreferred(true);
+                descs[i].setValue(RESOLVABLE_AT_DESIGN_TIME, Boolean.FALSE);
+                descs[i].setValue(TYPE, Integer.class);
+            }
+            return Arrays.asList(descs).iterator();
+        }
+        return null;
+    }
+
+    public Class<?> getCommonPropertyType(ELContext context, Object base) {
+        if (base != null && base instanceof List) {
+            return Integer.class;
+        }
+        return null;
+    }
+
+    private final static void checkBounds(List base, int idx) {
+        if (idx < 0 || idx >= base.size()) {
+            throw new PropertyNotFoundException(
+                    new ArrayIndexOutOfBoundsException(idx).getMessage());
+        }
+    }
+       
+    private final static int coerce(Object property) {
+        if (property instanceof Number) {
+            return ((Number) property).intValue();
+        }
+        if (property instanceof Character) {
+            return ((Character) property).charValue();
+        }
+        if (property instanceof Boolean) {
+            return (((Boolean) property).booleanValue() ? 1 : 0);
+        }
         if (property instanceof String) {
             return Integer.parseInt((String) property);
         }
-		throw new IllegalArgumentException(property != null ? property
-				.toString() : "null");
-	}
+        throw new IllegalArgumentException(property != null ? property
+                .toString() : "null");
+    }
 
 }

Modified: geronimo/specs/trunk/geronimo-el_2.2_spec/src/main/java/javax/el/MapELResolver.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-el_2.2_spec/src/main/java/javax/el/MapELResolver.java?rev=1024536&r1=1024535&r2=1024536&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-el_2.2_spec/src/main/java/javax/el/MapELResolver.java (original)
+++ geronimo/specs/trunk/geronimo-el_2.2_spec/src/main/java/javax/el/MapELResolver.java Wed Oct 20 06:40:04 2010
@@ -27,115 +27,115 @@ import java.util.Map;
 
 public class MapELResolver extends ELResolver {
 
-	private final static Class UNMODIFIABLE = Collections.unmodifiableMap(
-			new HashMap()).getClass();
+    private final static Class UNMODIFIABLE = Collections.unmodifiableMap(
+            new HashMap()).getClass();
 
-	private final boolean readOnly;
+    private final boolean readOnly;
 
-	public MapELResolver() {
-		this.readOnly = false;
-	}
-
-	public MapELResolver(boolean readOnly) {
-		this.readOnly = readOnly;
-	}
-
-	public Object getValue(ELContext context, Object base, Object property)
-			throws NullPointerException, PropertyNotFoundException, ELException {
-		if (context == null) {
-			throw new NullPointerException();
-		}
-
-		if (base instanceof Map) {
-			context.setPropertyResolved(true);
-			return ((Map) base).get(property);
-		}
-
-		return null;
-	}
-
-	public Class<?> getType(ELContext context, Object base, Object property)
-			throws NullPointerException, PropertyNotFoundException, ELException {
-		if (context == null) {
-			throw new NullPointerException();
-		}
-
-		if (base instanceof Map) {
-			context.setPropertyResolved(true);
-			Object obj = ((Map) base).get(property);
-			return (obj != null) ? obj.getClass() : null;
-		}
-
-		return null;
-	}
-
-	public void setValue(ELContext context, Object base, Object property,
-			Object value) throws NullPointerException,
-			PropertyNotFoundException, PropertyNotWritableException,
-			ELException {
-		if (context == null) {
-			throw new NullPointerException();
-		}
-
-		if (base instanceof Map) {
-			context.setPropertyResolved(true);
-
-			if (this.readOnly) {
-				throw new PropertyNotWritableException(message(context,
-						"resolverNotWriteable", new Object[] { base.getClass()
-								.getName() }));
-			}
-
-			try {
-				((Map) base).put(property, value);
-			} catch (UnsupportedOperationException e) {
-				throw new PropertyNotWritableException(e);
-			}
-		}
-	}
-
-	public boolean isReadOnly(ELContext context, Object base, Object property)
-			throws NullPointerException, PropertyNotFoundException, ELException {
-		if (context == null) {
-			throw new NullPointerException();
-		}
-
-		if (base instanceof Map) {
-			context.setPropertyResolved(true);
-			return this.readOnly || UNMODIFIABLE.equals(base.getClass());
-		}
-
-		return this.readOnly;
-	}
-
-	public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context, Object base) {
-		if (base instanceof Map) {
-			Iterator itr = ((Map) base).keySet().iterator();
-			List<FeatureDescriptor> feats = new ArrayList<FeatureDescriptor>();
-			Object key;
-			FeatureDescriptor desc;
-			while (itr.hasNext()) {
-				key = itr.next();
-				desc = new FeatureDescriptor();
-				desc.setDisplayName(key.toString());
-				desc.setExpert(false);
-				desc.setHidden(false);
-				desc.setName(key.toString());
-				desc.setPreferred(true);
-				desc.setValue(RESOLVABLE_AT_DESIGN_TIME, Boolean.FALSE);
-				desc.setValue(TYPE, key.getClass());
-				feats.add(desc);
-			}
-			return feats.iterator();
-		}
-		return null;
-	}
-
-	public Class<?> getCommonPropertyType(ELContext context, Object base) {
-		if (base instanceof Map) {
-			return Object.class;
-		}
-		return null;
-	}
+    public MapELResolver() {
+        this.readOnly = false;
+    }
+
+    public MapELResolver(boolean readOnly) {
+        this.readOnly = readOnly;
+    }
+
+    public Object getValue(ELContext context, Object base, Object property)
+            throws NullPointerException, PropertyNotFoundException, ELException {
+        if (context == null) {
+            throw new NullPointerException();
+        }
+
+        if (base instanceof Map) {
+            context.setPropertyResolved(true);
+            return ((Map) base).get(property);
+        }
+
+        return null;
+    }
+
+    public Class<?> getType(ELContext context, Object base, Object property)
+            throws NullPointerException, PropertyNotFoundException, ELException {
+        if (context == null) {
+            throw new NullPointerException();
+        }
+
+        if (base instanceof Map) {
+            context.setPropertyResolved(true);
+            Object obj = ((Map) base).get(property);
+            return (obj != null) ? obj.getClass() : null;
+        }
+
+        return null;
+    }
+
+    public void setValue(ELContext context, Object base, Object property,
+            Object value) throws NullPointerException,
+            PropertyNotFoundException, PropertyNotWritableException,
+            ELException {
+        if (context == null) {
+            throw new NullPointerException();
+        }
+
+        if (base instanceof Map) {
+            context.setPropertyResolved(true);
+
+            if (this.readOnly) {
+                throw new PropertyNotWritableException(message(context,
+                        "resolverNotWriteable", new Object[] { base.getClass()
+                                .getName() }));
+            }
+
+            try {
+                ((Map) base).put(property, value);
+            } catch (UnsupportedOperationException e) {
+                throw new PropertyNotWritableException(e);
+            }
+        }
+    }
+
+    public boolean isReadOnly(ELContext context, Object base, Object property)
+            throws NullPointerException, PropertyNotFoundException, ELException {
+        if (context == null) {
+            throw new NullPointerException();
+        }
+
+        if (base instanceof Map) {
+            context.setPropertyResolved(true);
+            return this.readOnly || UNMODIFIABLE.equals(base.getClass());
+        }
+
+        return this.readOnly;
+    }
+
+    public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context, Object base) {
+        if (base instanceof Map) {
+            Iterator itr = ((Map) base).keySet().iterator();
+            List<FeatureDescriptor> feats = new ArrayList<FeatureDescriptor>();
+            Object key;
+            FeatureDescriptor desc;
+            while (itr.hasNext()) {
+                key = itr.next();
+                desc = new FeatureDescriptor();
+                desc.setDisplayName(key.toString());
+                desc.setExpert(false);
+                desc.setHidden(false);
+                desc.setName(key.toString());
+                desc.setPreferred(true);
+                desc.setValue(RESOLVABLE_AT_DESIGN_TIME, Boolean.FALSE);
+                desc.setValue(TYPE, key.getClass());
+                feats.add(desc);
+            }
+            return feats.iterator();
+        }
+        return null;
+    }
+
+    public Class<?> getCommonPropertyType(ELContext context, Object base) {
+        if (base instanceof Map) {
+            return Object.class;
+        }
+        return null;
+    }
 
 }

Modified: geronimo/specs/trunk/geronimo-el_2.2_spec/src/main/java/javax/el/PropertyNotFoundException.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-el_2.2_spec/src/main/java/javax/el/PropertyNotFoundException.java?rev=1024536&r1=1024535&r2=1024536&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-el_2.2_spec/src/main/java/javax/el/PropertyNotFoundException.java (original)
+++ geronimo/specs/trunk/geronimo-el_2.2_spec/src/main/java/javax/el/PropertyNotFoundException.java Wed Oct 20 06:40:04 2010
@@ -21,7 +21,7 @@ package javax.el;
  *
  */
 public class PropertyNotFoundException extends ELException {
-	
+    
     /**
      * 
      */

Modified: geronimo/specs/trunk/geronimo-el_2.2_spec/src/main/java/javax/el/ResourceBundleELResolver.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-el_2.2_spec/src/main/java/javax/el/ResourceBundleELResolver.java?rev=1024536&r1=1024535&r2=1024536&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-el_2.2_spec/src/main/java/javax/el/ResourceBundleELResolver.java (original)
+++ geronimo/specs/trunk/geronimo-el_2.2_spec/src/main/java/javax/el/ResourceBundleELResolver.java Wed Oct 20 06:40:04 2010
@@ -27,102 +27,102 @@ import java.util.ResourceBundle;
 
 public class ResourceBundleELResolver extends ELResolver {
 
-	public ResourceBundleELResolver() {
-		super();
-	}
-
-	public Object getValue(ELContext context, Object base, Object property)
-			throws NullPointerException, PropertyNotFoundException, ELException {
-		if (context == null) {
-			throw new NullPointerException();
-		}
-
-		if (base instanceof ResourceBundle) {
-			context.setPropertyResolved(true);
-
-			if (property != null) {
-				try {
-					return ((ResourceBundle) base).getObject(property
-							.toString());
-				} catch (MissingResourceException mre) {
-					return "???" + property.toString() + "???";
-				}
-			}
-		}
-
-		return null;
-	}
-
-	public Class<?> getType(ELContext context, Object base, Object property)
-			throws NullPointerException, PropertyNotFoundException, ELException {
-		if (context == null) {
-			throw new NullPointerException();
-		}
-
-		if (base instanceof ResourceBundle) {
-			context.setPropertyResolved(true);
-		}
-
-		return null;
-	}
-
-	public void setValue(ELContext context, Object base, Object property,
-			Object value) throws NullPointerException,
-			PropertyNotFoundException, PropertyNotWritableException,
-			ELException {
-		if (context == null) {
-			throw new NullPointerException();
-		}
-
-		if (base instanceof ResourceBundle) {
-			context.setPropertyResolved(true);
-			throw new PropertyNotWritableException(message(context,
-					"resolverNotWriteable", new Object[] { base.getClass()
-							.getName() }));
-		}
-	}
-
-	public boolean isReadOnly(ELContext context, Object base, Object property)
-			throws NullPointerException, PropertyNotFoundException, ELException {
-		if (context == null) {
-			throw new NullPointerException();
-		}
-
-		if (base instanceof ResourceBundle) {
-			context.setPropertyResolved(true);
-		}
-
-		return true;
-	}
-
-	public Iterator getFeatureDescriptors(ELContext context, Object base) {
-		if (base instanceof ResourceBundle) {
-			List<FeatureDescriptor> feats = new ArrayList<FeatureDescriptor>();
-			Enumeration e = ((ResourceBundle) base).getKeys();
-			FeatureDescriptor feat;
-			String key;
-			while (e.hasMoreElements()) {
-				key = (String) e.nextElement();
-				feat = new FeatureDescriptor();
-				feat.setDisplayName(key);
-				feat.setExpert(false);
-				feat.setHidden(false);
-				feat.setName(key);
-				feat.setPreferred(true);
-				feat.setValue(RESOLVABLE_AT_DESIGN_TIME, Boolean.TRUE);
-				feat.setValue(TYPE, String.class);
-				feats.add(feat);
-			}
-			return feats.iterator();
-		}
-		return null;
-	}
-
-	public Class<?> getCommonPropertyType(ELContext context, Object base) {
-		if (base instanceof ResourceBundle) {
-			return String.class;
-		}
-		return null;
-	}
+    public ResourceBundleELResolver() {
+        super();
+    }
+
+    public Object getValue(ELContext context, Object base, Object property)
+            throws NullPointerException, PropertyNotFoundException, ELException {
+        if (context == null) {
+            throw new NullPointerException();
+        }
+
+        if (base instanceof ResourceBundle) {
+            context.setPropertyResolved(true);
+
+            if (property != null) {
+                try {
+                    return ((ResourceBundle) base).getObject(property
+                            .toString());
+                } catch (MissingResourceException mre) {
+                    return "???" + property.toString() + "???";
+                }
+            }
+        }
+
+        return null;
+    }
+
+    public Class<?> getType(ELContext context, Object base, Object property)
+            throws NullPointerException, PropertyNotFoundException, ELException {
+        if (context == null) {
+            throw new NullPointerException();
+        }
+
+        if (base instanceof ResourceBundle) {
+            context.setPropertyResolved(true);
+        }
+
+        return null;
+    }
+
+    public void setValue(ELContext context, Object base, Object property,
+            Object value) throws NullPointerException,
+            PropertyNotFoundException, PropertyNotWritableException,
+            ELException {
+        if (context == null) {
+            throw new NullPointerException();
+        }
+
+        if (base instanceof ResourceBundle) {
+            context.setPropertyResolved(true);
+            throw new PropertyNotWritableException(message(context,
+                    "resolverNotWriteable", new Object[] { base.getClass()
+                            .getName() }));
+        }
+    }
+
+    public boolean isReadOnly(ELContext context, Object base, Object property)
+            throws NullPointerException, PropertyNotFoundException, ELException {
+        if (context == null) {
+            throw new NullPointerException();
+        }
+
+        if (base instanceof ResourceBundle) {
+            context.setPropertyResolved(true);
+        }
+
+        return true;
+    }
+
+    public Iterator getFeatureDescriptors(ELContext context, Object base) {
+        if (base instanceof ResourceBundle) {
+            List<FeatureDescriptor> feats = new ArrayList<FeatureDescriptor>();
+            Enumeration e = ((ResourceBundle) base).getKeys();
+            FeatureDescriptor feat;
+            String key;
+            while (e.hasMoreElements()) {
+                key = (String) e.nextElement();
+                feat = new FeatureDescriptor();
+                feat.setDisplayName(key);
+                feat.setExpert(false);
+                feat.setHidden(false);
+                feat.setName(key);
+                feat.setPreferred(true);
+                feat.setValue(RESOLVABLE_AT_DESIGN_TIME, Boolean.TRUE);
+                feat.setValue(TYPE, String.class);
+                feats.add(feat);
+            }
+            return feats.iterator();
+        }
+        return null;
+    }
+
+    public Class<?> getCommonPropertyType(ELContext context, Object base) {
+        if (base instanceof ResourceBundle) {
+            return String.class;
+        }
+        return null;
+    }
 
 }



Mime
View raw message