Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Vosburgh2015-12-23 13:17:41 -0500
committerBrian Vosburgh2015-12-23 13:17:41 -0500
commit3ea0495ff9b5ed893092c410f727421b9e530622 (patch)
tree52057cce7419065a9e9711a46c14bdda38f8eb3d
parentc7a8134e9bc01bc61fb9bc4290342cab4b1346b1 (diff)
downloadwebtools.dali-3ea0495ff9b5ed893092c410f727421b9e530622.tar.gz
webtools.dali-3ea0495ff9b5ed893092c410f727421b9e530622.tar.xz
webtools.dali-3ea0495ff9b5ed893092c410f727421b9e530622.zip
add null check to AbstractJpaProject.getJavaResourcePackage(String)
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/AbstractJpaProject.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/AbstractJpaProject.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/AbstractJpaProject.java
index 0054a07ee2..477605292a 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/AbstractJpaProject.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/AbstractJpaProject.java
@@ -936,7 +936,9 @@ public abstract class AbstractJpaProject
public JavaResourcePackage getJavaResourcePackage(String packageName) {
for (JavaResourcePackage jrp : this.getJavaResourcePackages()) {
- if (jrp.getName().equals(packageName)) {
+ String name = jrp.getName();
+ // name can be null if package name is wrong(?)
+ if ((name != null) && name.equals(packageName)) {
return jrp;
}
}

Back to the top