db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhille...@apache.org
Subject svn commit: r1487133 - in /db/derby/code/trunk: ./ java/build/org/apache/derbyBuild/ java/build/org/apache/derbyPreBuild/ java/demo/ java/demo/nserverdemo/ java/demo/simple/ java/demo/toursdb/ java/storeless/ java/storeless/org/apache/derby/impl/storel...
Date Tue, 28 May 2013 22:00:29 GMT
Author: rhillegas
Date: Tue May 28 22:00:29 2013
New Revision: 1487133

URL: http://svn.apache.org/r1487133
Log:
DERBY-6213: Convert 1.4 and 1.5 to 1.6 in source/target clauses of compilation tasks.

Modified:
    db/derby/code/trunk/build.xml
    db/derby/code/trunk/java/build/org/apache/derbyBuild/build.xml
    db/derby/code/trunk/java/build/org/apache/derbyPreBuild/build.xml
    db/derby/code/trunk/java/demo/build.xml
    db/derby/code/trunk/java/demo/nserverdemo/SimpleNetworkClientSample.java
    db/derby/code/trunk/java/demo/simple/SimpleApp.java
    db/derby/code/trunk/java/demo/toursdb/build.xml
    db/derby/code/trunk/java/storeless/build.xml
    db/derby/code/trunk/java/storeless/org/apache/derby/impl/storeless/EmptyDictionary.java
    db/derby/code/trunk/java/tools/org/apache/derby/iapi/tools/build.xml
    db/derby/code/trunk/java/tools/org/apache/derby/iapi/tools/i18n/LocalizedResource.java
    db/derby/code/trunk/tools/l10n/build.xml

Modified: db/derby/code/trunk/build.xml
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/build.xml?rev=1487133&r1=1487132&r2=1487133&view=diff
==============================================================================
--- db/derby/code/trunk/build.xml (original)
+++ db/derby/code/trunk/build.xml Tue May 28 22:00:29 2013
@@ -146,7 +146,7 @@
     <property name="showenv.done" value="true"/>
   </target>
 
-  <!--  Make sure compiler level is Java 5 level or higher -->
+  <!--  Make sure compiler level is Java 6 level or higher -->
   <target name="checkCompilerLevel">
 
     <!--
@@ -154,18 +154,16 @@
        If we can find the following class, then we assume that the compiler
        is at least Java 6 level.
     -->
-    <available classname="java.sql.Wrapper" property="compilerLevel16" value="1.6"/>
-    <property name="compilerLevel16" value="1.5"/>
+    <available property="compilerAtCorrectLevel" classname="java.sql.Wrapper"/>
+    <fail unless="compilerAtCorrectLevel" message="Compiler level must be Java 6 or later."/>
 
-    <javac source="1.5" srcdir="${basedir}" failonerror="false"
+    <property name="compilerLevel16" value="1.6"/>
+
+    <javac source="1.6" srcdir="${basedir}" failonerror="false"
            includeantruntime="false">
       <include name="${dummy.src}"/>
     </javac>
 
-    <available property="compilerAtCorrectLevel" classname="java.util.Queue"/>
-
-    <fail unless="compilerAtCorrectLevel" message="Compiler level must be Java 5 or later."/>
-
     <antcall target="checkVMLevel"/>
     
   </target>
@@ -795,8 +793,8 @@
     <mkdir dir="${out.jdbc4.dir}"/>
 
     <javac
-      source="1.5"
-      target="1.5"
+      source="1.6"
+      target="1.6"
       bootclasspath="${empty}"
       nowarn="on"
       debug="${debug}"
@@ -810,6 +808,7 @@
       <classpath>
         <pathelement path="${java16compile.classpath}"/>
       </classpath>
+      <compilerarg value="-Xlint:unchecked"/>
      </javac>
 
   </target>
@@ -1282,7 +1281,7 @@
        doctitle="Apache Derby V${major}.${minor} Test Javadoc"
        Footer="${javadoc.Footer}"
        bottom="Apache Derby V${major}.${minor} Internals - &lt;i&gt;Copyright &amp;copy;
2004,${copyright.year} The Apache Software Foundation. All Rights Reserved.&lt;/i&gt;"
-       source="1.5"
+       source="1.6"
      >
       <fileset dir="${derby.testing.src.dir}"
                excludesfile="${javadoc.exclusions}"/>

Modified: db/derby/code/trunk/java/build/org/apache/derbyBuild/build.xml
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/build/org/apache/derbyBuild/build.xml?rev=1487133&r1=1487132&r2=1487133&view=diff
==============================================================================
--- db/derby/code/trunk/java/build/org/apache/derbyBuild/build.xml (original)
+++ db/derby/code/trunk/java/build/org/apache/derbyBuild/build.xml Tue May 28 22:00:29 2013
@@ -39,8 +39,8 @@
     <copy file="${derby.build.src.dir}/org/apache/derbyBuild/odbcgen_fragments.properties"
tofile="${out.dir}/org/apache/derbyBuild/odbcgen_fragments.properties"/>
 
     <javac
-      source="1.5"
-      target="1.5"
+      source="1.6"
+      target="1.6"
       bootclasspath="${empty}"
       nowarn="on"
       debug="${debug}"
@@ -56,6 +56,7 @@
         <pathelement path="${ant.core.lib}"/>
       </classpath>
       <include name="org/apache/derbyBuild/**"/>
+      <compilerarg value="-Xlint:unchecked"/>
     </javac>
   </target>
 </project>

Modified: db/derby/code/trunk/java/build/org/apache/derbyPreBuild/build.xml
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/build/org/apache/derbyPreBuild/build.xml?rev=1487133&r1=1487132&r2=1487133&view=diff
==============================================================================
--- db/derby/code/trunk/java/build/org/apache/derbyPreBuild/build.xml (original)
+++ db/derby/code/trunk/java/build/org/apache/derbyPreBuild/build.xml Tue May 28 22:00:29
2013
@@ -31,8 +31,8 @@
 
   <target name="compile">
     <javac
-      source="1.5"
-      target="1.5"
+      source="1.6"
+      target="1.6"
       nowarn="on"
       debug="true"
       depend="${depend}"
@@ -47,6 +47,7 @@
       <classpath>
         <pathelement path="${ant.core.lib}"/>
       </classpath>
+      <compilerarg value="-Xlint:unchecked"/>
     </javac>
   </target>
 </project>

Modified: db/derby/code/trunk/java/demo/build.xml
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/demo/build.xml?rev=1487133&r1=1487132&r2=1487133&view=diff
==============================================================================
--- db/derby/code/trunk/java/demo/build.xml (original)
+++ db/derby/code/trunk/java/demo/build.xml Tue May 28 22:00:29 2013
@@ -36,8 +36,8 @@
 
   <target name="compile">
     <javac
-      source="1.4"
-      target="1.4"
+      source="1.6"
+      target="1.6"
       bootclasspath="${empty}"
       nowarn="on"
       debug="${debug}"
@@ -52,10 +52,11 @@
       <classpath>
         <pathelement path="${java16compile.classpath}"/>
       </classpath>
+      <compilerarg value="-Xlint:unchecked"/>
     </javac>
     <javac
-      source="1.4"
-      target="1.4"
+      source="1.6"
+      target="1.6"
       bootclasspath="${empty}"
       nowarn="on"
       debug="${debug}"
@@ -71,11 +72,12 @@
       <classpath>
         <pathelement path="${java16compile.classpath}"/>
       </classpath>
+      <compilerarg value="-Xlint:unchecked"/>
     </javac>
     <!-- "simple" demos under java/demo/ (SimpleApp, SimpleMobileApp) -->
     <javac
-      source="1.4"
-      target="1.4"
+      source="1.6"
+      target="1.6"
       bootclasspath="${empty}"
       nowarn="on"
       debug="${debug}"
@@ -90,10 +92,11 @@
         <pathelement location="${javasrc.dir}"/>
         <pathelement path="${java16compile.classpath}"/>
       </classpath>
+      <compilerarg value="-Xlint:unchecked"/>
     </javac>
     <javac
-      source="1.4"
-      target="1.4"
+      source="1.6"
+      target="1.6"
       bootclasspath="${empty}"
       nowarn="on"
       debug="${debug}"
@@ -108,6 +111,7 @@
         <pathelement location="${javasrc.dir}"/>
         <pathelement path="${java16compile.classpath}"/>
       </classpath>
+      <compilerarg value="-Xlint:unchecked"/>
     </javac>
     <ant target="compile" dir="toursdb"/>
   </target>
@@ -127,8 +131,8 @@
 
   <target name="compile-vtidemo">
     <javac
-      source="1.5"
-      target="1.5"
+      source="1.6"
+      target="1.6"
       bootclasspath="${empty}"
       nowarn="on"
       debug="${debug}"
@@ -142,7 +146,7 @@
       <classpath>
         <pathelement path="${java16compile.classpath}"/>
       </classpath>
-       <!-- <compilerarg value="-Xlint:unchecked"/> -->
+      <compilerarg value="-Xlint:unchecked"/>
     </javac>
   </target>
 

Modified: db/derby/code/trunk/java/demo/nserverdemo/SimpleNetworkClientSample.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/demo/nserverdemo/SimpleNetworkClientSample.java?rev=1487133&r1=1487132&r2=1487133&view=diff
==============================================================================
--- db/derby/code/trunk/java/demo/nserverdemo/SimpleNetworkClientSample.java (original)
+++ db/derby/code/trunk/java/demo/nserverdemo/SimpleNetworkClientSample.java Tue May 28 22:00:29
2013
@@ -168,7 +168,7 @@ public static final String DERBY_CLIENT_
 	public javax.sql.DataSource getClientDataSource(String database, String user, String
 									  password) throws SQLException, ClassNotFoundException, InstantiationException,
IllegalAccessException, NoSuchMethodException, InvocationTargetException
 	{
-		Class nsDataSource = Class.forName(jdbcDataSource);
+		Class<?> nsDataSource = Class.forName(jdbcDataSource);
 		DataSource ds = (DataSource) nsDataSource.newInstance();
 
 		// can also include Derby URL attributes along with the database name

Modified: db/derby/code/trunk/java/demo/simple/SimpleApp.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/demo/simple/SimpleApp.java?rev=1487133&r1=1487132&r2=1487133&view=diff
==============================================================================
--- db/derby/code/trunk/java/demo/simple/SimpleApp.java (original)
+++ db/derby/code/trunk/java/demo/simple/SimpleApp.java Tue May 28 22:00:29 2013
@@ -135,7 +135,7 @@ public class SimpleApp
 	/* This ArrayList usage may cause a warning when compiling this class
 	 * with a compiler for J2SE 5.0 or newer. We are not using generics
 	 * because we want the source to support J2SE 1.4.2 environments. */
-        ArrayList statements = new ArrayList(); // list of Statements, PreparedStatements
+        ArrayList<Statement> statements = new ArrayList<Statement>(); // list
of Statements, PreparedStatements
         PreparedStatement psInsert = null;
         PreparedStatement psUpdate = null;
         Statement s = null;

Modified: db/derby/code/trunk/java/demo/toursdb/build.xml
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/demo/toursdb/build.xml?rev=1487133&r1=1487132&r2=1487133&view=diff
==============================================================================
--- db/derby/code/trunk/java/demo/toursdb/build.xml (original)
+++ db/derby/code/trunk/java/demo/toursdb/build.xml Tue May 28 22:00:29 2013
@@ -38,8 +38,8 @@
 
   <target name="compile">
     <javac
-      source="1.4"
-      target="1.4"
+      source="1.6"
+      target="1.6"
       bootclasspath="${empty}"
       debug="${debug}"
       depend="${depend}"
@@ -53,6 +53,7 @@
         <pathelement path="${java16compile.classpath}"/>
       </classpath>
       <include name="toursdb/insertMaps.java"/>
+      <compilerarg value="-Xlint:unchecked"/>
     </javac>
   </target>
 

Modified: db/derby/code/trunk/java/storeless/build.xml
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/storeless/build.xml?rev=1487133&r1=1487132&r2=1487133&view=diff
==============================================================================
--- db/derby/code/trunk/java/storeless/build.xml (original)
+++ db/derby/code/trunk/java/storeless/build.xml Tue May 28 22:00:29 2013
@@ -60,8 +60,8 @@
           </fileset>
         </copy>
     <javac
-      source="1.4"
-      target="1.4"
+      source="1.6"
+      target="1.6"
       bootclasspath="${empty}"
       nowarn="on"
       debug="${debug}"
@@ -76,6 +76,7 @@
       	  <pathelement path="${out.dir}"/>
           <pathelement path="${java16compile.classpath}"/>
       </classpath>
+      <compilerarg value="-Xlint:unchecked"/>
     </javac>
   </target>
  

Modified: db/derby/code/trunk/java/storeless/org/apache/derby/impl/storeless/EmptyDictionary.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/storeless/org/apache/derby/impl/storeless/EmptyDictionary.java?rev=1487133&r1=1487132&r2=1487133&view=diff
==============================================================================
--- db/derby/code/trunk/java/storeless/org/apache/derby/impl/storeless/EmptyDictionary.java
(original)
+++ db/derby/code/trunk/java/storeless/org/apache/derby/impl/storeless/EmptyDictionary.java
Tue May 28 22:00:29 2013
@@ -55,6 +55,7 @@ import org.apache.derby.iapi.sql.diction
 import org.apache.derby.iapi.sql.dictionary.SchemaDescriptor;
 import org.apache.derby.iapi.sql.dictionary.RoleGrantDescriptor;
 import org.apache.derby.iapi.sql.dictionary.SequenceDescriptor;
+import org.apache.derby.iapi.sql.dictionary.StatisticsDescriptor;
 import org.apache.derby.iapi.sql.dictionary.PermDescriptor;
 import org.apache.derby.iapi.sql.dictionary.RoleClosureIterator;
 import org.apache.derby.iapi.sql.dictionary.SubKeyConstraintDescriptor;
@@ -622,13 +623,13 @@ public class EmptyDictionary implements 
 
 	}
 
-	public List getDependentsDescriptorList(String dependentID)
+	public List<DependencyDescriptor> getDependentsDescriptorList(String dependentID)
 			throws StandardException {
 		// Auto-generated method stub
 		return null;
 	}
 
-	public List getProvidersDescriptorList(String providerID)
+	public List<DependencyDescriptor> getProvidersDescriptorList(String providerID)
 			throws StandardException {
 		// Auto-generated method stub
 		return null;
@@ -777,7 +778,7 @@ public class EmptyDictionary implements 
 
 	}
 
-	public List getStatisticsDescriptors(TableDescriptor td)
+	public List<StatisticsDescriptor> getStatisticsDescriptors(TableDescriptor td)
 			throws StandardException {
 		// Auto-generated method stub
 		return null;

Modified: db/derby/code/trunk/java/tools/org/apache/derby/iapi/tools/build.xml
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/tools/org/apache/derby/iapi/tools/build.xml?rev=1487133&r1=1487132&r2=1487133&view=diff
==============================================================================
--- db/derby/code/trunk/java/tools/org/apache/derby/iapi/tools/build.xml (original)
+++ db/derby/code/trunk/java/tools/org/apache/derby/iapi/tools/build.xml Tue May 28 22:00:29
2013
@@ -36,8 +36,8 @@
 
   <target name="compile_tools_iapi">
     <javac
-      source="1.4"
-      target="1.4"
+      source="1.6"
+      target="1.6"
       bootclasspath="${empty}"
       nowarn="on"
       debug="${debug}"
@@ -53,13 +53,14 @@
       </classpath>
       <include name="${derby.dir}/iapi/tools/**"/>
       <exclude name="${derby.dir}/iapi/tools/run.java"/>
+      <compilerarg value="-Xlint:unchecked"/>
     </javac>
   </target>
 
   <target name="compile_tools_iapi_run">
     <javac
-      source="1.4"
-      target="1.4"
+      source="1.6"
+      target="1.6"
       bootclasspath="${empty}"
       nowarn="on"
       debug="${debug}"
@@ -74,6 +75,7 @@
         <pathelement path="${compile.classpath}"/>
       </classpath>
       <include name="${derby.dir}/iapi/tools/run.java"/>
+      <compilerarg value="-Xlint:unchecked"/>
     </javac>
   </target>
 

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=1487133&r1=1487132&r2=1487133&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
Tue May 28 22:00:29 2013
@@ -44,7 +44,7 @@ import java.sql.SQLException;
 import java.sql.Types;
 
 
-public final class LocalizedResource  implements java.security.PrivilegedAction {
+public final class LocalizedResource  implements java.security.PrivilegedAction<String>
{
 
 	private static final boolean SUPPORTS_BIG_DECIMAL_CALLS;
 	
@@ -458,7 +458,7 @@ public final class LocalizedResource  im
 		 try
 		  {
 				resourceKey =  key;
-				s = (String) java.security.AccessController.doPrivileged(this);
+				s = java.security.AccessController.doPrivileged(this);
 		}
 		catch (SecurityException se) {
 			s = null;
@@ -466,7 +466,7 @@ public final class LocalizedResource  im
 		//System.out.println("{"+resourceKey+"="+s+"}");
 		return s;
 	}
-	public final Object run() {
+	public final String run() {
 		String s = System.getProperty(resourceKey);
 		return s;
 	}

Modified: db/derby/code/trunk/tools/l10n/build.xml
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/tools/l10n/build.xml?rev=1487133&r1=1487132&r2=1487133&view=diff
==============================================================================
--- db/derby/code/trunk/tools/l10n/build.xml (original)
+++ db/derby/code/trunk/tools/l10n/build.xml Tue May 28 22:00:29 2013
@@ -36,8 +36,8 @@
 
   <target name="compile">
     <javac
-      source="1.4"
-      target="1.4"
+      source="1.6"
+      target="1.6"
       bootclasspath="${empty}"
       nowarn="on"
       debug="${debug}"
@@ -52,6 +52,7 @@
       <classpath>
         <pathelement path="${java14compile.classpath}"/>
       </classpath>
+      <compilerarg value="-Xlint:unchecked"/>
     </javac>
   </target>
 



Mime
View raw message