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 254492 - False positive of warning "MismatchedReadAndWriteOfArray"
Summary: False positive of warning "MismatchedReadAndWriteOfArray"
Status: RESOLVED WORKSFORME
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 8.0.2
Hardware: All All
: P4 normal (vote)
Assignee: issues@guibuilder
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-18 21:55 UTC by SirIntellegence
Modified: 2015-09-09 17:11 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Class File (2.25 KB, text/x-java-source)
2015-08-18 21:55 UTC, SirIntellegence
Details
Form file (2.82 KB, application/octet-stream)
2015-08-18 21:55 UTC, SirIntellegence
Details

Note You need to log in before you can comment on or make changes to this bug.
Description SirIntellegence 2015-08-18 21:55:08 UTC
Created attachment 155433 [details]
Class File

If the array has content and is referenced in a readonly block of code, the ide will not notice it.
Comment 1 SirIntellegence 2015-08-18 21:55:32 UTC
Created attachment 155434 [details]
Form file
Comment 2 Jiri Kovalsky 2015-08-18 22:03:36 UTC
Maybe a GUI Builder issue?
Comment 3 SirIntellegence 2015-08-18 22:06:50 UTC
Clarification:
It places a MismatchedReadAndWriteOfArray warning on the array in the .java file. I don't think it would be related to a GUI builder issue since the hint thing is reading the code, unless it is skipping over it.
Comment 4 Tomas Pavek 2015-09-09 15:02:05 UTC
I'm not getting this warning when opening the attached java file in build 201509090002.
Comment 5 SirIntellegence 2015-09-09 16:35:06 UTC
Have you tried after downloading both files? It needs to detect the generated area as read-only.
Comment 6 Tomas Pavek 2015-09-09 17:11:48 UTC
Yes. It only shows me a warning that constant name does not follow naming conventions. When I Ctrl-R it to ITEMS, there is no warning. I've also tried the same in a GUI form class created from scratch.