Author: rec
Date: Sat Nov 1 21:25:45 2014
New Revision: 1636062
URL: http://svn.apache.org/r1636062
Log:
[UIMA-4080] NPE when limiting to project and importing descriptor from
dependency
Modified:
uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/jcasgen/Jg.java
Modified:
uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/jcasgen/Jg.java
URL:
http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/jcasgen/Jg.java?rev=1636062&r1=1636061&r2=1636062&view=diff
==============================================================================
---
uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/jcasgen/Jg.java
(original)
+++
uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/jcasgen/Jg.java
Sat Nov 1 21:25:45 2014
@@ -717,9 +717,16 @@ public class Jg {
try {
typeDefinitionUri = new URI (td.getSourceUrlString());
} catch (URISyntaxException e) {
- return true; // may be overkill - but if td's source cant be parsed, ...
likely out of project
+ return true; // may be overkill - but if td's source can't be parsed ...
likely out of project
}
String tdPath = typeDefinitionUri.getPath();
+
+ // Issue UIMA-4080 - If a type system resides in a JAR, then the path is
null and it is
+ // certainly out of scope.
+ if (tdPath == null) {
+ return true;
+ }
+
boolean r = !tdPath.startsWith(projectDirPath);
if (r) {
return true;