Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 316391

Summary: Cannot use javax.annotation.Provider<T> to lazily fetch instance of T
Product: z_Archived Reporter: Brian de Alwis <bsd>
Component: E4Assignee: Project Inbox <e4.runtime-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: ob1.eclipse
Version: unspecified   
Target Milestone: ---   
Hardware: Macintosh   
OS: Mac OS X   
Whiteboard:
Attachments:
Description Flags
Patch none

Description Brian de Alwis CLA 2010-06-09 17:41:07 EDT
I'm porting the e4rover code to the latest from HEAD.  The code used the following pattern for reporting exceptions:
   class XXX {
     // ...
     @Inject Provider<StatusReporter> statusReporter;
     // ...
     
     void code() {
        try {  
           ... 
        } catch(Exception e) {
          statusReporter.get().show(...);
        }
      }
   }
   
 This isn't working: the statusReporter.get() is failing.  Unfortunately I'm leaving for a plane, and don't have the traceback to show :-(
Comment 1 Oleg Besedin CLA 2010-06-14 16:56:02 EDT
Created attachment 171871 [details]
Patch

Good catch, the creation of providers based on the context information (as opposing to bindings) was totally broken.
Comment 2 Oleg Besedin CLA 2010-06-14 16:56:42 EDT
Patch applied to CVS Head.