From 1273c8e2331cbfb150194a3b73b192de0fc22cb8 Mon Sep 17 00:00:00 2001 From: Jim Holmlund Date: Thu, 24 Mar 2011 11:40:13 -0700 Subject: [PATCH] 7029823: (ann) test/java/lang/annotation/package-info.java no longer compiles Use @Deprecated instead of @java.lang.annotation.Documented Reviewed-by: jjg, smarks --- jdk/test/java/lang/annotation/PackageMain.java | 6 ++---- jdk/test/java/lang/annotation/package-info.java | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/jdk/test/java/lang/annotation/PackageMain.java b/jdk/test/java/lang/annotation/PackageMain.java index 8b3f727d8c7..5c73a9ebb25 100644 --- a/jdk/test/java/lang/annotation/PackageMain.java +++ b/jdk/test/java/lang/annotation/PackageMain.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 2011, 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,8 +21,6 @@ * questions. */ -import java.lang.annotation.Documented; - public class PackageMain { public static void main(String[] args) throws Exception { Class c = Class.forName("foo.bar.Baz"); @@ -30,7 +28,7 @@ public class PackageMain { System.out.println("cl=" + c.getClassLoader()); Package p = c.getPackage(); System.out.println("p=" + p); - Documented d = p.getAnnotation(Documented.class); + Deprecated d = p.getAnnotation(Deprecated.class); if (d == null) throw new Error(); } } diff --git a/jdk/test/java/lang/annotation/package-info.java b/jdk/test/java/lang/annotation/package-info.java index f5463672c5c..8b057d87a3d 100644 --- a/jdk/test/java/lang/annotation/package-info.java +++ b/jdk/test/java/lang/annotation/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 2011, 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 @@ -31,7 +31,7 @@ * @run main PackageMain */ -@java.lang.annotation.Documented +@Deprecated package foo.bar; class Baz {}