Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 354947 - Nullpointer-Exception while parsing definition file (aop.xml) in DocumentParser
Summary: Nullpointer-Exception while parsing definition file (aop.xml) in DocumentParser
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: LTWeaving (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 trivial (vote)
Target Milestone: 1.6.12   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-17 09:28 EDT by total.schnucklig CLA
Modified: 2011-08-17 11:54 EDT (History)
1 user (show)

See Also:


Attachments

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