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 171142 - "Introduce Method" doesn't infer static methods
Summary: "Introduce Method" doesn't infer static methods
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-30 23:27 UTC by jnicol
Modified: 2016-05-16 13:50 UTC (History)
0 users

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 jnicol 2009-08-30 23:27:40 UTC
private void blah() { System.out.println(5); }

If you introduce a method on the println, the sub-method is not static.  However:

private static void blah() { System.out.println(5); }

If you introduce a method on the println, the sub-method is static.
Comment 1 Svata Dedic 2016-05-16 13:50:34 UTC
OK, could be an option (with remembered preset value from the last time) if the code does not contain `this' reference.