Skip to contentSkip to conversation

icedtea7-native: backport patch of jaxb to fix NullPointerException

PATCH New [email protected] 1 participant 1 message Apr 11, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 icedtea7-native: backport patch of jaxb to fix NullPointerException

From: Kai Kang <[email protected]>

Backport patch of jaxb from

https://java.net/projects/jaxb/sources/v2/revision/1864898

to fix NullPointerException.

See https://java.net/jira/browse/JAXB-860 as well.

---
 recipes-core/icedtea/icedtea7-native.inc            |  3 +++
 .../jaxws_fix_NullPointerException.patch            | 21 +++++++++++++++++++++
 2 files changed, 24 insertions(+)
 create mode 100644 recipes-core/icedtea/openjdk-7-03b147/jaxws_fix_NullPointerException.patch
recipes-core/icedtea/icedtea7-native.inc +3 -0
index cb6b5d3..0ffe5d5 100644
@@ -33,6 +33,7 @@ SRC_URI = " \
   ${ICEDTEA_PATCHES} \
   ${OPENJDK_PATCHES} \
   file://allow-headless-build.patch;striplevel=0 \
+  file://jaxws_fix_NullPointerException.patch;apply=no \
   "
 
 S = "${WORKDIR}/${ICEDTEA}"
@@ -154,6 +155,8 @@ do_configure_append() {
 	done
 	${POST_CONFIGURE_CLEAN_X11}
 	oe_runmake patch-boot
+
+	patch -p1 < ${WORKDIR}/jaxws_fix_NullPointerException.patch
 }
 
 EXTRA_OEMAKE = ' \
recipes-core/icedtea/openjdk-7-03b147/jaxws_fix_NullPointerException.patch new file +21 -0
new file mode 100644
index 0000000..ba47036
@@ -0,0 +1,21 @@
+Upstream-Status: Backport [https://java.net/projects/jaxb/sources/v2/revision/1864898]
+
+Backport patch of jaxb to fix NullPointerException issue.
+
+Signed-off-by: Kai Kang <[email protected]>
+---
+diff --git a/openjdk/jaxws/sources/jaxws_src/src/com/sun/xml/internal/bind/v2/runtime/ClassBeanInfoImpl.java b/openjdk/jaxws/sources/jaxws_src/src/com/sun/xml/internal/bind/v2/runtime/ClassBeanInfoImpl.java
+index dc88d45..cc4f6e9 100644
+--- a/openjdk/jaxws/sources/jaxws_src/src/com/sun/xml/internal/bind/v2/runtime/ClassBeanInfoImpl.java
++++ b/openjdk/jaxws/sources/jaxws_src/src/com/sun/xml/internal/bind/v2/runtime/ClassBeanInfoImpl.java
+@@ -187,7 +187,9 @@ public final class ClassBeanInfoImpl<BeanT> extends JaxBeanInfo<BeanT> implement
+     private void checkOverrideProperties(Property p) {
+         ClassBeanInfoImpl bi = this;
+         while ((bi = bi.superClazz) != null) {
+-            for (Property superProperty : bi.properties) {
++            Property[] props = bi.properties;
++            if (props == null) break;
++            for (Property superProperty : props) {
+                 if (superProperty == null) break;
+                 String spName = superProperty.getFieldName();
+                 if ((spName != null) && (spName.equals(p.getFieldName()))) {
Signature · 1 line
2.6.1