--- old/test/demo/jvmti/mtrace/JFrameCreateTime.java 2012-11-16 17:31:07.119000000 +0400 +++ new/test/demo/jvmti/mtrace/JFrameCreateTime.java 2012-11-16 17:31:06.240000000 +0400 @@ -32,24 +32,28 @@ * was very slow (VisualMust debugger people reported this). */ +import java.awt.GraphicsEnvironment; import javax.swing.*; public class JFrameCreateTime { public static void main(String[] args) { - JFrame f; - long start, end; - - start = System.currentTimeMillis(); - f = new JFrame("JFrame"); - end = System.currentTimeMillis(); - - System.out.println("JFrame first creation took " + (end - start) + " ms"); - - start = System.currentTimeMillis(); - f = new JFrame("JFrame"); - end = System.currentTimeMillis(); - - System.out.println("JFrame second creation took " + (end - start) + " ms"); + if (GraphicsEnvironment.getLocalGraphicsEnvironment().isHeadlessInstance()) { + System.out.println("JFrame test was skipped due to headless mode"); + } else { + JFrame f; + long start, end; + + start = System.currentTimeMillis(); + f = new JFrame("JFrame"); + end = System.currentTimeMillis(); + + System.out.println("JFrame first creation took " + (end - start) + " ms"); + + start = System.currentTimeMillis(); + f = new JFrame("JFrame"); + end = System.currentTimeMillis(); + System.out.println("JFrame second creation took " + (end - start) + " ms"); + } System.exit(0); } } --- old/test/java/io/Serializable/resolveClass/deserializeButton/Foo.java 2012-11-16 17:31:13.224000000 +0400 +++ new/test/java/io/Serializable/resolveClass/deserializeButton/Foo.java 2012-11-16 17:31:12.250000000 +0400 @@ -26,21 +26,28 @@ * @summary Verify that class loaded outside of application class loader is * correctly resolved during deserialization when read in by custom * readObject() method of a bootstrap class (in this case, - * java.awt.Button). + * java.util.Vector [was java.awt.Button]). */ -import java.awt.Button; -import java.awt.event.MouseAdapter; import java.io.*; +import java.util.Vector; public class Foo implements Runnable { - static class Adapter extends MouseAdapter implements Serializable {} + static class Adapter extends Object implements Serializable {} + //initial version + // static class Adapter extends MouseAdapter implements Serializable {} + //was rewritten for headless mode public void run() { - try { - Button button = new Button(); - button.addMouseListener(new Adapter()); + try { + Vector button = new Vector(); + button.add(new Adapter()); + + //initial version + // Button button = new Button(); + // button.addMouseListener(new Adapter()); + //was rewritten for headless mode // iterate to trigger java.lang.reflect code generation for (int i = 0; i < 100; i++) { @@ -54,7 +61,7 @@ } } catch (Exception ex) { throw new Error( - "Error occured while (de)serializing Button: " + ex); + "Error occured while (de)serializing Button: ", ex); } } } --- old/test/java/io/Serializable/resolveClass/deserializeButton/run.sh 2012-11-16 17:31:21.465000000 +0400 +++ new/test/java/io/Serializable/resolveClass/deserializeButton/run.sh 2012-11-16 17:31:18.156000000 +0400 @@ -26,7 +26,7 @@ # @summary Verify that class loaded outside of application class loader is # correctly resolved during deserialization when read in by custom # readObject() method of a bootstrap class (in this case, -# java.awt.Button). +# java.util.Vector [was java.awt.Button]). if [ "${TESTJAVA}" = "" ] then --- old/test/java/io/Serializable/resolveClass/deserializeButton/Test.java 2012-11-16 17:31:27.423000000 +0400 +++ new/test/java/io/Serializable/resolveClass/deserializeButton/Test.java 2012-11-16 17:31:26.591000000 +0400 @@ -26,7 +26,7 @@ * @summary Verify that class loaded outside of application class loader is * correctly resolved during deserialization when read in by custom * readObject() method of a bootstrap class (in this case, - * java.awt.Button). + * java.util.Vector [was java.awt.Button]). */ import java.io.*;