db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhille...@apache.org
Subject svn commit: r1480251 - in /db/derby/code/trunk/java: drda/org/apache/derby/drda/ engine/org/apache/derby/agg/ engine/org/apache/derby/authentication/ engine/org/apache/derby/catalog/ engine/org/apache/derby/database/ engine/org/apache/derby/diag/ engin...
Date Wed, 08 May 2013 12:37:32 GMT
Author: rhillegas
Date: Wed May  8 12:37:32 2013
New Revision: 1480251

URL: http://svn.apache.org/r1480251
Log:
DERBY-6213: Convert misc packages to Java 6.

Modified:
    db/derby/code/trunk/java/drda/org/apache/derby/drda/NetServlet.java
    db/derby/code/trunk/java/drda/org/apache/derby/drda/build.xml
    db/derby/code/trunk/java/engine/org/apache/derby/agg/build.xml
    db/derby/code/trunk/java/engine/org/apache/derby/authentication/build.xml
    db/derby/code/trunk/java/engine/org/apache/derby/catalog/TriggerNewTransitionRows.java
    db/derby/code/trunk/java/engine/org/apache/derby/catalog/build.xml
    db/derby/code/trunk/java/engine/org/apache/derby/database/build.xml
    db/derby/code/trunk/java/engine/org/apache/derby/diag/ErrorLogReader.java
    db/derby/code/trunk/java/engine/org/apache/derby/diag/ErrorMessages.java
    db/derby/code/trunk/java/engine/org/apache/derby/diag/LockTable.java
    db/derby/code/trunk/java/engine/org/apache/derby/diag/StatementCache.java
    db/derby/code/trunk/java/engine/org/apache/derby/diag/StatementDuration.java
    db/derby/code/trunk/java/engine/org/apache/derby/diag/build.xml
    db/derby/code/trunk/java/engine/org/apache/derby/vti/UpdatableVTITemplate.java
    db/derby/code/trunk/java/tools/org/apache/derby/tools/PlanExporter.java
    db/derby/code/trunk/java/tools/org/apache/derby/tools/SignatureChecker.java
    db/derby/code/trunk/java/tools/org/apache/derby/tools/build.xml

Modified: db/derby/code/trunk/java/drda/org/apache/derby/drda/NetServlet.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/drda/org/apache/derby/drda/NetServlet.java?rev=1480251&r1=1480250&r2=1480251&view=diff
==============================================================================
--- db/derby/code/trunk/java/drda/org/apache/derby/drda/NetServlet.java (original)
+++ db/derby/code/trunk/java/drda/org/apache/derby/drda/NetServlet.java Wed May  8 12:37:32
2013
@@ -553,9 +553,9 @@ public class NetServlet extends HttpServ
         };
         Thread servThread = null;
         try {
-            servThread = (Thread) AccessController.doPrivileged(
-                                new PrivilegedExceptionAction() {
-                                    public Object run() throws Exception
+            servThread = AccessController.doPrivileged(
+                                new PrivilegedExceptionAction<Thread>() {
+                                    public Thread run() throws Exception
                                     {
                                         return new Thread(service);
                                     }

Modified: db/derby/code/trunk/java/drda/org/apache/derby/drda/build.xml
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/drda/org/apache/derby/drda/build.xml?rev=1480251&r1=1480250&r2=1480251&view=diff
==============================================================================
--- db/derby/code/trunk/java/drda/org/apache/derby/drda/build.xml (original)
+++ db/derby/code/trunk/java/drda/org/apache/derby/drda/build.xml Wed May  8 12:37:32 2013
@@ -44,8 +44,8 @@
 
   <target name="compile">
     <javac
-      source="1.5"
-      target="1.5"
+      source="1.6"
+      target="1.6"
       bootclasspath="${empty}"
       nowarn="on"
       debug="${debug}"
@@ -57,17 +57,18 @@
       srcdir="${derby.drda.src.dir}"
       destdir="${out.dir}">
       <classpath>
-        <pathelement path="${java15compile.classpath}"/>
+        <pathelement path="${java16compile.classpath}"/>
       </classpath>
       <include name="${derby.dir}/drda/*.java"/>
       <exclude name="${derby.dir}/drda/NetServlet.java"/>
+      <compilerarg value="-Xlint:unchecked"/>
     </javac>
   </target>
 
   <target name="servlet" depends="checkservletjar" if="servletjar.available">
     <javac
-      source="1.4"
-      target="1.4"
+      source="1.6"
+      target="1.6"
       bootclasspath="${empty}"
       nowarn="on"
       debug="${debug}"
@@ -80,9 +81,10 @@
       destdir="${out.dir}">
       <classpath>
         <pathelement location="${servlet24}"/>
-        <pathelement path="${java15compile.classpath}"/>
+        <pathelement path="${java16compile.classpath}"/>
       </classpath>
       <include name="${derby.dir}/drda/NetServlet.java"/>
+      <compilerarg value="-Xlint:unchecked"/>
     </javac>
   </target>
 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/agg/build.xml
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/agg/build.xml?rev=1480251&r1=1480250&r2=1480251&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/agg/build.xml (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/agg/build.xml Wed May  8 12:37:32 2013
@@ -38,8 +38,8 @@
   <target name="compile_agg">
 
     <javac
-      source="1.5"
-      target="1.5"
+      source="1.6"
+      target="1.6"
       bootclasspath="${empty}"
       nowarn="on"
       debug="${debug}"
@@ -51,9 +51,10 @@
       srcdir="${derby.engine.src.dir}"
       destdir="${out.dir}">
       <classpath>
-        <pathelement path="${java15compile.classpath}"/>
+        <pathelement path="${java16compile.classpath}"/>
       </classpath>
       <include name="${derby.dir}/agg/*.java"/>
+      <compilerarg value="-Xlint:unchecked"/>
     </javac>
 
   </target>

Modified: db/derby/code/trunk/java/engine/org/apache/derby/authentication/build.xml
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/authentication/build.xml?rev=1480251&r1=1480250&r2=1480251&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/authentication/build.xml (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/authentication/build.xml Wed May  8 12:37:32
2013
@@ -37,8 +37,8 @@
 
   <target name="compile_authentication">
     <javac
-      source="1.4"
-      target="1.4"
+      source="1.6"
+      target="1.6"
       bootclasspath="${empty}"
       nowarn="on"
       debug="${debug}"
@@ -50,9 +50,10 @@
       srcdir="${derby.engine.src.dir}"
       destdir="${out.dir}">
       <classpath>
-        <pathelement path="${compile.classpath}"/>
+        <pathelement path="${java16compile.classpath}"/>
       </classpath>
       <include name="${derby.dir}/authentication/**"/>
+      <compilerarg value="-Xlint:unchecked"/>
     </javac>
   </target>
 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/catalog/TriggerNewTransitionRows.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/catalog/TriggerNewTransitionRows.java?rev=1480251&r1=1480250&r2=1480251&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/catalog/TriggerNewTransitionRows.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/catalog/TriggerNewTransitionRows.java
Wed May  8 12:37:32 2013
@@ -37,11 +37,7 @@ import java.math.BigDecimal;
  * trigger action. 
  * 
  * <p>
- * This class implements only JDBC 1.2, not JDBC 2.0.  You cannot
- * compile this class with JDK1.2, since it implements only the
- * JDBC 1.2 ResultSet interface and not the JDBC 2.0 ResultSet
- * interface.  You can only use this class in a JDK 1.2 runtime 
- * environment if no JDBC 2.0 calls are made against it.
+ * You can only use this class if no JDBC 2.0 or later calls are made against it.
  *
  */
 public final class TriggerNewTransitionRows extends org.apache.derby.vti.UpdatableVTITemplate


Modified: db/derby/code/trunk/java/engine/org/apache/derby/catalog/build.xml
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/catalog/build.xml?rev=1480251&r1=1480250&r2=1480251&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/catalog/build.xml (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/catalog/build.xml Wed May  8 12:37:32
2013
@@ -33,12 +33,12 @@
   <property file="${properties.dir}/compilepath.properties"/>
 
 <!-- Targets -->
-  <target name="catalog" depends="compile_catalog,java5"/>
+  <target name="catalog" depends="compile_catalog"/>
 
   <target name="compile_catalog">
     <javac
-      source="1.4"
-      target="1.4"
+      source="1.6"
+      target="1.6"
       bootclasspath="${empty}"
       nowarn="on"
       debug="${debug}"
@@ -50,31 +50,10 @@
       srcdir="${derby.engine.src.dir}"
       destdir="${out.dir}">
       <classpath>
-        <pathelement path="${compile.classpath}"/>
+        <pathelement path="${java16compile.classpath}"/>
       </classpath>
       <include name="${derby.dir}/catalog/**"/>
-      <exclude name="${derby.dir}/catalog/Java5*"/>
-    </javac>
-  </target>
-
-  <target name="java5">
-    <javac
-      source="1.5"
-      target="1.5"
-      bootclasspath="${empty}"
-      nowarn="on"
-      debug="${debug}"
-      depend="${depend}"
-      deprecation="${deprecation}"
-      optimize="${optimize}"
-      proceed="${proceed}"
-      verbose="${verbose}"
-      srcdir="${derby.engine.src.dir}"
-      destdir="${out.dir}">
-      <classpath>
-        <pathelement path="${java15compile.classpath}"/>
-      </classpath>
-      <include name="${derby.dir}/catalog/Java5*"/>
+      <compilerarg value="-Xlint:unchecked"/>
     </javac>
   </target>
 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/database/build.xml
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/database/build.xml?rev=1480251&r1=1480250&r2=1480251&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/database/build.xml (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/database/build.xml Wed May  8 12:37:32
2013
@@ -37,8 +37,8 @@
 
   <target name="compile_database">
     <javac
-      source="1.4"
-      target="1.4"
+      source="1.6"
+      target="1.6"
       bootclasspath="${empty}"
       nowarn="on"
       debug="${debug}"
@@ -50,9 +50,10 @@
       srcdir="${derby.engine.src.dir}"
       destdir="${out.dir}">
       <classpath>
-        <pathelement path="${compile.classpath}"/>
+        <pathelement path="${java16compile.classpath}"/>
       </classpath>
       <include name="${derby.dir}/database/**"/>
+      <compilerarg value="-Xlint:unchecked"/>
     </javac>
   </target>
 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/diag/ErrorLogReader.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/diag/ErrorLogReader.java?rev=1480251&r1=1480250&r2=1480251&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/diag/ErrorLogReader.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/diag/ErrorLogReader.java Wed May  8 12:37:32
2013
@@ -125,11 +125,11 @@ public class ErrorLogReader extends VTIT
 	{
         DiagUtil.checkAccess();
 
-        final String home = (String)AccessController.doPrivileged
+        final String home = AccessController.doPrivileged
             (
-             new PrivilegedAction()
+             new PrivilegedAction<String>()
              {
-                 public Object run()
+                 public String run()
                  {
                      return System.getProperty( Property.SYSTEM_HOME_PROPERTY );
                  }

Modified: db/derby/code/trunk/java/engine/org/apache/derby/diag/ErrorMessages.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/diag/ErrorMessages.java?rev=1480251&r1=1480250&r2=1480251&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/diag/ErrorMessages.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/diag/ErrorMessages.java Wed May  8 12:37:32
2013
@@ -63,7 +63,7 @@ import org.apache.derby.iapi.sql.ResultC
  * </UL>
  * 
  */
-public final class ErrorMessages extends VTITemplate implements VTICosting, java.security.PrivilegedAction
 {
+public final class ErrorMessages extends VTITemplate implements VTICosting, java.security.PrivilegedAction<InputStream>
 {
 	
 	/* The name of the file containing all the SQLSTate codes.
 	 * The class gets the SQLState code from the messages
@@ -162,7 +162,7 @@ public final class ErrorMessages extends
 		p = new Properties();
 		for (int i = 0; i < 50; i++) {
 			msgFile = i;
-			InputStream is = (InputStream) java.security.AccessController.doPrivileged(this);
+			InputStream is = java.security.AccessController.doPrivileged(this);
 			if (is == null)
 				continue;
 
@@ -216,7 +216,7 @@ public final class ErrorMessages extends
 
 	private int msgFile;
 	
-	public final Object run() {
+	public final InputStream run() {
 		InputStream msg = getClass().getResourceAsStream("/org/apache/derby/loc/m" + msgFile +
"_en.properties");
 		msgFile = 0;
 		return msg;

Modified: db/derby/code/trunk/java/engine/org/apache/derby/diag/LockTable.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/diag/LockTable.java?rev=1480251&r1=1480250&r2=1480251&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/diag/LockTable.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/diag/LockTable.java Wed May  8 12:37:32
2013
@@ -232,11 +232,11 @@ public class LockTable extends VTITempla
 	/**
 		Convert the lock information into a hashtable.
 	*/
-    private Hashtable dumpLock(
+    private Hashtable<String,Object> dumpLock(
     Latch                   lock)
         throws StandardException
     {
-		Hashtable	attributes = new Hashtable(17);
+		Hashtable<String,Object>	attributes = new Hashtable<String,Object>(17);
         Object      lock_type =  lock.getQualifier();
 
 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/diag/StatementCache.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/diag/StatementCache.java?rev=1480251&r1=1480250&r2=1480251&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/diag/StatementCache.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/diag/StatementCache.java Wed May  8 12:37:32
2013
@@ -70,7 +70,7 @@ import org.apache.derby.vti.VTITemplate;
 public final class StatementCache extends VTITemplate {
 
 	private int position = -1;
-	private Vector data;
+	private Vector<GenericPreparedStatement> data;
 	private GenericPreparedStatement currentPs;
 	private boolean wasNull;
 
@@ -86,7 +86,7 @@ public final class StatementCache extend
 
 		if (statementCache != null) {
 			final Collection values = statementCache.values();
-			data = new Vector(values.size());
+			data = new Vector<GenericPreparedStatement>(values.size());
 			for (Iterator i = values.iterator(); i.hasNext(); ) {
 				final CachedStatement cs = (CachedStatement) i.next();
 				final GenericPreparedStatement ps =

Modified: db/derby/code/trunk/java/engine/org/apache/derby/diag/StatementDuration.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/diag/StatementDuration.java?rev=1480251&r1=1480250&r2=1480251&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/diag/StatementDuration.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/diag/StatementDuration.java Wed May 
8 12:37:32 2013
@@ -87,7 +87,7 @@ public class StatementDuration extends V
 	private InputStream inputStream;
 	private BufferedReader bufferedReader;
 	private String inputFileName;
-	private Hashtable hashTable;
+	private Hashtable<String,String[]> hashTable;
 
 	// Variables for current row
 	private String line;
@@ -116,11 +116,11 @@ public class StatementDuration extends V
 	{
         DiagUtil.checkAccess();
 
-        final String home = (String)AccessController.doPrivileged
+        final String home = AccessController.doPrivileged
             (
-             new PrivilegedAction()
+             new PrivilegedAction<String>()
              {
-                 public Object run()
+                 public String run()
                  {
                      return System.getProperty( Property.SYSTEM_HOME_PROPERTY );
                  }
@@ -169,7 +169,7 @@ public class StatementDuration extends V
 				throw new SQLException(ex.getMessage());
 			}
 
-			hashTable = new Hashtable();
+			hashTable = new Hashtable<String,String[]>();
 		}
 
 		while (true)
@@ -206,14 +206,14 @@ public class StatementDuration extends V
 
 				/* NOTE: We need to use the LCCID as the key
 				 */
-				Object previousRow = hashTable.put(newRow[3],
+				String[] previousRow = hashTable.put(newRow[3],
 												   newRow);
 				if (previousRow == null)
 				{
 					continue;
 				}
 
-				currentRow = (String[]) previousRow;
+				currentRow = previousRow;
 				
 				/* Figure out the duration. */
 				Timestamp endTs = stringToTimestamp( newRow[0] );

Modified: db/derby/code/trunk/java/engine/org/apache/derby/diag/build.xml
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/diag/build.xml?rev=1480251&r1=1480250&r2=1480251&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/diag/build.xml (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/diag/build.xml Wed May  8 12:37:32 2013
@@ -37,8 +37,8 @@
 
   <target name="compile_diag">
     <javac
-      source="1.4"
-      target="1.4"
+      source="1.6"
+      target="1.6"
       bootclasspath="${empty}"
       nowarn="on"
       debug="${debug}"
@@ -50,9 +50,10 @@
       srcdir="${derby.engine.src.dir}"
       destdir="${out.dir}">
       <classpath>
-        <pathelement path="${compile.classpath}"/>
+        <pathelement path="${java16compile.classpath}"/>
       </classpath>
       <include name="${derby.dir}/diag/**"/>
+      <compilerarg value="-Xlint:unchecked"/>
     </javac>
   </target>
 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/vti/UpdatableVTITemplate.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/vti/UpdatableVTITemplate.java?rev=1480251&r1=1480250&r2=1480251&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/vti/UpdatableVTITemplate.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/vti/UpdatableVTITemplate.java Wed May
 8 12:37:32 2013
@@ -30,13 +30,16 @@ import java.sql.Blob;
 import java.sql.Clob;
 import java.sql.Connection;
 import java.sql.Date;
+import java.sql.NClob;
 import java.sql.ParameterMetaData;
 import java.sql.PreparedStatement;
 import java.sql.Ref;
 import java.sql.ResultSet;
 import java.sql.ResultSetMetaData;
+import java.sql.RowId;
 import java.sql.SQLException;
 import java.sql.SQLWarning;
+import java.sql.SQLXML;
 import java.sql.Time;
 import java.sql.Timestamp;
 import java.util.Calendar;
@@ -727,4 +730,54 @@ public abstract class UpdatableVTITempla
     public ParameterMetaData getParameterMetaData() throws SQLException {
         throw new SQLException("getParameterMetaData");
     }
+
+    public  boolean 	isWrapperFor(Class<?> iface) throws SQLException { throw new SQLException(
"isWrapperFor" ); }
+    public  <T> T unwrap(Class<T> iface) throws SQLException { throw new SQLException(
"unwrap" ); }
+
+    public boolean isClosed() throws SQLException
+    { throw new SQLException("isClosed"); }
+    public boolean isPoolable() throws SQLException
+    { throw new SQLException("isPoolable"); }
+    public void setPoolable(boolean poolable) throws SQLException
+    { throw new SQLException("setPoolable"); }
+	public void setAsciiStream(int parameterIndex, InputStream x) throws SQLException
+    { throw new SQLException("setAsciiStream"); }
+	public void setAsciiStream(int parameterIndex, InputStream x, long length) throws SQLException
+    { throw new SQLException("setAsciiStream"); }
+	public void setBinaryStream(int parameterIndex, InputStream x) throws SQLException
+    { throw new SQLException("setBinaryStream"); }
+	public void setBinaryStream(int parameterIndex, InputStream x, long length) throws SQLException
+    { throw new SQLException("setBinaryStream"); }
+    public void 	setBlob(int parameterIndex, InputStream is) throws SQLException
+    { throw new SQLException("setBlob"); }
+    public void 	setBlob(int parameterIndex, InputStream is, long length) throws SQLException
+    { throw new SQLException("setBlob"); }
+    public void 	setClob(int parameterIndex, Reader reader) throws SQLException
+    { throw new SQLException("setClob"); }
+    public void 	setClob(int parameterIndex, Reader reader, long length) throws SQLException
+    { throw new SQLException("setClob"); }
+    public  void 	setCharacterStream(int parameterIndex, Reader value) throws SQLException
+    { throw new SQLException("setCharacterStream"); }
+    public void 	setCharacterStream(int parameterIndex, Reader value, long length) throws
SQLException
+    { throw new SQLException("setCharacterStream"); }
+    public  void 	setNCharacterStream(int parameterIndex, Reader value) throws SQLException
+    { throw new SQLException("setNCharacterStream"); }
+    public void 	setNCharacterStream(int parameterIndex, Reader value, long length) throws
SQLException
+    { throw new SQLException("setNCharacterStream"); }
+    public void 	setNClob(int parameterIndex, NClob value) throws SQLException
+    { throw new SQLException("setNClob"); }
+    public void 	setNClob(int parameterIndex, Reader reader) throws SQLException
+    { throw new SQLException("setNClob"); }
+    public void 	setNClob(int parameterIndex, Reader reader, long length) throws SQLException
+    { throw new SQLException("setNClob"); }
+    public void  	setNString(int parameterIndex, String value) throws SQLException
+    { throw new SQLException("setNString"); }
+    public void setRowId(int parameterIndex, RowId x) throws SQLException
+    { throw new SQLException("setRowId"); }
+    public void setSQLXML(int parameterIndex, SQLXML xmlObject) throws SQLException
+    { throw new SQLException("setSQLXML"); }
+    public boolean isCloseOnCompletion() throws SQLException
+    { throw new SQLException("isCloseOnCompletion"); }
+    public void closeOnCompletion() throws SQLException
+    { throw new SQLException("closeOnCompletion"); }
 }

Modified: db/derby/code/trunk/java/tools/org/apache/derby/tools/PlanExporter.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/tools/org/apache/derby/tools/PlanExporter.java?rev=1480251&r1=1480250&r2=1480251&view=diff
==============================================================================
--- db/derby/code/trunk/java/tools/org/apache/derby/tools/PlanExporter.java (original)
+++ db/derby/code/trunk/java/tools/org/apache/derby/tools/PlanExporter.java Wed May  8 12:37:32
2013
@@ -292,7 +292,7 @@ public class PlanExporter {
     private static void deleteFile(final String fileName)
     {
         AccessController.doPrivileged
-        (new java.security.PrivilegedAction() {
+        (new java.security.PrivilegedAction<Object>() {
 
             public Object run() {
                 File delFile = new File(fileName);

Modified: db/derby/code/trunk/java/tools/org/apache/derby/tools/SignatureChecker.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/tools/org/apache/derby/tools/SignatureChecker.java?rev=1480251&r1=1480250&r2=1480251&view=diff
==============================================================================
--- db/derby/code/trunk/java/tools/org/apache/derby/tools/SignatureChecker.java (original)
+++ db/derby/code/trunk/java/tools/org/apache/derby/tools/SignatureChecker.java Wed May  8
12:37:32 2013
@@ -84,8 +84,8 @@ public class SignatureChecker
 
     private ParsedArgs _parsedArgs;
 
-    private ArrayList   _procedures = new ArrayList();
-    private ArrayList   _functions = new ArrayList();
+    private ArrayList<SQLRoutine>   _procedures = new ArrayList<SQLRoutine>();
+    private ArrayList<SQLRoutine>   _functions = new ArrayList<SQLRoutine>();
 
     private boolean     _debugging = false;
     
@@ -453,9 +453,9 @@ public class SignatureChecker
         } catch (Throwable t) {}
 
         try {
-            Class   driverManagerClass = Class.forName( "java.sql.DriverManager" );
+            Class<?>   driverManagerClass = Class.forName( "java.sql.DriverManager"
);
             Method  getConnectionMethod = driverManagerClass.getDeclaredMethod
-                ( "getConnection", new Class[] { String.class } );
+                ( "getConnection", String.class );
 
             return (Connection) getConnectionMethod.invoke
                 ( null, new Object[] { _parsedArgs.getJ2seConnectionUrl() } );
@@ -518,7 +518,7 @@ public class SignatureChecker
      */
     private SQLRoutine getProcedure( int idx )
     {
-        return (SQLRoutine) _procedures.get( idx );
+        return _procedures.get( idx );
     }
 
     /**
@@ -534,7 +534,7 @@ public class SignatureChecker
      */
     private SQLRoutine getFunction( int idx )
     {
-        return (SQLRoutine) _functions.get( idx );
+        return _functions.get( idx );
     }
 
     /**
@@ -639,7 +639,7 @@ public class SignatureChecker
         private String _schema;
         private String _name;
         private boolean _isTableFunction;
-        private ArrayList   _argList = new ArrayList();
+        private ArrayList<String>   _argList = new ArrayList<String>();
 
         public SQLRoutine( String schema, String name, boolean isTableFunction )
         {
@@ -653,7 +653,7 @@ public class SignatureChecker
         public String getSchema() { return _schema; }
         public String getName() { return _name; }
         public int      getArgCount() { return _argList.size(); }
-        public String getArgType( int idx ) { return (String) _argList.get( idx ); }
+        public String getArgType( int idx ) { return _argList.get( idx ); }
         public boolean isTableFunction() { return _isTableFunction; }
 
         public  String  toString()

Modified: db/derby/code/trunk/java/tools/org/apache/derby/tools/build.xml
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/tools/org/apache/derby/tools/build.xml?rev=1480251&r1=1480250&r2=1480251&view=diff
==============================================================================
--- db/derby/code/trunk/java/tools/org/apache/derby/tools/build.xml (original)
+++ db/derby/code/trunk/java/tools/org/apache/derby/tools/build.xml Wed May  8 12:37:32 2013
@@ -37,8 +37,8 @@
 
   <target name="compile">
     <javac
-      source="1.4"
-      target="1.4"
+      source="1.6"
+      target="1.6"
       bootclasspath="${empty}"
       nowarn="on"
       debug="${debug}"
@@ -50,9 +50,10 @@
       srcdir="${derby.tools.src.dir}"
       destdir="${out.dir}">
       <classpath>
-        <pathelement path="${compile.classpath}"/>
+        <pathelement path="${java16compile.classpath}"/>
       </classpath>
       <include name="${derby.dir}/tools/*.java"/>
+      <compilerarg value="-Xlint:unchecked"/>
     </javac>
   </target>
 



Mime
View raw message