Re: RFR 15 8242327: List spec should state that unmodifiable lists implement RandomAccess

2020-04-09 Thread Stuart Marks

Thanks Lance.

Upon advice from Pavel Rappo, I've adjusted the link markup to use the full 
reference form of a javadoc link. Revised patch below. Also, could you review 
the CSR?


https://bugs.openjdk.java.net/browse/JDK-8242406

Thanks,

s'marks



# HG changeset patch
# User smarks
# Date 1586486847 25200
#  Thu Apr 09 19:47:27 2020 -0700
# Node ID 45a22ec2df1a3738d241d82c375507bf4aeb3d1b
# Parent  46108b5b69d92dd424b73b828454849c397509cb
8242327: List spec should state that unmodifiable lists implement RandomAccess
Reviewed-by: XXX

diff -r 46108b5b69d9 -r 45a22ec2df1a 
src/java.base/share/classes/java/util/List.java
--- a/src/java.base/share/classes/java/util/List.java   Tue Apr 07 16:31:46 
2020 -0700
+++ b/src/java.base/share/classes/java/util/List.java   Thu Apr 09 19:47:27 
2020 -0700
@@ -104,6 +104,8 @@
  * They are serializable if all elements are serializable.
  * The order of elements in the list is the same as the order of the
  * provided arguments, or of the elements in the provided array.
+ * The lists and their {@link #subList(int, int) subList} views implement 
the
+ * {@link RandomAccess} interface.
  * They are value-based.
  * Callers should make no assumptions about the identity of the returned 
instances.

  * Factories are free to create new instances or reuse existing ones. 
Therefore,




On 4/8/20 2:33 PM, Lance Andersen wrote:

Hi Stuart,

This looks good

On Apr 8, 2020, at 5:01 PM, Stuart Marks > wrote:


Hi all,

Please review this small change to the List interface that specifies that 
unmodifiable lists (returned by List.of et al) implement the RandomAccess 
marker interface. In fact, they already do; the intent of this section was to 
specify the user-visible characteristics of such lists, but this particular 
characteristic was accidentally omitted.


https://bugs.openjdk.java.net/browse/JDK-8242327

Patch below. I'll follow up with a CSR request.

Thanks,

s'marks




Re: RFR [15/java.xml] 8242470 : Upgrade Xerces to Version 2.12.1

2020-04-09 Thread naoto . sato

+1

Naoto

On 4/9/20 2:28 PM, Joe Wang wrote:
Please review an update to Xerces 2.12.1. Xerces 2.12.1 was a bug fix 
release. Bugs in the release were either already in the JDK or not 
applicable. This patch therefore includes only an update to the md file.


--- a/src/java.xml/share/legal/xerces.md
+++ b/src/java.xml/share/legal/xerces.md
@@ -1,4 +1,4 @@
-## Apache Xerces v2.12.0
+## Apache Xerces v2.12.1

  ### Apache Xerces Notice
  
@@ -8,9 +8,11 @@
=

  Apache Xerces Java
-    Copyright 1999-2018 The Apache Software Foundation
+    Copyright 1999-2020 The Apache Software Foundation
+
  This product includes software developed at
  The Apache Software Foundation (http://www.apache.org/).
+
  Portions of this software were originally based on the following:
  - software copyright (c) 1999, IBM Corporation., http://www.ibm.com.
  - software copyright (c) 1999, Sun Microsystems., http://www.sun.com.


Thanks,
Joe


Re: RFR [15/java.xml] 8242470 : Upgrade Xerces to Version 2.12.1

2020-04-09 Thread Lance Andersen
+1

> On Apr 9, 2020, at 5:28 PM, Joe Wang  wrote:
> 
> Please review an update to Xerces 2.12.1. Xerces 2.12.1 was a bug fix 
> release. Bugs in the release were either already in the JDK or not 
> applicable. This patch therefore includes only an update to the md file.
> 
> --- a/src/java.xml/share/legal/xerces.md
> +++ b/src/java.xml/share/legal/xerces.md
> @@ -1,4 +1,4 @@
> -## Apache Xerces v2.12.0
> +## Apache Xerces v2.12.1
> 
>  ### Apache Xerces Notice
>  
> @@ -8,9 +8,11 @@
> =
> 
>  Apache Xerces Java
> -Copyright 1999-2018 The Apache Software Foundation
> +Copyright 1999-2020 The Apache Software Foundation
> +
>  This product includes software developed at
>  The Apache Software Foundation (http://www.apache.org/).
> +
>  Portions of this software were originally based on the following:
>  - software copyright (c) 1999, IBM Corporation., http://www.ibm.com.
>  - software copyright (c) 1999, Sun Microsystems., http://www.sun.com.
> 
> 
> Thanks,
> Joe

 
  

 Lance Andersen| 
Principal Member of Technical Staff | +1.781.442.2037
Oracle Java Engineering 
1 Network Drive 
Burlington, MA 01803
lance.ander...@oracle.com 





RFR [15/java.xml] 8242470 : Upgrade Xerces to Version 2.12.1

2020-04-09 Thread Joe Wang
Please review an update to Xerces 2.12.1. Xerces 2.12.1 was a bug fix 
release. Bugs in the release were either already in the JDK or not 
applicable. This patch therefore includes only an update to the md file.


--- a/src/java.xml/share/legal/xerces.md
+++ b/src/java.xml/share/legal/xerces.md
@@ -1,4 +1,4 @@
-## Apache Xerces v2.12.0
+## Apache Xerces v2.12.1

 ### Apache Xerces Notice
 
@@ -8,9 +8,11 @@
=

 Apache Xerces Java
-    Copyright 1999-2018 The Apache Software Foundation
+    Copyright 1999-2020 The Apache Software Foundation
+
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).
+
 Portions of this software were originally based on the following:
 - software copyright (c) 1999, IBM Corporation., http://www.ibm.com.
 - software copyright (c) 1999, Sun Microsystems., http://www.sun.com.


Thanks,
Joe


Re: JDK 15 RFR of JDK-8225540: In core reflection note whether returned annotations are declaration or type annotations

2020-04-09 Thread Joe Darcy

Hi Pavel,

On 4/9/2020 3:46 AM, Pavel Rappo wrote:

http://cr.openjdk.java.net/~darcy/8225540.1/

I'm not an expert in this area, but AFAIK this looks good.

A couple of nits.

1. The newly added text in the top-level doc comment for AnnotatedElement is missing 
some  tags. It looks nice in source, but it won't be like that in the 
output. (For better or worse, this is not Markdown.)


That is intentional; I prefer to separate the lines with white-space.




2. @implSpec for AnnotatedElement.isAnnotationPresent reads pretty unconventionally. There's 
nothing wrong with that. I simply wonder if there are any reasons why you picked that wording as 
opposed to the typical "The default implementation calls/returns/performs/etc. ..."? 
Also, there's a typo: "the the".


Good point; changed to the conventional "The default implementation 
returns $EXPRESSION."





3. Since we are in this area, would you care to fix a couple of typos?



Why not :-)



diff -r 193e4179def8 src/java.base/share/classes/java/lang/reflect/Modifier.java
--- a/src/java.base/share/classes/java/lang/reflect/Modifier.java   Wed Apr 
08 22:58:42 2020 -0700
+++ b/src/java.base/share/classes/java/lang/reflect/Modifier.java   Thu Apr 
09 11:28:32 2020 +0100
@@ -377,7 +377,7 @@
  
  /**

   * The Java source modifiers that can be applied to a method.
- * @jls8.4.3  Method Modifiers
+ * @jls 8.4.3 Method Modifiers
   */
  private static final int METHOD_MODIFIERS =
  Modifier.PUBLIC | Modifier.PROTECTED| Modifier.PRIVATE |
@@ -400,9 +400,6 @@
  private static final int PARAMETER_MODIFIERS =
  Modifier.FINAL;
  
-/**

- *
- */
  static final int ACCESS_MODIFIERS =
  Modifier.PUBLIC | Modifier.PROTECTED | Modifier.PRIVATE;


Thanks for the review,

-Joe



Re: RFR: 8188055: (ref) Add Reference.refersTo predicate

2020-04-09 Thread Paul Sandoz
Reference.java
—

 335  *
 336  * @return   The object to which this reference refers, or
 337  *   {@code null} if this reference object has been cleared

Add @see refersTo

 338  */
 339 @HotSpotIntrinsicCandidate
 340 public T get() {

Paul.

> On Apr 7, 2020, at 5:25 PM, Kim Barrett  wrote:
> 
> [Note review on both core-libs and hotspot-gc-dev lists; try not to lose
> either when replying.]
> 
> Please review a new function: java.lang.ref.Reference.refersTo.
> 
> This function is needed to test the referent of a Reference object
> without artificially extending the lifetime of the referent object, as
> may happen when calling Reference.get.  Some garbage collectors
> require extending the lifetime of a weak referent when accessed, in
> order to maintain collector invariants.  Lifetime extension may occur
> with any collector when the Reference is a SoftReference, as calling
> get indicates recent access.  This new function also allows testing
> the referent of a PhantomReference, which can't be accessed by calling
> get.
> 
> The new function uses a native method whose implementation is in the
> VM so it can use the Access API.  It is the intent that this function
> will be intrinsified by optimizing compilers like C2 or graal, but
> that hasn't been implemented yet.  Bear that in mind before rushing
> off to change existing uses of Reference.get.
> 
> CR:
> https://bugs.openjdk.java.net/browse/JDK-8188055
> https://bugs.openjdk.java.net/browse/JDK-8241029 (CSR)
> 
> Webrev:
> https://cr.openjdk.java.net/~kbarrett/8188055/open.04/
> 
> Testing:
> mach5 tier1
> 
> Locally (linux-x64) verified the new test passes with various garbage
> collectors. 
> 



RFR 15 8242462: Residual Cleanup of rmic removal

2020-04-09 Thread Roger Riggs

Please review a few cleanups I missed on the removal of rmic.
I didn't get a reply on the changes to the hotspot (cds) tests.
(I did get an ok on the javadoc changes)

Webrev:
http://cr.openjdk.java.net/~rriggs/webrev-remove-rmic-8225319-misc-1/

Issue:
  https://bugs.openjdk.java.net/browse/JDK-8242462

Thanks, Roger



Re: JDK 15 RFR of JDK-8225540: In core reflection note whether returned annotations are declaration or type annotations

2020-04-09 Thread Pavel Rappo
> http://cr.openjdk.java.net/~darcy/8225540.1/

I'm not an expert in this area, but AFAIK this looks good.

A couple of nits.

1. The newly added text in the top-level doc comment for AnnotatedElement is 
missing some  tags. It looks nice in source, but it won't be like that in 
the output. (For better or worse, this is not Markdown.)

2. @implSpec for AnnotatedElement.isAnnotationPresent reads pretty 
unconventionally. There's nothing wrong with that. I simply wonder if there are 
any reasons why you picked that wording as opposed to the typical "The default 
implementation calls/returns/performs/etc. ..."? Also, there's a typo: "the 
the".

3. Since we are in this area, would you care to fix a couple of typos?

diff -r 193e4179def8 src/java.base/share/classes/java/lang/reflect/Modifier.java
--- a/src/java.base/share/classes/java/lang/reflect/Modifier.java   Wed Apr 
08 22:58:42 2020 -0700
+++ b/src/java.base/share/classes/java/lang/reflect/Modifier.java   Thu Apr 
09 11:28:32 2020 +0100
@@ -377,7 +377,7 @@
 
 /**
  * The Java source modifiers that can be applied to a method.
- * @jls8.4.3  Method Modifiers
+ * @jls 8.4.3 Method Modifiers
  */
 private static final int METHOD_MODIFIERS =
 Modifier.PUBLIC | Modifier.PROTECTED| Modifier.PRIVATE |
@@ -400,9 +400,6 @@
 private static final int PARAMETER_MODIFIERS =
 Modifier.FINAL;
 
-/**
- *
- */
 static final int ACCESS_MODIFIERS =
 Modifier.PUBLIC | Modifier.PROTECTED | Modifier.PRIVATE;

-Pavel