Updated Branches:
  refs/heads/master 90c2b1812 -> 7a21d813f

Java 7 diamonds and multi catch statements


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/7a21d813
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/7a21d813
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/7a21d813

Branch: refs/heads/master
Commit: 7a21d813ff324fb96f23d6593020c4bae2f69d39
Parents: 90c2b18
Author: Martin Tzvetanov Grigorov <[email protected]>
Authored: Wed Jan 22 12:12:04 2014 +0200
Committer: Martin Tzvetanov Grigorov <[email protected]>
Committed: Wed Jan 22 12:12:04 2014 +0200

----------------------------------------------------------------------
 .../checker/CheckingObjectOutputStream.java     | 32 +++++---------------
 1 file changed, 8 insertions(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/7a21d813/wicket-core/src/main/java/org/apache/wicket/core/util/objects/checker/CheckingObjectOutputStream.java
----------------------------------------------------------------------
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/core/util/objects/checker/CheckingObjectOutputStream.java
 
b/wicket-core/src/main/java/org/apache/wicket/core/util/objects/checker/CheckingObjectOutputStream.java
index 5113c48..0b9651d 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/core/util/objects/checker/CheckingObjectOutputStream.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/core/util/objects/checker/CheckingObjectOutputStream.java
@@ -292,19 +292,19 @@ public class CheckingObjectOutputStream extends 
ObjectOutputStream
        private final ObjectOutputStream out;
 
        /** object stack with the trace path. */
-       private final LinkedList<TraceSlot> traceStack = new 
LinkedList<TraceSlot>();
+       private final LinkedList<TraceSlot> traceStack = new LinkedList<>();
 
        /** set for checking circular references. */
-       private final Map<Object, Object> checked = new IdentityHashMap<Object, 
Object>();
+       private final Map<Object, Object> checked = new IdentityHashMap<>();
 
        /** string stack with current names pushed. */
-       private final LinkedList<CharSequence> nameStack = new 
LinkedList<CharSequence>();
+       private final LinkedList<CharSequence> nameStack = new LinkedList<>();
 
        /** root object being analyzed. */
        private Object root;
 
        /** set of classes that had no writeObject methods at lookup (to avoid 
repeated checking) */
-       private final Set<Class<?>> writeObjectMethodMissing = new 
HashSet<Class<?>>();
+       private final Set<Class<?>> writeObjectMethodMissing = new HashSet<>();
 
        /** current simple field name. */
        private CharSequence simpleName = "";
@@ -404,11 +404,7 @@ public class CheckingObjectOutputStream extends 
ObjectOutputStream
                                }
                                cls = repCl;
                        }
-                       catch (IllegalAccessException e)
-                       {
-                               throw new RuntimeException(e);
-                       }
-                       catch (InvocationTargetException e)
+                       catch (IllegalAccessException | 
InvocationTargetException e)
                        {
                                throw new RuntimeException(e);
                        }
@@ -583,11 +579,7 @@ public class CheckingObjectOutputStream extends 
ObjectOutputStream
                {
                        numFields = 
(Integer)GET_NUM_OBJ_FIELDS_METHOD.invoke(desc, (Object[])null);
                }
-               catch (IllegalAccessException e)
-               {
-                       throw new RuntimeException(e);
-               }
-               catch (InvocationTargetException e)
+               catch (IllegalAccessException | InvocationTargetException e)
                {
                        throw new RuntimeException(e);
                }
@@ -602,11 +594,7 @@ public class CheckingObjectOutputStream extends 
ObjectOutputStream
                        {
                                GET_OBJ_FIELD_VALUES_METHOD.invoke(desc, obj, 
objVals);
                        }
-                       catch (IllegalAccessException e)
-                       {
-                               throw new RuntimeException(e);
-                       }
-                       catch (InvocationTargetException e)
+                       catch (IllegalAccessException | 
InvocationTargetException e)
                        {
                                throw new RuntimeException(e);
                        }
@@ -632,11 +620,7 @@ public class CheckingObjectOutputStream extends 
ObjectOutputStream
                                {
                                        field = 
(Field)GET_FIELD_METHOD.invoke(fieldDesc, (Object[])null);
                                }
-                               catch (IllegalAccessException e)
-                               {
-                                       throw new RuntimeException(e);
-                               }
-                               catch (InvocationTargetException e)
+                               catch (IllegalAccessException | 
InvocationTargetException e)
                                {
                                        throw new RuntimeException(e);
                                }

Reply via email to