You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by yo...@apache.org on 2004/09/02 02:13:00 UTC
cvs commit: jakarta-commons/dbcp/src/java/org/apache/commons/dbcp SQLNestedException.java
yoavs 2004/09/01 17:13:00
Modified: dbcp build.xml
dbcp/src/java/org/apache/commons/dbcp
SQLNestedException.java
Log:
Made DBCP compile on JDK 1.5.0 (or 5.0, whatever ;)) by adding source="1.4"
to compiler arguments. This can be overridden in build.properties by setting a javac.source property. There are compiler errors in JDK 5.0 without this source switch that cannot be fixed without JDK 5.0-specific syntax, which I didn't want to put in.
Also made a tiny change in SQLNestedException to eliminate a JDK 5.0 compile warning (not an error) about a varargs cast mismatch.
Revision Changes Path
1.27 +6 -3 jakarta-commons/dbcp/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-commons/dbcp/build.xml,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- build.xml 21 Aug 2004 21:20:58 -0000 1.26
+++ build.xml 2 Sep 2004 00:13:00 -0000 1.27
@@ -47,6 +47,7 @@
<property name="javac.optimize" value="false"/>
<property name="javac.debug" value="true"/>
<property name="javac.deprecation" value="false"/>
+ <property name="javac.source" value="1.4" />
<available property="jndi.present" classname="javax.naming.Context"/>
<available property="jdbc3.present" classname="java.sql.Savepoint"/>
@@ -123,7 +124,8 @@
classpath="${classpath}"
debug="${javac.debug}"
deprecation="${javac.deprecation}"
- optimize="${javac.optimize}">
+ optimize="${javac.optimize}"
+ source="${javac.source}">
<exclude name="org/apache/commons/dbcp/BasicDataSourceFactory.java"
unless="jndi.present"/>
<exclude name="org/apache/commons/dbcp/datasources/**"
@@ -139,7 +141,8 @@
srcdir="${src.test.dir}"
debug="${javac.debug}"
deprecation="${javac.deprecation}"
- optimize="${javac.optimize}">
+ optimize="${javac.optimize}"
+ source="${javac.source}">
<classpath>
<pathelement location="${build.classes.dir}" />
<pathelement location="${build.test-classes.dir}" />
1.9 +2 -2 jakarta-commons/dbcp/src/java/org/apache/commons/dbcp/SQLNestedException.java
Index: SQLNestedException.java
===================================================================
RCS file: /home/cvs/jakarta-commons/dbcp/src/java/org/apache/commons/dbcp/SQLNestedException.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- SQLNestedException.java 28 Feb 2004 12:18:17 -0000 1.8
+++ SQLNestedException.java 2 Sep 2004 00:13:00 -0000 1.9
@@ -35,7 +35,7 @@
static {
Method getCauseMethod;
try {
- getCauseMethod = Throwable.class.getMethod("getCause", null);
+ getCauseMethod = Throwable.class.getMethod("getCause", (Class[]) null);
} catch (Exception e) {
getCauseMethod = null;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org