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 109519

Summary: Wrong hint upon possible loss of precision in array initializer
Product: java Reporter: matthies <matthies>
Component: HintsAssignee: Svata Dedic <sdedic>
Status: NEW ---    
Severity: blocker CC: sandipchitale
Priority: P3    
Version: 6.x   
Hardware: PC   
OS: Windows XP   
Issue Type: ENHANCEMENT Exception Reporter:

Description matthies 2007-07-12 15:07:26 UTC
This line of Java code

    byte[] bytes = { 0x80 };

gives this error

    possible loss of precision
    found   : int
    required: byte

but the hint then is

    Change type of bytes to byte[]

where it should either be

    Change type of bytes to int[]

or (possibly more helpful in this case)

    Cast 0x80 to byte

Found with build 200707111200.
Comment 1 Jan Lahoda 2007-09-11 19:33:31 UTC
I do not get the fix anymore in this case in current builds. Changing to enhancement - we should try to provide some
fixes for such cases.