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 251354 - "Return of Collection Field" should not be triggered when returning this.
Summary: "Return of Collection Field" should not be triggered when returning this.
Status: NEW
Alias: None
Product: ide
Classification: Unclassified
Component: Exceptions Reporter (show other bugs)
Version: 8.0
Hardware: All All
: P4 normal (vote)
Assignee: Tomas Hurka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-22 04:56 UTC by supuhstar
Modified: 2015-03-22 04:59 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description supuhstar 2015-03-22 04:56:57 UTC
"Return of Collection Field" triggers when returning this. For example:

class MyChainingDictionary extends HashMap<CharSequence, Object> {
  public MyChainingDictionary put(CharSequence key, Object val) {
    super.put(key, val);
    return this;
  }
}

This should always be safe, because anything calling put will already have a reference to this object, anyway.