This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 118767 - [60cat] Comparing Strings using == or != warning in code generated by equals() and hashCode()
Summary: [60cat] Comparing Strings using == or != warning in code generated by equals(...
Status: RESOLVED DUPLICATE of bug 111441
Alias: None
Product: editor
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: issues@editor
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-12 22:43 UTC by jlaskowski
Modified: 2007-11-05 13:44 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jlaskowski 2007-10-12 22:43:16 UTC
[ BUILD # : 200710100000 ]
[ JDK VERSION : 1.6.0_02 ]

Create a java class with a instance field of type String. Ctrl+Insert
and select equals() and hashCode(). Generated equals() method uses !=
to compare strings so warning's displayed.
Comment 1 dynamite 2007-10-13 23:52:05 UTC
Alternatively have a warnings option to disable its display specifically for the equals() and hashCode() methods.
Comment 2 Jiri Prox 2007-10-15 08:27:09 UTC
This is being tracked in issue 111441. Thanks for your report

*** This issue has been marked as a duplicate of 111441 ***