You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by Martin Ritchie <ri...@apache.org> on 2008/07/14 13:58:34 UTC

Java Broker fails to compile under JDK 1.5

Hi,

I've just been trying to compile everything using Java 1.5 I thought
everything was supposed to build using 1.5 yet I get the following
errors, It looks to to me like the compiler is getting upset at the
generic throws but not sure why. Any thoughts from anyone?


    [javac] Compiling 265 source files to
/home/ritchiem/dev/Apache/git/qpid-dev/qpid/java/build/broker/classes
    [javac] /home/ritchiem/dev/Apache/git/qpid-dev/qpid/java/broker/src/main/java/org/apache/qpid/server/filter/UnaryExpression.java:81:
unreported exception java.lang.Exception; must be caught or declared
to be thrown
    [javac]             Object object = evaluate(message);
    [javac]                                     ^
    [javac] /home/ritchiem/dev/Apache/git/qpid-dev/qpid/java/broker/src/main/java/org/apache/qpid/server/filter/UnaryExpression.java:216:
unreported exception java.lang.Exception; must be caught or declared
to be thrown
    [javac]             Object rvalue = right.evaluate(message);
    [javac]                                           ^
    [javac] /home/ritchiem/dev/Apache/git/qpid-dev/qpid/java/broker/src/main/java/org/apache/qpid/server/filter/UnaryExpression.java:251:
unreported exception java.lang.Exception; must be caught or declared
to be thrown
    [javac]             Object rvalue = right.evaluate(message);
    [javac]                                           ^
    [javac] /home/ritchiem/dev/Apache/git/qpid-dev/qpid/java/broker/src/main/java/org/apache/qpid/server/filter/UnaryExpression.java:321:
unreported exception java.lang.Exception; must be caught or declared
to be thrown
    [javac]             Boolean lvalue = (Boolean) right.evaluate(message);
    [javac]                                                      ^
    [javac] /home/ritchiem/dev/Apache/git/qpid-dev/qpid/java/broker/src/main/java/org/apache/qpid/server/filter/UnaryExpression.java:345:
unreported exception java.lang.Exception; must be caught or declared
to be thrown
    [javac]             Object rvalue = right.evaluate(message);
    [javac]                                           ^
    [javac] Note: Some input files use or override a deprecated API.
    [javac] Note: Recompile with -Xlint:deprecation for details.
    [javac] Note: Some input files use unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.
    [javac] 5 errors


ritchiem@RHEL4:(git)qpid-dev[trunk-dev]/qpid/java$ java -version
java version "1.5.0_15"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_15-b04)
Java HotSpot(TM) Server VM (build 1.5.0_15-b04, mixed mode)



-- 
Martin Ritchie

Re: Java Broker fails to compile under JDK 1.5

Posted by Robert Godfrey <ro...@gmail.com>.
2008/7/14 Aidan Skinner <ai...@apache.org>:
> On Mon, Jul 14, 2008 at 12:58 PM, Martin Ritchie <ri...@apache.org> wrote:
>
>> I've just been trying to compile everything using Java 1.5 I thought
>> everything was supposed to build using 1.5 yet I get the following
>> errors, It looks to to me like the compiler is getting upset at the
>> generic throws but not sure why. Any thoughts from anyone?
>
> IIRC that's a javac bug Rob filed and it works if you run the compiler
> again (!?), could be wrong though. There was a post about it a while
> back...

That's correct if you run ant again it will compile...

I should really rip out that templated exception code...

-- Rob

Re: Java Broker fails to compile under JDK 1.5

Posted by Aidan Skinner <ai...@apache.org>.
On Mon, Jul 14, 2008 at 12:58 PM, Martin Ritchie <ri...@apache.org> wrote:

> I've just been trying to compile everything using Java 1.5 I thought
> everything was supposed to build using 1.5 yet I get the following
> errors, It looks to to me like the compiler is getting upset at the
> generic throws but not sure why. Any thoughts from anyone?

IIRC that's a javac bug Rob filed and it works if you run the compiler
again (!?), could be wrong though. There was a post about it a while
back...

- Aidan
-- 
Apache Qpid - World Domination through Advanced Message Queueing
http://cwiki.apache.org/qpid