pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter_e@gmx.net>
To: pgsql-jdbc@postgresql.org
Subject: Compilation problem using jikes
Date: Wed, 10 Nov 2004 16:37:59 +0100
Message-ID: <200411101637.59434.peter_e@gmx.net> (raw)

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/




view thread (3+ messages)  latest in thread

Message-ID: <200411101637.59434.peter_e@gmx.net>
Permalink:  ../200411101637.59434.peter_e@gmx.net/
Also on:    postgresql.org/message-id/200411101637.59434.peter_e@gmx.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: peter_e@gmx.net
  Subject: Re: Compilation problem using jikes
  In-Reply-To: <200411101637.59434.peter_e@gmx.net>
  References: <200411101637.59434.peter_e@gmx.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox