[oe] [meta-java][PATCH] icedtea7-native: backport patch of jaxb to fix NullPointerException

kai.kang at windriver.com kai.kang at windriver.com
Mon Apr 11 06:39:46 UTC 2016


From: Kai Kang <kai.kang at windriver.com>

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.

Signed-off-by: Kai Kang <kai.kang at windriver.com>
---
 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

diff --git a/recipes-core/icedtea/icedtea7-native.inc b/recipes-core/icedtea/icedtea7-native.inc
index cb6b5d3..0ffe5d5 100644
--- a/recipes-core/icedtea/icedtea7-native.inc
+++ b/recipes-core/icedtea/icedtea7-native.inc
@@ -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 = ' \
diff --git a/recipes-core/icedtea/openjdk-7-03b147/jaxws_fix_NullPointerException.patch b/recipes-core/icedtea/openjdk-7-03b147/jaxws_fix_NullPointerException.patch
new file mode 100644
index 0000000..ba47036
--- /dev/null
+++ b/recipes-core/icedtea/openjdk-7-03b147/jaxws_fix_NullPointerException.patch
@@ -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 <kai.kang at windriver.com>
+---
+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()))) {
-- 
2.6.1




More information about the Openembedded-devel mailing list