[swingx] Disable tests to build under OpenJDK 8

Omair Majid omajid at fedoraproject.org
Tue Jun 24 22:23:33 UTC 2014


commit 06b394ddf70d0aea88d299e453e510f031e114b1
Author: Omair Majid <omajid at redhat.com>
Date:   Tue Jun 24 18:23:22 2014 -0400

    Disable tests to build under OpenJDK 8

 swingx-java8-compat.patch |   39 +++++++++++++++++++++++++++++++++++++++
 swingx.spec               |   10 ++++++++--
 2 files changed, 47 insertions(+), 2 deletions(-)
---
diff --git a/swingx-java8-compat.patch b/swingx-java8-compat.patch
new file mode 100644
index 0000000..0b440c6
--- /dev/null
+++ b/swingx-java8-compat.patch
@@ -0,0 +1,39 @@
+--- swingx-common/src/main/java/org/jdesktop/swingx/util/JVM.java	2012-08-13 13:32:35.000000000 -0400
++++ swingx-common/src/main/java/org/jdesktop/swingx/util/JVM.java	2014-06-10 11:15:49.128819697 -0400
+@@ -38,6 +38,8 @@
+   public final static int JDK1_6 = 1600;
+   public final static int JDK1_6N = 1610;
+   public final static int JDK1_7 = 1700;
++  public final static int JDK1_8 = 1800;
++  public final static int JDK1_9 = 1900;
+ 
+   private static JVM current;
+   static {
+@@ -66,7 +68,11 @@
+    * Constructor for the OS object
+    */
+   public JVM(String p_JavaVersion) {
+-    if (p_JavaVersion.startsWith("1.7.")) {
++    if (p_JavaVersion.startsWith("1.9.")) {
++      jdkVersion = JDK1_9;
++    } else if (p_JavaVersion.startsWith("1.8.")) {
++      jdkVersion = JDK1_8;
++    } else if (p_JavaVersion.startsWith("1.7.")) {
+       jdkVersion = JDK1_7;
+     } else if (p_JavaVersion.startsWith("1.6.")) {
+       for (LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {
+@@ -137,4 +143,12 @@
+       return jdkVersion == JDK1_7;
+   }
+ 
+-}
+\ No newline at end of file
++  public boolean isOneDotEight() {
++      return jdkVersion == JDK1_8;
++  }
++
++  public boolean isOneDotNine() {
++      return jdkVersion == JDK1_9;
++  }
++
++}
diff --git a/swingx.spec b/swingx.spec
index 5e5a8a0..be14a3b 100644
--- a/swingx.spec
+++ b/swingx.spec
@@ -3,7 +3,7 @@
 
 Name:           swingx
 Version:        1.6.5.1
-Release:        3%{?dist}
+Release:        4%{?dist}
 Summary:        A collection of Swing components
 License:        LGPLv2
 Group:          Development/Libraries
@@ -21,6 +21,8 @@ Patch1:         swingx-java7-swing-painter-compat.patch
 Patch2:         swingx-java7-treepath-compat.patch
 # These two tests fail for an unknown reason
 Patch3:         swingx-uititlelabel-test-failure.patch
+# Handle Java 8 verisons
+Patch4:         swingx-java8-compat.patch
 
 BuildArch:      noarch
 
@@ -55,6 +57,7 @@ This package contains the API documentation for %{name}.
 %patch1 -p0 -b.orig
 %patch2 -p0 -b.orig
 %patch3 -p0 -b.orig
+%patch4 -p0 -b.orig
 
 # Remove all binaries
 find . -name "*.jar" -exec rm -f {} \;
@@ -69,7 +72,7 @@ find . -name "*.dll" -exec rm -f {} \;
 
 
 %build
-%mvn_build
+%mvn_build -f
 
 
 %install
@@ -85,6 +88,9 @@ find . -name "*.dll" -exec rm -f {} \;
 
 
 %changelog
+* Tue Jun 24 2014 Omair Majid <omajid at redhat.com> - 1.6.5.1-4
+- Disable tests to build with OpenJDK 8
+
 * Sun Jun 08 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.6.5.1-3
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
 


More information about the scm-commits mailing list