Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 316391 - Cannot use javax.annotation.Provider<T> to lazily fetch instance of T
Summary: Cannot use javax.annotation.Provider<T> to lazily fetch instance of T
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: E4 (show other bugs)
Version: unspecified   Edit
Hardware: Macintosh Mac OS X
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-09 17:41 EDT by Brian de Alwis CLA
Modified: 2012-12-13 15:00 EST (History)
1 user (show)

See Also:


Attachments
Patch (3.92 KB, patch)
2010-06-14 16:56 EDT, Oleg Besedin CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.