db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From krist...@apache.org
Subject svn commit: r1172535 - /db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/SQLChar.java
Date Mon, 19 Sep 2011 09:31:07 GMT
Author: kristwaa
Date: Mon Sep 19 09:31:07 2011
New Revision: 1172535

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

Removed dead code.

Patch file: derby-2720-1a-remove_sqlchar_getXFormat.diff


Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/SQLChar.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/SQLChar.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/SQLChar.java?rev=1172535&r1=1172534&r2=1172535&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/SQLChar.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/SQLChar.java Mon Sep 19 09:31:07
2011
@@ -72,7 +72,6 @@ import java.sql.Time;
 import java.sql.Timestamp;
 import java.text.RuleBasedCollator;
 import java.text.CollationKey;
-import java.text.DateFormat;
 import java.util.Locale;
 import java.util.Calendar;
 
@@ -2968,42 +2967,6 @@ readingLoop:
         return localeFinder;
     }
 
-    protected DateFormat getDateFormat() throws StandardException {
-        return getLocaleFinder().getDateFormat();
-    }
-    protected DateFormat getTimeFormat() throws StandardException {
-        return getLocaleFinder().getTimeFormat();
-    }
-    protected DateFormat getTimestampFormat() throws StandardException {
-        return getLocaleFinder().getTimestampFormat();
-    }
-
-    protected DateFormat getDateFormat( Calendar cal) 
-        throws StandardException {
-        return setDateFormatCalendar( getLocaleFinder().getDateFormat(), cal);
-    }
-    protected DateFormat getTimeFormat( Calendar cal) 
-        throws StandardException {
-        return setDateFormatCalendar( getLocaleFinder().getTimeFormat(), cal);
-    }
-    protected DateFormat getTimestampFormat( Calendar cal) 
-        throws StandardException {
-        return setDateFormatCalendar(
-                getLocaleFinder().getTimestampFormat(), cal);
-    }
-
-    private DateFormat setDateFormatCalendar( DateFormat df, Calendar cal)
-    {
-        if( cal != null && df.getTimeZone() != cal.getTimeZone())
-        {
-            // The DateFormat returned by getDateFormat may be cached and used
-            // by other threads.  Therefore we cannot change its calendar.
-            df = (DateFormat) df.clone();
-            df.setCalendar( cal);
-        }
-        return df;
-    }
-
     public int estimateMemoryUsage()
     {
         int sz = BASE_MEMORY_USAGE + ClassSize.estimateMemoryUsage( value);



Mime
View raw message