From e11250df8bcab060995dc522d6afd090e03e96f6 Mon Sep 17 00:00:00 2001 From: darcy Date: Fri, 6 May 2011 17:06:25 -0700 Subject: [PATCH] 7011326: Add informative example to @SafeVarargs type or language discussion Reviewed-by: mcimadamore, mduigou --- src/share/classes/java/lang/SafeVarargs.java | 28 ++++++++++++++------ 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/src/share/classes/java/lang/SafeVarargs.java b/src/share/classes/java/lang/SafeVarargs.java index b0c03a916..818ea21ba 100644 --- a/src/share/classes/java/lang/SafeVarargs.java +++ b/src/share/classes/java/lang/SafeVarargs.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 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 @@ -32,7 +32,7 @@ import java.lang.annotation.*; * constructor does not perform potentially unsafe operations on its * varargs parameter. Applying this annotation to a method or * constructor suppresses unchecked warnings about a - * non-reifiable variable-arity (vararg) type and suppresses + * non-reifiable variable arity (vararg) type and suppresses * unchecked warnings about parameterized array creation at call * sites. * @@ -41,11 +41,10 @@ import java.lang.annotation.*; * additional usage restrictions on this annotation type; it is a * compile-time error if a method or constructor declaration is * annotated with a {@code @SafeVarargs} annotation, and either: - * @@ -55,15 +54,28 @@ import java.lang.annotation.*; * *