Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0003236 [Resin] trivial always 01-09-09 18:46 01-12-09 16:39
Reporter koreth View Status public  
Assigned To ferg
Priority normal Resolution fixed  
Status closed   Product Version 4.0.0
Summary 0003236: Patch: Get rid of some unnecessary NPEs
Description When I run under a debugger and break on NPEs, it's annoying to get lots of false hits from OsgiManager. So here's a patch to get rid of its NPEs. (Whether the fact that I'm getting them is a symptom of something else, I can't say, but from the structure of the code it looks like exceptions are totally expected here.)

--- a/modules/kernel/src/com/caucho/osgi/OsgiManager.java
+++ b/modules/kernel/src/com/caucho/osgi/OsgiManager.java
@@ -349,9 +349,11 @@ public class OsgiManager
     synchronized (_exportMap) {
       loader = _publishedExportMap.get(packageName);
 
- try {
- return loader.getResource(name);
- } catch (Exception e) {
+ if (loader != null) {
+ try {
+ return loader.getResource(name);
+ } catch (Exception e) {
+ }
       }
     }
Additional Information
Attached Files

- Relationships

There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
01-09-09 18:46 koreth New Issue
01-09-09 19:17 nam Project Quercus => Resin
01-12-09 16:39 ferg Assigned To  => ferg
01-12-09 16:39 ferg Status new => closed
01-12-09 16:39 ferg Resolution open => fixed
01-12-09 16:39 ferg Fixed in Version  => 4.0.0


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
28 total queries executed.
26 unique queries executed.
Powered by Mantis Bugtracker