Skip to content

8276408: Deprecate Runtime.exec methods with a single string command line argument #6233

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

Closed

Conversation

RogerRiggs
Copy link
Contributor

@RogerRiggs RogerRiggs commented Nov 3, 2021

The three java.lang.Runtime.exec methods that tokenize a command line to produce an array of string arguments are easily misused, sometimes with erroneous results. For example, on some operating systems, spaces are supported in filenames and are in common use.

The tokenization uses only whitespace characters, ignoring quote characters. It is error prone because quotes may appear in the string but are ignored. The implementation (on Windows) includes a heuristic for the executable argument that tries to re-parse the command line respecting quotes but it is undocumented.


Progress

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

Issue

  • JDK-8276408: Deprecate Runtime.exec methods with a single string command line argument

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 6233

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

Using diff file

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

@RogerRiggs
Copy link
Contributor Author

/csr needed

@bridgekeeper
Copy link

bridgekeeper bot commented Nov 3, 2021

👋 Welcome back rriggs! 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 rfr Pull request is ready for review csr Pull request needs approved CSR before integration labels Nov 3, 2021
@openjdk
Copy link

openjdk bot commented Nov 3, 2021

@RogerRiggs this pull request will not be integrated until the CSR request JDK-8276412 for issue JDK-8276408 has been approved.

@openjdk
Copy link

openjdk bot commented Nov 3, 2021

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

  • core-libs

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 core-libs core-libs-dev@openjdk.org label Nov 3, 2021
@mlbridge
Copy link

mlbridge bot commented Nov 3, 2021

Webrevs

@openjdk openjdk bot removed the csr Pull request needs approved CSR before integration label Nov 4, 2021
to suppress deprecation warnings where testing of the deprecated methods is intended.
Copy link
Contributor

@AlanBateman AlanBateman left a comment

Choose a reason for hiding this comment

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

Long overdue! The wording looks okay.

@openjdk
Copy link

openjdk bot commented Nov 5, 2021

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

8276408: Deprecate Runtime.exec methods with a single string command line argument

Reviewed-by: alanb

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 no new commits pushed to the master branch. If another commit should be pushed before you perform the /integrate command, your PR will be automatically rebased. If you prefer to avoid any potential 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 Nov 5, 2021
@RogerRiggs
Copy link
Contributor Author

/integrate

@openjdk
Copy link

openjdk bot commented Nov 8, 2021

Going to push as commit 7e73bca.
Since your change was applied there have been 23 commits pushed to the master branch:

  • 75adf54: 8276306: jdk/jshell/CustomInputToolBuilder.java fails intermittently on storage acquisition
  • 7320b77: 8276548: Use range based visitor for Howl-Full cards
  • ea23e73: 8249004: Reduce ThreadsListHandle overhead in relation to direct handshakes
  • c815c5c: 8276209: Some call sites doesn't pass the parameter 'size' to SharedRuntime::dtrace_object_alloc(_base)
  • 71c4b19: 8276562: Fix to JDK-8263155 left out the help text changes
  • cc2cac1: 8274686: java.util.UUID#hashCode() should use Long.hashCode()
  • 0c2d00b: 8275097: Wrong span of the 'default' tag
  • fa754b8: 8276149: jshell throws EOF error when throwing exception inside switch expression
  • 4c14edd: 8274734: the method jdk.jshell.SourceCodeAnalysis documentation not working
  • ff6863c: 8276540: Howl Full CardSet container iteration marks too many cards
  • ... and 13 more: https://git.openjdk.java.net/jdk/compare/b01f1073f9691c40fc15b7ed67ae2e019ff729ea...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot closed this Nov 8, 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 Nov 8, 2021
@openjdk
Copy link

openjdk bot commented Nov 8, 2021

@RogerRiggs Pushed as commit 7e73bca.

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

@RogerRiggs RogerRiggs deleted the 8276408-deprecate-runtime-exec branch November 16, 2021 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core-libs core-libs-dev@openjdk.org integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

2 participants