/hg/icedtea6-hg: 3 new changesets

andrew at icedtea.classpath.org andrew at icedtea.classpath.org
Fri May 17 14:43:13 PDT 2013


changeset 2e5fa8029f94 in /hg/icedtea6-hg
details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=2e5fa8029f94
author: Andrew John Hughes <ahughes at redhat.com>
date: Fri May 17 22:41:38 2013 +0100

	Synchronise with upstream, removing patches available there.

	2013-05-17  Andrew John Hughes  <gnu.andrew at redhat.com>

		* patches/hotspot/original/7197906-handle_32_bit_shifts.patch,
		* patches/hotspot/original/fix_get_stack_bounds_leak.patch,
		* patches/openjdk/8004302-soap_test_failure.patch,
		* patches/openjdk/jaxp144_05.patch:
		Removed as available upstream.
		* Makefile.am: Remove patches.
		* patches/security/20130416/6657673.patch,
		* patches/security/20130416/8005432.patch:
		Regenerated against upstream.


changeset ce006f6558f1 in /hg/icedtea6-hg
details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=ce006f6558f1
author: Pavel Tisnovsky <ptisnovs at redhat.com>
date: Fri May 17 17:58:51 2013 +0200

	Renamed three patches to be more consistent with other JTreg-related patches.


changeset 8721058bbbbf in /hg/icedtea6-hg
details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=8721058bbbbf
author: Andrew John Hughes <ahughes at redhat.com>
date: Fri May 17 22:43:02 2013 +0100

	Merge


diffstat:

 ChangeLog                                                   |      29 +
 Makefile.am                                                 |      14 +-
 patches/componentOrientationTests.patch                     |     246 -
 patches/hotspot/original/7197906-handle_32_bit_shifts.patch |      33 -
 patches/hotspot/original/fix_get_stack_bounds_leak.patch    |      12 -
 patches/jtreg-ComponentOrientationTests.patch               |     246 +
 patches/jtreg-LayoutGetCharacterCount.patch                 |      54 +
 patches/jtreg-LayoutLimits.patch                            |      49 +
 patches/openjdk/8004302-soap_test_failure.patch             |      75 -
 patches/openjdk/jaxp144_05.patch                            |  595589 ----------
 patches/security/20130416/6657673.patch                     |     400 +-
 patches/security/20130416/8005432.patch                     |      48 +-
 patches/textLayoutGetCharacterCount.patch                   |      54 -
 patches/textLayoutLimits.patch                              |      49 -
 14 files changed, 606 insertions(+), 596292 deletions(-)

diffs (truncated from 597837 to 500 lines):

diff -r 095625ea8650 -r 8721058bbbbf ChangeLog
--- a/ChangeLog	Wed May 15 20:25:05 2013 +0100
+++ b/ChangeLog	Fri May 17 22:43:02 2013 +0100
@@ -1,3 +1,32 @@
+2013-05-17  Andrew John Hughes  <gnu.andrew at redhat.com>
+
+	* patches/hotspot/original/7197906-handle_32_bit_shifts.patch,
+	* patches/hotspot/original/fix_get_stack_bounds_leak.patch,
+	* patches/openjdk/8004302-soap_test_failure.patch,
+	* patches/openjdk/jaxp144_05.patch:
+	Removed as available upstream.
+	* Makefile.am: Remove patches.
+	* patches/security/20130416/6657673.patch,
+	* patches/security/20130416/8005432.patch:
+	Regenerated against upstream.
+
+2013-05-17  Pavel Tisnovsky  <ptisnovs at redhat.com>
+
+	* patches/componentOrientationTests.patch:
+	Renamed to...
+	* patches/jtreg-ComponentOrientationTests.patch:
+	this.
+	* patches/textLayoutGetCharacterCount.patch:
+	Renamed to...
+	* patches/jtreg-LayoutGetCharacterCount.patch:
+	this.
+	* patches/textLayoutLimits.patch:
+	Renamed to...
+	* patches/jtreg-LayoutLimits.patch:
+	this.
+	* Makefile.am:
+	Renamed three patches to be more consistent with other JTreg-related patches.
+
 2013-05-15  Andrew John Hughes  <gnu.andrew at redhat.com>
 
 	* Makefile.am:
diff -r 095625ea8650 -r 8721058bbbbf Makefile.am
--- a/Makefile.am	Wed May 15 20:25:05 2013 +0100
+++ b/Makefile.am	Fri May 17 22:43:02 2013 +0100
@@ -258,14 +258,12 @@
 ICEDTEA_FSG_PATCHES =
 
 DROP_PATCHES = \
-	patches/openjdk/jaf-b20_jaxws2-1_6_2011_06_13.patch \
-	patches/openjdk/jaxp144_05.patch
+	patches/openjdk/jaf-b20_jaxws2-1_6_2011_06_13.patch
 
 SECURITY_PATCHES = \
 	patches/security/20120830/7182135-impossible_to_use_some_editors_directly.patch \
 	patches/openjdk/7036559-concurrenthashmap_improvements.patch \
 	patches/security/20130416/8009063.patch \
-	patches/openjdk/8004302-soap_test_failure.patch \
 	patches/security/20130416/6657673.patch \
 	patches/security/20130416/6657673-fixup.patch \
 	patches/openjdk/7133220-factory_finder_parser_transform_useBSClassLoader.patch \
@@ -497,8 +495,6 @@
 	patches/openjdk/7162902-corba_fixes.patch \
 	patches/traceable.patch \
 	patches/pr1319-support_giflib_5.patch \
-	patches/openjdk/8007393.patch \
-	patches/openjdk/8007611.patch \
 	patches/copy_memory.patch \
 	patches/openjdk/6718364-inference_failure.patch \
 	patches/openjdk/6682380-foreach_crash.patch \
@@ -509,9 +505,9 @@
 	patches/jaxws-tempfiles-ioutils-6.patch \
 	patches/object-factory-cl-internal.patch \
 	patches/openjdk/8009530-icu_kern_table_support_broken.patch \
-	patches/textLayoutGetCharacterCount.patch \
-	patches/textLayoutLimits.patch \
-	patches/componentOrientationTests.patch \
+	patches/jtreg-LayoutGetCharacterCount.patch \
+	patches/jtreg-LayoutLimits.patch \
+	patches/jtreg-ComponentOrientationTests.patch \
 	patches/jtreg-TextLayoutBoundsChecks.patch
 
 if WITH_ALT_HSBUILD
@@ -560,8 +556,6 @@
 	patches/pr696-zero-fast_aldc-hs20.patch \
 	patches/arm-debug.patch \
 	patches/openjdk/7010849-modernise_sa.patch \
-	patches/hotspot/original/7197906-handle_32_bit_shifts.patch \
-	patches/hotspot/original/fix_get_stack_bounds_leak.patch \
 	patches/hotspot/original/jvmtiEnv.patch \
 	patches/hotspot/original/6840152-jvm_crashes_with_heavyweight_monitors.patch \
 	patches/hotspot/original/aarch64.patch \
diff -r 095625ea8650 -r 8721058bbbbf patches/componentOrientationTests.patch
--- a/patches/componentOrientationTests.patch	Wed May 15 20:25:05 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,246 +0,0 @@
-diff -uN ComponentOrientation/ComponentOrientationTest.java /jck/icedtea6/openjdk/jdk/test/java/awt/ComponentOrientation/ComponentOrientationTest.java
---- openjdk.old/jdk/test/java/awt/ComponentOrientation/ComponentOrientationTest.java	2013-04-29 15:24:56.000000000 +0200
-+++ openjdk/jdk/test/java/awt/ComponentOrientation/ComponentOrientationTest.java	2013-04-29 15:24:56.000000000 +0200
-@@ -0,0 +1,77 @@
-+/*
-+ * Copyright 2013 Red Hat, Inc. All Rights Reserved.
-+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-+ *
-+ * This code is free software; you can redistribute it and/or modify it
-+ * under the terms of the GNU General Public License version 2 only, as
-+ * published by the Free Software Foundation.
-+ *
-+ * This code is distributed in the hope that it will be useful, but WITHOUT
-+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-+ * version 2 for more details (a copy is included in the LICENSE file that
-+ * accompanied this code).
-+ *
-+ * You should have received a copy of the GNU General Public License version
-+ * 2 along with this work; if not, write to the Free Software Foundation,
-+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-+ */
-+
-+import java.awt.ComponentOrientation;
-+import java.awt.FlowLayout;
-+import java.awt.Rectangle;
-+
-+import javax.swing.JFrame;
-+import javax.swing.JLabel;
-+
-+/**
-+ * @test
-+ * @run main ComponentOrientationTest
-+ * @author Pavel Tisnovsky
-+ *
-+ * Basic test if component orientation subsystem works properly.
-+ */
-+public class ComponentOrientationTest {
-+
-+    public static void main(String[] args) {
-+        int[] aligns = {FlowLayout.LEFT, FlowLayout.CENTER, FlowLayout.RIGHT};
-+
-+        for (int align : aligns) {
-+            testComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT, align, true);
-+            testComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT, align, false);
-+        }
-+    }
-+
-+    private static void testComponentOrientation(ComponentOrientation componentOrientation, int align, boolean firstLabelBeforeSecondOne) {
-+        JFrame panel = new JFrame();
-+        JLabel label1 = new JLabel("JAVA");
-+        JLabel label2 = new JLabel("JAVA");
-+
-+        panel.setLayout(new FlowLayout(align));
-+        panel.applyComponentOrientation(componentOrientation);
-+
-+        panel.add(label1);
-+        panel.add(label2);
-+        panel.pack();
-+
-+        Rectangle rect1 = firstLabelBeforeSecondOne ? label1.getBounds() : label2.getBounds();
-+        Rectangle rect2 = firstLabelBeforeSecondOne ? label2.getBounds() : label1.getBounds();
-+
-+        // test the order of two components
-+        if (rect1.x >= rect2.x) {
-+            panel.dispose();
-+            throw new RuntimeException("Components are positioned in a wrong order!");
-+        }
-+        if (rect1.x + rect1.width >= rect2.x) {
-+            panel.dispose();
-+            throw new RuntimeException("Components are positioned on the same place!");
-+        }
-+
-+        // test vertical position of two components
-+        if (rect1.y != rect2.y) {
-+            panel.dispose();
-+            throw new RuntimeException("Components are not positioned  on the same vertical position!");
-+        }
-+        panel.dispose();
-+    }
-+}
-diff -uN ComponentOrientation/ComponentPlacementTest.java /jck/icedtea6/openjdk/jdk/test/java/awt/ComponentOrientation/ComponentPlacementTest.java
---- openjdk.old/jdk/test/java/awt/ComponentOrientation/ComponentPlacementTest.java	2013-04-29 15:24:56.000000000 +0200
-+++ openjdk/jdk/test/java/awt/ComponentOrientation/ComponentPlacementTest.java	2013-04-29 15:24:56.000000000 +0200
-@@ -0,0 +1,79 @@
-+/*
-+ * Copyright 2013 Red Hat, Inc. All Rights Reserved.
-+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-+ *
-+ * This code is free software; you can redistribute it and/or modify it
-+ * under the terms of the GNU General Public License version 2 only, as
-+ * published by the Free Software Foundation.
-+ *
-+ * This code is distributed in the hope that it will be useful, but WITHOUT
-+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-+ * version 2 for more details (a copy is included in the LICENSE file that
-+ * accompanied this code).
-+ *
-+ * You should have received a copy of the GNU General Public License version
-+ * 2 along with this work; if not, write to the Free Software Foundation,
-+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-+ */
-+
-+import java.awt.ComponentOrientation;
-+import java.awt.FlowLayout;
-+import java.awt.Rectangle;
-+
-+import javax.swing.JFrame;
-+import javax.swing.JLabel;
-+
-+/**
-+ * @test
-+ * @run main ComponentPlacementTest
-+ * @author Pavel Tisnovsky
-+ *
-+ * Basic test if component orientation and component placement subsystem works properly.
-+ */
-+public class ComponentPlacementTest
-+{
-+    public static void main(String[] args) {
-+        int[] aligns = {FlowLayout.LEFT, FlowLayout.CENTER, FlowLayout.RIGHT};
-+        for (int align : aligns) {
-+            testComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT, align, true);
-+            testComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT, align, false);
-+        }
-+    }
-+
-+    private static void testComponentOrientation(ComponentOrientation componentOrientation, int align, boolean firstLabelBeforeSecondOne) {
-+        JFrame panel = new JFrame();
-+        JLabel label1 = new JLabel("JAVA1");
-+        JLabel label2 = new JLabel("JAVA2");
-+
-+        panel.setLayout(new FlowLayout(align));
-+        panel.applyComponentOrientation(componentOrientation);
-+
-+        panel.add(label1);
-+        panel.add(label2);
-+        panel.pack();
-+
-+        Rectangle panelRect = panel.getBounds();
-+        Rectangle rect1 = firstLabelBeforeSecondOne ? label1.getBounds() : label2.getBounds();
-+        Rectangle rect2 = firstLabelBeforeSecondOne ? label2.getBounds() : label1.getBounds();
-+        rect1.x += panelRect.x;
-+        rect1.y += panelRect.y;
-+        rect2.x += panelRect.x;
-+        rect2.y += panelRect.y;
-+
-+        if (!panelRect.contains(rect1)) {
-+            panel.dispose();
-+            throw new RuntimeException("First component is not placed inside the frame!");
-+        }
-+        if (!panelRect.contains(rect2)) {
-+            panel.dispose();
-+            throw new RuntimeException("Second component is not placed inside the frame!");
-+        }
-+        if (!rect1.intersection(rect2).isEmpty()) {
-+            panel.dispose();
-+            throw new RuntimeException("Component intersection detected!");
-+        }
-+        panel.dispose();
-+    }
-+
-+}
-diff -uN ComponentOrientation/ComponentSizeTest.java /jck/icedtea6/openjdk/jdk/test/java/awt/ComponentOrientation/ComponentSizeTest.java
---- openjdk.old/jdk/test/java/awt/ComponentOrientation/ComponentSizeTest.java	2013-04-29 15:24:56.000000000 +0200
-+++ openjdk/jdk/test/java/awt/ComponentOrientation/ComponentSizeTest.java	2013-04-29 15:24:56.000000000 +0200
-@@ -0,0 +1,78 @@
-+/*
-+ * Copyright 2013 Red Hat, Inc. All Rights Reserved.
-+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-+ *
-+ * This code is free software; you can redistribute it and/or modify it
-+ * under the terms of the GNU General Public License version 2 only, as
-+ * published by the Free Software Foundation.
-+ *
-+ * This code is distributed in the hope that it will be useful, but WITHOUT
-+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-+ * version 2 for more details (a copy is included in the LICENSE file that
-+ * accompanied this code).
-+ *
-+ * You should have received a copy of the GNU General Public License version
-+ * 2 along with this work; if not, write to the Free Software Foundation,
-+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-+ */
-+
-+import java.awt.ComponentOrientation;
-+import java.awt.FlowLayout;
-+import java.awt.Rectangle;
-+
-+import javax.swing.JFrame;
-+import javax.swing.JLabel;
-+
-+/**
-+ * @test
-+ * @run main ComponentSizeTest
-+ * @author Pavel Tisnovsky
-+ *
-+ * Basic test if component orientation and component placement subsystem works properly.
-+ */
-+public class ComponentSizeTest
-+{
-+    public static void main(String[] args) {
-+        int[] aligns = {FlowLayout.LEFT, FlowLayout.CENTER, FlowLayout.RIGHT};
-+        for (int align : aligns) {
-+            testComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT, align, true);
-+            testComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT, align, false);
-+        }
-+    }
-+
-+    private static void testComponentOrientation(ComponentOrientation componentOrientation, int align, boolean firstLabelBeforeSecondOne) {
-+        JFrame panel = new JFrame();
-+        JLabel label1 = new JLabel("JAVA");
-+        JLabel label2 = new JLabel("JAVA");
-+
-+        panel.setLayout(new FlowLayout(align));
-+        panel.applyComponentOrientation(componentOrientation);
-+
-+        panel.add(label1);
-+        panel.add(label2);
-+        panel.pack();
-+
-+        Rectangle rect1 = firstLabelBeforeSecondOne ? label1.getBounds() : label2.getBounds();
-+        Rectangle rect2 = firstLabelBeforeSecondOne ? label2.getBounds() : label1.getBounds();
-+
-+        if (rect1.isEmpty()) {
-+            panel.dispose();
-+            throw new RuntimeException("First component has zero area!");
-+        }
-+        if (rect2.isEmpty()) {
-+            panel.dispose();
-+            throw new RuntimeException("Second component has zero area!");
-+        }
-+        if (rect1.width != rect2.width) {
-+            panel.dispose();
-+            throw new RuntimeException("Components should have the same width!");
-+        }
-+        if (rect1.height != rect2.height) {
-+            panel.dispose();
-+            throw new RuntimeException("Components should have the same height!");
-+        }
-+        panel.dispose();
-+    }
-+
-+}
diff -r 095625ea8650 -r 8721058bbbbf patches/hotspot/original/7197906-handle_32_bit_shifts.patch
--- a/patches/hotspot/original/7197906-handle_32_bit_shifts.patch	Wed May 15 20:25:05 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
---- openjdk/hotspot/src/share/vm/memory/blockOffsetTable.hpp	2012-09-13 21:22:37.897456500 +0200
-+++ openjdk/hotspot/src/share/vm/memory/blockOffsetTable.hpp	2012-09-13 21:22:34.345253300 +0200
-@@ -285,7 +285,7 @@
-   };
- 
-   static size_t power_to_cards_back(uint i) {
--    return (size_t)(1 << (LogBase * i));
-+    return (size_t)1 << (LogBase * i);
-   }
-   static size_t power_to_words_back(uint i) {
-     return power_to_cards_back(i) * N_words;
---- openjdk/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp	2012-09-13 21:22:37.901456800 +0200
-+++ openjdk/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp	2012-09-13 21:22:34.354253900 +0200
-@@ -110,7 +110,7 @@
- #ifndef PRODUCT
- bool CMBitMapRO::covers(ReservedSpace rs) const {
-   // assert(_bm.map() == _virtual_space.low(), "map inconsistency");
--  assert(((size_t)_bm.size() * (size_t)(1 << _shifter)) == _bmWordSize,
-+  assert(((size_t)_bm.size() * ((size_t)1 << _shifter)) == _bmWordSize,
-          "size inconsistency");
-   return _bmStartWord == (HeapWord*)(rs.base()) &&
-          _bmWordSize  == rs.size()>>LogHeapWordSize;
---- openjdk/hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp	2012-09-13 21:22:37.898456600 +0200
-+++ openjdk/hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp	2012-09-13 21:22:34.346253400 +0200
-@@ -273,7 +273,7 @@
-   if (_max_fine_entries == 0) {
-     assert(_mod_max_fine_entries_mask == 0, "Both or none.");
-     size_t max_entries_log = (size_t)log2_long((jlong)G1RSetRegionEntries);
--    _max_fine_entries = (size_t)(1 << max_entries_log);
-+    _max_fine_entries = (size_t)1 << max_entries_log;
-     _mod_max_fine_entries_mask = _max_fine_entries - 1;
- 
-     assert(_fine_eviction_sample_size == 0
diff -r 095625ea8650 -r 8721058bbbbf patches/hotspot/original/fix_get_stack_bounds_leak.patch
--- a/patches/hotspot/original/fix_get_stack_bounds_leak.patch	Wed May 15 20:25:05 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
-diff --git a/src/os/linux/vm/os_linux.cpp b/src/os/linux/vm/os_linux.cpp
---- openjdk/hotspot/src/os/linux/vm/os_linux.cpp
-+++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp
-@@ -2650,6 +2650,8 @@
-     ssize_t len = getline(&str, &dummy, f);
-     if (len == -1) {
-       fclose(f);
-+      if (str != NULL)
-+	free(str);
-       return false;
-     }
- 
diff -r 095625ea8650 -r 8721058bbbbf patches/jtreg-ComponentOrientationTests.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/jtreg-ComponentOrientationTests.patch	Fri May 17 22:43:02 2013 +0100
@@ -0,0 +1,246 @@
+diff -uN ComponentOrientation/ComponentOrientationTest.java /jck/icedtea6/openjdk/jdk/test/java/awt/ComponentOrientation/ComponentOrientationTest.java
+--- openjdk.old/jdk/test/java/awt/ComponentOrientation/ComponentOrientationTest.java	2013-04-29 15:24:56.000000000 +0200
++++ openjdk/jdk/test/java/awt/ComponentOrientation/ComponentOrientationTest.java	2013-04-29 15:24:56.000000000 +0200
+@@ -0,0 +1,77 @@
++/*
++ * Copyright 2013 Red Hat, Inc. All Rights Reserved.
++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++ *
++ * This code is free software; you can redistribute it and/or modify it
++ * under the terms of the GNU General Public License version 2 only, as
++ * published by the Free Software Foundation.
++ *
++ * This code is distributed in the hope that it will be useful, but WITHOUT
++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
++ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
++ * version 2 for more details (a copy is included in the LICENSE file that
++ * accompanied this code).
++ *
++ * You should have received a copy of the GNU General Public License version
++ * 2 along with this work; if not, write to the Free Software Foundation,
++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
++ */
++
++import java.awt.ComponentOrientation;
++import java.awt.FlowLayout;
++import java.awt.Rectangle;
++
++import javax.swing.JFrame;
++import javax.swing.JLabel;
++
++/**
++ * @test
++ * @run main ComponentOrientationTest
++ * @author Pavel Tisnovsky
++ *
++ * Basic test if component orientation subsystem works properly.
++ */
++public class ComponentOrientationTest {
++
++    public static void main(String[] args) {
++        int[] aligns = {FlowLayout.LEFT, FlowLayout.CENTER, FlowLayout.RIGHT};
++
++        for (int align : aligns) {
++            testComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT, align, true);
++            testComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT, align, false);
++        }
++    }
++
++    private static void testComponentOrientation(ComponentOrientation componentOrientation, int align, boolean firstLabelBeforeSecondOne) {
++        JFrame panel = new JFrame();
++        JLabel label1 = new JLabel("JAVA");
++        JLabel label2 = new JLabel("JAVA");
++
++        panel.setLayout(new FlowLayout(align));
++        panel.applyComponentOrientation(componentOrientation);
++
++        panel.add(label1);
++        panel.add(label2);
++        panel.pack();
++
++        Rectangle rect1 = firstLabelBeforeSecondOne ? label1.getBounds() : label2.getBounds();
++        Rectangle rect2 = firstLabelBeforeSecondOne ? label2.getBounds() : label1.getBounds();
++
++        // test the order of two components
++        if (rect1.x >= rect2.x) {
++            panel.dispose();
++            throw new RuntimeException("Components are positioned in a wrong order!");
++        }
++        if (rect1.x + rect1.width >= rect2.x) {
++            panel.dispose();
++            throw new RuntimeException("Components are positioned on the same place!");
++        }
++
++        // test vertical position of two components
++        if (rect1.y != rect2.y) {
++            panel.dispose();
++            throw new RuntimeException("Components are not positioned  on the same vertical position!");
++        }
++        panel.dispose();
++    }
++}
+diff -uN ComponentOrientation/ComponentPlacementTest.java /jck/icedtea6/openjdk/jdk/test/java/awt/ComponentOrientation/ComponentPlacementTest.java
+--- openjdk.old/jdk/test/java/awt/ComponentOrientation/ComponentPlacementTest.java	2013-04-29 15:24:56.000000000 +0200
++++ openjdk/jdk/test/java/awt/ComponentOrientation/ComponentPlacementTest.java	2013-04-29 15:24:56.000000000 +0200
+@@ -0,0 +1,79 @@
++/*
++ * Copyright 2013 Red Hat, Inc. All Rights Reserved.
++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++ *
++ * This code is free software; you can redistribute it and/or modify it
++ * under the terms of the GNU General Public License version 2 only, as
++ * published by the Free Software Foundation.
++ *
++ * This code is distributed in the hope that it will be useful, but WITHOUT
++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
++ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
++ * version 2 for more details (a copy is included in the LICENSE file that
++ * accompanied this code).
++ *
++ * You should have received a copy of the GNU General Public License version
++ * 2 along with this work; if not, write to the Free Software Foundation,
++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
++ */
++
++import java.awt.ComponentOrientation;
++import java.awt.FlowLayout;
++import java.awt.Rectangle;



More information about the distro-pkg-dev mailing list