Index: /trunk/src/org/openstreetmap/josm/Main.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/Main.java	(revision 10207)
+++ /trunk/src/org/openstreetmap/josm/Main.java	(revision 10208)
@@ -954,6 +954,6 @@
                 if (klass != null && LookAndFeel.class.isAssignableFrom(klass)) {
                     try {
-                        UIManager.setLookAndFeel((LookAndFeel) klass.newInstance());
-                    } catch (Exception ex) {
+                        UIManager.setLookAndFeel((LookAndFeel) klass.getConstructor().newInstance());
+                    } catch (ReflectiveOperationException ex) {
                         warn("Cannot set Look and Feel: " + laf + ": "+ex.getMessage());
                     }
Index: /trunk/src/org/openstreetmap/josm/actions/ExtensionFileFilter.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/ExtensionFileFilter.java	(revision 10207)
+++ /trunk/src/org/openstreetmap/josm/actions/ExtensionFileFilter.java	(revision 10208)
@@ -65,8 +65,8 @@
         for (final Class<? extends FileImporter> importerClass : importerNames) {
             try {
-                FileImporter importer = importerClass.newInstance();
+                FileImporter importer = importerClass.getConstructor().newInstance();
                 importers.add(importer);
                 MapView.addLayerChangeListener(importer);
-            } catch (Exception e) {
+            } catch (ReflectiveOperationException e) {
                 if (Main.isDebugEnabled()) {
                     Main.debug(e.getMessage());
@@ -106,8 +106,8 @@
         for (final Class<? extends FileExporter> exporterClass : exporterClasses) {
             try {
-                FileExporter exporter = exporterClass.newInstance();
+                FileExporter exporter = exporterClass.getConstructor().newInstance();
                 exporters.add(exporter);
                 MapView.addLayerChangeListener(exporter);
-            } catch (Exception e) {
+            } catch (ReflectiveOperationException e) {
                 if (Main.isDebugEnabled()) {
                     Main.debug(e.getMessage());
Index: /trunk/src/org/openstreetmap/josm/data/Preferences.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/Preferences.java	(revision 10207)
+++ /trunk/src/org/openstreetmap/josm/data/Preferences.java	(revision 10208)
@@ -1209,6 +1209,6 @@
         T structPrototype;
         try {
-            structPrototype = klass.newInstance();
-        } catch (InstantiationException | IllegalAccessException ex) {
+            structPrototype = klass.getConstructor().newInstance();
+        } catch (ReflectiveOperationException ex) {
             throw new RuntimeException(ex);
         }
@@ -1258,10 +1258,10 @@
         T struct = null;
         try {
-            struct = klass.newInstance();
-        } catch (InstantiationException | IllegalAccessException ex) {
+            struct = klass.getConstructor().newInstance();
+        } catch (ReflectiveOperationException ex) {
             throw new RuntimeException(ex);
         }
         for (Entry<String, String> key_value : hash.entrySet()) {
-            Object value = null;
+            Object value;
             Field f;
             try {
Index: /trunk/src/org/openstreetmap/josm/data/projection/proj/ClassProjFactory.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/projection/proj/ClassProjFactory.java	(revision 10207)
+++ /trunk/src/org/openstreetmap/josm/data/projection/proj/ClassProjFactory.java	(revision 10208)
@@ -9,4 +9,8 @@
     private final Class<? extends Proj> projClass;
 
+    /**
+     * Constructs a new {@code ClassProjFactory}.
+     * @param projClass projection class
+     */
     public ClassProjFactory(Class<? extends Proj> projClass) {
         this.projClass = projClass;
@@ -17,6 +21,6 @@
         Proj proj = null;
         try {
-            proj = projClass.newInstance();
-        } catch (InstantiationException | IllegalAccessException e) {
+            proj = projClass.getConstructor().newInstance();
+        } catch (ReflectiveOperationException e) {
             throw new RuntimeException(e);
         }
Index: /trunk/src/org/openstreetmap/josm/data/validation/OsmValidator.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/validation/OsmValidator.java	(revision 10207)
+++ /trunk/src/org/openstreetmap/josm/data/validation/OsmValidator.java	(revision 10208)
@@ -136,6 +136,6 @@
         for (Class<Test> testClass : allAvailableTests) {
             try {
-                allTestsMap.put(testClass.getName(), testClass.newInstance());
-            } catch (Exception e) {
+                allTestsMap.put(testClass.getName(), testClass.getConstructor().newInstance());
+            } catch (ReflectiveOperationException e) {
                 Main.error(e);
             }
Index: /trunk/src/org/openstreetmap/josm/io/remotecontrol/RequestProcessor.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/remotecontrol/RequestProcessor.java	(revision 10207)
+++ /trunk/src/org/openstreetmap/josm/io/remotecontrol/RequestProcessor.java	(revision 10208)
@@ -220,5 +220,5 @@
             } else {
                 // create handler object
-                RequestHandler handler = handlerClass.newInstance();
+                RequestHandler handler = handlerClass.getConstructor().newInstance();
                 try {
                     handler.setCommand(command);
@@ -243,5 +243,5 @@
         } catch (IOException ioe) {
             Main.debug(Main.getErrorMessage(ioe));
-        } catch (Exception e) {
+        } catch (ReflectiveOperationException e) {
             Main.error(e);
             try {
@@ -391,15 +391,15 @@
     public static String getHandlerInfoAsJSON(String cmd) {
         try (StringWriter w = new StringWriter()) {
-            PrintWriter r = new PrintWriter(w);
             RequestHandler handler = null;
             try {
                 Class<?> c = handlers.get(cmd);
                 if (c == null) return null;
-                handler = handlers.get(cmd).newInstance();
-            } catch (InstantiationException | IllegalAccessException ex) {
+                handler = handlers.get(cmd).getConstructor().newInstance();
+            } catch (ReflectiveOperationException ex) {
                 Main.error(ex);
                 return null;
             }
 
+            PrintWriter r = new PrintWriter(w);
             printJsonInfo(cmd, r, handler);
             return w.toString();
@@ -459,12 +459,10 @@
      * Reports HTML message with the description of all available commands
      * @return HTML message with the description of all available commands
-     * @throws IllegalAccessException if one handler class or its nullary constructor is not accessible.
-     * @throws InstantiationException if one handler class represents an abstract class, an interface, an array class,
-     * a primitive type, or void; or if the class has no nullary constructor; or if the instantiation fails for some other reason.
-     */
-    public static String getUsageAsHtml() throws IllegalAccessException, InstantiationException {
+     * @throws ReflectiveOperationException if a reflective operation fails for one handler class
+     */
+    public static String getUsageAsHtml() throws ReflectiveOperationException {
         StringBuilder usage = new StringBuilder(1024);
         for (Entry<String, Class<? extends RequestHandler>> handler : handlers.entrySet()) {
-            RequestHandler sample = handler.getValue().newInstance();
+            RequestHandler sample = handler.getValue().getConstructor().newInstance();
             String[] mandatory = sample.getMandatoryParams();
             String[] optional = sample.getOptionalParams();
Index: /trunk/src/org/openstreetmap/josm/io/session/SessionReader.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/session/SessionReader.java	(revision 10207)
+++ /trunk/src/org/openstreetmap/josm/io/session/SessionReader.java	(revision 10208)
@@ -99,6 +99,6 @@
         SessionLayerImporter importer = null;
         try {
-            importer = importerClass.newInstance();
-        } catch (InstantiationException | IllegalAccessException e) {
+            importer = importerClass.getConstructor().newInstance();
+        } catch (ReflectiveOperationException e) {
             throw new RuntimeException(e);
         }
Index: /trunk/src/org/openstreetmap/josm/tools/XmlObjectParser.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/XmlObjectParser.java	(revision 10207)
+++ /trunk/src/org/openstreetmap/josm/tools/XmlObjectParser.java	(revision 10208)
@@ -83,6 +83,6 @@
                 Class<?> klass = mapping.get(qname).klass;
                 try {
-                    current.push(klass.newInstance());
-                } catch (Exception e) {
+                    current.push(klass.getConstructor().newInstance());
+                } catch (ReflectiveOperationException e) {
                     throwException(e);
                 }
Index: /trunk/test/unit/org/openstreetmap/josm/io/remotecontrol/RemoteControlTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/io/remotecontrol/RemoteControlTest.java	(revision 10207)
+++ /trunk/test/unit/org/openstreetmap/josm/io/remotecontrol/RemoteControlTest.java	(revision 10208)
@@ -68,11 +68,14 @@
         TrustManager[] trustAllCerts = new TrustManager[] {
             new X509TrustManager() {
+                @Override
                 public X509Certificate[] getAcceptedIssuers() {
                     return null;
                 }
 
+                @Override
                 public void checkClientTrusted(X509Certificate[] certs, String authType) {
                 }
 
+                @Override
                 public void checkServerTrusted(X509Certificate[] certs, String authType) {
                 }
@@ -141,5 +144,5 @@
                 }
                 assert responseBody.toString().contains(RequestProcessor.getUsageAsHtml());
-            } catch (IllegalAccessException | InstantiationException e) {
+            } catch (ReflectiveOperationException e) {
                 e.printStackTrace();
                 fail(e.getMessage());
