commit 8639d12f7f294ac0185031484575e988949536ee Author: Michal Srb msrb@redhat.com Date: Mon Feb 2 18:40:59 2015 +0100
Update to upstream release 1.234
.gitignore | 1 + 0001-Use-unbundled-class-from-glassfish-jaxb.patch | 75 ++++++++++++++------ sources | 2 +- stapler.spec | 5 +- 4 files changed, 60 insertions(+), 23 deletions(-) --- diff --git a/.gitignore b/.gitignore index 439f23b..6946891 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ /stapler-1.230-clean.tar.gz /stapler-1.231-clean.tar.gz /stapler-1.233-clean.tar.gz +/stapler-1.234-clean.tar.gz diff --git a/0001-Use-unbundled-class-from-glassfish-jaxb.patch b/0001-Use-unbundled-class-from-glassfish-jaxb.patch index 4a3a91c..21ea849 100644 --- a/0001-Use-unbundled-class-from-glassfish-jaxb.patch +++ b/0001-Use-unbundled-class-from-glassfish-jaxb.patch @@ -1,46 +1,79 @@ -From 009a2f6eb8982e294eca44a61add7892ff41a718 Mon Sep 17 00:00:00 2001 -From: Michal Srb msrb@redhat.com -Date: Wed, 22 May 2013 14:52:58 +0200 -Subject: [PATCH] Use unbundled class from glassfish-jaxb - ---- - .../main/java/org/kohsuke/stapler/export/SchemaGenerator.java | 9 +++++++-- - 1 file changed, 7 insertions(+), 2 deletions(-) - diff --git a/core/src/main/java/org/kohsuke/stapler/export/SchemaGenerator.java b/core/src/main/java/org/kohsuke/stapler/export/SchemaGenerator.java -index 6ca4d9b..75a228e 100644 +index 6ca4d9b..3a28c0f 100644 --- a/core/src/main/java/org/kohsuke/stapler/export/SchemaGenerator.java +++ b/core/src/main/java/org/kohsuke/stapler/export/SchemaGenerator.java -@@ -23,6 +23,8 @@ +@@ -23,9 +23,12 @@
package org.kohsuke.stapler.export;
-+import com.sun.xml.bind.v2.model.nav.ReflectionNavigator; -+ ++import com.sun.xml.bind.v2.model.nav.Navigator; import com.sun.xml.txw2.TXW; import com.sun.xml.txw2.output.ResultFactory; ++ import java.beans.Introspector; -@@ -47,6 +49,9 @@ import java.util.Stack; ++ + import org.kohsuke.stapler.export.XSD.ComplexType; + import org.kohsuke.stapler.export.XSD.ContentModel; + import org.kohsuke.stapler.export.XSD.Element; +@@ -34,6 +37,13 @@ import org.kohsuke.stapler.export.XSD.Annotated; + + import javax.xml.namespace.QName; + import javax.xml.transform.Result; ++ ++import java.lang.reflect.Field; ++import java.lang.reflect.InvocationTargetException; ++import java.lang.reflect.Method; ++import java.lang.reflect.Type; ++import java.security.AccessController; ++import java.security.PrivilegedAction; + import java.util.Calendar; + import java.util.Collection; + import java.util.HashSet; +@@ -47,6 +57,36 @@ import java.util.Stack; * @author Kohsuke Kawaguchi */ public class SchemaGenerator { + -+ private static final ReflectionNavigator reflectionNavigator = ReflectionNavigator.REFLECTION; ++ static final Navigator<Type, Class, Field, Method> REFLECTION_NAVIGATOR; ++ ++ static { ++ try { ++ Class refNav = Class.forName("com.sun.xml.bind.v2.model.nav.ReflectionNavigator"); ++ final Method getInstance = refNav.getDeclaredMethod("getInstance"); ++ ++ AccessController.doPrivileged(new PrivilegedAction<Object>() { ++ @Override ++ public Object run() { ++ getInstance.setAccessible(true); ++ return null; ++ } ++ }); ++ ++ REFLECTION_NAVIGATOR = (Navigator<Type, Class, Field, Method>) getInstance.invoke(null); ++ } catch (ClassNotFoundException e) { ++ throw new IllegalStateException(e); ++ } catch (InvocationTargetException e) { ++ throw new IllegalStateException(e); ++ } catch (NoSuchMethodException e) { ++ throw new IllegalStateException(e); ++ } catch (IllegalAccessException e) { ++ throw new IllegalStateException(e); ++ } catch (SecurityException e) { ++ throw new RuntimeException(e); ++ } ++ } + private final Stack<Model> queue = new Stack<Model>(); private final Set<Model> written = new HashSet<Model>(); /** -@@ -114,8 +119,8 @@ public class SchemaGenerator { +@@ -114,8 +154,8 @@ public class SchemaGenerator { } else if(Collection.class.isAssignableFrom(t)) { isCollection = true; - itemType = TypeUtil.erasure( - TypeUtil.getTypeArgument(TypeUtil.getBaseClass(p.getGenericType(),Collection.class),0)); -+ itemType = reflectionNavigator.erasure( -+ reflectionNavigator.getTypeArgument(reflectionNavigator.getBaseClass(p.getGenericType(),Collection.class),0)); ++ itemType = (Class) REFLECTION_NAVIGATOR.erasure(REFLECTION_NAVIGATOR.getTypeArgument( ++ REFLECTION_NAVIGATOR.getBaseClass(p.getGenericType(), Collection.class), 0)); } else { isCollection = false; itemType = t; --- -1.8.1.4 - diff --git a/sources b/sources index 0433903..06d86b7 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ 3b83ef96387f14655fc854ddc3c6bd57 LICENSE-2.0.txt -e21eedc4b51f6a9b4552f23b90a5b3ff stapler-1.233-clean.tar.gz +8ced617422785da386c623fe81c92622 stapler-1.234-clean.tar.gz diff --git a/stapler.spec b/stapler.spec index 6445f62..def00f4 100644 --- a/stapler.spec +++ b/stapler.spec @@ -1,5 +1,5 @@ Name: stapler -Version: 1.233 +Version: 1.234 Release: 1%{?dist} Summary: Stapler Java web framework
@@ -172,6 +172,9 @@ sed -i 's/org.kohsuke.asm5/org.objectweb.asm/' core/src/main/java/org/kohsuke/st
%changelog +* Mon Feb 02 2015 Michal Srb msrb@redhat.com - 1.234-1 +- Update to upstream release 1.234 + * Mon Nov 10 2014 Michal Srb msrb@redhat.com - 1.233-1 - Update to upstream version 1.233
java-sig-commits@lists.fedoraproject.org