You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by km...@apache.org on 2010/06/15 21:11:28 UTC

svn commit: r955003 - in /db/derby/code/branches/10.6: ./ java/tools/org/apache/derby/impl/tools/sysinfo/Main.java

Author: kmarsden
Date: Tue Jun 15 19:11:28 2010
New Revision: 955003

URL: http://svn.apache.org/viewvc?rev=955003&view=rev
Log:
DERBY-4597 remove references to IBM jcc driver from sysinfo 

Contributed by Lily Wei lilywei at yahoo dot com




Modified:
    db/derby/code/branches/10.6/   (props changed)
    db/derby/code/branches/10.6/java/tools/org/apache/derby/impl/tools/sysinfo/Main.java

Propchange: db/derby/code/branches/10.6/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Jun 15 19:11:28 2010
@@ -1,2 +1,2 @@
-/db/derby/code/trunk:938547,938796,938959,939231,940462,940469,941627,942031,944152,946794,948045,948069,951346,952138,954344
+/db/derby/code/trunk:938547,938796,938959,939231,940462,940469,941627,942031,944152,946794,948045,948069,951346,952138,954344,955001
 /db/derby/docs/trunk:954344

Modified: db/derby/code/branches/10.6/java/tools/org/apache/derby/impl/tools/sysinfo/Main.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.6/java/tools/org/apache/derby/impl/tools/sysinfo/Main.java?rev=955003&r1=955002&r2=955003&view=diff
==============================================================================
--- db/derby/code/branches/10.6/java/tools/org/apache/derby/impl/tools/sysinfo/Main.java (original)
+++ db/derby/code/branches/10.6/java/tools/org/apache/derby/impl/tools/sysinfo/Main.java Tue Jun 15 19:11:28 2010
@@ -1033,63 +1033,6 @@ public static void getMainInfo (java.io.
     private static ZipInfoProperties checkFile(String filename)
     {
         // try to create a ZipFile from it
-
-	// Check to see if it's a version of db2jcc.jar and if so, report the version number. 
-	if (filename.indexOf("db2jcc") >= 0)
-	{
-	    Class c = null;
-	    Method m = null;
-	    Object o = null;
-	    Integer build = null;
-	    Integer major = null;
-            Integer minor = null;
-	    try 
-	    {
-                try 
-		{
-		    c = Class.forName("com.ibm.db2.jcc.DB2Driver");
-		    m = c.getMethod("getJCCBuildNumber", null);
-		    o = c.newInstance();
-		    build = (Integer)m.invoke(o,null);
-		} catch (ClassNotFoundException cnfe) {
-		    c = Class.forName("com.ibm.db2.jcc.DB2Version");
-		    m = c.getMethod("getBuildNumber", null);
-		    o = c.newInstance();
-		    build = (Integer)m.invoke(o,null);
-	        } 
-		m = c.getMethod("getMajorVersion", null);
-		major = (Integer)m.invoke(o,null);
-		m = c.getMethod("getMinorVersion", null);
-		minor = (Integer)m.invoke(o,null);
-
-		ProductVersionHolder jccVersion = ProductVersionHolder.getProductVersionHolder(
-			"IBM Corp.",
-			"DB2 Java Common Client",
-			"DRDA:jcc",
-			major.intValue(),
-			minor.intValue(),
-			0,
-			0,
-			build.toString(),
-			Boolean.FALSE);
-
-		ZipInfoProperties zip = new ZipInfoProperties(jccVersion);
-
-                String loc = getFileWhichLoadedClass(c);
-                // For db2jcc.jar, report the actual file from which DB2Driver
-                // was loaded, if we can determine it. For db2jcc_license_c,
-                // report the filename from the classpath, and the version 
-                // info from the DB2Driver that we loaded. This is slightly
-                // misleading, since db2jcc_license_c.jar doesn't really have
-                // a "version", but the two jars are usually linked.
-                if (loc != null && filename.indexOf("license_c") < 0)
-                    zip.setLocation(loc);
-                else
-        zip.setLocation(new File(filename).getCanonicalPath().replace('/', File.separatorChar));
-		return zip;
-            } catch (Exception e) { return null; }
-	}
-
         try
         {
             ZipFile zf = new ZipFile(filename);