openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p..@apache.org
Subject svn commit: r575752 - /openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java
Date Fri, 14 Sep 2007 16:33:13 GMT
Author: pcl
Date: Fri Sep 14 09:33:09 2007
New Revision: 575752

URL: http://svn.apache.org/viewvc?rev=575752&view=rev
Log:
NPE check. Checking in on behalf of Abe.

Modified:
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java

Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java?rev=575752&r1=575751&r2=575752&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java
(original)
+++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java
Fri Sep 14 09:33:09 2007
@@ -3666,7 +3666,7 @@
      */
     private String toBackingFieldName(String name) {
         if (_meta.getAccessType() == ClassMetaData.ACCESS_PROPERTY
-            && _attrsToFields.containsKey(name))
+            && _attrsToFields != null && _attrsToFields.containsKey(name))
             name = (String) _attrsToFields.get(name);
         return name;
     }
@@ -3679,7 +3679,7 @@
         // meta is null when doing persistence-aware enhancement
         if (_meta != null
             && _meta.getAccessType() == ClassMetaData.ACCESS_PROPERTY
-            && _fieldsToAttrs.containsKey(name))
+            && _fieldsToAttrs != null && _fieldsToAttrs.containsKey(name))
             return (String) _fieldsToAttrs.get(name);
         else
             return name;



Mime
View raw message