db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhille...@apache.org
Subject svn commit: r1745932 [1/2] - in /db/derby/code/trunk/java: build/org/apache/derbyBuild/ client/org/apache/derby/client/ client/org/apache/derby/client/am/ client/org/apache/derby/jdbc/ demo/nserverdemo/ demo/toursdb/ drda/org/apache/derby/impl/drda/ en...
Date Sat, 28 May 2016 20:22:42 GMT
Author: rhillegas
Date: Sat May 28 20:22:41 2016
New Revision: 1745932

URL: http://svn.apache.org/viewvc?rev=1745932&view=rev
Log:
DERBY-6856: Eliminate build warnings related to RoundingMode and Class.newInstance() introduced by build 118 of JDK 9: commit derby-6856-05-ag-roundingMode-Class.newInstance.diff.

Modified:
    db/derby/code/trunk/java/build/org/apache/derbyBuild/ClassSizeCrawler.java
    db/derby/code/trunk/java/client/org/apache/derby/client/ClientDataSourceFactory.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientPreparedStatement.java
    db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientDriver.java
    db/derby/code/trunk/java/demo/nserverdemo/SimpleNetworkClientSample.java
    db/derby/code/trunk/java/demo/nserverdemo/SimpleNetworkServerSample.java
    db/derby/code/trunk/java/demo/toursdb/insertMaps.java
    db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DecryptionManager.java
    db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/NetworkServerControlImpl.java
    db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/XADatabase.java
    db/derby/code/trunk/java/engine/org/apache/derby/catalog/Java5SystemProcedures.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/cache/ClassSizeCatalog.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/diag/DiagnosticUtil.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/loader/ClassInfo.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/loader/InstanceGetter.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/SQLDecimal.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/authentication/SpecificAuthenticationServiceImpl.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/services/jce/JCECipherFactory.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor/BaseMonitor.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor/StorageFactoryService.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/services/reflect/LoadedGeneratedClass.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SequenceUpdater.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/AggregateNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BitTypeCompiler.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BooleanTypeCompiler.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CLOBTypeCompiler.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CountAggregateDefinition.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DateTypeCompiler.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/LOBTypeCompiler.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/MaxMinAggregateDefinition.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/OptimizerTracer.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/RefTypeCompiler.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/SumAvgAggregateDefinition.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/TimeTypeCompiler.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/TimestampTypeCompiler.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/TypeCompilerFactoryImpl.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/UserAggregateDefinition.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/UserDefinedTypeCompiler.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/XMLTypeCompiler.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/GenericAggregator.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/UserDefinedAggregator.java
    db/derby/code/trunk/java/engine/org/apache/derby/jdbc/ReferenceableDataSource.java
    db/derby/code/trunk/java/optional/org/apache/derby/optional/dump/DataFileVTI.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/FileCompare.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/RunList.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/RunTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/dbcleanup.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/jvm.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/shutdown.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/SerializeDataSources.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/PrepareStatementTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/ShutDownDBWhenNSShutsDownTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/i18n/UrlLocaleTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/DataSourceTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/AutoloadTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ClientConnectionPoolDataSourceTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DataSourceReferenceTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DataSourceSerializationTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DataSourceTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DriverTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/InternationalConnectTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/J2EEDataSourceTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ConcurrentImplicitCreateSchema.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/GetPropertyInfoTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/outparams30.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/memory/ConnectionHandlingJunit.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationRun.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationRun_Local_1Indexing.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationRun_Local_3.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationRun_Local_3_p3.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationRun_Local_3_p4.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationRun_Local_3_p6.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationRun_Local_Encrypted_1.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/SimplePerfTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/SimplePerfTest_Verify.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/Beetle6038.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/BootAllTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/EncryptionAESTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/InterruptResilienceTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/dblook_test.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/util/TestUtil.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/util/corruptio/CorruptDiskStorageFactory.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/ConnectorSetup.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/DriverManagerConnector.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/JDBCDataSource.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/TestConfiguration.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/perf/clients/Runner.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/system/mailjdbc/utils/DbTasks.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/system/nstest/NsTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/system/oe/client/Submitter.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/system/sttest/Sttest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/system/sttest/utils/CompressTable.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/junit/MissingPermissionsTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/unitTests/store/T_RawStoreFactory.java
    db/derby/code/trunk/java/tools/org/apache/derby/impl/tools/ij/ConnectionEnv.java
    db/derby/code/trunk/java/tools/org/apache/derby/impl/tools/ij/ij.jj
    db/derby/code/trunk/java/tools/org/apache/derby/impl/tools/ij/util.java
    db/derby/code/trunk/java/tools/org/apache/derby/impl/tools/ij/utilMain.java
    db/derby/code/trunk/java/tools/org/apache/derby/impl/tools/ij/xaHelper.java
    db/derby/code/trunk/java/tools/org/apache/derby/impl/tools/planexporter/AccessDatabase.java
    db/derby/code/trunk/java/tools/org/apache/derby/tools/dblook.java
    db/derby/code/trunk/java/tools/org/apache/derby/tools/ij.java

Modified: db/derby/code/trunk/java/build/org/apache/derbyBuild/ClassSizeCrawler.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/build/org/apache/derbyBuild/ClassSizeCrawler.java?rev=1745932&r1=1745931&r2=1745932&view=diff
==============================================================================
--- db/derby/code/trunk/java/build/org/apache/derbyBuild/ClassSizeCrawler.java (original)
+++ db/derby/code/trunk/java/build/org/apache/derbyBuild/ClassSizeCrawler.java Sat May 28 20:22:41 2016
@@ -195,7 +195,7 @@ public class ClassSizeCrawler
             out.print( "package org.apache.derby.iapi.services.cache;\n" +
                        "class ClassSizeCatalogImpl extends ClassSizeCatalog\n" +
                        "{\n" +
-                       "    ClassSizeCatalogImpl()\n" +
+                       "    public ClassSizeCatalogImpl()\n" +
                        "    {\n");
             for( Enumeration e = classSizes.keys();
                  e.hasMoreElements();)

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/ClientDataSourceFactory.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/ClientDataSourceFactory.java?rev=1745932&r1=1745931&r2=1745932&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/ClientDataSourceFactory.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/ClientDataSourceFactory.java Sat May 28 20:22:41 2016
@@ -101,7 +101,8 @@ public class ClientDataSourceFactory imp
             if (className != null &&
                     className.startsWith("org.apache.derby.jdbc.Client")) {
                 // Create the proper data source object shell.
-                ds = Class.forName(className).newInstance();
+                Class<?> clazz = Class.forName(className);
+                ds = clazz.getConstructor().newInstance();
 
                 // Fill in the data source object shell with values from the
                 // jndi reference.

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientPreparedStatement.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientPreparedStatement.java?rev=1745932&r1=1745931&r2=1745932&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientPreparedStatement.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientPreparedStatement.java Sat May 28 20:22:41 2016
@@ -25,6 +25,7 @@ import java.io.InputStream;
 import java.io.Reader;
 import java.math.BigDecimal;
 import java.math.BigInteger;
+import java.math.RoundingMode;
 import java.net.URL;
 import java.sql.Array;
 import java.sql.BatchUpdateException;
@@ -1558,7 +1559,7 @@ public class ClientPreparedStatement ext
         try {
             if (targetJdbcType == Types.DECIMAL ||
                 targetJdbcType == Types.NUMERIC) {
-                x = ((BigDecimal) x).setScale(scale, BigDecimal.ROUND_DOWN);
+                x = ((BigDecimal) x).setScale(scale, RoundingMode.DOWN);
             }
         } catch (ArithmeticException ae) {
             // Any problems with scale should have already been caught by

Modified: db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientDriver.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientDriver.java?rev=1745932&r1=1745931&r2=1745932&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientDriver.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientDriver.java Sat May 28 20:22:41 2016
@@ -470,14 +470,18 @@ public class ClientDriver implements Dri
         final String factoryName =
                 "org.apache.derby.client.net.ClientJDBCObjectFactoryImpl40";
         try {
-            return (ClientJDBCObjectFactory)
-            Class.forName(factoryName).newInstance();
+            Class<?> clazz = Class.forName(factoryName);
+            return (ClientJDBCObjectFactory) clazz.getConstructor().newInstance();
         } catch (ClassNotFoundException cnfe) {
             return createDefaultFactoryImpl();
         } catch (InstantiationException ie) {
             return createDefaultFactoryImpl();
         } catch (IllegalAccessException iae) {
             return createDefaultFactoryImpl();
+        } catch (NoSuchMethodException iae) {
+            return createDefaultFactoryImpl();
+        } catch (java.lang.reflect.InvocationTargetException iae) {
+            return createDefaultFactoryImpl();
         }
     }
 
@@ -497,14 +501,18 @@ public class ClientDriver implements Dri
         final String factoryName =
                 "org.apache.derby.client.net.ClientJDBCObjectFactoryImpl42";
         try {
-            return (ClientJDBCObjectFactory)
-            Class.forName(factoryName).newInstance();
+            Class<?> clazz = Class.forName(factoryName);
+            return (ClientJDBCObjectFactory) clazz.getConstructor().newInstance();
         } catch (ClassNotFoundException cnfe) {
             return createJDBC40FactoryImpl();
         } catch (InstantiationException ie) {
             return createJDBC40FactoryImpl();
         } catch (IllegalAccessException iae) {
             return createJDBC40FactoryImpl();
+        } catch (NoSuchMethodException iae) {
+            return createJDBC40FactoryImpl();
+        } catch (java.lang.reflect.InvocationTargetException iae) {
+            return createJDBC40FactoryImpl();
         }
     }
 

Modified: db/derby/code/trunk/java/demo/nserverdemo/SimpleNetworkClientSample.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/demo/nserverdemo/SimpleNetworkClientSample.java?rev=1745932&r1=1745931&r2=1745932&view=diff
==============================================================================
--- db/derby/code/trunk/java/demo/nserverdemo/SimpleNetworkClientSample.java (original)
+++ db/derby/code/trunk/java/demo/nserverdemo/SimpleNetworkClientSample.java Sat May 28 20:22:41 2016
@@ -162,7 +162,7 @@ public class SimpleNetworkClientSample
 									  password) throws SQLException, ClassNotFoundException, InstantiationException, IllegalAccessException, NoSuchMethodException, InvocationTargetException
 	{
 		Class<?> nsDataSource = Class.forName(jdbcDataSource);
-		DataSource ds = (DataSource) nsDataSource.newInstance();
+		DataSource ds = (DataSource) nsDataSource.getConstructor().newInstance();
 
 		// can also include Derby URL attributes along with the database name
 		Class[] methodParams = new Class[] {String.class};

Modified: db/derby/code/trunk/java/demo/nserverdemo/SimpleNetworkServerSample.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/demo/nserverdemo/SimpleNetworkServerSample.java?rev=1745932&r1=1745931&r2=1745932&view=diff
==============================================================================
--- db/derby/code/trunk/java/demo/nserverdemo/SimpleNetworkServerSample.java (original)
+++ db/derby/code/trunk/java/demo/nserverdemo/SimpleNetworkServerSample.java Sat May 28 20:22:41 2016
@@ -183,7 +183,8 @@ public class SimpleNetworkServerSample
 		System.setProperty("derby.drda.startNetworkServer","true");
 
 		// Booting Derby
-		Class.forName("org.apache.derby.jdbc.EmbeddedDriver").newInstance();
+        Class<?> clazz = Class.forName("org.apache.derby.jdbc.EmbeddedDriver");
+        clazz.getConstructor().newInstance();
 	}
 
 

Modified: db/derby/code/trunk/java/demo/toursdb/insertMaps.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/demo/toursdb/insertMaps.java?rev=1745932&r1=1745931&r2=1745932&view=diff
==============================================================================
--- db/derby/code/trunk/java/demo/toursdb/insertMaps.java (original)
+++ db/derby/code/trunk/java/demo/toursdb/insertMaps.java Sat May 28 20:22:41 2016
@@ -42,7 +42,8 @@ public class insertMaps {
 	public static void main(String[] args) throws Exception {
 
 		System.out.println("Loading the Derby jdbc driver...");
-		Class.forName(CSdriver).newInstance();
+        Class<?> clazz = Class.forName(CSdriver);
+        clazz.getConstructor().newInstance();
 	
 		System.out.println("Getting Derby database connection...");
 		Connection connCS = DriverManager.getConnection(dbURLCS);

Modified: db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DecryptionManager.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DecryptionManager.java?rev=1745932&r1=1745931&r2=1745932&view=diff
==============================================================================
--- db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DecryptionManager.java (original)
+++ db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DecryptionManager.java Sat May 28 20:22:41 2016
@@ -103,7 +103,10 @@ class DecryptionManager
   {
     try {
       if (java.security.Security.getProvider ("IBMJCE") == null) // IBMJCE is not installed, install it.
-        java.security.Security.addProvider ((java.security.Provider) Class.forName("IBMJCE").newInstance());
+      {
+          Class<?> clazz = Class.forName("IBMJCE");
+          java.security.Security.addProvider ((java.security.Provider) clazz.getConstructor().newInstance());
+      }
       paramSpec_ = new DHParameterSpec (modulus__, base__, exponential_length__);
       keyPairGenerator_ = KeyPairGenerator.getInstance ("DH", "IBMJCE");
       keyPairGenerator_.initialize ((AlgorithmParameterSpec)paramSpec_);
@@ -123,6 +126,14 @@ class DecryptionManager
       throw new SQLException ("java.lang.InstantiationException is caught" +
                               " when initializing EncryptionManager '" + e.getMessage() + "'");
     }
+    catch (java.lang.NoSuchMethodException e) {
+      throw new SQLException ("java.lang.NoSuchMethodException is caught" +
+                              " when initializing EncryptionManager '" + e.getMessage() + "'");
+    }
+    catch (java.lang.reflect.InvocationTargetException e) {
+      throw new SQLException ("java.lang.reflect.InvocationTargetException is caught" +
+                              " when initializing EncryptionManager '" + e.getMessage() + "'");
+    }
     catch (java.security.NoSuchProviderException e) {
       throw new SQLException ("java.security.NoSuchProviderException is caught" +
                               " when initializing EncryptionManager '" + e.getMessage() + "'");

Modified: db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/NetworkServerControlImpl.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/NetworkServerControlImpl.java?rev=1745932&r1=1745931&r2=1745932&view=diff
==============================================================================
--- db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/NetworkServerControlImpl.java (original)
+++ db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/NetworkServerControlImpl.java Sat May 28 20:22:41 2016
@@ -1091,7 +1091,8 @@ public final class NetworkServerControlI
                     }
 
                     // start the server.
-                    cloudscapeDriver = (Driver) Class.forName(CLOUDSCAPE_DRIVER).newInstance();
+                    Class<?> clazz = Class.forName(CLOUDSCAPE_DRIVER);
+                    cloudscapeDriver = (Driver) clazz.getConstructor().newInstance();
 
                 }
                 catch (Exception e) {

Modified: db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/XADatabase.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/XADatabase.java?rev=1745932&r1=1745931&r2=1745932&view=diff
==============================================================================
--- db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/XADatabase.java (original)
+++ db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/XADatabase.java Sat May 28 20:22:41 2016
@@ -64,17 +64,14 @@ class XADatabase extends Database {
     synchronized void makeConnection(Properties p) throws SQLException
     {
         if (xaDataSource == null) {
+            Class<?> clazz;
             try {
                 if (JVMInfo.hasJNDI()) {
-                    xaDataSource =
-                        (EmbeddedXADataSourceInterface)Class.forName(
-                        "org.apache.derby.jdbc.EmbeddedXADataSource").
-                        newInstance();
+                    clazz = Class.forName("org.apache.derby.jdbc.EmbeddedXADataSource");
+                    xaDataSource = (EmbeddedXADataSourceInterface) clazz.getConstructor().newInstance();
                 } else {
-                    xaDataSource =
-                        (EmbeddedXADataSourceInterface)Class.forName(
-                        "org.apache.derby.jdbc.BasicEmbeddedXADataSource40").
-                        newInstance();
+                    clazz = Class.forName("org.apache.derby.jdbc.BasicEmbeddedXADataSource40");
+                    xaDataSource = (EmbeddedXADataSourceInterface) clazz.getConstructor().newInstance();
                 }
             } catch (Exception e) {
                 SQLException ne = new SQLException(

Modified: db/derby/code/trunk/java/engine/org/apache/derby/catalog/Java5SystemProcedures.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/catalog/Java5SystemProcedures.java?rev=1745932&r1=1745931&r2=1745932&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/catalog/Java5SystemProcedures.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/catalog/Java5SystemProcedures.java Sat May 28 20:22:41 2016
@@ -115,10 +115,12 @@ public  class   Java5SystemProcedures
             }
 
             try {
-                tool = (OptionalTool) toolClass.newInstance();
+                tool = (OptionalTool) toolClass.getConstructor().newInstance();
             }
             catch (InstantiationException ie) { throw wrap( ie ); }
             catch (IllegalAccessException iae) { throw wrap( iae ); }
+            catch (NoSuchMethodException ie) { throw wrap( ie ); }
+            catch (java.lang.reflect.InvocationTargetException iae) { throw wrap( iae ); }
 
             // Strip the custom tool class name from the optional args as necessary
             if ( CUSTOM_TOOL_CLASS_NAME.equals( toolName ) )

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/cache/ClassSizeCatalog.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/cache/ClassSizeCatalog.java?rev=1745932&r1=1745931&r2=1745932&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/cache/ClassSizeCatalog.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/cache/ClassSizeCatalog.java Sat May 28 20:22:41 2016
@@ -36,11 +36,13 @@ abstract class ClassSizeCatalog extends
         // try to compile it. This may fail because ClassSizeCatalogImpl.java
         // is not created until everything else has been compiled. Bury
         // ClassSizeCatalogImpl in a string.
+        String className = ClassSizeCatalog.class.getName() + "Impl";
         try {
-            INSTANCE = (ClassSizeCatalog)
-                Class.forName(ClassSizeCatalog.class.getName() + "Impl")
-                    .newInstance();
+            Class<?> clazz = Class.forName(className);
+            INSTANCE = (ClassSizeCatalog) clazz.getConstructor().newInstance();
         } catch (Exception e) {
+            System.out.println("Got error while instantiating " + className + ": " + e.getMessage());
+            e.printStackTrace();
             throw new ExceptionInInitializerError(e);
         }
     }

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/diag/DiagnosticUtil.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/diag/DiagnosticUtil.java?rev=1745932&r1=1745931&r2=1745932&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/diag/DiagnosticUtil.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/diag/DiagnosticUtil.java Sat May 28 20:22:41 2016
@@ -41,6 +41,8 @@ the D_* helper class:
 
 **/
 
+import java.lang.reflect.Constructor;
+
 public class DiagnosticUtil
 {
     /* Constructors for This class: */
@@ -80,7 +82,7 @@ public class DiagnosticUtil
 					className.substring(0, lastDot) + 
 					"D_" + className.substring(lastDot);
 
-				Class diagClass;
+				Class<?> diagClass;
 				
 				try {
 					diagClass = Class.forName(diagClassName);
@@ -95,7 +97,8 @@ public class DiagnosticUtil
 				}
 
 
-				Diagnosticable diag_obj = (Diagnosticable) diagClass.newInstance();
+                Constructor<?> constructor = diagClass.getConstructor();
+				Diagnosticable diag_obj = (Diagnosticable) diagClass.getConstructor().newInstance();
 
 				diag_obj.init(ref);
 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/loader/ClassInfo.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/loader/ClassInfo.java?rev=1745932&r1=1745931&r2=1745932&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/loader/ClassInfo.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/loader/ClassInfo.java Sat May 28 20:22:41 2016
@@ -65,11 +65,15 @@ public class ClassInfo implements Instan
 
 	*/
 	public Object getNewInstance()
-		throws InstantiationException, IllegalAccessException, InvocationTargetException  {
+		throws InstantiationException,
+               IllegalAccessException,
+               InvocationTargetException,
+               NoSuchMethodException
+  {
 
 		if (!useConstructor) {
 
-			return clazz.newInstance();
+            return clazz.getConstructor().newInstance();
 		}
 
 		if (noArgConstructor == null) {

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/loader/InstanceGetter.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/loader/InstanceGetter.java?rev=1745932&r1=1745931&r2=1745932&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/loader/InstanceGetter.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/loader/InstanceGetter.java Sat May 28 20:22:41 2016
@@ -34,5 +34,8 @@ public interface InstanceGetter {
 
 	*/
 	public Object getNewInstance()
-		throws InstantiationException, IllegalAccessException, InvocationTargetException;
+		throws InstantiationException,
+               IllegalAccessException,
+               InvocationTargetException,
+               NoSuchMethodException;
 }

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/SQLDecimal.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/SQLDecimal.java?rev=1745932&r1=1745931&r2=1745932&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/SQLDecimal.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/SQLDecimal.java Sat May 28 20:22:41 2016
@@ -34,6 +34,7 @@ import org.apache.derby.iapi.services.ca
 
 import java.math.BigDecimal;
 import java.math.BigInteger;
+import java.math.RoundingMode;
 import java.io.ObjectOutput;
 import java.io.ObjectInput;
 import java.io.IOException;
@@ -127,8 +128,7 @@ public final class SQLDecimal extends Nu
 		value = val;
 		if ((value != null) && (scale >= 0))
 		{
-			value = value.setScale(scale, 
-							BigDecimal.ROUND_DOWN);
+			value = value.setScale(scale, RoundingMode.DOWN);
 		}
 	}
 
@@ -854,14 +854,20 @@ public final class SQLDecimal extends Nu
 		** (for the whole result set column, eg.); otherwise dynamically
 		** calculates the scale according to actual values.  Beetle 3901
 		*/
-		result.setBigDecimal(dividendBigDecimal.divide(
-									divisorBigDecimal,
-									scale > -1 ? scale :
-									Math.max((dividendBigDecimal.scale() + 
-											SQLDecimal.getWholeDigits(divisorBigDecimal) +
-											1), 
-										NumberDataValue.MIN_DECIMAL_DIVIDE_SCALE),
-									BigDecimal.ROUND_DOWN));
+		result.setBigDecimal
+          (
+           dividendBigDecimal.divide
+           (
+            divisorBigDecimal,
+            scale > -1 ?
+            scale :
+            Math.max
+            (
+             (dividendBigDecimal.scale() + SQLDecimal.getWholeDigits(divisorBigDecimal) + 1), 
+             NumberDataValue.MIN_DECIMAL_DIVIDE_SCALE
+            ),
+            RoundingMode.DOWN)
+           );
 		
 		return result;
 	}
@@ -985,7 +991,7 @@ public final class SQLDecimal extends Nu
 			throw StandardException.newException(SQLState.LANG_OUTSIDE_RANGE_FOR_DATATYPE, 
 									("DECIMAL/NUMERIC("+desiredPrecision+","+desiredScale+")"));
 		}
-		value = value.setScale(desiredScale, BigDecimal.ROUND_DOWN);
+		value = value.setScale(desiredScale, RoundingMode.DOWN);
 		rawData = null;
 	}
 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/authentication/SpecificAuthenticationServiceImpl.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/authentication/SpecificAuthenticationServiceImpl.java?rev=1745932&r1=1745931&r2=1745932&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/authentication/SpecificAuthenticationServiceImpl.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/authentication/SpecificAuthenticationServiceImpl.java Sat May 28 20:22:41 2016
@@ -116,13 +116,13 @@ public class SpecificAuthenticationServi
 		Throwable t;
 		try {
 
-			Class sasClass = Class.forName(specificAuthenticationScheme);
+			Class<?> sasClass = Class.forName(specificAuthenticationScheme);
 			if (!UserAuthenticator.class.isAssignableFrom(sasClass)) {
 				throw StandardException.newException(SQLState.AUTHENTICATION_NOT_IMPLEMENTED,
 					specificAuthenticationScheme, "org.apache.derby.authentication.UserAuthenticator");
 			}
 
-			UserAuthenticator aScheme = (UserAuthenticator) sasClass.newInstance();
+			UserAuthenticator aScheme = (UserAuthenticator) sasClass.getConstructor().newInstance();
 
 			// Set ourselves as being ready and loading the proper
 			// authentication scheme for this service
@@ -137,6 +137,10 @@ public class SpecificAuthenticationServi
 			t = ie;
 		} catch (IllegalAccessException iae) {
 			t = iae;
+		} catch (NoSuchMethodException nsme) {
+			t = nsme;
+		} catch (java.lang.reflect.InvocationTargetException ite) {
+			t = ite;
 		}
         
         String  detail = t.getClass().getName() + ": " + t.getMessage();

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/services/jce/JCECipherFactory.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/services/jce/JCECipherFactory.java?rev=1745932&r1=1745931&r2=1745932&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/services/jce/JCECipherFactory.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/services/jce/JCECipherFactory.java Sat May 28 20:22:41 2016
@@ -540,15 +540,15 @@ final class JCECipherFactory implements
 				// provider package should be set by property
 				if (Security.getProvider(cryptoProviderShort) == null)
 				{
-                    Class cryptoClass = Class.forName(cryptoProvider);
+                    Class<?> cryptoClass = Class.forName(cryptoProvider);
                     if (!Provider.class.isAssignableFrom(cryptoClass)) {
                         throw StandardException.newException(
                                 SQLState.ENCRYPTION_NOT_A_PROVIDER,
                                 cryptoProvider);
                     }
 
-                    final Provider provider =
-                            (Provider) cryptoClass.newInstance();
+                    java.lang.reflect.Constructor<?> constructor = cryptoClass.getConstructor();
+                    final Provider provider = (Provider) constructor.newInstance();
 
 					// add provider through privileged block.
                     AccessController.doPrivileged(new PrivilegedAction<Void>() {
@@ -627,6 +627,14 @@ final class JCECipherFactory implements
         {
             t = iae;
         }
+        catch (NoSuchMethodException nsme)
+        {
+            t = nsme;
+        }
+		catch (java.lang.reflect.InvocationTargetException ite)
+		{
+			t = ite;
+		}
 		catch (NoSuchAlgorithmException nsae)
 		{
 			t = nsae;

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor/BaseMonitor.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor/BaseMonitor.java?rev=1745932&r1=1745931&r2=1745932&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor/BaseMonitor.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor/BaseMonitor.java Sat May 28 20:22:41 2016
@@ -28,6 +28,7 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.io.InputStreamReader;
 import java.io.PrintWriter;
+import java.lang.reflect.Constructor;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.net.URL;
@@ -618,11 +619,12 @@ abstract class BaseMonitor
 
 			Throwable t;
 			try {
-				Class clazz = Class.forName(className);
+				Class<?> clazz = Class.forName(className);
+                final Constructor<?> constructor = clazz.getDeclaredConstructor();
 
 				// See if it is a FormatableInstanceGetter
 				if (FormatableInstanceGetter.class.isAssignableFrom(clazz)) {
-					FormatableInstanceGetter tfig = (FormatableInstanceGetter) clazz.newInstance();
+                    FormatableInstanceGetter tfig = (FormatableInstanceGetter) constructor.newInstance();
 					tfig.setFormatId(fmtId);
 					return iga[off] = tfig;
 				}
@@ -635,6 +637,10 @@ abstract class BaseMonitor
 				t = iae;
 			} catch (InstantiationException ie) {
 				t = ie;
+			} catch (NoSuchMethodException nsme) {
+				t = nsme;
+			} catch (InvocationTargetException ite) {
+				t = ite;
 			} catch (LinkageError le) {
 				t = le;
 			}
@@ -685,9 +691,12 @@ abstract class BaseMonitor
  		catch (IllegalAccessException iae) {
 			t = iae;
 		}
+ 		catch (NoSuchMethodException iae) {
+			t = iae;
+		}
 		catch (InvocationTargetException ite) {
 			t = ite;
-		}
+        }
 		catch (LinkageError le) {
 			t = le;
 		}
@@ -777,7 +786,8 @@ abstract class BaseMonitor
     private Object newInstance(Class<?> classObject) {
 
 		try {
-            final Object module = classObject.newInstance();
+            final Constructor<?> constructor = classObject.getDeclaredConstructor();
+            final Object module = constructor.newInstance();
 
             // Get and report any warnings generated during initialization
             try {
@@ -805,6 +815,12 @@ abstract class BaseMonitor
  		catch (IllegalAccessException e) {
 			report(classObject.getName() + " " + e.toString());
 		}
+ 		catch (NoSuchMethodException e) {
+			report(classObject.getName() + " " + e.toString());
+		}
+ 		catch (InvocationTargetException e) {
+            report(classObject.getName() + " " + e.getCause().toString());
+		}
 		catch (LinkageError le) {
 			report(classObject.getName() + " " + le.toString());
 			reportException(le);

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor/StorageFactoryService.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor/StorageFactoryService.java?rev=1745932&r1=1745931&r2=1745932&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor/StorageFactoryService.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor/StorageFactoryService.java Sat May 28 20:22:41 2016
@@ -54,6 +54,7 @@ import java.io.OutputStream;
 import java.io.IOException;
 import java.io.FileNotFoundException;
 import java.io.OutputStreamWriter;
+import java.lang.reflect.InvocationTargetException;
 
 import java.util.Enumeration;
 import java.util.NoSuchElementException;
@@ -78,7 +79,7 @@ final class StorageFactoryService implem
     private String home; // the path of the database home directory. Can be null
     private String canonicalHome; // will be null if home is null
     private final String subSubProtocol;
-    private final Class storageFactoryClass;
+    private final Class<?> storageFactoryClass;
     private StorageFactory rootStorageFactory;
     private char separatorChar;
 
@@ -185,7 +186,8 @@ final class StorageFactoryService implem
             return AccessController.doPrivileged(
                 new PrivilegedExceptionAction<StorageFactory>()
                 {
-                    public StorageFactory run() throws InstantiationException, IllegalAccessException, IOException
+                  public StorageFactory run() throws InstantiationException,
+                      IllegalAccessException, IOException, NoSuchMethodException, InvocationTargetException
                     {
                         return privGetStorageFactoryInstance( useHome, databaseName, tempDirName, uniqueName);
                     }
@@ -203,9 +205,13 @@ final class StorageFactoryService implem
                                                           String databaseName,
                                                           String tempDirName,
                                                           String uniqueName)
-         throws InstantiationException, IllegalAccessException, IOException
+      throws InstantiationException,
+             IllegalAccessException,
+             IOException,
+             NoSuchMethodException,
+             InvocationTargetException
     {
-        StorageFactory storageFactory = (StorageFactory) storageFactoryClass.newInstance();
+        StorageFactory storageFactory = (StorageFactory) storageFactoryClass.getConstructor().newInstance();
         String dbn;
         if( databaseName != null
             && subSubProtocol != null
@@ -270,7 +276,8 @@ final class StorageFactoryService implem
                 {
                     public Object run()
                         throws IOException, StandardException,
-                        InstantiationException, IllegalAccessException
+                        InstantiationException, IllegalAccessException,
+                        NoSuchMethodException, InvocationTargetException
                     {
                         if( recreateFrom != null) // restore from a file
                         {
@@ -683,7 +690,10 @@ final class StorageFactoryService implem
                                 new PrivilegedExceptionAction<Object>()
                                 {
                                     public Object run()
-                                        throws IOException, StandardException, InstantiationException, IllegalAccessException
+                                        throws IOException, StandardException,
+                                      InstantiationException, IllegalAccessException,
+                                      NoSuchMethodException, InvocationTargetException
+                                      
                                     {
                                         StorageFactory storageFactory
                                           = privGetStorageFactoryInstance( true, serviceName, null, null);
@@ -730,7 +740,9 @@ final class StorageFactoryService implem
                             new PrivilegedExceptionAction<Object>()
                             {
                                 public Object run()
-                                    throws IOException, StandardException, InstantiationException, IllegalAccessException
+                                    throws IOException, StandardException,
+                                    InstantiationException, IllegalAccessException,
+                                    NoSuchMethodException, InvocationTargetException
                                 {
                                     WritableStorageFactory storageFactory =
                                       (WritableStorageFactory) privGetStorageFactoryInstance( true,
@@ -787,7 +799,9 @@ final class StorageFactoryService implem
                 new PrivilegedExceptionAction<Object>()
                 {
                     public Object run()
-                        throws StandardException, IOException, InstantiationException, IllegalAccessException
+                        throws StandardException, IOException,
+                        InstantiationException, IllegalAccessException,
+                        NoSuchMethodException, InvocationTargetException
                     {
                         StorageFactory storageFactory = privGetStorageFactoryInstance( true, name, null, null);
                         try
@@ -892,7 +906,9 @@ final class StorageFactoryService implem
                 new PrivilegedExceptionAction<Object>()
                 {
                     public Object run()
-                        throws StandardException, IOException, InstantiationException, IllegalAccessException
+                        throws StandardException, IOException,
+                        InstantiationException, IllegalAccessException,
+                        NoSuchMethodException, InvocationTargetException
                     {
                         StorageFactory storageFactory = privGetStorageFactoryInstance( true, serviceName, null, null);
                         try
@@ -954,7 +970,9 @@ final class StorageFactoryService implem
                 new PrivilegedExceptionAction<String>()
                 {
                     public String run()
-                        throws StandardException, IOException, InstantiationException, IllegalAccessException
+                        throws StandardException, IOException,
+                        InstantiationException, IllegalAccessException,
+                        NoSuchMethodException, InvocationTargetException
                     {
                         StorageFactory storageFactory = privGetStorageFactoryInstance( true, nm, null, null);
                         try

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/services/reflect/LoadedGeneratedClass.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/services/reflect/LoadedGeneratedClass.java?rev=1745932&r1=1745931&r2=1745932&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/services/reflect/LoadedGeneratedClass.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/services/reflect/LoadedGeneratedClass.java Sat May 28 20:22:41 2016
@@ -77,6 +77,8 @@ public abstract class LoadedGeneratedCla
 			t = iae;
 		} catch (java.lang.reflect.InvocationTargetException ite) {
 			t = ite;
+		} catch (NoSuchMethodException le) {
+			t = le;
 		} catch (LinkageError le) {
 			t = le;
 		}

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SequenceUpdater.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SequenceUpdater.java?rev=1745932&r1=1745931&r2=1745932&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SequenceUpdater.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SequenceUpdater.java Sat May 28 20:22:41 2016
@@ -568,13 +568,15 @@ public abstract class SequenceUpdater im
                     SQLState.LANG_NOT_A_SEQUENCE_PREALLOCATOR, propertyName);
             }
 
-            return (SequencePreallocator) klass.newInstance();
+            return (SequencePreallocator) klass.getConstructor().newInstance();
         }
         catch (ClassNotFoundException e) { throw missingAllocator( propertyName, className, e ); }
         catch (ClassCastException e) { throw missingAllocator( propertyName, className, e ); }
         catch (InstantiationException e) { throw missingAllocator( propertyName, className, e ); }
         catch (IllegalAccessException e) { throw missingAllocator( propertyName, className, e ); }
         catch (NumberFormatException e) { throw missingAllocator( propertyName, className, e ); }
+        catch (NoSuchMethodException e) { throw missingAllocator( propertyName, className, e ); }
+        catch (java.lang.reflect.InvocationTargetException e) { throw missingAllocator( propertyName, className, e ); }
     }
     private StandardException   missingAllocator( String propertyName, String className, Exception e )
     {

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/AggregateNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/AggregateNode.java?rev=1745932&r1=1745931&r2=1745932&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/AggregateNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/AggregateNode.java Sat May 28 20:22:41 2016
@@ -638,7 +638,7 @@ class AggregateNode extends UnaryOperato
             Object instance = null;
             try
             {
-                instance = theClass.newInstance();
+                instance = theClass.getConstructor().newInstance();
             }
             catch (Throwable t)
             {

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BitTypeCompiler.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BitTypeCompiler.java?rev=1745932&r1=1745931&r2=1745932&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BitTypeCompiler.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BitTypeCompiler.java Sat May 28 20:22:41 2016
@@ -34,7 +34,7 @@ import org.apache.derby.iapi.types.TypeI
  *
  */
 
-class BitTypeCompiler extends BaseTypeCompiler
+public class BitTypeCompiler extends BaseTypeCompiler
 {
         /**
          * Tell whether this type (bit) can be converted to the given type.

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BooleanTypeCompiler.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BooleanTypeCompiler.java?rev=1745932&r1=1745931&r2=1745932&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BooleanTypeCompiler.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BooleanTypeCompiler.java Sat May 28 20:22:41 2016
@@ -32,7 +32,7 @@ import org.apache.derby.iapi.types.TypeI
  *
  */
 
-class BooleanTypeCompiler extends BaseTypeCompiler
+public class BooleanTypeCompiler extends BaseTypeCompiler
 {
 	/**
 	 * Tell whether this type (boolean) can be converted to the given type.

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CLOBTypeCompiler.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CLOBTypeCompiler.java?rev=1745932&r1=1745931&r2=1745932&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CLOBTypeCompiler.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CLOBTypeCompiler.java Sat May 28 20:22:41 2016
@@ -35,7 +35,7 @@ import org.apache.derby.iapi.types.TypeI
  *
  */
 
-class CLOBTypeCompiler extends BaseTypeCompiler
+public class CLOBTypeCompiler extends BaseTypeCompiler
 {
         /**
          * Tell whether this type (LOB) can be converted to the given type.

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CountAggregateDefinition.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CountAggregateDefinition.java?rev=1745932&r1=1745931&r2=1745932&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CountAggregateDefinition.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CountAggregateDefinition.java Sat May 28 20:22:41 2016
@@ -35,7 +35,7 @@ class CountAggregateDefinition
 	 * Niladic constructor.  Does nothing.  For ease
 	 * Of use, only.
 	 */
-    CountAggregateDefinition() { super(); }
+    public CountAggregateDefinition() { super(); }
 
 	/**
 	 * Determines the result datatype. We can run

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DateTypeCompiler.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DateTypeCompiler.java?rev=1745932&r1=1745931&r2=1745932&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DateTypeCompiler.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DateTypeCompiler.java Sat May 28 20:22:41 2016
@@ -28,7 +28,7 @@ import org.apache.derby.iapi.sql.compile
 import org.apache.derby.iapi.types.DataTypeDescriptor;
 import org.apache.derby.iapi.types.TypeId;
 
-class DateTypeCompiler extends BaseTypeCompiler
+public class DateTypeCompiler extends BaseTypeCompiler
 {
 	/* TypeCompiler methods */
 	/**

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/LOBTypeCompiler.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/LOBTypeCompiler.java?rev=1745932&r1=1745931&r2=1745932&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/LOBTypeCompiler.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/LOBTypeCompiler.java Sat May 28 20:22:41 2016
@@ -34,7 +34,7 @@ import org.apache.derby.iapi.types.TypeI
  *
  */
 
-class LOBTypeCompiler extends BaseTypeCompiler
+public class LOBTypeCompiler extends BaseTypeCompiler
 {
     /**
      * Tell whether this type (LOB) can be converted to the given type.

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/MaxMinAggregateDefinition.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/MaxMinAggregateDefinition.java?rev=1745932&r1=1745931&r2=1745932&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/MaxMinAggregateDefinition.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/MaxMinAggregateDefinition.java Sat May 28 20:22:41 2016
@@ -41,7 +41,7 @@ class MaxMinAggregateDefinition
 	 * Niladic constructor.  Does nothing.  For ease
 	 * Of use, only.
 	 */
-    MaxMinAggregateDefinition() { super(); }
+    public MaxMinAggregateDefinition() { super(); }
 
 	/**
 	 * Determines the result datatype.  Accept NumberDataValues

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/OptimizerTracer.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/OptimizerTracer.java?rev=1745932&r1=1745931&r2=1745932&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/OptimizerTracer.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/OptimizerTracer.java Sat May 28 20:22:41 2016
@@ -115,11 +115,14 @@ public	class   OptimizerTracer  implemen
                 ClassFactoryContext cfc = (ClassFactoryContext) getContext( ClassFactoryContext.CONTEXT_ID );
                 ClassFactory    classFactory = cfc.getClassFactory();
 
-                tracer = (OptTrace) classFactory.loadApplicationClass( customOptTraceName ).newInstance();
+                Class<?> clazz = classFactory.loadApplicationClass( customOptTraceName );
+                tracer = (OptTrace) clazz.getConstructor().newInstance();
             }
             catch (InstantiationException cnfe) { throw cantInstantiate( customOptTraceName ); }
             catch (ClassNotFoundException cnfe) { throw cantInstantiate( customOptTraceName ); }
             catch (IllegalAccessException cnfe) { throw cantInstantiate( customOptTraceName ); }
+            catch (NoSuchMethodException cnfe) { throw cantInstantiate( customOptTraceName ); }
+            catch (java.lang.reflect.InvocationTargetException cnfe) { throw cantInstantiate( customOptTraceName ); }
             catch (Throwable t) { throw wrap( t ); }
         }
         else { throw wrap( MessageService.getTextMessage( SQLState.LANG_BAD_OPTIONAL_TOOL_ARGS ) ); }

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/RefTypeCompiler.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/RefTypeCompiler.java?rev=1745932&r1=1745931&r2=1745932&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/RefTypeCompiler.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/RefTypeCompiler.java Sat May 28 20:22:41 2016
@@ -33,7 +33,7 @@ import org.apache.derby.iapi.types.TypeI
  *
  */
 
-class RefTypeCompiler extends BaseTypeCompiler
+public class RefTypeCompiler extends BaseTypeCompiler
 {
 	/** @see TypeCompiler#getCorrespondingPrimitiveTypeName */
 	public String getCorrespondingPrimitiveTypeName()

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/SumAvgAggregateDefinition.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/SumAvgAggregateDefinition.java?rev=1745932&r1=1745931&r2=1745932&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/SumAvgAggregateDefinition.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/SumAvgAggregateDefinition.java Sat May 28 20:22:41 2016
@@ -43,7 +43,7 @@ class SumAvgAggregateDefinition
 	 * Niladic constructor.  Does nothing.  For ease
 	 * Of use, only.
 	 */
-    SumAvgAggregateDefinition() { super(); }
+    public SumAvgAggregateDefinition() { super(); }
 
 	/**
 	 * Determines the result datatype.  Accept NumberDataValues

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/TimeTypeCompiler.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/TimeTypeCompiler.java?rev=1745932&r1=1745931&r2=1745932&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/TimeTypeCompiler.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/TimeTypeCompiler.java Sat May 28 20:22:41 2016
@@ -28,7 +28,7 @@ import org.apache.derby.iapi.sql.compile
 import org.apache.derby.iapi.types.DataTypeDescriptor;
 import org.apache.derby.iapi.types.TypeId;
 
-class TimeTypeCompiler extends BaseTypeCompiler
+public class TimeTypeCompiler extends BaseTypeCompiler
 {
 	/* TypeCompiler methods */
 	/**

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/TimestampTypeCompiler.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/TimestampTypeCompiler.java?rev=1745932&r1=1745931&r2=1745932&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/TimestampTypeCompiler.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/TimestampTypeCompiler.java Sat May 28 20:22:41 2016
@@ -28,7 +28,7 @@ import org.apache.derby.iapi.sql.compile
 import org.apache.derby.iapi.types.DataTypeDescriptor;
 import org.apache.derby.iapi.types.TypeId;
 
-class TimestampTypeCompiler extends BaseTypeCompiler
+public class TimestampTypeCompiler extends BaseTypeCompiler
 {
 	/* TypeCompiler methods */	
 	/**

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/TypeCompilerFactoryImpl.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/TypeCompilerFactoryImpl.java?rev=1745932&r1=1745931&r2=1745932&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/TypeCompilerFactoryImpl.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/TypeCompilerFactoryImpl.java Sat May 28 20:22:41 2016
@@ -247,7 +247,8 @@ public class TypeCompilerFactoryImpl imp
                         try
                         {
                                 typeCompilerClass = Class.forName(className);
-                                anInstance  = (TypeCompiler) typeCompilerClass.newInstance();
+                                anInstance  = (TypeCompiler)
+                                    typeCompilerClass.getConstructor().newInstance();
                                 ((BaseTypeCompiler) anInstance).setTypeId(typeId);
                         }
                         catch (ClassNotFoundException cnfe)
@@ -262,6 +263,14 @@ public class TypeCompilerFactoryImpl imp
                         {
                                 exc = ie;
                         }
+                        catch (NoSuchMethodException nsme)
+                        {
+                                exc = nsme;
+                        }
+                        catch (java.lang.reflect.InvocationTargetException ite)
+                        {
+                                exc = ite;
+                        }
 
                         if (SanityManager.DEBUG)
                         {

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/UserAggregateDefinition.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/UserAggregateDefinition.java?rev=1745932&r1=1745931&r2=1745932&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/UserAggregateDefinition.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/UserAggregateDefinition.java Sat May 28 20:22:41 2016
@@ -71,7 +71,7 @@ class UserAggregateDefinition implements
 	/**
 	 * Conjure out of thin air.
 	 */
-    UserAggregateDefinition( AliasDescriptor alias )
+    public UserAggregateDefinition( AliasDescriptor alias )
     {
         _alias = alias;
     }

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/UserDefinedTypeCompiler.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/UserDefinedTypeCompiler.java?rev=1745932&r1=1745931&r2=1745932&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/UserDefinedTypeCompiler.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/UserDefinedTypeCompiler.java Sat May 28 20:22:41 2016
@@ -30,7 +30,7 @@ import org.apache.derby.iapi.sql.compile
 import org.apache.derby.iapi.types.DataTypeDescriptor;
 import org.apache.derby.iapi.types.TypeId;
 
-class UserDefinedTypeCompiler extends BaseTypeCompiler
+public class UserDefinedTypeCompiler extends BaseTypeCompiler
 {
 	/* TypeCompiler methods */
 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/XMLTypeCompiler.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/XMLTypeCompiler.java?rev=1745932&r1=1745931&r2=1745932&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/XMLTypeCompiler.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/XMLTypeCompiler.java Sat May 28 20:22:41 2016
@@ -33,7 +33,7 @@ import org.apache.derby.iapi.types.TypeI
  * This class implements TypeCompiler for the XML type.
  */
 
-class XMLTypeCompiler extends BaseTypeCompiler
+public class XMLTypeCompiler extends BaseTypeCompiler
 {
     /**
      * Tell whether this type (XML) can be converted to the given type.

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/GenericAggregator.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/GenericAggregator.java?rev=1745932&r1=1745931&r2=1745932&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/GenericAggregator.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/GenericAggregator.java Sat May 28 20:22:41 2016
@@ -21,6 +21,8 @@
 
 package org.apache.derby.impl.sql.execute;
 
+import java.lang.reflect.Constructor;
+
 import org.apache.derby.iapi.error.StandardException;
 import org.apache.derby.iapi.services.io.Storable;
 import org.apache.derby.iapi.services.loader.ClassFactory;
@@ -303,8 +305,9 @@ class GenericAggregator
 		{
 			try
 			{
-				Class aggregatorClass = cf.loadApplicationClass(aggInfo.getAggregatorClassName());
-				Object agg = aggregatorClass.newInstance();
+				Class<?> aggregatorClass = cf.loadApplicationClass(aggInfo.getAggregatorClassName());
+                Constructor<?> constructor = aggregatorClass.getConstructor();
+				Object agg = constructor.newInstance();
 				aggregatorInstance = (ExecAggregator)agg;
 				cachedAggregator = aggregatorInstance;
 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/UserDefinedAggregator.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/UserDefinedAggregator.java?rev=1745932&r1=1745931&r2=1745932&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/UserDefinedAggregator.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/UserDefinedAggregator.java Sat May 28 20:22:41 2016
@@ -90,16 +90,18 @@ public final class UserDefinedAggregator
         catch (ClassNotFoundException cnfe) { logAggregatorInstantiationError( aggregateName, cnfe ); }
 	}
     /** Initialization logic shared by setup() and newAggregator() */
-    private void    setup( Class udaClass, DataTypeDescriptor resultType )
+    private void    setup( Class<?> udaClass, DataTypeDescriptor resultType )
     {
         String  aggregateName = udaClass.getName();
         
         try {
-            _aggregator = (Aggregator) udaClass.newInstance();
+            _aggregator = (Aggregator) udaClass.getConstructor().newInstance();
             _aggregator.init();
         }
         catch (InstantiationException ie) { logAggregatorInstantiationError( aggregateName, ie ); }
         catch (IllegalAccessException iae) { logAggregatorInstantiationError( aggregateName, iae ); }
+        catch (NoSuchMethodException nsme) { logAggregatorInstantiationError( aggregateName, nsme ); }
+        catch (java.lang.reflect.InvocationTargetException ite) { logAggregatorInstantiationError( aggregateName, ite ); }
 
         _resultType = resultType;
     }

Modified: db/derby/code/trunk/java/engine/org/apache/derby/jdbc/ReferenceableDataSource.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/jdbc/ReferenceableDataSource.java?rev=1745932&r1=1745931&r2=1745932&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/jdbc/ReferenceableDataSource.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/jdbc/ReferenceableDataSource.java Sat May 28 20:22:41 2016
@@ -100,7 +100,7 @@ public class ReferenceableDataSource ext
             if (className != null &&
                     className.startsWith("org.apache.derby.jdbc.Embedded")) {
                 // Create the proper data source object shell.
-                ds = Class.forName(className).newInstance();
+                ds = Class.forName(className).getConstructor().newInstance();
 
                 // Fill in the data source object shell with values from the
                 // jndi reference.

Modified: db/derby/code/trunk/java/optional/org/apache/derby/optional/dump/DataFileVTI.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/optional/org/apache/derby/optional/dump/DataFileVTI.java?rev=1745932&r1=1745931&r2=1745932&view=diff
==============================================================================
--- db/derby/code/trunk/java/optional/org/apache/derby/optional/dump/DataFileVTI.java (original)
+++ db/derby/code/trunk/java/optional/org/apache/derby/optional/dump/DataFileVTI.java Sat May 28 20:22:41 2016
@@ -544,7 +544,8 @@ public  class   DataFileVTI extends VTIT
          )
         throws Exception
     {
-        UserAuthenticator   authenticator = (UserAuthenticator) Class.forName( customProvider ).newInstance();
+        Class<?> clazz = Class.forName( customProvider );
+        UserAuthenticator   authenticator = (UserAuthenticator) clazz.getConstructor().newInstance();
 
         return authenticator.authenticateUser( user, password, databaseDirectoryName, new Properties() );
     }

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/FileCompare.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/FileCompare.java?rev=1745932&r1=1745931&r2=1745932&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/FileCompare.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/FileCompare.java Sat May 28 20:22:41 2016
@@ -83,7 +83,7 @@ public class FileCompare
 	  try	
 	  {
         Class<?> c = Class.forName(NetServer.getDriverName(framework));
-        Object o = c.newInstance();
+        Object o = c.getConstructor().newInstance();
         driverVersionMajor = (Integer) c.getMethod("getMajorVersion").invoke(o);
         driverVersionMinor = (Integer) c.getMethod("getMinorVersion").invoke(o);
             if (framework.startsWith("DerbyNet")) searchDriverVersion = true;

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/RunList.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/RunList.java?rev=1745932&r1=1745931&r2=1745932&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/RunList.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/RunList.java Sat May 28 20:22:41 2016
@@ -1221,7 +1221,7 @@ public class RunList
 	    try	
 	    {
 		c = Class.forName("com.ibm.db2.jcc.DB2Driver");
-		o = c.newInstance();
+		o = c.getConstructor().newInstance();
 		m = c.getMethod("getMajorVersion", null);
 		i = (Integer)m.invoke(o, null);
 		jccMajor = i.intValue();

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/RunTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/RunTest.java?rev=1745932&r1=1745931&r2=1745932&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/RunTest.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/RunTest.java Sat May 28 20:22:41 2016
@@ -1083,7 +1083,7 @@ public class RunTest
  			try	
 			{
 				c = Class.forName("com.ibm.db2.jcc.DB2Driver");
-				o = c.newInstance();
+				o = c.getConstructor().newInstance();
 				m = c.getMethod("getMajorVersion", null);
 				i = (Integer)m.invoke(o, null);
 				jccMajor = i.intValue();

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/dbcleanup.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/dbcleanup.java?rev=1745932&r1=1745931&r2=1745932&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/dbcleanup.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/dbcleanup.java Sat May 28 20:22:41 2016
@@ -81,7 +81,8 @@ public class dbcleanup {
     		PrintStream stdout = System.out;
     		PrintStream stderr = System.err;
 
-		Class.forName(driver).newInstance();
+            Class<?> clazz = Class.forName(driver);
+            clazz.getConstructor().newInstance();
 
 		if (dbIsNew) {
 		try {

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/jvm.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/jvm.java?rev=1745932&r1=1745931&r2=1745932&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/jvm.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/jvm.java Sat May 28 20:22:41 2016
@@ -21,6 +21,7 @@
 
 package org.apache.derbyTesting.functionTests.harness;
 
+import java.lang.reflect.InvocationTargetException;
 import java.util.Enumeration;
 import java.util.Properties;
 import java.util.Vector;
@@ -209,12 +210,17 @@ public abstract class jvm {
         pass in class name for JVM.  If we can't find it, try
 	also org.apache.derbyTesting.functionTests.harness.<jvmName>
      */
-    public static jvm getJvm(String jvmName) throws ClassNotFoundException, InstantiationException, IllegalAccessException {
-	jvm result = null;
+    public static jvm getJvm(String jvmName) throws ClassNotFoundException, InstantiationException, IllegalAccessException, NoSuchMethodException, InvocationTargetException
+    {
+	    jvm result = null;
+        Class<?> clazz;
         try {
-		result = (jvm)Class.forName(jvmName).newInstance();
-        } catch (ClassNotFoundException e) {
-		result = (jvm)Class.forName("org.apache.derbyTesting.functionTests.harness."+jvmName).newInstance();
+            clazz = Class.forName(jvmName);
+            result = (jvm) clazz.getConstructor().newInstance();
+        } catch (ClassNotFoundException e)
+        {
+            clazz = Class.forName("org.apache.derbyTesting.functionTests.harness."+jvmName);
+            result = (jvm) clazz.getConstructor().newInstance();
         }
         return result;
     }

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/shutdown.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/shutdown.java?rev=1745932&r1=1745931&r2=1745932&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/shutdown.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/shutdown.java Sat May 28 20:22:41 2016
@@ -83,7 +83,8 @@ public class shutdown
         PrintStream stdout = System.out;
     	PrintStream stderr = System.err;
 
-		Class.forName(driver).newInstance();
+        Class<?> clazz = Class.forName(driver);
+		clazz.getConstructor().newInstance();
 
 		try 
 		{

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/SerializeDataSources.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/SerializeDataSources.java?rev=1745932&r1=1745931&r2=1745932&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/SerializeDataSources.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/serializedDataSources/SerializeDataSources.java Sat May 28 20:22:41 2016
@@ -114,7 +114,7 @@ public class SerializeDataSources {
                 "_0_0", "_1_0");
         int dsCount = 0;
         for (String dsClassName : dataSourceClasses) {
-            Class dsClass;
+            Class<?> dsClass;
             // Try to load the class.
             try {
                 dsClass = Class.forName(dsClassName);
@@ -124,7 +124,7 @@ public class SerializeDataSources {
                 continue;
             }
             // Create new instance.
-            DataSource ds = (DataSource)dsClass.newInstance();
+            DataSource ds = (DataSource)dsClass.getConstructor().newInstance();
             // Generate file name.
             File serialized = new File(dsClass.getSimpleName() + "-" +
                     modifiedVersionString + ".ser");

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/PrepareStatementTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/PrepareStatementTest.java?rev=1745932&r1=1745931&r2=1745932&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/PrepareStatementTest.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/PrepareStatementTest.java Sat May 28 20:22:41 2016
@@ -26,6 +26,7 @@ import java.io.DataInputStream;
 import java.io.InputStream;
 import java.io.InputStreamReader;
 import java.math.BigDecimal;
+import java.math.RoundingMode;
 import java.sql.BatchUpdateException;
 import java.sql.CallableStatement;
 import java.sql.DataTruncation;
@@ -533,7 +534,7 @@ public class PrepareStatementTest extend
         rs.next();
         // Check that the correct scale was set
         BigDecimal expected
-            = bdFromString.setScale(scale, BigDecimal.ROUND_DOWN);
+            = bdFromString.setScale(scale, RoundingMode.DOWN);
         BigDecimal actual = (BigDecimal)rs.getObject(1);
         assertEquals("Actual value: " + actual
                      + "does not match expected value: " + expected,

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/ShutDownDBWhenNSShutsDownTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/ShutDownDBWhenNSShutsDownTest.java?rev=1745932&r1=1745931&r2=1745932&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/ShutDownDBWhenNSShutsDownTest.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/ShutDownDBWhenNSShutsDownTest.java Sat May 28 20:22:41 2016
@@ -126,9 +126,13 @@ public class ShutDownDBWhenNSShutsDownTe
 
         // shut down the engine
         TestConfiguration.getCurrent().shutdownEngine();
-        
+
+        Class<?> clazz;
         if (loadEmbeddedDriver)
-            Class.forName("org.apache.derby.jdbc.EmbeddedDriver").newInstance();
+        {
+            clazz = Class.forName("org.apache.derby.jdbc.EmbeddedDriver");
+            clazz.getConstructor().newInstance();
+        }
 
         // see if it is still possible to connect to the server (before
         // DERBY-1326, this would hang)

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/i18n/UrlLocaleTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/i18n/UrlLocaleTest.java?rev=1745932&r1=1745931&r2=1745932&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/i18n/UrlLocaleTest.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/i18n/UrlLocaleTest.java Sat May 28 20:22:41 2016
@@ -56,7 +56,8 @@ public class UrlLocaleTest extends BaseJ
         // Reregister driver for any subsequent tests
         String driverClass =
                 TestConfiguration.getCurrent().getJDBCClient().getJDBCDriverName();
-        Class.forName(driverClass).newInstance();
+        Class<?> clazz = Class.forName(driverClass);
+        clazz.getConstructor().newInstance();
     }
     
     /**

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/DataSourceTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/DataSourceTest.java?rev=1745932&r1=1745931&r2=1745932&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/DataSourceTest.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/DataSourceTest.java Sat May 28 20:22:41 2016
@@ -282,10 +282,12 @@ public class DataSourceTest extends Base
     	//As per the JDBC definition, an exception and hence an event is raised
     	//for isValid only if the param value is illegal
     	assertFalse(aes12.didConnectionErrorEventHappen());
-        aes12.resetState();        	
+        aes12.resetState();
+        Class<?> clazz;
         if (usingEmbedded())
         {
-            Class.forName("org.apache.derby.jdbc.EmbeddedDriver").newInstance();
+            clazz = Class.forName("org.apache.derby.jdbc.EmbeddedDriver");
+            clazz.getConstructor().newInstance();
         }else
         {
         	getTestConfiguration().startNetworkServer();

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/AutoloadTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/AutoloadTest.java?rev=1745932&r1=1745931&r2=1745932&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/AutoloadTest.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/AutoloadTest.java Sat May 28 20:22:41 2016
@@ -374,7 +374,8 @@ public class AutoloadTest extends BaseJD
 
             //Derby should be able to get a connection if AutoloaderDriver is
             //not in DriverManager. Make a connection to test it. Derby-2905
-            Class.forName(driverClass).newInstance();
+            Class<?> clazz = Class.forName(driverClass);
+            clazz.getConstructor().newInstance();
             url = getTestConfiguration().getJDBCUrl();
             user = getTestConfiguration().getUserName();
             password = getTestConfiguration().getUserPassword();
@@ -527,7 +528,8 @@ public class AutoloadTest extends BaseJD
             testUnsuccessfulConnect();
         }
 
-        Class.forName(driverClass).newInstance();
+        Class<?> clazz = Class.forName(driverClass);
+        clazz.getConstructor().newInstance();
         testSuccessfulConnect();
         testUnsuccessfulConnect();
     }

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ClientConnectionPoolDataSourceTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ClientConnectionPoolDataSourceTest.java?rev=1745932&r1=1745931&r2=1745932&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ClientConnectionPoolDataSourceTest.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ClientConnectionPoolDataSourceTest.java Sat May 28 20:22:41 2016
@@ -53,14 +53,13 @@ public class ClientConnectionPoolDataSou
     public void testMaxStatementsProperty() throws Exception {
         ClientConnectionPoolDataSourceInterface cDs;
 
+        Class<?> clazz;
         if (JDBC.vmSupportsJNDI()) {
-            cDs = (ClientConnectionPoolDataSourceInterface)Class.forName(
-                "org.apache.derby.jdbc.ClientConnectionPoolDataSource")
-                    .newInstance();
+            clazz = Class.forName("org.apache.derby.jdbc.ClientConnectionPoolDataSource");
+            cDs = (ClientConnectionPoolDataSourceInterface) clazz.getConstructor().newInstance();
         } else {
-            cDs = (ClientConnectionPoolDataSourceInterface)Class.forName(
-                "org.apache.derby.jdbc.BasicClientConnectionPoolDataSource40")
-                    .newInstance();
+            clazz = Class.forName("org.apache.derby.jdbc.BasicClientConnectionPoolDataSource40");
+            cDs = (ClientConnectionPoolDataSourceInterface) clazz.getConstructor().newInstance();
         }
         // Check the default value.
         assertEquals("Unexpected default value", 0, cDs.getMaxStatements());

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DataSourceReferenceTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DataSourceReferenceTest.java?rev=1745932&r1=1745931&r2=1745932&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DataSourceReferenceTest.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DataSourceReferenceTest.java Sat May 28 20:22:41 2016
@@ -220,7 +220,8 @@ public class DataSourceReferenceTest
                                         String className)
         throws Exception {
         // Instantiate a new data source object and get all its properties.
-        Object dsObj = Class.forName(className).newInstance();
+        Class<?> clazz = Class.forName(className);
+        Object dsObj = clazz.getConstructor().newInstance();
         String[] properties = getPropertyBeanList(dsObj);
         // Validate property set (existence and naming).
         assertDataSourceProperties(dsDesc, properties);
@@ -290,12 +291,14 @@ public class DataSourceReferenceTest
             throws Exception {
         println("Testing recreated empty data source.");
         // Create an empty data source.
-        Object ds = Class.forName(className).newInstance();
+        Class<?> clazz = Class.forName(className);
+        Object ds = clazz.getConstructor().newInstance();
         Referenceable refDs = (Referenceable)ds;
         Reference dsAsReference = refDs.getReference();
         String factoryClassName = dsAsReference.getFactoryClassName();
+        clazz = Class.forName(factoryClassName);
         ObjectFactory factory =
-            (ObjectFactory)Class.forName(factoryClassName).newInstance();
+            (ObjectFactory) clazz.getConstructor().newInstance();
         Object recreatedDs =
             factory.getObjectInstance(dsAsReference, null, null, null);
         // Empty, recreated data source should not be the same as the one we
@@ -333,7 +336,8 @@ public class DataSourceReferenceTest
                                                 String className)
             throws Exception {
         println("Testing recreated populated data source.");
-        Object ds = Class.forName(className).newInstance();
+        Class<?> clazz = Class.forName(className);
+        Object ds = clazz.getConstructor().newInstance();
         // Populate the data source.
         Iterator propIter = dsDesc.getPropertyIterator();
         while (propIter.hasNext()) {
@@ -361,8 +365,9 @@ public class DataSourceReferenceTest
         Referenceable refDs = (Referenceable)ds;
         Reference dsAsReference = refDs.getReference();
         String factoryClassName = dsAsReference.getFactoryClassName();
+        clazz = Class.forName(factoryClassName);
         ObjectFactory factory =
-            (ObjectFactory)Class.forName(factoryClassName).newInstance();
+            (ObjectFactory) clazz.getConstructor().newInstance();
         Object recreatedDs =
             factory.getObjectInstance(dsAsReference, null, null, null);
         // Recreated should not be same instance as original.




Mime
View raw message