All occurrences of
@compile -source 1.5
have been removed from jsr166 CVS.
On Mon, Jan 13, 2014 at 5:11 PM, Joe Darcy <joe.da...@oracle.com> wrote:
Hello,
Per the policy set forth in
JEP 182: Policy for Retiring javac -source and -target Options
http://openjdk.java.net/jeps/182
in JDK 9, javac will only recognize javac source and target value of 6/1.6 and
higher. Therefore, uses of earlier options in the JDK regression tests need to
be modified.
Please review the first pass at fixing this before support for the old source
and target values is removed:
JDK-8031651 : Remove unneeded -source and -target flags in jdk repo
regression tests
http://cr.openjdk.java.net/~darcy/8031651.2/
Patch also below.
A few comments on the changes. In java/security/cert/* the tests were
intentionally creating a corrupted set to make sure it was rejected properly.
Chris, do the changes in java/util/concurrent need to go into Doug's repo first?
I had to wrestle a bit for the code in javax/imageio/metadata/GetObjectMinValue
to make the generics work out.
For test/java/util/Locale/Bug4175998Test.java, as of source 6, an encoding
error, even in a comment is a javac error. Therefore, a non-ASCKII character is
replaced by a Unicode escape.
Kumar, the pack200 tests uses "-target 5"; can you look into updating this to
target 6 or later?
Thanks,
-Joe
--- old/test/demo/jvmti/hprof/StackMapTableTest.java 2014-01-13
16:54:09.000000000 -0800
+++ new/test/demo/jvmti/hprof/StackMapTableTest.java 2014-01-13
16:54:09.000000000 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2014, Oracle and/or its affiliates. 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
@@ -27,7 +27,7 @@
* @summary Test jvmti hprof and java_crw_demo with StackMapTable attributes
*
* @compile ../DemoRun.java
- * @compile -source 7 -g:lines HelloWorld.java
+ * @compile -g:lines HelloWorld.java
* @build StackMapTableTest
* @run main StackMapTableTest HelloWorld
*/
--- old/test/java/lang/reflect/OldenCompilingWithDefaults.java 2014-01-13
16:54:10.000000000 -0800
+++ new/test/java/lang/reflect/OldenCompilingWithDefaults.java 2014-01-13
16:54:10.000000000 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2014, Oracle and/or its affiliates. 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
@@ -25,7 +25,6 @@
* @test
* @bug 8009267
* @summary Verify uses of isAnnotationPresent compile under older source
versions
- * @compile -source 1.5 -target 1.5 OldenCompilingWithDefaults.java
* @compile -source 1.6 -target 1.6 OldenCompilingWithDefaults.java
* @compile -source 1.7 -target 1.7 OldenCompilingWithDefaults.java
* @compile OldenCompilingWithDefaults.java
--- old/test/java/security/cert/PKIXBuilderParameters/InvalidParameters.java
2014-01-13 16:54:10.000000000 -0800
+++ new/test/java/security/cert/PKIXBuilderParameters/InvalidParameters.java
2014-01-13 16:54:10.000000000 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2014, Oracle and/or its affiliates. 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
@@ -21,16 +21,17 @@
* questions.
*/
-/**
+/*
* @test
* @test 4422738
- * @compile -source 1.4 InvalidParameters.java
+ * @compile InvalidParameters.java
* @run main InvalidParameters
* @summary Make sure PKIXBuilderParameters(Set) detects invalid
* parameters and throws correct exceptions
*/
import java.security.InvalidAlgorithmParameterException;
import java.security.cert.PKIXBuilderParameters;
+import java.security.cert.TrustAnchor;
import java.util.Collections;
import java.util.Set;
@@ -53,8 +54,10 @@
// make sure Set of invalid objects throws ClassCastException
try {
+ @SuppressWarnings("unchecked") // Knowingly do something bad
+ Set<TrustAnchor> badSet = (Set<TrustAnchor>) (Set)
Collections.singleton(new String());
PKIXBuilderParameters p =
- new PKIXBuilderParameters(Collections.singleton(new String()),
null);
+ new PKIXBuilderParameters(badSet, null);
throw new Exception("should have thrown ClassCastException");
} catch (ClassCastException cce) { }
}
--- old/test/java/security/cert/PKIXParameters/InvalidParameters.java
2014-01-13 16:54:11.000000000 -0800
+++ new/test/java/security/cert/PKIXParameters/InvalidParameters.java
2014-01-13 16:54:10.000000000 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2014, Oracle and/or its affiliates. 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
@@ -24,7 +24,7 @@
/**
* @test
* @test 4422738
- * @compile -source 1.4 InvalidParameters.java
+ * @compile InvalidParameters.java
* @run main InvalidParameters
* @summary Make sure PKIXParameters(Set) and setTrustAnchors() detects
invalid
* parameters and throws correct exceptions
@@ -64,12 +64,14 @@
} catch (NullPointerException npe) { }
// make sure Set of invalid objects throws ClassCastException
+ @SuppressWarnings("unchecked") // Knowingly do something bad
+ Set<TrustAnchor> badSet = (Set<TrustAnchor>) (Set)
Collections.singleton(new String());
try {
- PKIXParameters p = new PKIXParameters(Collections.singleton(new
String()));
+ PKIXParameters p = new PKIXParameters(badSet);
throw new Exception("should have thrown ClassCastException");
} catch (ClassCastException cce) { }
try {
- params.setTrustAnchors(Collections.singleton(new String()));
+ params.setTrustAnchors(badSet);
throw new Exception("should have thrown ClassCastException");
} catch (ClassCastException cce) { }
}
--- old/test/java/util/Locale/Bug4175998Test.java 2014-01-13
16:54:11.000000000 -0800
+++ new/test/java/util/Locale/Bug4175998Test.java 2014-01-13
16:54:11.000000000 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2014, Oracle and/or its affiliates. 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
@@ -20,13 +20,15 @@
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
+
/*
- @test
- @summary test ISO639-2 language codes
- @compile -encoding ascii -source 5 Bug4175998Test.java
- @run main Bug4175998Test
- @bug 4175998
-*/
+ * @test
+ * @summary test ISO639-2 language codes
+ * @compile -encoding ascii Bug4175998Test.java
+ * @run main Bug4175998Test
+ * @bug 4175998
+ */
+
/*
*
*
@@ -731,7 +733,7 @@
pon pon Pohnpeian
por por Portuguese
pra pra Prakrit languages
-pro pro Provençal, Old (to 1500)
+pro pro Proven\u00E7al, Old (to 1500)
pus pus Pushto
qaa-qtz qaa-qtz Reserved for local use
que que Quechua
---
old/test/java/util/concurrent/BlockingQueue/CancelledProducerConsumerLoops.java
2014-01-13 16:54:12.000000000 -0800
+++
new/test/java/util/concurrent/BlockingQueue/CancelledProducerConsumerLoops.java
2014-01-13 16:54:11.000000000 -0800
@@ -34,7 +34,7 @@
/*
* @test
* @bug 4486658
- * @compile -source 1.5 CancelledProducerConsumerLoops.java
+ * @compile CancelledProducerConsumerLoops.java
* @run main/timeout=7000 CancelledProducerConsumerLoops
* @summary Checks for responsiveness of blocking queues to cancellation.
* Runs under the assumption that ITERS computations require more than
---
old/test/java/util/concurrent/BlockingQueue/MultipleProducersSingleConsumerLoops.java
2014-01-13 16:54:12.000000000 -0800
+++
new/test/java/util/concurrent/BlockingQueue/MultipleProducersSingleConsumerLoops.java
2014-01-13 16:54:12.000000000 -0800
@@ -34,7 +34,7 @@
/*
* @test
* @bug 4486658
- * @compile -source 1.5 MultipleProducersSingleConsumerLoops.java
+ * @compile MultipleProducersSingleConsumerLoops.java
* @run main/timeout=3600 MultipleProducersSingleConsumerLoops
* @summary multiple producers and single consumer using blocking queues
*/
--- old/test/java/util/concurrent/BlockingQueue/ProducerConsumerLoops.java
2014-01-13 16:54:12.000000000 -0800
+++ new/test/java/util/concurrent/BlockingQueue/ProducerConsumerLoops.java
2014-01-13 16:54:12.000000000 -0800
@@ -34,7 +34,7 @@
/*
* @test
* @bug 4486658
- * @compile -source 1.5 ProducerConsumerLoops.java
+ * @compile ProducerConsumerLoops.java
* @run main/timeout=3600 ProducerConsumerLoops
* @summary multiple producers and consumers using blocking queues
*/
---
old/test/java/util/concurrent/BlockingQueue/SingleProducerMultipleConsumerLoops.java
2014-01-13 16:54:13.000000000 -0800
+++
new/test/java/util/concurrent/BlockingQueue/SingleProducerMultipleConsumerLoops.java
2014-01-13 16:54:13.000000000 -0800
@@ -34,7 +34,7 @@
/*
* @test
* @bug 4486658
- * @compile -source 1.5 SingleProducerMultipleConsumerLoops.java
+ * @compile SingleProducerMultipleConsumerLoops.java
* @run main/timeout=600 SingleProducerMultipleConsumerLoops
* @summary check ordering for blocking queues with 1 producer and multiple
consumers
*/
--- old/test/java/util/concurrent/ConcurrentHashMap/MapCheck.java 2014-01-13
16:54:14.000000000 -0800
+++ new/test/java/util/concurrent/ConcurrentHashMap/MapCheck.java 2014-01-13
16:54:13.000000000 -0800
@@ -34,7 +34,7 @@
/*
* @test
* @bug 4486658
- * @compile -source 1.5 MapCheck.java
+ * @compile MapCheck.java
* @run main/timeout=240 MapCheck
* @summary Times and checks basic map operations
*/
--- old/test/java/util/concurrent/ConcurrentHashMap/MapLoops.java 2014-01-13
16:54:14.000000000 -0800
+++ new/test/java/util/concurrent/ConcurrentHashMap/MapLoops.java 2014-01-13
16:54:14.000000000 -0800
@@ -34,7 +34,7 @@
/*
* @test
* @bug 4486658
- * @compile -source 1.5 MapLoops.java
+ * @compile MapLoops.java
* @run main/timeout=1600 MapLoops
* @summary Exercise multithreaded maps, by default ConcurrentHashMap.
* Multithreaded hash table test. Each thread does a random walk
--- old/test/java/util/concurrent/Exchanger/ExchangeLoops.java 2014-01-13
16:54:15.000000000 -0800
+++ new/test/java/util/concurrent/Exchanger/ExchangeLoops.java 2014-01-13
16:54:14.000000000 -0800
@@ -34,7 +34,7 @@
/*
* @test
* @bug 4486658
- * @compile -source 1.5 ExchangeLoops.java
+ * @compile ExchangeLoops.java
* @run main/timeout=720 ExchangeLoops
* @summary checks to make sure a pipeline of exchangers passes data.
*/
---
old/test/java/util/concurrent/ExecutorCompletionService/ExecutorCompletionServiceLoops.java
2014-01-13 16:54:15.000000000 -0800
+++
new/test/java/util/concurrent/ExecutorCompletionService/ExecutorCompletionServiceLoops.java
2014-01-13 16:54:15.000000000 -0800
@@ -34,7 +34,7 @@
/*
* @test
* @bug 4965960
- * @compile -source 1.5 ExecutorCompletionServiceLoops.java
+ * @compile ExecutorCompletionServiceLoops.java
* @run main/timeout=3600 ExecutorCompletionServiceLoops
* @summary Exercise ExecutorCompletionServiceLoops
*/
--- old/test/java/util/concurrent/FutureTask/CancelledFutureLoops.java
2014-01-13 16:54:16.000000000 -0800
+++ new/test/java/util/concurrent/FutureTask/CancelledFutureLoops.java
2014-01-13 16:54:15.000000000 -0800
@@ -34,7 +34,7 @@
/*
* @test
* @bug 4486658
- * @compile -source 1.5 CancelledFutureLoops.java
+ * @compile CancelledFutureLoops.java
* @run main/timeout=2000 CancelledFutureLoops
* @summary Checks for responsiveness of futures to cancellation.
* Runs under the assumption that ITERS computations require more than
--- old/test/java/util/concurrent/atomic/VMSupportsCS8.java 2014-01-13
16:54:16.000000000 -0800
+++ new/test/java/util/concurrent/atomic/VMSupportsCS8.java 2014-01-13
16:54:16.000000000 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2014, Oracle and/or its affiliates. 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
@@ -24,7 +24,7 @@
/*
* @test
* @bug 4992443 4994819
- * @compile -source 1.5 VMSupportsCS8.java
+ * @compile VMSupportsCS8.java
* @run main VMSupportsCS8
* @summary Checks that the value of VMSupportsCS8 matches system properties.
*/
--- old/test/java/util/concurrent/locks/ReentrantLock/CancelledLockLoops.java
2014-01-13 16:54:16.000000000 -0800
+++ new/test/java/util/concurrent/locks/ReentrantLock/CancelledLockLoops.java
2014-01-13 16:54:16.000000000 -0800
@@ -34,7 +34,7 @@
/*
* @test
* @bug 4486658
- * @compile -source 1.5 CancelledLockLoops.java
+ * @compile CancelledLockLoops.java
* @run main/timeout=2800 CancelledLockLoops
* @summary tests lockInterruptibly.
* Checks for responsiveness of locks to interrupts. Runs under that
---
old/test/java/util/concurrent/locks/ReentrantLock/LockOncePerThreadLoops.java
2014-01-13 16:54:17.000000000 -0800
+++
new/test/java/util/concurrent/locks/ReentrantLock/LockOncePerThreadLoops.java
2014-01-13 16:54:17.000000000 -0800
@@ -34,7 +34,7 @@
/*
* @test
* @bug 4486658
- * @compile -source 1.5 LockOncePerThreadLoops.java
+ * @compile LockOncePerThreadLoops.java
* @run main/timeout=15000 LockOncePerThreadLoops
* @summary Checks for missed signals by locking and unlocking each of an
array of locks once per thread
*/
---
old/test/java/util/concurrent/locks/ReentrantLock/SimpleReentrantLockLoops.java
2014-01-13 16:54:17.000000000 -0800
+++
new/test/java/util/concurrent/locks/ReentrantLock/SimpleReentrantLockLoops.java
2014-01-13 16:54:17.000000000 -0800
@@ -34,7 +34,7 @@
/*
* @test
* @bug 4486658
- * @compile -source 1.5 SimpleReentrantLockLoops.java
+ * @compile SimpleReentrantLockLoops.java
* @run main/timeout=4500 SimpleReentrantLockLoops
* @summary multiple threads using a single lock
*/
--- old/test/java/util/concurrent/locks/ReentrantLock/TimeoutLockLoops.java
2014-01-13 16:54:18.000000000 -0800
+++ new/test/java/util/concurrent/locks/ReentrantLock/TimeoutLockLoops.java
2014-01-13 16:54:17.000000000 -0800
@@ -34,7 +34,7 @@
/*
* @test
* @bug 4486658 5031862
- * @compile -source 1.5 TimeoutLockLoops.java
+ * @compile TimeoutLockLoops.java
* @run main TimeoutLockLoops
* @summary Checks for responsiveness of locks to timeouts.
* Runs under the assumption that ITERS computations require more than
--- old/test/java/util/concurrent/locks/ReentrantReadWriteLock/MapLoops.java
2014-01-13 16:54:18.000000000 -0800
+++ new/test/java/util/concurrent/locks/ReentrantReadWriteLock/MapLoops.java
2014-01-13 16:54:18.000000000 -0800
@@ -34,7 +34,7 @@
/*
* @test
* @bug 4486658
- * @compile -source 1.5 MapLoops.java
+ * @compile MapLoops.java
* @run main/timeout=4700 MapLoops
* @summary Exercise multithreaded maps, by default ConcurrentHashMap.
* Multithreaded hash table test. Each thread does a random walk
--- old/test/javax/imageio/metadata/GetObjectMinValue.java 2014-01-13
16:54:20.000000000 -0800
+++ new/test/javax/imageio/metadata/GetObjectMinValue.java 2014-01-13
16:54:19.000000000 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2014, Oracle and/or its affiliates. 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
@@ -24,14 +24,12 @@
/*
* @test
* @bug 4429875 7186799
- * @compile -source 1.4 GetObjectMinValue.java
+ * @compile GetObjectMinValue.java
* @run main GetObjectMinValue
* @summary Tests the getObject{Min,Max}Value method of
* IIOMetadataFormatImpl for an inclusive range
*/
-// Compiled with -source 1.4 to work around javac bug 5041233
-
import javax.imageio.metadata.IIOMetadataFormatImpl;
import javax.imageio.ImageTypeSpecifier;
@@ -79,13 +77,13 @@
}
public void addObjectValue(String elementName,
- Class classType, Object defaultValue,
+ Class<?> classType, Integer defaultValue,
Comparable minValue, Comparable maxValue,
boolean minInclusive, boolean
maxInclusive) {
- super.addObjectValue(elementName,
- classType, defaultValue,
- minValue, maxValue,
- minInclusive, maxInclusive);
+ super.<Integer>addObjectValue(elementName,
+ (Class<Integer>)classType, defaultValue,
+ (Comparable<? super Integer>) minValue,
(Comparable<? super Integer>) maxValue,
+ minInclusive, maxInclusive);
}
public boolean canNodeAppear(String elementName,
--- old/test/javax/sound/midi/MidiDeviceConnectors/TestAllDevices.java
2014-01-13 16:54:20.000000000 -0800
+++ new/test/javax/sound/midi/MidiDeviceConnectors/TestAllDevices.java
2014-01-13 16:54:20.000000000 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2014, Oracle and/or its affiliates. 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
@@ -25,7 +25,7 @@
* @test
* @bug 4933700
* @summary Tests that default devices return MidiDeviceTransmitter/Receiver
and returned objects return correct MidiDevice
- * @compile -source 1.7 TestAllDevices.java
+ * @compile TestAllDevices.java
* @run main TestAllDevices
* @author Alex Menkov
*/
--- old/test/javax/sound/sampled/AudioFormat/PCM_FLOAT_support.java 2014-01-13
16:54:20.000000000 -0800
+++ new/test/javax/sound/sampled/AudioFormat/PCM_FLOAT_support.java 2014-01-13
16:54:20.000000000 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2014, Oracle and/or its affiliates. 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
@@ -25,7 +25,7 @@
* @test
* @bug 6944033
* @summary Tests that PCM_FLOAT encoding is supported
- * @compile -source 1.7 PCM_FLOAT_support.java
+ * @compile PCM_FLOAT_support.java
* @run main PCM_FLOAT_support
* @author Alex Menkov
*
--- old/test/sun/management/jmxremote/LocalRMIServerSocketFactoryTest.java
2014-01-13 16:54:21.000000000 -0800
+++ new/test/sun/management/jmxremote/LocalRMIServerSocketFactoryTest.java
2014-01-13 16:54:21.000000000 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2014, Oracle and/or its affiliates. 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
@@ -28,7 +28,7 @@
*
* @author Daniel Fuchs
*
- * @run compile -XDignore.symbol.file=true -source 1.6 -g
LocalRMIServerSocketFactoryTest.java
+ * @run compile -XDignore.symbol.file=true -g
LocalRMIServerSocketFactoryTest.java
* @run main LocalRMIServerSocketFactoryTest
*/