RFR 8216205: Java API documentation formatting error in System.getEnv
Brent Christian
brent.christian at oracle.com
Mon Jan 7 19:31:55 UTC 2019
OK - looks good. -B
On 1/7/19 11:19 AM, Roger Riggs wrote:
> Hi Brent,
>
> Thanks for spotting the 2nd formatting error.
> I think the references in getenv() are the most useful to have a link to
> RuntimePermission.
> Too many links impact readability.
>
> Thanks, Roger
>
>
> Updated:
>
> diff --git a/src/java.base/share/classes/java/lang/System.java
> b/src/java.base/share/classes/java/lang/System.java
> --- a/src/java.base/share/classes/java/lang/System.java
> +++ b/src/java.base/share/classes/java/lang/System.java
> @@ -1,5 +1,5 @@
> /*
> - * Copyright (c) 1994, 2018, Oracle and/or its affiliates. All rights
> reserved.
> + * Copyright (c) 1994, 2019, 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
> @@ -984,7 +984,7 @@ public final class System {
> * <p>If a security manager exists, its
> * {@link SecurityManager#checkPermission checkPermission}
> * method is called with a
> - * {@code {@link RuntimePermission}("getenv."+name)}
> + * {@link RuntimePermission RuntimePermission("getenv."+name)}
> * permission. This may result in a {@link SecurityException}
> * being thrown. If no exception is thrown the value of the
> * variable {@code name} is returned.
> @@ -1055,7 +1055,7 @@ public final class System {
> * <p>If a security manager exists, its
> * {@link SecurityManager#checkPermission checkPermission}
> * method is called with a
> - * {@code {@link RuntimePermission}("getenv.*")} permission.
> + * {@link RuntimePermission RuntimePermission("getenv.*")} permission.
> * This may result in a {@link SecurityException} being thrown.
> *
> * <p>When passing information to a Java subprocess,
>
>
>
>
>
> On 01/07/2019 02:03 PM, Brent Christian wrote:
>> Also, AFAICT all the other javadoc mentions of RuntimePermission
>> (besides "getenv") use @code, rather than @link.
>>
>> -Brent
>>
>> On 1/7/19 10:58 AM, Brent Christian wrote:
>>> Looks good, though it looks like a similar change is needed on L987
>>> for System.getenv(name).
>>>
>>> -Brent
>>>
>>> On 1/7/19 10:45 AM, Roger Riggs wrote:
>>>> Please review a javadoc fix. Only @link is needed, @code is removed.
>>>>
>>>>
>>>> diff --git a/src/java.base/share/classes/java/lang/System.java
>>>> b/src/java.base/share/classes/java/lang/System.java
>>>> --- a/src/java.base/share/classes/java/lang/System.java
>>>> +++ b/src/java.base/share/classes/java/lang/System.java
>>>> @@ -1,5 +1,5 @@
>>>> /*
>>>> - * Copyright (c) 1994, 2018, Oracle and/or its affiliates. All
>>>> rights reserved.
>>>> + * Copyright (c) 1994, 2019, 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
>>>> @@ -1055,7 +1055,7 @@ public final class System {
>>>> * <p>If a security manager exists, its
>>>> * {@link SecurityManager#checkPermission checkPermission}
>>>> * method is called with a
>>>> - * {@code {@link RuntimePermission}("getenv.*")} permission.
>>>> + * {@link RuntimePermission RuntimePermission("getenv.*")}
>>>> permission.
>>>> * This may result in a {@link SecurityException} being thrown.
>>>> *
>>>> * <p>When passing information to a Java subprocess,
>>>>
>>>>
>>>> Thanks, Roger
>
More information about the core-libs-dev
mailing list