8031651: Remove unneeded -source and -target flags in jdk repo regression tests

Reviewed-by: dfuchs, mullan
This commit is contained in:
Joe Darcy 2014-01-14 10:08:24 -08:00
parent bae4227a91
commit 48ce9464b0
9 changed files with 39 additions and 35 deletions

View File

@ -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
*/

View File

@ -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

View File

@ -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 @@ public class InvalidParameters {
// 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) { }
}

View File

@ -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 @@ public class InvalidParameters {
} 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) { }
}

View File

@ -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 @@ pol pol Polish
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

View File

@ -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 class GetObjectMinValue {
}
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,

View File

@ -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
*/

View File

@ -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
*

View File

@ -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
*/