Fixed bug 38095: Handle new Exception thrown by newInstance
authorJavier Armendáriz <javier.armendariz@openbravo.com>
Fri, 09 Mar 2018 14:58:16 +0100
changeset 84 58e71342e8e0
parent 83 179251fc6c31
child 85 4f3030b1c9ad
Fixed bug 38095: Handle new Exception thrown by newInstance

JDK 9 fixed replaced ExternalConnectionPool.getInstance exceptions
to a ReflectiveOperationException. Modified the setInterceptor method
to explicitly throw this Exception.
src-test/org/openbravo/util/db/MeasurePerformance.java
--- a/src-test/org/openbravo/util/db/MeasurePerformance.java	Tue Feb 20 08:15:22 2018 +0100
+++ b/src-test/org/openbravo/util/db/MeasurePerformance.java	Fri Mar 09 14:58:16 2018 +0100
@@ -53,8 +53,7 @@
 
   /** Not using CDI for this test cases requires to manually set interceptors and initialize jmx */
   @BeforeClass
-  public static void setInterceptor() throws InstantiationException, IllegalAccessException,
-      ClassNotFoundException {
+  public static void setInterceptor() throws ReflectiveOperationException {
     conf.setEnabled(true);
     String poolClassName = OBPropertiesProvider.getInstance().getOpenbravoProperties()
         .getProperty("db.externalPoolClassName");