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

Bug 354947

Summary: Nullpointer-Exception while parsing definition file (aop.xml) in DocumentParser
Product: [Tools] AspectJ Reporter: total.schnucklig
Component: LTWeavingAssignee: aspectj inbox <aspectj-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: trivial    
Priority: P3 CC: aclement
Version: unspecified   
Target Milestone: 1.6.12   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description total.schnucklig CLA 2011-08-17 09:28:42 EDT
Build Identifier: 20100617-1415

With an activated NullpointerException-Breakpoint i recently stumpled upon a thrown NPE in the DocumentParser.parse()-method (Line 106):

	public static Definition parse(final URL url) throws Exception {
		InputStream in = null;
		try {
			if (CACHE && parsedFiles.containsKey(url.toString())) {
				return parsedFiles.get(url.toString());
			}
			Definition def=null;
			
			if(LIGHTPARSER){	
				def = SimpleAOPParser.parse(url);
			}else{
				def = saxParsing(url);
			}
		
			if (CACHE && def.getAspectClassNames().size() > 0) {
				parsedFiles.put(url.toString(), def);
			}

			return def;
		} finally {
			try {
				in.close();
			} catch (Throwable t) {

			}
		}
	}

... The parsing of the configuration file works fine, merely the InputStream seems not to be used anymore. 


Reproducible: Always
Comment 1 Andrew Clement CLA 2011-08-17 11:54:57 EDT
thanks for taking the time to let me know.  Fixed it.