db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r922682 - in /db/derby/code/trunk/java/engine/org/apache/derby: iapi/services/i18n/LocaleFinder.java iapi/types/SQLChar.java impl/db/BasicDatabase.java
Date Sat, 13 Mar 2010 22:33:05 GMT
Author: kahatlen
Date: Sat Mar 13 22:33:04 2010
New Revision: 922682

URL: http://svn.apache.org/viewvc?rev=922682&view=rev
Log:
DERBY-1748 (partial) Removed unused collation code

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/i18n/LocaleFinder.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/SQLChar.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/db/BasicDatabase.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/i18n/LocaleFinder.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/i18n/LocaleFinder.java?rev=922682&r1=922681&r2=922682&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/i18n/LocaleFinder.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/i18n/LocaleFinder.java
Sat Mar 13 22:33:04 2010
@@ -25,7 +25,6 @@ import org.apache.derby.iapi.error.Stand
 
 import java.util.Locale;
 import java.text.DateFormat;
-import java.text.RuleBasedCollator;
 
 /**
 	A LocaleFinder gets a Locale and things associated with Locales.
@@ -38,14 +37,6 @@ public interface LocaleFinder {
 	Locale getCurrentLocale() throws StandardException;
 
 	/**
-	 * Get a RuleBasedCollator corresponding to the Locale returned by
-	 * getCurrentLocale().
-	 *
-	 * @exception StandardException		Thrown on error
-	 */
-	RuleBasedCollator getCollator() throws StandardException;
-
-	/**
 	 * Get a formatter for formatting dates. The implementation may cache this
 	 * value, since it never changes for a given Locale.
 	 *

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=922682&r1=922681&r2=922682&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 Sat Mar 13 22:33:04
2010
@@ -2934,7 +2934,12 @@ readingLoop:
     protected RuleBasedCollator getCollatorForCollation() 
         throws StandardException
     {
-        return getLocaleFinder().getCollator();
+        if (SanityManager.DEBUG) {
+            // Sub-classes that support collation will override this method,
+            // do don't expect it to be called here in the base class.
+            SanityManager.THROWASSERT("No support for collators in base class");
+        }
+        return null;
     }
 
     protected LocaleFinder getLocaleFinder()

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/db/BasicDatabase.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/db/BasicDatabase.java?rev=922682&r1=922681&r2=922682&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/db/BasicDatabase.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/db/BasicDatabase.java Sat Mar 13
22:33:04 2010
@@ -88,8 +88,6 @@ import java.util.Enumeration;
 import java.util.Hashtable;
 import java.util.Locale;
 import java.lang.reflect.Method;
-import java.text.Collator;
-import java.text.RuleBasedCollator;
 import java.text.DateFormat;
 
 /**
@@ -127,7 +125,6 @@ public class BasicDatabase implements Mo
 	// so that XA class use can be isolated to XA modules.
 	protected Object resourceAdapter;
 	private Locale databaseLocale;
-	private RuleBasedCollator ruleBasedCollator;
 	private DateFormat dateFormat;
 	private DateFormat timeFormat;
 	private DateFormat timestampFormat;
@@ -496,23 +493,6 @@ public class BasicDatabase implements Mo
 	}
 
 	/** @exception StandardException	Thrown on error */
-	public RuleBasedCollator getCollator() throws StandardException {
-		RuleBasedCollator retval = ruleBasedCollator;
-
-		if (retval == null) {
-			if (databaseLocale != null) {
-				retval = ruleBasedCollator =
-					(RuleBasedCollator) Collator.getInstance(databaseLocale);
-			} else {
-				throw noLocale();
-			}
-		}
-
-		return retval;
-	}
-
-
-	/** @exception StandardException	Thrown on error */
 	public DateFormat getDateFormat() throws StandardException {
 		if (databaseLocale != null) {
 			if (dateFormat == null) {



Mime
View raw message