java/5519: add some dummy checking to compilation phase
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
>Originator:     Nic Ferrier
>Release:        n/a
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)

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".



More information about the Java-prs mailing list