db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r586317 - in /db/derby/code/trunk/java: build/org/apache/derbyBuild/ tools/org/apache/derby/iapi/tools/i18n/ tools/org/apache/derby/impl/tools/sysinfo/
Date Fri, 19 Oct 2007 08:21:00 GMT
Author: kahatlen
Date: Fri Oct 19 01:21:00 2007
New Revision: 586317

URL: http://svn.apache.org/viewvc?rev=586317&view=rev
Log:
DERBY-3132: Changed some calls to deprecated methods

  Properties.save(OutputStream, String)
        -> Properties.store(OutputStream, String)

  URLDecoder.decode(String) -> URLDecoder.decode(String, String)

  ResultSet.getBigDecimal(int, int) -> ResultSet.getBigDecimal(int)

Modified:
    db/derby/code/trunk/java/build/org/apache/derbyBuild/propertyconfig.java
    db/derby/code/trunk/java/build/org/apache/derbyBuild/splitmessages.java
    db/derby/code/trunk/java/tools/org/apache/derby/iapi/tools/i18n/LocalizedResource.java
    db/derby/code/trunk/java/tools/org/apache/derby/impl/tools/sysinfo/Main.java

Modified: db/derby/code/trunk/java/build/org/apache/derbyBuild/propertyconfig.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/build/org/apache/derbyBuild/propertyconfig.java?rev=586317&r1=586316&r2=586317&view=diff
==============================================================================
--- db/derby/code/trunk/java/build/org/apache/derbyBuild/propertyconfig.java (original)
+++ db/derby/code/trunk/java/build/org/apache/derbyBuild/propertyconfig.java Fri Oct 19 01:21:00
2007
@@ -313,7 +313,7 @@
 		FileOutputStream os = new FileOutputStream(outputfile);
 		try
 		{
-			outputProp.save(os, 
+			outputProp.store(os,
 							header.
 							concat("# config is ").concat(config).
 							concat(footer));

Modified: db/derby/code/trunk/java/build/org/apache/derbyBuild/splitmessages.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/build/org/apache/derbyBuild/splitmessages.java?rev=586317&r1=586316&r2=586317&view=diff
==============================================================================
--- db/derby/code/trunk/java/build/org/apache/derbyBuild/splitmessages.java (original)
+++ db/derby/code/trunk/java/build/org/apache/derbyBuild/splitmessages.java Fri Oct 19 01:21:00
2007
@@ -173,7 +173,7 @@
 				new FileOutputStream(new File(dir, "m"+i+locale+".properties")), 16 * 1024);
 
             
-			c[i].save(fos, (String) null);
+			c[i].store(fos, (String) null);
 			fos.flush();
 			fos.close();
             
@@ -181,7 +181,7 @@
 				// add duplicate english file as the base
 				fos = new BufferedOutputStream(
 					new FileOutputStream(new File(dir, "m"+i+".properties")), 16 * 1024);
-				c[i].save(fos, (String) null);
+				c[i].store(fos, (String) null);
 				fos.flush();
 				fos.close();
 			}
@@ -198,7 +198,7 @@
             new FileOutputStream(new File(dir, clientPropsFileName)), 
             16 * 1024);
 
-        clientProps.save(clientOutStream, (String)null);
+        clientProps.store(clientOutStream, (String)null);
         clientOutStream.flush();
         clientOutStream.close();
         
@@ -209,7 +209,7 @@
                 new FileOutputStream(new File(dir, "clientmessages.properties")), 
                 16 * 1024);
 
-            clientProps.save(clientOutStream, (String)null);
+            clientProps.store(clientOutStream, (String)null);
             clientOutStream.flush();
             clientOutStream.close();            
         }

Modified: db/derby/code/trunk/java/tools/org/apache/derby/iapi/tools/i18n/LocalizedResource.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/tools/org/apache/derby/iapi/tools/i18n/LocalizedResource.java?rev=586317&r1=586316&r2=586317&view=diff
==============================================================================
--- db/derby/code/trunk/java/tools/org/apache/derby/iapi/tools/i18n/LocalizedResource.java
(original)
+++ db/derby/code/trunk/java/tools/org/apache/derby/iapi/tools/i18n/LocalizedResource.java
Fri Oct 19 01:21:00 2007
@@ -340,8 +340,7 @@
 				return getNumberAsString(rs.getDouble(columnNumber));
 			}
 			else if (SUPPORTS_BIG_DECIMAL_CALLS && (type == Types.NUMERIC || type == Types.DECIMAL))
{
-				return	getNumberAsString(rs.getBigDecimal(columnNumber,
-											rsm.getScale(columnNumber)));
+				return getNumberAsString(rs.getBigDecimal(columnNumber));
 			}
 			else if (type == Types.TIME ) {
 				return getTimeAsString(rs.getTime(columnNumber));

Modified: db/derby/code/trunk/java/tools/org/apache/derby/impl/tools/sysinfo/Main.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/tools/org/apache/derby/impl/tools/sysinfo/Main.java?rev=586317&r1=586316&r2=586317&view=diff
==============================================================================
--- db/derby/code/trunk/java/tools/org/apache/derby/impl/tools/sysinfo/Main.java (original)
+++ db/derby/code/trunk/java/tools/org/apache/derby/impl/tools/sysinfo/Main.java Fri Oct 19
01:21:00 2007
@@ -1201,7 +1201,15 @@
      */
     private static String formatURL(URL loc)
     {
-        String filename = URLDecoder.decode(loc.toString());
+        String filename;
+        try {
+            // Should use UTF-8 according to
+            // http://www.w3.org/TR/html40/appendix/notes.html#non-ascii-chars
+            filename = URLDecoder.decode(loc.toString(), "UTF-8");
+        } catch (UnsupportedEncodingException e) {
+            // All JVMs are required to support UTF-8.
+            return null;
+        }
 
         if (filename.startsWith("jar:")) { filename = filename.substring(4); }
         if (filename.startsWith("file:")) { filename = filename.substring(5); }



Mime
View raw message