RFR: 8277348: Use String.stripTrailing() in jdk.jshell where applicable

Andrey Turbanov duke at openjdk.java.net
Wed Nov 17 19:45:06 UTC 2021


There are 2 methods in jdk.jshell module which trim trailing whitespace characters from String.
1. jdk.internal.jshell.tool.JShellTool#trimEnd
2. jdk.jshell.Util#trimEnd

Since Java 11 we have a method String.stripTrailing which could be used instead.

-------------

Commit messages:
 - [PATCH] Use String.stripTrailing() in jdk.jshell where applicable

Changes: https://git.openjdk.java.net/jdk/pull/6365/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=6365&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8277348
  Stats: 43 lines in 4 files changed: 0 ins; 33 del; 10 mod
  Patch: https://git.openjdk.java.net/jdk/pull/6365.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/6365/head:pull/6365

PR: https://git.openjdk.java.net/jdk/pull/6365


More information about the kulla-dev mailing list