Skip site navigation (1) Skip section navigation (2)

Compilation problem using jikes

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Compilation problem using jikes
Date: 2004-11-10 15:37:59
Message-ID: 200411101637.59434.peter_e@gmx.net (view raw or flat)
Thread:
Lists: pgsql-jdbc
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 method invoked 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 use a 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 use a 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/


Responses

pgsql-jdbc by date

Next:From: Nicolai TufarDate: 2004-11-10 18:20:10
Subject: Translation update: tr
Previous:From: Markus SchaberDate: 2004-11-10 15:12:20
Subject: Re: driver beta release

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group