Board index » jbuilder » assert statement unreachable for Java 1.5 (with generics)

assert statement unreachable for Java 1.5 (with generics)


2005-02-21 08:24:33 AM
jbuilder20
I have JBuilder 2005 DEveloper (Update 1) installed.
It is set up to use Language Features "Java 5 SDK, v5.0 (generics enabled)".
If I have an ASSERT statement as the first startement of a method, JBuilder marks it as unreachable.
This does NOT happen with Language Features set to "Java 2 SDK, v1.4 (asserts enabled)".
I am puzzled. Compilation works fine, though I have not checked to see if the assert statemwent actually gets compiled or not.
Any idea what's happening here?
 
 

Re:assert statement unreachable for Java 1.5 (with generics)

On 2/20/2005 at 7:24:33 PM, simon pearce wrote:
Quote
I have JBuilder 2005 DEveloper (Update 1) installed.
It is set up to use Language Features "Java 5 SDK, v5.0 (generics
enabled)". If I have an ASSERT statement as the first startement of a
method, JBuilder marks it as unreachable. This does NOT happen with
Language Features set to "Java 2 SDK, v1.4 (asserts enabled)".

I am puzzled. Compilation works fine, though I have not checked to see
if the assert statemwent actually gets compiled or not.

Any idea what's happening here?
I think you are seeing the "code audit" feature, which is new in JBuilder
2005, and needs some ... uhh, improvement. You can control which audits
are in effect on the "Code Audits" page of the Project Properties.
I am not sure if there were any changes in code audits in Update 3, but it
would be a good idea to install it anyway. It is available from the same
place that you downloaded update 1, inappropriately labeled "JBuilder 2005
Application Server Update".
--
Regards,
John McGrath [TeamB]
---------------------------------------------------
Before sending me e-mail, please read:
www.JPMcGrath.net/newsgroups/e-mail.html