db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From krist...@apache.org
Subject svn commit: r1181679 - in /db/derby/code/trunk/java/engine/org/apache/derby/iapi/types: DataType.java SQLDate.java SQLTime.java SQLTimestamp.java
Date Tue, 11 Oct 2011 10:01:04 GMT
Author: kristwaa
Date: Tue Oct 11 10:01:03 2011
New Revision: 1181679

URL: http://svn.apache.org/viewvc?rev=1181679&view=rev
Log:
DERBY-2720: remove dead code associated with unsupported National Char implementation 

Removed unused method DataType.getNationalString and its implementations.

Patch file: derby-2720-2a-remove_getNationalString.diff

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/DataType.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/SQLDate.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/SQLTime.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/SQLTimestamp.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/DataType.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/DataType.java?rev=1181679&r1=1181678&r2=1181679&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/DataType.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/DataType.java Tue Oct 11 10:01:03
2011
@@ -21,18 +21,11 @@
 
 package org.apache.derby.iapi.types;
 
-import org.apache.derby.iapi.types.DataValueDescriptor;
-import org.apache.derby.iapi.types.DataTypeDescriptor;
-import org.apache.derby.iapi.types.BooleanDataValue;
-import org.apache.derby.iapi.types.Orderable;
-
 import org.apache.derby.iapi.reference.SQLState;
 import org.apache.derby.iapi.error.StandardException;
 import org.apache.derby.iapi.services.i18n.MessageService;
 import org.apache.derby.iapi.services.sanity.SanityManager;
 
-import org.apache.derby.iapi.services.i18n.LocaleFinder;
-
 import java.io.InputStream;
 import java.sql.Blob;
 import java.sql.Clob;
@@ -654,19 +647,6 @@ public abstract class DataType
 		return cloneValue(false);
 	}
 
-	// International support
-
-	/**
-	 * International version of getString(). Overridden for date, time,
-	 * and timestamp in SQLDate, SQLTime, SQLTimestamp.
-	 *
-	 * @exception StandardException		Thrown on error
-	 */
-	protected String getNationalString(LocaleFinder localeFinder) throws StandardException
-	{
-		return getString();
-	}
-
 	public void throwLangSetMismatch(Object value) throws StandardException {
 		throwLangSetMismatch(value.getClass().getName());
 	}

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/SQLDate.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/SQLDate.java?rev=1181679&r1=1181678&r2=1181679&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/SQLDate.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/SQLDate.java Tue Oct 11 10:01:03
2011
@@ -21,8 +21,6 @@
 
 package org.apache.derby.iapi.types;
 
-import org.apache.derby.iapi.types.SQLInteger;
-
 import org.apache.derby.iapi.reference.SQLState;
 
 import org.apache.derby.iapi.services.io.ArrayInputStream;
@@ -30,11 +28,6 @@ import org.apache.derby.iapi.services.io
 import org.apache.derby.iapi.error.StandardException;
 
 import org.apache.derby.iapi.db.DatabaseContext;
-import org.apache.derby.iapi.types.DataValueDescriptor;
-import org.apache.derby.iapi.types.TypeId;
-
-import org.apache.derby.iapi.types.NumberDataValue;
-import org.apache.derby.iapi.types.DateTimeDataValue;
 
 import org.apache.derby.iapi.services.context.ContextService;
 
@@ -42,16 +35,12 @@ import org.apache.derby.iapi.services.io
  
 import org.apache.derby.iapi.services.sanity.SanityManager;
 
-import org.apache.derby.iapi.types.DataType;
-
 import org.apache.derby.iapi.services.cache.ClassSize;
 import org.apache.derby.iapi.services.i18n.LocaleFinder;
 import org.apache.derby.iapi.util.StringUtil;
 
 import java.sql.Date;
-import java.sql.Time;
 import java.sql.Timestamp;
-import java.sql.Types;
 import java.sql.PreparedStatement;
 
 import java.util.Calendar;
@@ -838,24 +827,6 @@ public final class SQLDate extends DataT
 		return vstr.toString();
 	}
 
-	// International Support
-
-	/**
-	 * International version of getString(). Overrides getNationalString
-	 * in DataType for date, time, and timestamp.
-	 *
-	 * @exception StandardException		Thrown on error
-	 */
-	protected String getNationalString(LocaleFinder localeFinder) throws StandardException
-	{
-		if (isNull())
-		{
-			return getString();
-		}
-
-		return localeFinder.getDateFormat().format(getDate(new GregorianCalendar()));
-	}
-
 	/**
 		This helper routine tests the nullability of various parameters
 		and sets up the result appropriately.

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/SQLTime.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/SQLTime.java?rev=1181679&r1=1181678&r2=1181679&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/SQLTime.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/SQLTime.java Tue Oct 11 10:01:03
2011
@@ -34,21 +34,12 @@ import org.apache.derby.iapi.error.Stand
 
 import org.apache.derby.iapi.db.DatabaseContext;
 
-import org.apache.derby.iapi.types.DataValueDescriptor;
-import org.apache.derby.iapi.types.TypeId;
-
-import org.apache.derby.iapi.types.DateTimeDataValue;
-import org.apache.derby.iapi.types.NumberDataValue;
-
-import org.apache.derby.iapi.types.DataType;
 import org.apache.derby.iapi.services.i18n.LocaleFinder;
 import org.apache.derby.iapi.services.cache.ClassSize;
 import org.apache.derby.iapi.util.StringUtil;
 
-import java.sql.Date;
 import java.sql.Time;
 import java.sql.Timestamp;
-import java.sql.Types;
 import java.sql.PreparedStatement;
 
 import java.util.Calendar;
@@ -921,24 +912,6 @@ public final class SQLTime extends DataT
 		return vstr.toString();
 	}
 
-	// International Support
-
-	/**
-	 * International version of getString(). Overrides getNationalString
-	 * in DataType for date, time, and timestamp.
-	 *
-	 * @exception StandardException		Thrown on error
-	 */
-	protected String getNationalString(LocaleFinder localeFinder) throws StandardException
-	{
-		if (isNull())
-		{
-			return getString();
-		}
-
-		return localeFinder.getTimeFormat().format(getTime( (Calendar) null));
-	}
-
 	/**
 	 * Compute encoded time value
 	 * Time is represented by hour << 16 + minute << 8 + seconds

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/SQLTimestamp.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/SQLTimestamp.java?rev=1181679&r1=1181678&r2=1181679&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/SQLTimestamp.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/SQLTimestamp.java Tue Oct
11 10:01:03 2011
@@ -28,29 +28,18 @@ import org.apache.derby.iapi.services.io
 import org.apache.derby.iapi.error.StandardException;
 import org.apache.derby.iapi.db.DatabaseContext;
 
-import org.apache.derby.iapi.types.DataValueDescriptor;
-import org.apache.derby.iapi.types.TypeId;
-
-import org.apache.derby.iapi.types.NumberDataValue;
-import org.apache.derby.iapi.types.DateTimeDataValue;
-
 import org.apache.derby.iapi.services.io.StoredFormatIds;
 import org.apache.derby.iapi.services.context.ContextService;
  
 import org.apache.derby.iapi.services.sanity.SanityManager;
-import org.apache.derby.iapi.types.DataType;
 import org.apache.derby.iapi.services.i18n.LocaleFinder;
 import org.apache.derby.iapi.services.cache.ClassSize;
 import org.apache.derby.iapi.util.StringUtil;
 import org.apache.derby.iapi.util.ReuseFactory;
 
-import org.apache.derby.iapi.types.SQLDouble;
-import org.apache.derby.iapi.types.SQLTime;
-
 import java.sql.Date;
 import java.sql.Time;
 import java.sql.Timestamp;
-import java.sql.Types;
 import java.sql.ResultSet;
 import java.sql.SQLException;
 import java.sql.PreparedStatement;
@@ -879,25 +868,6 @@ public final class SQLTimestamp extends 
 		/* encoded date should already be 0 for null */
 	}
 
-	// International Support
-
-	/**
-	 * International version of getString(). Overrides getNationalString
-	 * in DataType for date, time, and timestamp.
-	 *
-	 * @exception StandardException		Thrown on error
-	 */
-	protected String getNationalString(LocaleFinder localeFinder) throws StandardException
-	{
-		if (isNull())
-		{
-			return getString();
-		}
-
-
-		return localeFinder.getTimestampFormat().format(getTimestamp((Calendar) null));
-	}
-
 	/**
 		computeEncodedDate sets the date in a Calendar object
 		and then uses the SQLDate function to compute an encoded date



Mime
View raw message