[kepler-dev] Compiling Ptolemy with Java 1.4.2

Edward A. Lee eal at eecs.berkeley.edu
Wed Jul 26 18:51:02 PDT 2006


Dan:

This is a compiler bug in 1.4.2, unfortunately.
There is no reason you can't override a static method in this way.
MatrixToken did not used to have a convert() method, so the problem
is new, due to my changes.

I've checked in a workaround...
Sorry about breaking the build.

Edward

At 02:29 PM 7/26/2006, Dan Higgins wrote:
>Hi Christopher,
>     Our nightly build of Kepler is failing in compiling Ptolemy. The
>error message is:
>
>     [javac]                                  ^
>     [javac]
>C:\work\ptII\build\src\ptolemy\data\LongMatrixToken.java:241: conver
>t(ptolemy.data.Token) in ptolemy.data.LongMatrixToken cannot override
>convert(pt
>olemy.data.Token) in ptolemy.data.MatrixToken; attempting to use
>incompatible re
>turn type
>     [javac] found   : ptolemy.data.LongMatrixToken
>     [javac] required: ptolemy.data.MatrixToken
>     [javac]     public static LongMatrixToken convert(Token token)
>     [javac]                                   ^
>     [javac] C:\work\ptII\build\src\ptolemy\data\LongToken.java:116:
>convert(ptol
>emy.data.Token) in ptolemy.data.LongToken cannot override
>convert(ptolemy.data.T
>oken) in ptolemy.data.ScalarToken; attempting to use incompatible return
>type
>     [javac] found   : ptolemy.data.LongToken
>     [javac] required: ptolemy.data.ScalarToken
>     [javac]     public static LongToken convert(Token token) throws
>IllegalActio
>nException {
>
>.....
>
>Strangely enough this error occurs ONLY when compiling with Java 1.4.2.
>If I use Java 1.5, Ptolemy compiles with no error messages.
>
>Did you guys change something in the Token convert code recently, and
>Are you using Java 1.5 exclusively now? It would seem better if we could
>still compile with 1.4.2 (or maybe I am wrong here about the Java
>versioning being a problem)
>
>Dan
>
>--
>*******************************************************************
>Dan Higgins                                  higgins at nceas.ucsb.edu
>http://www.nceas.ucsb.edu/    Ph: 805-893-5127
>National Center for Ecological Analysis and Synthesis (NCEAS) Marine 
>Science Building - Room 3405
>Santa Barbara, CA 93195
>*******************************************************************
>
>
>_______________________________________________
>Kepler-dev mailing list
>Kepler-dev at ecoinformatics.org
>http://mercury.nceas.ucsb.edu/ecoinformatics/mailman/listinfo/kepler-dev

------------
Edward A. Lee
Professor, Chair of EECS
231 Cory Hall, UC Berkeley, Berkeley, CA 94720-1770
phone: 510-642-0253 or 510-642-0455, fax: 510-642-2845
eal at eecs.Berkeley.EDU, http://ptolemy.eecs.berkeley.edu/~eal  



More information about the Kepler-dev mailing list