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

Summary: "Introduce Method" doesn't infer static methods
Product: java Reporter: jnicol <jnicol>
Component: HintsAssignee: Svata Dedic <sdedic>
Status: NEW ---    
Severity: blocker    
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

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.