< prev index next >

src/java.sql.rowset/share/classes/javax/sql/rowset/spi/SyncFactory.java

Print this page

        

@@ -580,18 +580,16 @@
              * the classpath. We need to find the ClassLoader which loads
              * this SyncFactory and try to load the SyncProvider class from
              * there.
              **/
             c = Class.forName(providerID, true, cl);
-            return (SyncProvider) c.newInstance();
+            @SuppressWarnings("deprecation")
+            Object result =  c.newInstance();
+            return (SyncProvider)result;
 
-        } catch (IllegalAccessException e) {
+        } catch (IllegalAccessException | InstantiationException | ClassNotFoundException e) {
             throw new SyncFactoryException("IllegalAccessException: " + e.getMessage());
-        } catch (InstantiationException e) {
-            throw new SyncFactoryException("InstantiationException: " + e.getMessage());
-        } catch (ClassNotFoundException e) {
-            throw new SyncFactoryException("ClassNotFoundException: " + e.getMessage());
         }
     }
 
     /**
      * Returns an Enumeration of currently registered synchronization
< prev index next >