From: Tim P <ti...@us...> - 2008-03-20 21:01:54
|
Update of /cvsroot/webmacro/webmacro/src/org/webmacro/engine In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv6039/src/org/webmacro/engine Modified Files: PropertyOperatorCache.java Log Message: Checkstyle: Redundant throws Index: PropertyOperatorCache.java =================================================================== RCS file: /cvsroot/webmacro/webmacro/src/org/webmacro/engine/PropertyOperatorCache.java,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** PropertyOperatorCache.java 20 Mar 2008 09:49:29 -0000 1.23 --- PropertyOperatorCache.java 20 Mar 2008 21:01:48 -0000 1.24 *************** *** 133,137 **** final public PropertyOperator getOperator(final Class type) ! throws PropertyException { Object o = _cache.get(type); --- 133,137 ---- final public PropertyOperator getOperator(final Class type) ! throws PropertyException { Object o = _cache.get(type); *************** *** 147,151 **** final public PropertyOperator getOperator(final Object obj) ! throws PropertyException { Class type = obj.getClass(); --- 147,151 ---- final public PropertyOperator getOperator(final Object obj) ! throws PropertyException { Class type = obj.getClass(); *************** *** 173,180 **** */ final public Object getProperty(final Context context, ! final Object instance, ! final Object[] names, ! int start) ! throws PropertyException, SecurityException { if (instance == null) --- 173,180 ---- */ final public Object getProperty(final Context context, ! final Object instance, ! final Object[] names, ! int start) ! throws PropertyException { if (instance == null) *************** *** 193,199 **** */ final public Object getProperty(final Context context, ! final Object instance, ! final Object[] names) ! throws PropertyException, SecurityException { return getProperty(context, instance, names, 0); --- 193,199 ---- */ final public Object getProperty(final Context context, ! final Object instance, ! final Object[] names) ! throws PropertyException { return getProperty(context, instance, names, 0); *************** *** 212,220 **** */ final public boolean setProperty(final Context context, ! Object instance, ! final Object[] names, ! int start, ! final Object value) ! throws PropertyException, SecurityException { try --- 212,220 ---- */ final public boolean setProperty(final Context context, ! Object instance, ! final Object[] names, ! int start, ! final Object value) ! throws PropertyException { try *************** *** 241,248 **** */ final public boolean setProperty(final Context context, ! final Object instance, ! final Object[] names, ! final Object value) ! throws PropertyException, SecurityException { return setProperty(context, instance, names, 0, value); --- 241,248 ---- */ final public boolean setProperty(final Context context, ! final Object instance, ! final Object[] names, ! final Object value) ! throws PropertyException { return setProperty(context, instance, names, 0, value); *************** *** 258,262 **** */ final public Iterator getIterator(Object instance) ! throws PropertyException { if (instance instanceof Object[]) --- 258,262 ---- */ final public Iterator getIterator(Object instance) ! throws PropertyException { if (instance instanceof Object[]) *************** *** 311,345 **** /** ! * My accessors for fields, and binary methods */ final private HashMap _unaryAccessors = new HashMap(); /** ! * Accessors that require an additional property name */ final private HashMap _binaryAccessors = new HashMap(); /** ! * Accessors for direct method calls */ final private HashMap _directAccessors = new HashMap(); /** ! * Hash table accessor */ private BinaryMethodAccessor _hashAccessor; /** ! * The iterator method we found */ private Method iteratorMethod = null; /** ! * An accessor for array lengths */ private static LengthAccessor _lengthAccessor = new LengthAccessor(); /** ! * The property operator cache */ final private PropertyOperatorCache _cache; --- 311,345 ---- /** ! * My accessors for fields, and binary methods. */ final private HashMap _unaryAccessors = new HashMap(); /** ! * Accessors that require an additional property name. */ final private HashMap _binaryAccessors = new HashMap(); /** ! * Accessors for direct method calls. */ final private HashMap _directAccessors = new HashMap(); /** ! * Hash table accessor. */ private BinaryMethodAccessor _hashAccessor; /** ! * The iterator method we found. */ private Method iteratorMethod = null; /** ! * An accessor for array lengths. */ private static LengthAccessor _lengthAccessor = new LengthAccessor(); /** ! * The property operator cache. */ final private PropertyOperatorCache _cache; *************** *** 350,356 **** * may appear more than once in the vector if it is declared in more * than one superclass or interface. */ private void getAllMethods(HashMap meths, Class c) - throws SecurityException { if (Modifier.isPublic(c.getModifiers())) --- 350,356 ---- * may appear more than once in the vector if it is declared in more * than one superclass or interface. + * @exception SecurityException */ private void getAllMethods(HashMap meths, Class c) { if (Modifier.isPublic(c.getModifiers())) *************** *** 540,547 **** /** ! * Construct a property operator for the target class */ public PropertyOperator(final Class target, PropertyOperatorCache cache) ! throws SecurityException, PropertyException { --- 540,548 ---- /** ! * Construct a property operator for the target class. ! * @exception SecurityException */ public PropertyOperator(final Class target, PropertyOperatorCache cache) ! throws PropertyException { *************** *** 713,720 **** */ public Object getProperty(final Context context, ! final Object instance, ! final Object[] names, ! int start, int end) ! throws PropertyException { String propName; --- 714,721 ---- */ public Object getProperty(final Context context, ! final Object instance, ! final Object[] names, ! int start, int end) ! throws PropertyException { String propName; *************** *** 896,904 **** */ public boolean setProperty(Context context, ! Object instance, ! Object[] names, ! Object value, ! int pos) ! throws PropertyException, NoSuchMethodException { // names[pos] is what we could set from here --- 897,905 ---- */ public boolean setProperty(Context context, ! Object instance, ! Object[] names, ! Object value, ! int pos) ! throws PropertyException, NoSuchMethodException { // names[pos] is what we could set from here *************** *** 992,996 **** */ public Iterator findIterator(Object instance) ! throws PropertyException { if (iteratorMethod != null) --- 993,997 ---- */ public Iterator findIterator(Object instance) ! throws PropertyException { if (iteratorMethod != null) *************** *** 1022,1026 **** */ static Object invoke(Method meth, Object instance, Object[] args) ! throws PropertyException { try --- 1023,1027 ---- */ static Object invoke(Method meth, Object instance, Object[] args) ! throws PropertyException { try *************** *** 1110,1114 **** */ Object get(Object instance) ! throws PropertyException, NoSuchMethodException { throw new PropertyException("BUG in PropertyOperator.java!"); --- 1111,1115 ---- */ Object get(Object instance) ! throws PropertyException, NoSuchMethodException { throw new PropertyException("BUG in PropertyOperator.java!"); *************** *** 1119,1123 **** */ boolean set(Object instance, Object value) ! throws PropertyException, NoSuchMethodException { throw new PropertyException("BUG in PropertyOperator.java!"); --- 1120,1124 ---- */ boolean set(Object instance, Object value) ! throws PropertyException, NoSuchMethodException { throw new PropertyException("BUG in PropertyOperator.java!"); *************** *** 1125,1132 **** /** ! * Binary get */ Object get(Object instance, String subName) ! throws PropertyException, NoSuchMethodException { throw new PropertyException("BUG in PropertyOperator.java!"); --- 1126,1133 ---- /** ! * Binary get. */ Object get(Object instance, String subName) ! throws PropertyException, NoSuchMethodException { throw new PropertyException("BUG in PropertyOperator.java!"); *************** *** 1134,1141 **** /** ! * Binary */ boolean set(Object instance, String subName, Object value) ! throws PropertyException, NoSuchMethodException { throw new PropertyException("BUG in PropertyOperator.java!"); --- 1135,1142 ---- /** ! * Binary. */ boolean set(Object instance, String subName, Object value) ! throws PropertyException, NoSuchMethodException { throw new PropertyException("BUG in PropertyOperator.java!"); *************** *** 1147,1151 **** */ Object get(Object instance, Object[] args) ! throws PropertyException, NoSuchMethodException { throw new PropertyException("BUG in PropertyOperator.java!"); --- 1148,1152 ---- */ Object get(Object instance, Object[] args) ! throws PropertyException, NoSuchMethodException { throw new PropertyException("BUG in PropertyOperator.java!"); *************** *** 1170,1174 **** final Object get(final Object instance) ! throws PropertyException { try --- 1171,1175 ---- final Object get(final Object instance) ! throws PropertyException { try *************** *** 1185,1189 **** final boolean set(final Object instance, final Object value) ! throws PropertyException { try --- 1186,1190 ---- final boolean set(final Object instance, final Object value) ! throws PropertyException { try *************** *** 1214,1218 **** final Object get(final Object instance) ! throws PropertyException { try --- 1215,1219 ---- final Object get(final Object instance) ! throws PropertyException { try *************** *** 1229,1233 **** final boolean set(final Object instance, final Object value) ! throws PropertyException { throw new PropertyException("Cannot set length of array"); --- 1230,1234 ---- final boolean set(final Object instance, final Object value) ! throws PropertyException { throw new PropertyException("Cannot set length of array"); *************** *** 1256,1260 **** final Object get(Object instance, Object[] args) ! throws PropertyException, NoSuchMethodException { Class[] types = new Class[args.length]; --- 1257,1261 ---- final Object get(Object instance, Object[] args) ! throws PropertyException, NoSuchMethodException { Class[] types = new Class[args.length]; *************** *** 1317,1321 **** MethodAccessor(final String name, final Method m, final Class[] params) ! throws PropertyException { super(name); --- 1318,1322 ---- MethodAccessor(final String name, final Method m, final Class[] params) ! throws PropertyException { super(name); *************** *** 1348,1352 **** final void addMethod(final Method m, Class[] params) ! throws PropertyException { --- 1349,1353 ---- final void addMethod(final Method m, Class[] params) ! throws PropertyException { *************** *** 1396,1400 **** final boolean setImpl(final Object inst, final Object[] args) ! throws PropertyException, NoSuchMethodException { //which method to use? check params for first match --- 1397,1401 ---- final boolean setImpl(final Object inst, final Object[] args) ! throws PropertyException, NoSuchMethodException { //which method to use? check params for first match *************** *** 1434,1438 **** UnaryMethodAccessor(final String name, final Method m, final Class[] params) ! throws PropertyException { super(name, m, params); --- 1435,1439 ---- UnaryMethodAccessor(final String name, final Method m, final Class[] params) ! throws PropertyException { super(name, m, params); *************** *** 1450,1454 **** final Object get(final Object instance) ! throws PropertyException, NoSuchMethodException { return PropertyOperator.invoke(_getMethod, instance, null); --- 1451,1455 ---- final Object get(final Object instance) ! throws PropertyException, NoSuchMethodException { return PropertyOperator.invoke(_getMethod, instance, null); *************** *** 1456,1460 **** final boolean set(final Object instance, final Object value) ! throws PropertyException, NoSuchMethodException { Object[] args = --- 1457,1461 ---- final boolean set(final Object instance, final Object value) ! throws PropertyException, NoSuchMethodException { Object[] args = *************** *** 1469,1473 **** BinaryMethodAccessor(String name, Method m, Class[] params) ! throws PropertyException { super(name, m, params); --- 1470,1474 ---- BinaryMethodAccessor(String name, Method m, Class[] params) ! throws PropertyException { super(name, m, params); *************** *** 1485,1489 **** final Object get(final Object instance, String prop) ! throws PropertyException, NoSuchMethodException { Object[] args = --- 1486,1490 ---- final Object get(final Object instance, String prop) ! throws PropertyException, NoSuchMethodException { Object[] args = *************** *** 1493,1497 **** final boolean set(final Object instance, String prop, Object value) ! throws PropertyException, NoSuchMethodException { Object[] args = --- 1494,1498 ---- final boolean set(final Object instance, String prop, Object value) ! throws PropertyException, NoSuchMethodException { Object[] args = |