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 197993 - Infrastructure may pass position -1, causing API usability problem
Summary: Infrastructure may pass position -1, causing API usability problem
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 7.0.1
Hardware: All All
: P3 normal (vote)
Assignee: Svata Dedic
Depends on:
Reported: 2011-04-22 10:28 UTC by Petr Jiricka
Modified: 2013-09-02 14:19 UTC (History)
1 user (show)

See Also:
Exception Reporter:

Exception from the hint (8.04 KB, text/plain)
2011-04-22 10:28 UTC, Petr Jiricka

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Jiricka 2011-04-22 10:28:36 UTC
Created attachment 107898 [details]
Exception from the hint

See e.g. the attached exception. Currently this needs to be worked around/hacked in the clients' code - there should be better support in the infrastructure for this case.
Comment 1 Jan Lahoda 2011-05-02 09:02:50 UTC
There is nothing wrong in editor.hints, it only reacts to what it gets. java.hints could allow hints implementations to declare they are not interested in synthetic trees (or, better, to declare that they are), but I do not think that qualifies as a P3/defect.
Comment 2 David Konecny 2011-05-09 22:03:43 UTC
Whether this qualifies as defect or not depends on how frequently the exception can happen. I've never seen it and do not know how to reproduce it so I cannot say, but there is plenty of hints which are not ready for -1 end position.