[testng] 161/355: Use Java7
Eugene Zhukov
eugene-guest at moszumanska.debian.org
Tue Aug 18 10:20:00 UTC 2015
This is an automated email from the git hooks/post-receive script.
eugene-guest pushed a commit to annotated tag OpenBSD
in repository testng.
commit ca99e895330b6d053a244d57ce80a7cdcf7934b1
Author: Julien Herr <julien.herr at alcatel-lucent.com>
Date: Thu Mar 12 09:46:48 2015 +0100
Use Java7
---
build-tests.xml | 2 +-
build.xml | 10 +++++-----
pom.xml | 2 +-
src/main/java/org/testng/internal/ClassHelper.java | 6 +-----
4 files changed, 8 insertions(+), 12 deletions(-)
diff --git a/build-tests.xml b/build-tests.xml
index d0ccfd7..4f51c47 100644
--- a/build-tests.xml
+++ b/build-tests.xml
@@ -34,7 +34,7 @@ TESTNG.REPORT.DIR=${testng.report.dir}
<property name="build.compiler" value="modern"/>
<javac debug="true"
- source="1.5"
+ source="1.7"
classpathref="compile.cp"
srcdir="${test.dir}"
destdir="${test.build.dir}"
diff --git a/build.xml b/build.xml
index 7f8059c..e97ec67 100644
--- a/build.xml
+++ b/build.xml
@@ -30,16 +30,16 @@
<!-- ====================================================================== -->
<target name="validate" description="Validates the build environment.">
- <!-- java greater than 1.5 required to build -->
+ <!-- java greater than 1.6 required to build -->
<condition property="requiredJavaVersion">
<or>
+ <equals arg1="${ant.java.version}" arg2="1.9" />
<equals arg1="${ant.java.version}" arg2="1.8" />
<equals arg1="${ant.java.version}" arg2="1.7" />
- <equals arg1="${ant.java.version}" arg2="1.6" />
</or>
</condition>
<fail unless="requiredJavaVersion"
- message="Java version 1.5 required." />
+ message="Java version 1.7 required." />
<!-- validate ant version too ... -->
</target>
@@ -100,7 +100,7 @@
<echo>Src:${src.dir}</echo>
<javac classpathref="compile2.cp"
verbose="false"
- target="1.5"
+ target="1.7"
debug="true"
optimize="${optimize}"
destdir="${build.dir}">
@@ -168,7 +168,7 @@
</target>
<target name="javadocs-current">
- <javadoc additionalparam="-quiet" destdir="javadocs" source="1.5" windowtitle="TestNG"
+ <javadoc additionalparam="-quiet" destdir="javadocs" source="1.7" windowtitle="TestNG"
classpath="${testng.jar}" classpathref="compile2.cp" verbose="false">
<fileset dir="${src.dir}" defaultexcludes="yes">
<include name="org/testng/*.java" />
diff --git a/pom.xml b/pom.xml
index 688d726..c118ee1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -158,7 +158,7 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
- <source>1.5</source>
+ <source>1.7</source>
</configuration>
</plugin>
diff --git a/src/main/java/org/testng/internal/ClassHelper.java b/src/main/java/org/testng/internal/ClassHelper.java
index f83a195..80489fb 100644
--- a/src/main/java/org/testng/internal/ClassHelper.java
+++ b/src/main/java/org/testng/internal/ClassHelper.java
@@ -70,11 +70,7 @@ public final class ClassHelper {
public static <T> T newInstance(Constructor<T> constructor, Object... parameters) {
try {
return constructor.newInstance(parameters);
- } catch (InstantiationException e) {
- throw new TestNGException("Cannot instantiate class " + constructor.getDeclaringClass().getName(), e);
- } catch (IllegalAccessException e) {
- throw new TestNGException("Cannot instantiate class " + constructor.getDeclaringClass().getName(), e);
- } catch (InvocationTargetException e) {
+ } catch (InstantiationException | IllegalAccessException | InvocationTargetException e) {
throw new TestNGException("Cannot instantiate class " + constructor.getDeclaringClass().getName(), e);
}
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/testng.git
More information about the pkg-java-commits
mailing list