Skip to content
This repository has been archived by the owner on Sep 2, 2022. It is now read-only.
/ jdk17 Public archive

8266631: StandardJavaFileManager: getJavaFileObjects() impl violates the spec #56

Closed
wants to merge 4 commits into from

Conversation

lahodaj
Copy link
Contributor

@lahodaj lahodaj commented Jun 15, 2021

[a copy of https://github.com/openjdk/jdk/pull/4360 for openjdk/jdk17]

This improves javadoc/specification of several StandardJavaFileManager methods, as requested in these bugs:
https://bugs.openjdk.java.net/browse/JDK-8266631
https://bugs.openjdk.java.net/browse/JDK-8266596
https://bugs.openjdk.java.net/browse/JDK-8266591
https://bugs.openjdk.java.net/browse/JDK-8266590

The CSR is here:
https://bugs.openjdk.java.net/browse/JDK-8268260

/issue JDK-8266631
/issue JDK-8266596
/issue JDK-8266591
/issue JDK-8266590


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issues

  • JDK-8266631: StandardJavaFileManager: getJavaFileObjects() impl violates the spec
  • JDK-8266596: StandardJavaFileManager: default impls of setLocationFromPaths(), getJavaFileObjectsFromPaths() methods don't throw IllegalArgumentException as specified
  • JDK-8266591: StandardJavaFileManager::getJavaFileObjectsFromPaths() methods contain a typo in their spec
  • JDK-8266590: StandardJavaFileManager::setLocationFromPaths() spec contains an error

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk17 pull/56/head:pull/56
$ git checkout pull/56

Update a local copy of the PR:
$ git checkout pull/56
$ git pull https://git.openjdk.java.net/jdk17 pull/56/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 56

View PR using the GUI difftool:
$ git pr show -t 56

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk17/pull/56.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Jun 15, 2021

👋 Welcome back jlahoda! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot added the rfr Pull request is ready for review label Jun 15, 2021
@openjdk openjdk bot changed the title 8266631: StandardJavaFileManager: getJavaFileObjects() impl violates the spec 8266631: StandardJavaFileManager: getJavaFileObjects() impl violates the spec Jun 15, 2021
@openjdk
Copy link

openjdk bot commented Jun 15, 2021

@lahodaj This issue is referenced in the PR title - it will now be updated.

@openjdk
Copy link

openjdk bot commented Jun 15, 2021

@lahodaj
Adding additional issue to issue list: 8266596: StandardJavaFileManager: default impls of setLocationFromPaths(), getJavaFileObjectsFromPaths() methods don't throw IllegalArgumentException as specified.

@openjdk
Copy link

openjdk bot commented Jun 15, 2021

@lahodaj
Adding additional issue to issue list: 8266591: StandardJavaFileManager::getJavaFileObjectsFromPaths() methods contain a typo in their spec.

@openjdk
Copy link

openjdk bot commented Jun 15, 2021

@lahodaj
Adding additional issue to issue list: 8266590: StandardJavaFileManager::setLocationFromPaths() spec contains an error.

@openjdk
Copy link

openjdk bot commented Jun 15, 2021

@lahodaj The following label will be automatically applied to this pull request:

  • compiler

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the compiler compiler-dev@openjdk.java.net label Jun 15, 2021
@mlbridge
Copy link

mlbridge bot commented Jun 15, 2021

Webrevs

Copy link
Contributor

@vicente-romero-oracle vicente-romero-oracle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@openjdk
Copy link

openjdk bot commented Jun 15, 2021

@lahodaj This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8266631: StandardJavaFileManager: getJavaFileObjects() impl violates the spec
8266596: StandardJavaFileManager: default impls of setLocationFromPaths(), getJavaFileObjectsFromPaths() methods don't throw IllegalArgumentException as specified
8266591: StandardJavaFileManager::getJavaFileObjectsFromPaths() methods contain a typo in their spec
8266590: StandardJavaFileManager::setLocationFromPaths() spec contains an error

Reviewed-by: vromero, jjg

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 55 new commits pushed to the master branch:

  • 6b14c8a: 8267421: j.l.constant.DirectMethodHandleDesc.Kind.valueOf(int) implementation doesn't conform to the spec regarding REF_invokeInterface handling
  • ef4ba22: 8268349: Provide clear run-time warnings about Security Manager deprecation
  • 4099810: 8268293: VectorAPI cast operation on mask and shuffle is broken
  • e2d7ec3: 8267100: [BACKOUT] JDK-8196415 Disable SHA-1 Signed JARs
  • d3ad8cd: 8268672: C2: assert(!loop->is_member(u_loop)) failed: can be in outer loop or out of both loops only
  • f25e719: 8268717: Upstream: 8268673: Stack walk across optimized entry frame on fresh native thread fails
  • 22ebd19: 8268362: [REDO] C2 crash when compile negative Arrays.copyOf length after loop
  • f8df953: 8268702: JFR diagnostic commands lack argument descriptors when viewed using Platform MBean Server
  • c294ae4: 8267042: bug in monitor locking/unlocking on ARM32 C1 due to uninitialized BasicObjectLock::_displaced_header
  • b358b54: 8269063: Build failure due to VerifyReceiverTypes was not declared after JDK-8268405
  • ... and 45 more: https://git.openjdk.java.net/jdk17/compare/b18de6cf79e0195736d94b08be67f10ca7c3cd08...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Jun 15, 2021
@lahodaj
Copy link
Contributor Author

lahodaj commented Jun 15, 2021

/csr needed

@openjdk openjdk bot added the csr Pull request needs approved CSR before integration label Jun 15, 2021
@openjdk
Copy link

openjdk bot commented Jun 15, 2021

@lahodaj this pull request will not be integrated until the CSR request JDK-8268260 for issue JDK-8266631 has been approved.

@openjdk openjdk bot removed the ready Pull request is ready to be integrated label Jun 15, 2021
Copy link
Contributor

@jonathan-gibbons jonathan-gibbons left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK ... but please avoid using {@linkplain} for code constructs. Use {@link} or {@code}

* cannot be converted to a file.
* The default implementation lazily converts each path to a file and calls
* {@link #getJavaFileObjectsFromFiles(Iterable) getJavaFileObjectsFromFiles}.
* {@linkplain IllegalArgumentException IllegalArgumentException} will be thrown
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest using with {@link} or {@code} but not {@linkplain}.
Given that there is a @throws which will link it, {@code} may be enough.

* cannot be converted to a file.
* The default implementation lazily converts each path to a file and calls
* {@link #getJavaFileObjectsFromPaths(Collection) getJavaFileObjectsFromPaths}.
* {@linkplain IllegalArgumentException IllegalArgumentException} will be thrown
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto use {@code}

@@ -262,10 +263,15 @@
* getJavaFileObjectsFromPaths({@linkplain java.util.Arrays#asList Arrays.asList}(paths))
* </pre>
*
* @implSpec
* The default implementation will only throw {@linkplain NullPointerException NullPointerException}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{@linkplain} should only be used for natural-language text.
Alternatively, it may work to use {@linkplain NullPointerException {@code NullPointerException}} but that seems overkill.

* The default implementation converts each path to a file and calls
* {@link #getJavaFileObjectsFromFiles getJavaObjectsFromFiles}.
* The default implementation lazily converts each path to a file and calls
* {@link #setLocation setLocation}.
* {@linkplain IllegalArgumentException IllegalArgumentException}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto.

@lahodaj
Copy link
Contributor Author

lahodaj commented Jun 22, 2021

/csr unneeded

@openjdk openjdk bot removed the csr Pull request needs approved CSR before integration label Jun 22, 2021
@openjdk
Copy link

openjdk bot commented Jun 22, 2021

@lahodaj determined that a CSR request is not needed for this pull request.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Jun 22, 2021
@lahodaj
Copy link
Contributor Author

lahodaj commented Jun 22, 2021

/csr needed

@openjdk
Copy link

openjdk bot commented Jun 22, 2021

@lahodaj the issue for this pull request, JDK-8266631, already has an approved CSR request: JDK-8268260

@lahodaj
Copy link
Contributor Author

lahodaj commented Jun 22, 2021

/integrate

@openjdk
Copy link

openjdk bot commented Jun 22, 2021

Going to push as commit 01f12fb.
Since your change was applied there have been 55 commits pushed to the master branch:

  • 6b14c8a: 8267421: j.l.constant.DirectMethodHandleDesc.Kind.valueOf(int) implementation doesn't conform to the spec regarding REF_invokeInterface handling
  • ef4ba22: 8268349: Provide clear run-time warnings about Security Manager deprecation
  • 4099810: 8268293: VectorAPI cast operation on mask and shuffle is broken
  • e2d7ec3: 8267100: [BACKOUT] JDK-8196415 Disable SHA-1 Signed JARs
  • d3ad8cd: 8268672: C2: assert(!loop->is_member(u_loop)) failed: can be in outer loop or out of both loops only
  • f25e719: 8268717: Upstream: 8268673: Stack walk across optimized entry frame on fresh native thread fails
  • 22ebd19: 8268362: [REDO] C2 crash when compile negative Arrays.copyOf length after loop
  • f8df953: 8268702: JFR diagnostic commands lack argument descriptors when viewed using Platform MBean Server
  • c294ae4: 8267042: bug in monitor locking/unlocking on ARM32 C1 due to uninitialized BasicObjectLock::_displaced_header
  • b358b54: 8269063: Build failure due to VerifyReceiverTypes was not declared after JDK-8268405
  • ... and 45 more: https://git.openjdk.java.net/jdk17/compare/b18de6cf79e0195736d94b08be67f10ca7c3cd08...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot closed this Jun 22, 2021
@openjdk openjdk bot added integrated Pull request has been integrated and removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Jun 22, 2021
@openjdk
Copy link

openjdk bot commented Jun 22, 2021

@lahodaj Pushed as commit 01f12fb.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
compiler compiler-dev@openjdk.java.net integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

3 participants