Port to current QDox
This commit is contained in:
parent
3b718cb885
commit
7780cbd066
@ -1,4 +1,4 @@
|
||||
From 405a771f5fbbc7f88b9115e769c3dae084dec586 Mon Sep 17 00:00:00 2001
|
||||
From 5b1a0fe4400bffddd1ab31af91beaef7bb560f6c Mon Sep 17 00:00:00 2001
|
||||
From: Michael Simacek <msimacek@redhat.com>
|
||||
Date: Thu, 12 May 2016 11:40:13 +0200
|
||||
Subject: [PATCH 1/3] Unshade ASM
|
||||
@ -31,5 +31,5 @@ index dea2f2a..303dfc3 100644
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
--
|
||||
2.5.5
|
||||
2.9.3
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From c6917e3b00cc856b0c8fc77a802f2dde88df2e89 Mon Sep 17 00:00:00 2001
|
||||
From 9e1bb9bfee86490163fb1e226556620aa8cdf7bc Mon Sep 17 00:00:00 2001
|
||||
From: Mikolaj Izdebski <mizdebsk@redhat.com>
|
||||
Date: Fri, 21 Nov 2014 10:05:05 +0100
|
||||
Subject: [PATCH 2/3] Port to Eclipse Luna OSGi
|
||||
@ -58,5 +58,5 @@ index 58a392b..cc8d081 100644
|
||||
|
||||
}
|
||||
--
|
||||
2.5.5
|
||||
2.9.3
|
||||
|
||||
|
@ -1,24 +1,25 @@
|
||||
From 9dd6a5b50adb726892b188c2999fd19483fab2b6 Mon Sep 17 00:00:00 2001
|
||||
From 928bd5a98dc500a31197a56c8f6c5e19a3a273f8 Mon Sep 17 00:00:00 2001
|
||||
From: Mikolaj Izdebski <mizdebsk@redhat.com>
|
||||
Date: Fri, 21 Nov 2014 10:51:38 +0100
|
||||
Subject: [PATCH 3/3] Port to QDox 2.0
|
||||
|
||||
---
|
||||
pom.xml | 2 +-
|
||||
.../blueprint/generator/QdoxMappingLoader.java | 144 ++++++++++++---------
|
||||
.../xbean/spring/generator/QdoxMappingLoader.java | 144 ++++++++++++---------
|
||||
3 files changed, 163 insertions(+), 127 deletions(-)
|
||||
.../blueprint/generator/QdoxMappingLoader.java | 144 +++++++++++---------
|
||||
.../xbean/spring/generator/QdoxMappingLoader.java | 148 ++++++++++++---------
|
||||
.../org/apache/xbean/spring/generator/Type.java | 7 +-
|
||||
4 files changed, 166 insertions(+), 135 deletions(-)
|
||||
|
||||
diff --git a/pom.xml b/pom.xml
|
||||
index 75e146b..86ec665 100644
|
||||
index 6e53649..9132fe4 100644
|
||||
--- a/pom.xml
|
||||
+++ b/pom.xml
|
||||
@@ -274,7 +274,7 @@
|
||||
@@ -297,7 +297,7 @@
|
||||
<dependency>
|
||||
<groupId>com.thoughtworks.qdox</groupId>
|
||||
<artifactId>qdox</artifactId>
|
||||
- <version>1.6.3</version>
|
||||
+ <version>2.0-M2</version>
|
||||
+ <version>2.0-M5</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@ -337,7 +338,7 @@ index 6635937..e17fd08 100644
|
||||
for (Enumeration entries = jarFile.entries(); entries.hasMoreElements(); ) {
|
||||
JarEntry entry = (JarEntry) entries.nextElement();
|
||||
diff --git a/xbean-spring/src/main/java/org/apache/xbean/spring/generator/QdoxMappingLoader.java b/xbean-spring/src/main/java/org/apache/xbean/spring/generator/QdoxMappingLoader.java
|
||||
index 94bd7a1..ae55819 100644
|
||||
index 94bd7a1..228117e 100644
|
||||
--- a/xbean-spring/src/main/java/org/apache/xbean/spring/generator/QdoxMappingLoader.java
|
||||
+++ b/xbean-spring/src/main/java/org/apache/xbean/spring/generator/QdoxMappingLoader.java
|
||||
@@ -20,6 +20,7 @@ import java.io.File;
|
||||
@ -449,7 +450,7 @@ index 94bd7a1..ae55819 100644
|
||||
if (initMethod == null && method.getTagByName(INIT_METHOD_ANNOTATION) != null) {
|
||||
initMethod = method.getName();
|
||||
}
|
||||
@@ -237,22 +241,43 @@ public class QdoxMappingLoader implements MappingLoader {
|
||||
@@ -237,27 +241,48 @@ public class QdoxMappingLoader implements MappingLoader {
|
||||
}
|
||||
|
||||
List<List<ParameterMapping>> constructorArgs = new ArrayList<List<ParameterMapping>>();
|
||||
@ -507,6 +508,21 @@ index 94bd7a1..ae55819 100644
|
||||
}
|
||||
}
|
||||
|
||||
HashSet<String> interfaces = new HashSet<String>();
|
||||
- interfaces.addAll(getFullyQualifiedNames(javaClass.getImplementedInterfaces()));
|
||||
+ interfaces.addAll(getFullyQualifiedNames(javaClass.getInterfaces()));
|
||||
|
||||
JavaClass actualClass = javaClass;
|
||||
if (factoryClass != null) {
|
||||
@@ -282,7 +307,7 @@ public class QdoxMappingLoader implements MappingLoader {
|
||||
}
|
||||
p = s;
|
||||
superClasses.add(p.getFullyQualifiedName());
|
||||
- interfaces.addAll(getFullyQualifiedNames(p.getImplementedInterfaces()));
|
||||
+ interfaces.addAll(getFullyQualifiedNames(p.getInterfaces()));
|
||||
}
|
||||
|
||||
return new ElementMapping(namespace,
|
||||
@@ -303,7 +328,7 @@ public class QdoxMappingLoader implements MappingLoader {
|
||||
interfaces);
|
||||
}
|
||||
@ -527,7 +543,7 @@ index 94bd7a1..ae55819 100644
|
||||
|
||||
// first attempt to load the attribute from the java beans accessor methods
|
||||
- JavaClass javaClass = parameter.getParentMethod().getParentClass();
|
||||
+ JavaClass javaClass = parameter.getParentClass();
|
||||
+ JavaClass javaClass = parameter.getDeclaringClass();
|
||||
BeanProperty beanProperty = javaClass.getBeanProperty(parameterName);
|
||||
if (beanProperty != null) {
|
||||
AttributeMapping attributeMapping = loadAttribute(beanProperty, parameterDescription);
|
||||
@ -535,7 +551,7 @@ index 94bd7a1..ae55819 100644
|
||||
if (attributeMapping == null) {
|
||||
throw new InvalidModelException("Hidden property usage: " +
|
||||
- "The construction method " + toMethodLocator(parameter.getParentMethod()) +
|
||||
+ "The construction method " + toMethodLocator(parameter.getParentClass(), methodOrConstructor) +
|
||||
+ "The construction method " + toMethodLocator(parameter.getDeclaringClass(), methodOrConstructor) +
|
||||
" can not use a hidded property " + parameterName);
|
||||
}
|
||||
return attributeMapping;
|
||||
@ -650,6 +666,24 @@ index 94bd7a1..ae55819 100644
|
||||
JarFile jarFile = new JarFile(base);
|
||||
for (Enumeration entries = jarFile.entries(); entries.hasMoreElements(); ) {
|
||||
JarEntry entry = (JarEntry) entries.nextElement();
|
||||
diff --git a/xbean-spring/src/main/java/org/apache/xbean/spring/generator/Type.java b/xbean-spring/src/main/java/org/apache/xbean/spring/generator/Type.java
|
||||
index 5eac64c..0d9fa63 100644
|
||||
--- a/xbean-spring/src/main/java/org/apache/xbean/spring/generator/Type.java
|
||||
+++ b/xbean-spring/src/main/java/org/apache/xbean/spring/generator/Type.java
|
||||
@@ -41,12 +41,7 @@ public class Type {
|
||||
public static Type newArrayType(String type, int dimensions) {
|
||||
if (type == null) throw new NullPointerException("type");
|
||||
if (dimensions < 1) throw new IllegalArgumentException("dimensions must be atleast one");
|
||||
- StringBuffer buf = new StringBuffer(type.length() + (dimensions * 2));
|
||||
- buf.append(type);
|
||||
- for (int i = 0; i < dimensions; i ++) {
|
||||
- buf.append("[]");
|
||||
- }
|
||||
- return new Type(buf.toString(), newSimpleType(type));
|
||||
+ return new Type(type, newSimpleType(type.replaceAll("\\[\\]", "")));
|
||||
}
|
||||
|
||||
public static Type newCollectionType(String collectionType, Type elementType) {
|
||||
--
|
||||
2.5.5
|
||||
2.9.3
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
Name: xbean
|
||||
Version: 4.5
|
||||
Release: 3%{?dist}
|
||||
Release: 4%{?dist}
|
||||
Summary: Java plugin based web server
|
||||
License: ASL 2.0
|
||||
URL: http://geronimo.apache.org/xbean/
|
||||
@ -195,6 +195,9 @@ sed -i "s|</Private-Package>|</Private-Package-->|" xbean-blueprint/pom.xml
|
||||
%doc LICENSE NOTICE
|
||||
|
||||
%changelog
|
||||
* Wed Feb 01 2017 Michael Simacek <msimacek@redhat.com> - 4.5-4
|
||||
- Port to current QDox
|
||||
|
||||
* Thu Jun 16 2016 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.5-3
|
||||
- Add missing build-requires
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user