I tried compiling the latest driver source code using jikes (and
sablevm), and there were some errors. Maybe you can fix them and
take a look at the warnings, too.
$ ant -Dbuild.compiler=jikes
...
[echo] Configured build for the JDBC3 edition driver with NO SSL
compile:
[javac] Compiling 103 source files to /home/peter/jdbc-dev/pgjdbc/build
[javac] Issued 1 semantic warning compiling
"/home/peter/jdbc-dev/pgjdbc/org/postgresql/util/PSQLDriverVersion.java":
[javac] 29. System.out.println(driver.getVersion());
[javac] ^---------------^
[javac] *** Semantic Warning: Invoking the class method "getVersion" via an instance is discouraged because the
methodinvoked will be the one in the variable's declared type, not the instance's dynamic type.
[javac] Issued 1 semantic warning compiling
"/home/peter/jdbc-dev/pgjdbc/org/postgresql/jdbc3/AbstractJdbc3Connection.java":
[javac] <--------------------------------------
[javac] 52. case ResultSet.CLOSE_CURSORS_AT_COMMIT:
[javac] 53. rsHoldability = holdability;
[javac] --------------------------------------->
[javac] *** Semantic Warning: This switch block can fall through to the next case. Did you forget a break
statement?
[javac] Issued 1 semantic warning compiling
"/home/peter/jdbc-dev/pgjdbc/org/postgresql/jdbc2/AbstractJdbc2Statement.java":
[javac] <---------------
[javac] 1480. case Types.CHAR:
[javac] 1481. setString(parameterIndex, x.toString(), Oid.BPCHAR);
[javac] --------------------------------------------------------------->
[javac] *** Semantic Warning: This switch block can fall through to the next case. Did you forget a break
statement?
[javac] Issued 1 semantic warning compiling
"/home/peter/jdbc-dev/pgjdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java":
[javac] <------------------
[javac] 1659. case Types.DECIMAL:
[javac] . . .
[javac] 1675. rowBuffer[columnIndex] = connection.encodeString(String.valueOf( valueObject));
[javac] -------------------------------------------------------------------------------------------------->
[javac] *** Semantic Warning: This switch block can fall through to the next case. Did you forget a break
statement?
[javac] Issued 2 semantic warnings compiling
"/home/peter/jdbc-dev/pgjdbc/org/postgresql/jdbc2/TimestampUtils.java":
[javac] 239. StringBuffer sbuf = new StringBuffer(s.substring(0, 8));
[javac] ^--^
[javac] *** Semantic Warning: Local "sbuf" shadows a field of the same name in
"org.postgresql.jdbc2.TimestampUtils".
[javac] 240. StringBuffer dateFormat = new StringBuffer("HH:mm:ss");
[javac] ^--------^
[javac] *** Semantic Warning: Local "dateFormat" shadows a field of the same name in
"org.postgresql.jdbc2.TimestampUtils".
[javac] Issued 3 semantic warnings compiling
"/home/peter/jdbc-dev/pgjdbc/org/postgresql/jdbc2/AbstractJdbc2Array.java":
[javac] <--------------
[javac] 264. case Types.BIT:
[javac] . . .
[javac] 273. }
[javac] ------------>
[javac] *** Semantic Warning: This switch block can fall through to the next case. Did you forget a break
statement?
[javac] <-------------------
[javac] 274. case Types.SMALLINT:
[javac] 275. fields[1] = new Field("VALUE", Oid.INT2, 2);
[javac] ------------------------------------------------------->
[javac] *** Semantic Warning: This switch block can fall through to the next case. Did you forget a break
statement?
[javac] <---------------
[javac] 332. case Types.CHAR:
[javac] 333. fields[1] = new Field("VALUE", Oid.BPCHAR, 1);
[javac] --------------------------------------------------------->
[javac] *** Semantic Warning: This switch block can fall through to the next case. Did you forget a break
statement?
[javac] Found 2 semantic errors and issued 1 warning compiling
"/home/peter/jdbc-dev/pgjdbc/org/postgresql/ds/common/PooledConnectionImpl.java":
[javac] 144. Connection con = (Connection)Proxy.newProxyInstance(getClass().getClassLoader(), new
Class[]{Connection.class,PGConnection.class}, handler);
[javac] ^-^
[javac] *** Semantic Warning: Local "con" shadows a field of the same name in
"org.postgresql.ds.common.PooledConnectionImpl".
[javac] 338. private ConnectionHandler con;
[javac] ^---------------^
[javac] *** Semantic Error: The static type "org.postgresql.ds.common.PooledConnectionImpl$StatementHandler" must
usea qualified name to access the non-static member type
"org.postgresql.ds.common.PooledConnectionImpl$ConnectionHandler"of the enclosing type
"org.postgresql.ds.common.PooledConnectionImpl".
[javac] 341. public StatementHandler(ConnectionHandler con, Statement st) {
[javac] ^---------------^
[javac] *** Semantic Error: The static type "org.postgresql.ds.common.PooledConnectionImpl$StatementHandler" must
usea qualified name to access the non-static member type
"org.postgresql.ds.common.PooledConnectionImpl$ConnectionHandler"of the enclosing type
"org.postgresql.ds.common.PooledConnectionImpl".
BUILD FAILED
--
Peter Eisentraut
http://developer.postgresql.org/~petere/