java/5519: add some dummy checking to compilation phase

nferrier@gnu.org nferrier@gnu.org
Mon Jan 28 15:06:00 GMT 2002


>Number:         5519
>Category:       java
>Synopsis:       add some dummy checking to compilation phase
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Mon Jan 28 15:06:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Nic Ferrier
>Release:        n/a
>Organization:
>Environment:
n/a
>Description:
GCC will do dummy checking, eg: reporting suspicious casts and so forth. It would be really useful if the Java compiler did something similar.

For example, I have a blind spot about comparing references for equality, eg:

  Long l1 = new Long(10);
  Long l2 = new Long(10);
  if (l1 == l2)
    System.out.println("ha!");

I'd like to be able to pass a flag to the compiler to get it to report this suspicious comparison.

I'm sure that each Java programmer can think of their own "idiot traps".
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the Java-prs mailing list