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

Summary: False positive of warning "MismatchedReadAndWriteOfArray"
Product: guibuilder Reporter: SirIntellegence
Component: CodeAssignee: issues@guibuilder <issues>
Status: RESOLVED WORKSFORME    
Severity: normal    
Priority: P4    
Version: 8.0.2   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: Class File
Form file

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.