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 - Wrong hint upon possible loss of precision in array initializer
Summary: Wrong hint upon possible loss of precision in array initializer
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-12 15:07 UTC by matthies
Modified: 2013-09-02 14:18 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.