jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1688061 - in /jmeter/trunk/src/core/org/apache/jmeter/gui: GuiPackage.java MainFrame.java SavePropertyDialog.java
Date Sun, 28 Jun 2015 20:18:31 GMT
Author: pmouawad
Date: Sun Jun 28 20:18:30 2015
New Revision: 1688061

URL: http://svn.apache.org/r1688061
Log:
Java7 multiple exception catching

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/gui/GuiPackage.java
    jmeter/trunk/src/core/org/apache/jmeter/gui/MainFrame.java
    jmeter/trunk/src/core/org/apache/jmeter/gui/SavePropertyDialog.java

Modified: jmeter/trunk/src/core/org/apache/jmeter/gui/GuiPackage.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/gui/GuiPackage.java?rev=1688061&r1=1688060&r2=1688061&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/gui/GuiPackage.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/gui/GuiPackage.java Sun Jun 28 20:18:30 2015
@@ -351,13 +351,7 @@ public final class GuiPackage implements
                     "Missing jar? See log file." ,
                     JOptionPane.ERROR_MESSAGE);
             throw new RuntimeException(e.toString(), e); // Probably a missing jar
-        } catch (ClassNotFoundException e) {
-            log.error("Problem retrieving gui for " + objClass, e);
-            throw new RuntimeException(e.toString(), e); // Programming error: bail out.
-        } catch (InstantiationException e) {
-            log.error("Problem retrieving gui for " + objClass, e);
-            throw new RuntimeException(e.toString(), e); // Programming error: bail out.
-        } catch (IllegalAccessException e) {
+        } catch (ClassNotFoundException|InstantiationException|IllegalAccessException e)
{
             log.error("Problem retrieving gui for " + objClass, e);
             throw new RuntimeException(e.toString(), e); // Programming error: bail out.
         }

Modified: jmeter/trunk/src/core/org/apache/jmeter/gui/MainFrame.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/gui/MainFrame.java?rev=1688061&r1=1688060&r2=1688061&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/gui/MainFrame.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/gui/MainFrame.java Sun Jun 28 20:18:30 2015
@@ -770,9 +770,7 @@ public class MainFrame extends JFrame im
                     return;
                 }
             }
-        } catch (UnsupportedFlavorException e) {
-            log.warn("Dnd failed" , e);
-        } catch (IOException e) {
+        } catch (UnsupportedFlavorException|IOException e) {
             log.warn("Dnd failed" , e);
         }
 
@@ -863,10 +861,8 @@ public class MainFrame extends JFrame im
                 final Field awtAppClassName = xtoolkit.getDeclaredField("awtAppClassName");
// $NON-NLS-1$
                 awtAppClassName.setAccessible(true);
                 awtAppClassName.set(null, DEFAULT_APP_NAME);
-            } catch (NoSuchFieldException nsfe) {
+            } catch (NoSuchFieldException|IllegalAccessException nsfe) {
                 log.warn("Error awt title: " + nsfe); // $NON-NLS-1$
-            } catch (IllegalAccessException iae) {
-                log.warn("Error awt title: " + iae); // $NON-NLS-1$
             }
        }
     }

Modified: jmeter/trunk/src/core/org/apache/jmeter/gui/SavePropertyDialog.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/gui/SavePropertyDialog.java?rev=1688061&r1=1688060&r2=1688061&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/gui/SavePropertyDialog.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/gui/SavePropertyDialog.java Sun Jun 28 20:18:30
2015
@@ -114,9 +114,7 @@ public class SavePropertyDialog extends
                     if (!functors.containsKey(actionCommand)) {
                         functors.put(actionCommand, new Functor(actionCommand));
                     }
-                } catch (IllegalAccessException e) {
-                    log.warn("Problem creating save config dialog", e);
-                } catch (InvocationTargetException e) {
+                } catch (IllegalAccessException|InvocationTargetException e) {
                     log.warn("Problem creating save config dialog", e);
                 }
             }



Mime
View raw message