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.
There is a common pattern with libraries which use anonymous inner classes to create an object like a Class object but with generic types attached to it, for use as keys with Lookup-like services: bind(new TypeLiteral<List<MockUser>>() {}).toProvider(users); This pattern is used by Guice's TypeLiteral and Jackson's TypeReference - and it is the way anything that needs this sort of thing will have to do it. Reformat code in NetBeans always splits this idiom in a way which makes it much less readable: bind(new TypeLiteral<List<MockUser>>() { }).toProvider(users); It would be better if there were a special case for anonymous inner classes with no members.