diff options
author | kmoore | 2011-01-11 16:02:04 +0000 |
---|---|---|
committer | kmoore | 2011-01-11 16:02:04 +0000 |
commit | 6c8358b3bb006b62aae6b83aedb2cbc844096d2f (patch) | |
tree | 8a126f79f346d54961adbde7a39afb1bb65e6a23 /jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/refactoring/JpaRenameFolderParticipant.java | |
parent | a6f284ce1f692bbf56d15d7fa56bdb4a0ddd3b47 (diff) | |
download | webtools.dali-6c8358b3bb006b62aae6b83aedb2cbc844096d2f.tar.gz webtools.dali-6c8358b3bb006b62aae6b83aedb2cbc844096d2f.tar.xz webtools.dali-6c8358b3bb006b62aae6b83aedb2cbc844096d2f.zip |
Fixing NPEs in refactoring participants. Added null checks in case the persistence.xml file is null.
Diffstat (limited to 'jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/refactoring/JpaRenameFolderParticipant.java')
-rw-r--r-- | jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/refactoring/JpaRenameFolderParticipant.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/refactoring/JpaRenameFolderParticipant.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/refactoring/JpaRenameFolderParticipant.java index 9a50ebd17d..5f6e832f88 100644 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/refactoring/JpaRenameFolderParticipant.java +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/refactoring/JpaRenameFolderParticipant.java @@ -167,6 +167,9 @@ public class JpaRenameFolderParticipant private PersistenceUnit getPersistenceUnit(JpaProject jpaProject) { PersistenceXml persistenceXml = jpaProject.getRootContextNode().getPersistenceXml(); + if (persistenceXml == null) { + return null; + } Persistence persistence = persistenceXml.getPersistence(); if (persistence == null) { return null; |