Modify

Opened 15 years ago

Last modified 15 years ago

#221 assigned defect

Assert keyword not supported

Reported by: hauma Owned by: moschny
Priority: normal Milestone:
Component: gjc Version: 1.07h
Severity: normal Keywords:
Cc:

Description

Java 1.4 adds an assert keyword to the language. This new keyword should be accepted by the compiler. Otherwise, existing code cannot be used easily.

Attachments (0)

Change History (2)

comment:1 Changed 15 years ago by moschny

  • Status changed from new to assigned

It should be relatively easy to fix the compiler to accept code with the assert keyword, however, it will be completely ignored then.

True assert support will not be there very soon.

comment:2 Changed 15 years ago by moschny

As described in

http://java.sun.com/docs/books/jls/assert-spec.html

the Java compiler does a relatively trivial transformation to wrap assert statements into if clauses guarded by a static final boolean variable that decides whether assertions are turned on or off.

Add Comment

Modify Ticket

Change Properties
Set your email in Preferences
Action
as assigned The owner will remain moschny.
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from moschny to the specified user. Next status will be 'new'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.