Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8263940: NPE when creating default file system when default file system provider is packaged as JAR file on class path #5103

Closed
wants to merge 2 commits into from

Conversation

LanceAndersen
Copy link
Contributor

@LanceAndersen LanceAndersen commented Aug 12, 2021

Hi all,

Please review the fix for JDK-8263940 to address an issues when the default file system provider is packaged as JAR file on class path.

The patch also addresses the @bug line for JDK-8271194

Mach5 Tier1 - Tier3 have run without issues

Best,
Lance


Progress

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

Issue

  • JDK-8263940: NPE when creating default file system when default file system provider is packaged as JAR file on class path

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 5103

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

Using diff file

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

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Aug 12, 2021

👋 Welcome back lancea! 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 label Aug 12, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Aug 12, 2021

@LanceAndersen The following labels will be automatically applied to this pull request:

  • core-libs
  • nio

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

@openjdk openjdk bot added nio core-libs labels Aug 12, 2021
@mlbridge
Copy link

@mlbridge mlbridge bot commented Aug 12, 2021

Webrevs

naotoj
naotoj approved these changes Aug 12, 2021
Copy link
Member

@naotoj naotoj left a comment

Looks good to me, Lance.

test/jdk/java/nio/file/spi/SetDefaultProvider.java Outdated Show resolved Hide resolved
@openjdk
Copy link

@openjdk openjdk bot commented Aug 12, 2021

@LanceAndersen 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:

8263940: NPE when creating default file system when default file system provider is packaged as JAR file on class path

Reviewed-by: naoto, bpb, iris, joehw

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 1 new commit pushed to the master branch:

  • e4766ee: 8272391: Undeleted debug information

Please see this link for an up-to-date comparison between the source branch of this pull request and the master branch.
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 label Aug 12, 2021
bplb
bplb approved these changes Aug 12, 2021
@LanceAndersen
Copy link
Contributor Author

@LanceAndersen LanceAndersen commented Aug 13, 2021

/integrate

@openjdk
Copy link

@openjdk openjdk bot commented Aug 13, 2021

Going to push as commit 717792c.
Since your change was applied there have been 6 commits pushed to the master branch:

  • d06d0b9: 8272112: Arena code simplifications
  • 0c4be76: 8058704: Nimbus does not honor JTextPane background color
  • 020aec5: 8271366: [REDO] JDK-8266054 VectorAPI rotate operation optimization
  • 4d4ba5c: 8272116: Update PerfDisableSharedMem with FLAG_SET_ERGO in PerfMemory::create_memory_region
  • 09ab86b: 8269909: getStack method in hprof.parser.Reader should use try-with-resource
  • e4766ee: 8272391: Undeleted debug information

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot closed this Aug 13, 2021
@openjdk openjdk bot added integrated and removed ready labels Aug 13, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Aug 13, 2021

@LanceAndersen Pushed as commit 717792c.

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

@openjdk openjdk bot removed the rfr label Aug 13, 2021
@@ -23,7 +23,7 @@

/**
* @test
* @bug 8266345
* @bug 4313887 7006126 8142968 8178380 8183320 8210112 8266345 8263940
Copy link
Contributor

@AlanBateman AlanBateman Aug 13, 2021

Choose a reason for hiding this comment

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

Thanks for correcting the @bug tag.

Files.deleteIfExists(jar);
createFileSystemProviderJar(jar, Path.of(testClasses));
String classpath = jar + File.pathSeparator + testClasses
+ File.separator + "modules" + File.separator + "m";
Copy link
Contributor

@AlanBateman AlanBateman Aug 13, 2021

Choose a reason for hiding this comment

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

This ends up with two copies of TestFIleSystemProvider on the class path. I think we should compile TestProvider to a different directory. That will eliminate the need to filter the classes when creating the JAR file.

* default FileSystemProvider
*/
private void createFileSystemProviderJar(Path jar, Path dir) throws IOException {

Copy link
Contributor

@AlanBateman AlanBateman Aug 13, 2021

Choose a reason for hiding this comment

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

In this test, the supporting methods are at the end of the source file, probably should keep it consistent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core-libs integrated nio
6 participants