Port to current QDox
This commit is contained in:
parent
0f41659808
commit
7e17d04e89
@ -1,3 +1,13 @@
|
||||
From 6d7da5456a7458a249bed9c4c1e768cc7cc2fe40 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Simacek <msimacek@redhat.com>
|
||||
Date: Wed, 1 Feb 2017 12:57:14 +0100
|
||||
Subject: [PATCH] Port to qdox 2.0
|
||||
|
||||
---
|
||||
.../src/main/java/org/hamcrest/generator/QDox.java | 4 ++--
|
||||
.../org/hamcrest/generator/QDoxFactoryReader.java | 26 ++++++++++++----------
|
||||
2 files changed, 16 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/hamcrest-generator/src/main/java/org/hamcrest/generator/QDox.java b/hamcrest-generator/src/main/java/org/hamcrest/generator/QDox.java
|
||||
index efaf615..338178d 100644
|
||||
--- a/hamcrest-generator/src/main/java/org/hamcrest/generator/QDox.java
|
||||
@ -20,7 +30,7 @@ index efaf615..338178d 100644
|
||||
public void addSourceTree(File sourceDir) {
|
||||
javaDocBuilder.addSourceTree(sourceDir);
|
||||
diff --git a/hamcrest-generator/src/main/java/org/hamcrest/generator/QDoxFactoryReader.java b/hamcrest-generator/src/main/java/org/hamcrest/generator/QDoxFactoryReader.java
|
||||
index 5108140..ec02f54 100644
|
||||
index 5108140..97fce01 100644
|
||||
--- a/hamcrest-generator/src/main/java/org/hamcrest/generator/QDoxFactoryReader.java
|
||||
+++ b/hamcrest-generator/src/main/java/org/hamcrest/generator/QDoxFactoryReader.java
|
||||
@@ -4,8 +4,10 @@ import com.thoughtworks.qdox.model.DocletTag;
|
||||
@ -29,7 +39,7 @@ index 5108140..ec02f54 100644
|
||||
import com.thoughtworks.qdox.model.JavaParameter;
|
||||
-import com.thoughtworks.qdox.model.Type;
|
||||
+import com.thoughtworks.qdox.model.JavaType;
|
||||
+import com.thoughtworks.qdox.model.impl.DefaultJavaType;
|
||||
+import com.thoughtworks.qdox.model.impl.DefaultJavaClass;
|
||||
|
||||
+import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
@ -70,7 +80,7 @@ index 5108140..ec02f54 100644
|
||||
type = GENERIC_REGEX.matcher(type).replaceAll("");
|
||||
type = VARARGS_REGEX.matcher(type).replaceAll("");
|
||||
- types[i] = new Type(type);
|
||||
+ types.add(new DefaultJavaType(type));
|
||||
+ types.add(new DefaultJavaClass(type));
|
||||
}
|
||||
- JavaMethod[] methods = classSource.getMethodsBySignature(factoryMethod.getName(), types, false, varArgs);
|
||||
- return methods.length == 1 ? methods[0] : null;
|
||||
@ -90,3 +100,6 @@ index 5108140..ec02f54 100644
|
||||
return null;
|
||||
}
|
||||
StringBuilder result = new StringBuilder();
|
||||
--
|
||||
2.9.3
|
||||
|
||||
|
@ -42,7 +42,7 @@
|
||||
|
||||
Name: hamcrest
|
||||
Version: 1.3
|
||||
Release: 16%{?dist}
|
||||
Release: 17%{?dist}
|
||||
Epoch: 0
|
||||
Summary: Library of matchers for building test expressions
|
||||
License: BSD
|
||||
@ -154,7 +154,7 @@ ln -sf $(build-classpath testng-jdk15) lib/integration/
|
||||
%patch4 -p1
|
||||
%patch5 -p1
|
||||
|
||||
sed -i 's/
//' LICENSE.txt
|
||||
sed -i 's/\r//' LICENSE.txt
|
||||
|
||||
%build
|
||||
export CLASSPATH=$(build-classpath qdox)
|
||||
@ -252,6 +252,9 @@ cp -pr %{name}-examples $RPM_BUILD_ROOT%{_datadir}/%{name}/
|
||||
%{_datadir}/%{name}
|
||||
|
||||
%changelog
|
||||
* Wed Feb 01 2017 Michael Simacek <msimacek@redhat.com> - 0:1.3-17
|
||||
- Port to current QDox
|
||||
|
||||
* Mon Jan 02 2017 Michael Simacek <msimacek@redhat.com> - 0:1.3-16
|
||||
- Try to fix nondeterministic failures by forking javac
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user