cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject cxf-xjc-utils git commit: Fix NPE
Date Fri, 04 Aug 2017 17:50:00 GMT
Repository: cxf-xjc-utils
Updated Branches:
  refs/heads/master b836aa823 -> 1336710aa


Fix NPE


Project: http://git-wip-us.apache.org/repos/asf/cxf-xjc-utils/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf-xjc-utils/commit/1336710a
Tree: http://git-wip-us.apache.org/repos/asf/cxf-xjc-utils/tree/1336710a
Diff: http://git-wip-us.apache.org/repos/asf/cxf-xjc-utils/diff/1336710a

Branch: refs/heads/master
Commit: 1336710aa119c8df43bcd600ce96b8d6018010d6
Parents: b836aa8
Author: Daniel Kulp <dkulp@apache.org>
Authored: Fri Aug 4 13:48:59 2017 -0400
Committer: Daniel Kulp <dkulp@apache.org>
Committed: Fri Aug 4 13:48:59 2017 -0400

----------------------------------------------------------------------
 dv/src/main/java/org/apache/cxf/xjc/dv/DefaultValuePlugin.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf-xjc-utils/blob/1336710a/dv/src/main/java/org/apache/cxf/xjc/dv/DefaultValuePlugin.java
----------------------------------------------------------------------
diff --git a/dv/src/main/java/org/apache/cxf/xjc/dv/DefaultValuePlugin.java b/dv/src/main/java/org/apache/cxf/xjc/dv/DefaultValuePlugin.java
index 63d8ca4..86680ef 100644
--- a/dv/src/main/java/org/apache/cxf/xjc/dv/DefaultValuePlugin.java
+++ b/dv/src/main/java/org/apache/cxf/xjc/dv/DefaultValuePlugin.java
@@ -450,9 +450,9 @@ public class DefaultValuePlugin {
         JFieldRef fr = JExpr.ref(fieldName);
         method.body().assign(fr, var);
         
-        method = dc.getMethod("unset" + fo.getPropertyInfo().getName(true), new JType[0]);
-        if (method != null) {
-            dc.methods().remove(method);
+        JMethod oldMethod = dc.getMethod("unset" + fo.getPropertyInfo().getName(true), new
JType[0]);
+        if (oldMethod != null) {
+            dc.methods().remove(oldMethod);
         }
         method = dc.method(mods, method.type(), "unset" + fo.getPropertyInfo().getName(true));
         method.body().assign(fr, JExpr._null());


Mime
View raw message