-
Bug
-
Resolution: Done
-
Minor
-
1.1.PFD
-
None
-
None
The example in the spec text and javadoc:
Unmanaged unmanagedFoo = new Unmanaged(Foo.class); UnmanagedInstance fooInstance = unManagedFoo.newInstance(); Foo foo = fooInstance.produce().inject().postConstruct(); // Use the foo instance fooInstance.preDestroy().dispose();
should be replaced with something like this:
Unmanaged<Foo> unmanagedFoo = new Unmanaged<Foo>(Foo.class); UnmanagedInstance<Foo> fooInstance = unmanagedFoo.newInstance(); Foo foo = fooInstance.produce().inject().postConstruct().get(); // Use the foo instance fooInstance.preDestroy().dispose();
Note the generics, unManagedFoo -> unmanagedFoo and missing get().