Make system compile with JDK1.5
authorfhanik <fhanik@13f79535-47bb-0310-9956-ffa450edef68>
Sat, 3 Jan 2009 01:30:23 +0000 (01:30 +0000)
committerfhanik <fhanik@13f79535-47bb-0310-9956-ffa450edef68>
Sat, 3 Jan 2009 01:30:23 +0000 (01:30 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@730885 13f79535-47bb-0310-9956-ffa450edef68

modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/jmx/ConnectionPool.java

index c8b66ea..05ccbb6 100644 (file)
@@ -42,7 +42,7 @@ public class ConnectionPool extends NotificationBroadcasterSupport implements Co
     }
 
     public ConnectionPool(org.apache.tomcat.jdbc.pool.ConnectionPool pool, boolean for16) {
-        super(getDefaultNotificationInfo());
+        super();
         this.pool = pool;
     }
 
@@ -61,8 +61,16 @@ public class ConnectionPool extends NotificationBroadcasterSupport implements Co
     
     @Override 
     public MBeanNotificationInfo[] getNotificationInfo() { 
-        return getDefaultNotificationInfo(); 
-    }
+       MBeanNotificationInfo[] pres = super.getNotificationInfo();
+       MBeanNotificationInfo[] loc = getDefaultNotificationInfo();
+       MBeanNotificationInfo[] aug = new MBeanNotificationInfo[
+                                               pres.length + loc.length
+                                                       ];
+       System.arraycopy(pres, 0, aug, 0, pres.length);
+       System.arraycopy(loc, 0, aug, pres.length+1, loc.length);       
+       
+        return aug; 
+    } 
     
     public static MBeanNotificationInfo[] getDefaultNotificationInfo() {
         String[] types = new String[] {NOTIFY_INIT, NOTIFY_CONNECT, NOTIFY_ABANDON};