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.
Link: http://services.netbeans.org/synergy/client/app/#/case/4989/suite/1691 Product Version: NetBeans IDE Dev (Build 201507240001) Java: 1.8.0_51; Java HotSpot(TM) 64-Bit Server VM 25.51-b03 Runtime: Java(TM) SE Runtime Environment 1.8.0_51-b16 System: Windows 8 version 6.2 running on amd64; UTF-8; pl_PL (nb) The following case is not covered with the test case, and it leads to an error: public class CreateSubclass // HINT: Create subclass { public class NonStaticSubClass // "Create subclass" hint should NOT appear here, as the subclass is not static. { public NonStaticSubClass() { } } } After invoking the hint the following class is created: public class NonStaticSubClassImpl extends CreateSubclass.NonStaticSubClass { } But it doesn't compile because of the error "an enclosing instance that contains CreateSubclass.NonStaticSubClass is required".
Well, partially. The hint can generate a constructor which takes the outer class' instance and invokes outer.super(). I block the hint in case of a non-static member and turn this issue into an enhancement: * generate outer.super() for non-static member classes * generate nested subclass (not top-level class) Create subclass suppressed in jet-main#4891cee42d1a