db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r1028645 - in /db/derby/code/trunk/java/engine/org/apache/derby: catalog/types/BaseTypeIdImpl.java iapi/services/info/JVMInfo.java
Date Fri, 29 Oct 2010 08:48:23 GMT
Author: kahatlen
Date: Fri Oct 29 08:48:22 2010
New Revision: 1028645

URL: http://svn.apache.org/viewvc?rev=1028645&view=rev
Log:
DERBY-4868: Remove Types.BIT/Types.BOOLEAN switch in JVMInfo

Only needed for Java versions 1.3 and earlier, which are no longer
supported.

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/catalog/types/BaseTypeIdImpl.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/info/JVMInfo.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/catalog/types/BaseTypeIdImpl.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/catalog/types/BaseTypeIdImpl.java?rev=1028645&r1=1028644&r2=1028645&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/catalog/types/BaseTypeIdImpl.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/catalog/types/BaseTypeIdImpl.java Fri
Oct 29 08:48:22 2010
@@ -27,28 +27,19 @@ import org.apache.derby.iapi.services.sa
 import org.apache.derby.iapi.services.io.Formatable;
 import org.apache.derby.iapi.services.io.StoredFormatIds;
 
-import org.apache.derby.iapi.types.DataValueDescriptor;
 import org.apache.derby.iapi.types.TypeId;
 
-import org.apache.derby.iapi.services.io.StreamStorable;
-
-import org.apache.derby.iapi.services.i18n.MessageService;
-
 import org.apache.derby.iapi.services.i18n.MessageService;
 import org.apache.derby.iapi.reference.JDBC40Translation;
 import org.apache.derby.iapi.reference.SQLState;
 
-import org.apache.derby.iapi.services.info.JVMInfo;
 import org.apache.derby.iapi.util.IdUtil;
 
 import java.sql.Types;
 
-import java.io.InputStream;
-import java.io.ByteArrayInputStream;
 import java.io.ObjectOutput;
 import java.io.ObjectInput;
 import java.io.IOException;
-import java.io.EOFException;
 
 /**
  * This class is the base class for all type ids that are written to the
@@ -348,7 +339,7 @@ public class BaseTypeIdImpl implements F
           case StoredFormatIds.BOOLEAN_TYPE_ID_IMPL:
               schemaName = null;
               unqualifiedName = TypeId.BOOLEAN_NAME;
-              JDBCTypeId = JVMInfo.JAVA_SQL_TYPES_BOOLEAN;
+              JDBCTypeId = Types.BOOLEAN;
               break;
 
           case StoredFormatIds.INT_TYPE_ID_IMPL:

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/info/JVMInfo.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/info/JVMInfo.java?rev=1028645&r1=1028644&r2=1028645&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/info/JVMInfo.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/info/JVMInfo.java Fri Oct
29 08:48:22 2010
@@ -21,9 +21,6 @@
 
 package org.apache.derby.iapi.services.info;
 
-import java.sql.Types;
-
-
 /**
 	This class is used to determine which Java specification Derby will run at.
     For a useful discussion of how this class is used, please see DERBY-3176.
@@ -50,11 +47,6 @@ public abstract class JVMInfo
 
 	public static final boolean J2ME;
 
-	/**
-    JDBC Boolean type - Types.BIT in JDK1.1 & 1.2 & 1.3, Types.BOOLEAN in JDK1.4
-	*/
-	public static final int JAVA_SQL_TYPES_BOOLEAN;
-
 	static 
 	{
 		int id;
@@ -67,8 +59,8 @@ public abstract class JVMInfo
 		// set a Java 2 system property.
 		// 
 		// Otherwise, see if we recognize what is set in java.version.
-		// If we don't recoginze that, or if the property is not set, assume
-		// version 1.3.
+		// If we don't recognize that, or if the property is not set, assume
+		// version 1.4.
 		//
 		String javaVersion;
 		String javaSpec;
@@ -143,8 +135,6 @@ public abstract class JVMInfo
 
 		JDK_ID = id;
 		J2ME = isJ2ME;
-		JAVA_SQL_TYPES_BOOLEAN = (isJ2ME || id >= J2SE_14) ?
-			Types.BOOLEAN :java.sql.Types.BIT;
 	}
 
 	/**



Mime
View raw message