changeset 1773:37295244f534

8005207: test has 2 @bug tags Reviewed-by: mcimadamore
author vromero
date Tue, 21 May 2013 13:50:56 +0100
parents 3d9750039fff
children 08daea43a7f8
files test/tools/doclint/RunTest.java test/tools/javac/5045412/Bar.java test/tools/javac/5045412/Foo.java test/tools/javac/lambda/MethodReferenceParserTest.java test/tools/javac/lambda/TestInvokeDynamic.java test/tools/javac/mandatoryWarnings/deprecated/Test.java test/tools/javac/mandatoryWarnings/unchecked/Test.java test/tools/javac/policy/test3/Test.java
diffstat 8 files changed, 22 insertions(+), 251 deletions(-) [+]
line wrap: on
line diff
--- a/test/tools/doclint/RunTest.java	Tue May 21 12:17:18 2013 +0100
+++ b/test/tools/doclint/RunTest.java	Tue May 21 13:50:56 2013 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2013, 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
@@ -22,20 +22,13 @@
  */
 
 /* @test
- * @bug 8004832
+ * @bug 8004832 8000103
  * @summary Add new doclint package
- * @bug 8000103
  * @summary Create doclint utility
  */
 
-import com.sun.tools.doclint.DocLint;
-import com.sun.tools.doclint.DocLint.BadArgs;
-import java.io.ByteArrayOutputStream;
 import java.io.File;
-import java.io.FilterOutputStream;
 import java.io.IOException;
-import java.io.OutputStream;
-import java.io.PrintStream;
 import java.io.PrintWriter;
 import java.io.StringWriter;
 import java.lang.annotation.Annotation;
@@ -44,6 +37,9 @@
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 
+import com.sun.tools.doclint.DocLint;
+import com.sun.tools.doclint.DocLint.BadArgs;
+
 /** javadoc error on toplevel:  a & b. */
 public class RunTest {
     /** javadoc error on member: a < b */
--- a/test/tools/javac/5045412/Bar.java	Tue May 21 12:17:18 2013 +0100
+++ b/test/tools/javac/5045412/Bar.java	Tue May 21 13:50:56 2013 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2013, 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,12 +24,6 @@
 /**
  * @test
  * @bug 5045412 6627366
- * @compile -Xlint:serial -XDfailcomplete=java.io.Serializable Bar.java
- */
-
-/**
- * @test
- * @bug 5045412 6627366
  * @compile -Xlint:serial -XDfailcomplete=java.io.Serializable Bar.java Foo.java
  */
 
--- a/test/tools/javac/5045412/Foo.java	Tue May 21 12:17:18 2013 +0100
+++ b/test/tools/javac/5045412/Foo.java	Tue May 21 13:50:56 2013 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2013, 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,11 +25,6 @@
  * @test
  * @bug 5045412 6627366
  * @compile -Xlint:serial -XDfailcomplete=java.io.Serializable Foo.java
- */
-
-/**
- * @test
- * @bug 5045412 6627366
  * @compile -Xlint:serial -XDfailcomplete=java.io.Serializable Foo.java Bar.java
  */
 
--- a/test/tools/javac/lambda/MethodReferenceParserTest.java	Tue May 21 12:17:18 2013 +0100
+++ b/test/tools/javac/lambda/MethodReferenceParserTest.java	Tue May 21 13:50:56 2013 +0100
@@ -23,8 +23,7 @@
 
 /*
  * @test
- * @bug 7115052
- * @bug 8003280 8006694
+ * @bug 7115052 8003280 8006694
  * @summary Add lambda tests
  *  Add parser support for method references
  *  temporarily workaround combo tests are causing time out in several platforms
--- a/test/tools/javac/lambda/TestInvokeDynamic.java	Tue May 21 12:17:18 2013 +0100
+++ b/test/tools/javac/lambda/TestInvokeDynamic.java	Tue May 21 13:50:56 2013 +0100
@@ -23,8 +23,7 @@
 
 /*
  * @test
- * @bug 7194586
- * @bug 8003280 8006694 8010404
+ * @bug 7194586 8003280 8006694 8010404
  * @summary Add lambda tests
  *  Add back-end support for invokedynamic
  *  temporarily workaround combo tests are causing time out in several platforms
@@ -36,6 +35,16 @@
 // use /othervm to avoid jtreg timeout issues (CODETOOLS-7900047)
 // see JDK-8006746
 
+import java.io.File;
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Locale;
+
+import javax.tools.Diagnostic;
+import javax.tools.JavaFileObject;
+import javax.tools.SimpleJavaFileObject;
+
 import com.sun.source.tree.MethodInvocationTree;
 import com.sun.source.tree.MethodTree;
 import com.sun.source.util.TaskEvent;
@@ -63,16 +72,6 @@
 import com.sun.tools.javac.util.Context;
 import com.sun.tools.javac.util.Names;
 
-import java.io.File;
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Locale;
-
-import javax.tools.Diagnostic;
-import javax.tools.JavaFileObject;
-import javax.tools.SimpleJavaFileObject;
-
 import static com.sun.tools.javac.jvm.ClassFile.*;
 
 public class TestInvokeDynamic
--- a/test/tools/javac/mandatoryWarnings/deprecated/Test.java	Tue May 21 12:17:18 2013 +0100
+++ b/test/tools/javac/mandatoryWarnings/deprecated/Test.java	Tue May 21 13:50:56 2013 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2013, 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
@@ -29,109 +29,19 @@
  * @bug 5047307
  * @summary javac -nowarn improperly suppresses JLS-mandated warnings
  * @compile/ref=Test1.out -XDrawDiagnostics A.java
- */
-
-/*
- * @test
- * @bug 5047307
- * @summary javac -nowarn improperly suppresses JLS-mandated warnings
  * @compile/ref=Test1.out -XDrawDiagnostics -nowarn A.java
- */
-
-/*
- * @test
- * @bug 5047307
- * @summary javac -nowarn improperly suppresses JLS-mandated warnings
  * @compile/ref=Test1.out -XDrawDiagnostics -Xmaxwarns 1 A.java
- */
-
-/*
- * @test
- * @bug 5047307
- * @summary javac -nowarn improperly suppresses JLS-mandated warnings
  * @compile/ref=Test2.out -XDrawDiagnostics A.java B.java
- */
-
-/*
- * @test
- * @bug 5047307
- * @summary javac -nowarn improperly suppresses JLS-mandated warnings
  * @compile/ref=Test2.out -XDrawDiagnostics -nowarn A.java B.java
- */
-
-/*
- * @test
- * @bug 5047307
- * @summary javac -nowarn improperly suppresses JLS-mandated warnings
  * @compile/ref=Test2.out -XDrawDiagnostics -Xmaxwarns 1 A.java B.java
- */
-
-/*
- * @test
- * @bug 5047307
- * @summary javac -nowarn improperly suppresses JLS-mandated warnings
  * @compile/ref=Test3.out -XDrawDiagnostics -Xlint:deprecation A.java
- */
-
-/*
- * @test
- * @bug 5047307
- * @summary javac -nowarn improperly suppresses JLS-mandated warnings
  * @compile/ref=Test3.out -XDrawDiagnostics -nowarn -Xlint:deprecation A.java
- */
-
-/*
- * @test
- * @bug 5047307
- * @summary javac -nowarn improperly suppresses JLS-mandated warnings
  * @compile/ref=Test3b.out -XDrawDiagnostics -nowarn -Xlint:deprecation -Xmaxwarns 1 A.java
- */
-
-/*
- * @test
- * @bug 5047307
- * @summary javac -nowarn improperly suppresses JLS-mandated warnings
  * @compile/ref=Test4.out -XDrawDiagnostics -Xlint:deprecation A.java B.java
- */
-
-/*
- * @test
- * @bug 5047307
- * @summary javac -nowarn improperly suppresses JLS-mandated warnings
  * @compile/ref=Test4.out -XDrawDiagnostics -nowarn -Xlint:deprecation A.java B.java
- */
-
-/*
- * @test
- * @bug 5047307
- * @summary javac -nowarn improperly suppresses JLS-mandated warnings
  * @compile/ref=Test4b.out -XDrawDiagnostics -nowarn -Xlint:deprecation -Xmaxwarns 1 A.java B.java
- */
-
-/*
- * @test
- * @bug 5047307
- * @summary javac -nowarn improperly suppresses JLS-mandated warnings
  * @compile/ref=Test4c.out -XDrawDiagnostics -nowarn -Xlint:deprecation -Xmaxwarns 2 A.java B.java
- */
-
-/*
- * @test
- * @bug 5047307
- * @summary javac -nowarn improperly suppresses JLS-mandated warnings
  * @compile/ref=Test4d.out -XDrawDiagnostics -nowarn -Xlint:deprecation -Xmaxwarns 3 A.java B.java
- */
-
-/*
- * @test
- * @bug 5047307
- * @summary javac -nowarn improperly suppresses JLS-mandated warnings
  * @compile/ref=Test5.out -XDrawDiagnostics -Xlint:deprecation  P.java Q.java
- */
-
-/*
- * @test
- * @bug 5047307
- * @summary javac -nowarn improperly suppresses JLS-mandated warnings
  * @compile/ref=Test5b.out -XDrawDiagnostics -Xlint:deprecation -Xmaxwarns 2 P.java Q.java
  */
--- a/test/tools/javac/mandatoryWarnings/unchecked/Test.java	Tue May 21 12:17:18 2013 +0100
+++ b/test/tools/javac/mandatoryWarnings/unchecked/Test.java	Tue May 21 13:50:56 2013 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2013, 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
@@ -29,95 +29,17 @@
  * @bug 5047307
  * @summary javac -nowarn improperly suppresses JLS-mandated warnings
  * @compile/ref=Test1.out -XDrawDiagnostics A.java
- */
-
-/*
- * @test
- * @bug 5047307
- * @summary javac -nowarn improperly suppresses JLS-mandated warnings
  * @compile/ref=Test1.out -XDrawDiagnostics -nowarn A.java
- */
-
-/*
- * @test
- * @bug 5047307
- * @summary javac -nowarn improperly suppresses JLS-mandated warnings
  * @compile/ref=Test1.out -XDrawDiagnostics -Xmaxwarns 1 A.java
- */
-
-/*
- * @test
- * @bug 5047307
- * @summary javac -nowarn improperly suppresses JLS-mandated warnings
  * @compile/ref=Test2.out -XDrawDiagnostics A.java B.java
- */
-
-/*
- * @test
- * @bug 5047307
- * @summary javac -nowarn improperly suppresses JLS-mandated warnings
  * @compile/ref=Test2.out -XDrawDiagnostics -nowarn A.java B.java
- */
-
-/*
- * @test
- * @bug 5047307
- * @summary javac -nowarn improperly suppresses JLS-mandated warnings
  * @compile/ref=Test2.out -XDrawDiagnostics -Xmaxwarns 1 A.java B.java
- */
-
-/*
- * @test
- * @bug 5047307
- * @summary javac -nowarn improperly suppresses JLS-mandated warnings
  * @compile/ref=Test3.out -XDrawDiagnostics -Xlint:unchecked A.java
- */
-
-/*
- * @test
- * @bug 5047307
- * @summary javac -nowarn improperly suppresses JLS-mandated warnings
  * @compile/ref=Test3.out -XDrawDiagnostics -nowarn -Xlint:unchecked A.java
- */
-
-/*
- * @test
- * @bug 5047307
- * @summary javac -nowarn improperly suppresses JLS-mandated warnings
  * @compile/ref=Test3b.out -XDrawDiagnostics -nowarn -Xlint:unchecked -Xmaxwarns 1 A.java
- */
-
-/*
- * @test
- * @bug 5047307
- * @summary javac -nowarn improperly suppresses JLS-mandated warnings
  * @compile/ref=Test4.out -XDrawDiagnostics -Xlint:unchecked A.java B.java
- */
-
-/*
- * @test
- * @bug 5047307
- * @summary javac -nowarn improperly suppresses JLS-mandated warnings
  * @compile/ref=Test4.out -XDrawDiagnostics -nowarn -Xlint:unchecked A.java B.java
- */
-
-/*
- * @test
- * @bug 5047307
- * @summary javac -nowarn improperly suppresses JLS-mandated warnings
  * @compile/ref=Test4b.out -XDrawDiagnostics -nowarn -Xlint:unchecked -Xmaxwarns 1 A.java B.java
- */
-
-/*
- * @test
- * @bug 5047307
- * @summary javac -nowarn improperly suppresses JLS-mandated warnings
  * @compile/ref=Test4c.out -XDrawDiagnostics -nowarn -Xlint:unchecked -Xmaxwarns 2 A.java B.java
- */
-
-/*
- * @test
- * @bug 5047307
- * @summary javac -nowarn improperly suppresses JLS-mandated warnings
  * @compile/ref=Test4d.out -XDrawDiagnostics -nowarn -Xlint:unchecked -Xmaxwarns 3 A.java B.java
  */
--- a/test/tools/javac/policy/test3/Test.java	Tue May 21 12:17:18 2013 +0100
+++ b/test/tools/javac/policy/test3/Test.java	Tue May 21 13:50:56 2013 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2013, 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
@@ -123,47 +123,3 @@
 
     int errors;
 }
-
-
-
-
-
-
-
-
-
-
-
-
-// These tests test the ability of the compiler to continue in the face of
-// errors, accordining to the shouldStopPolicy
-
-/* @ test /nodynamiccopyright/
- * @bug 6813059
- * @summary
- * @compile/fail/ref=flow.out       -XDrawDiagnostics -XDcompilePolicy=byfile -XDverboseCompilePolicy -XDshouldStopPolicy=FLOW       Test.java
-
- * @compile/fail/ref=default.out    -XDrawDiagnostics -XDcompilePolicy=byfile -XDverboseCompilePolicy                                Test.java
- * @compile/fail/ref=enter.out      -XDrawDiagnostics -XDcompilePolicy=byfile -XDverboseCompilePolicy -XDshouldStopPolicy=ENTER      Test.java
- * @compile/fail/ref=attr.out       -XDrawDiagnostics -XDcompilePolicy=byfile -XDverboseCompilePolicy -XDshouldStopPolicy=ATTR       Test.java
- * @compile/fail/ref=transtypes.out -XDrawDiagnostics -XDcompilePolicy=byfile -XDverboseCompilePolicy -XDshouldStopPolicy=TRANSTYPES Test.java
- * @compile/fail/ref=lower.out      -XDrawDiagnostics -XDcompilePolicy=byfile -XDverboseCompilePolicy -XDshouldStopPolicy=LOWER      Test.java
- * @compile/fail/ref=generate.out   -XDrawDiagnostics -XDcompilePolicy=byfile -XDverboseCompilePolicy -XDshouldStopPolicy=GENERATE   Test.java
- */
-
-/*
-class Test {
-    void m1() {
-        System.err.println("hello");
-        0 // syntax error
-        System.err.println("world");
-    }
-
-    void m2() {
-    }
-}
-
-class Test2 {
-}
-*/
-