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

8269753: Misplaced caret in PatternSyntaxException's detail message #4906

Closed
wants to merge 3 commits into from

Conversation

igraves
Copy link
Member

@igraves igraves commented Jul 26, 2021

Fixes a bug where carets aren't indented correctly in PatternSyntaxException messages because tab characters are converted to spaces in their indentation.


Progress

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

Issue

  • JDK-8269753: Misplaced caret in PatternSyntaxException's detail message

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 4906

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

Using diff file

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

@igraves
Copy link
Member Author

@igraves igraves commented Jul 26, 2021

@pavelrappo

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Jul 26, 2021

👋 Welcome back igraves! 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 Jul 26, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Jul 26, 2021

@igraves 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 label Jul 26, 2021
@mlbridge
Copy link

@mlbridge mlbridge bot commented Jul 26, 2021

Webrevs

@@ -107,7 +107,9 @@ public String getMessage() {
sb.append(pattern);
if (index >= 0 && pattern != null && index < pattern.length()) {
sb.append(System.lineSeparator());
for (int i = 0; i < index; i++) sb.append(' ');
for (int i = 0; i < index; i++) {
sb.append((pattern.charAt(i) == '\t') ? '\t' : ' ');
Copy link
Member

@pavelrappo pavelrappo Jul 26, 2021

Choose a reason for hiding this comment

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

test/jdk/java/util/regex/RegExTest.java Show resolved Hide resolved
test/jdk/java/util/regex/RegExTest.java Outdated Show resolved Hide resolved
@openjdk
Copy link

@openjdk openjdk bot commented Jul 26, 2021

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

8269753: Misplaced caret in PatternSyntaxException's detail message

Reviewed-by: prappo

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 46 new commits pushed to the master branch:

  • fcc7d59: 8269342: CICrashAt=1 does not always catch first Java method
  • 8785737: 8269616: serviceability/dcmd/framework/VMVersionTest.java fails with Address already in use error
  • 3aadae2: 8271140: Fix native frame handling in vframeStream::asJavaVFrame()
  • b8f79a7: 8268873: Unnecessary Vector usage in java.base
  • 0b12e7c: 8075806: divideExact is missing in java.lang.Math
  • efa63dc: 8171382: java.time.Duration missing isPositive method
  • ee55361: 8265474: Dubious 'null' assignment in CompactByteArray.expand
  • 515113d: 8269924: Shenandoah: Introduce weak/strong marking asserts
  • f2c359a: 8271215: Fix data races in G1PeriodicGCTask
  • 36aefa3: 8270447: [IR Framework] Add missing compilation level restriction when using FlipC1C2 stress option
  • ... and 36 more: https://git.openjdk.java.net/jdk/compare/9b93d816c182278427ef76ee803cc91c2d8b4223...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 label Jul 26, 2021
@igraves
Copy link
Member Author

@igraves igraves commented Jul 27, 2021

/integrate

@openjdk
Copy link

@openjdk openjdk bot commented Jul 27, 2021

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

  • c3d8e92: 8190753: (zipfs): Accessing a large entry (> 2^31 bytes) leads to a negative initial size for ByteArrayOutputStream
  • eb6da88: Merge
  • b76a838: 8269150: UnicodeReader not translating \u005c\u005d to \]
  • 7ddabbf: 8271175: runtime/jni/FindClassUtf8/FindClassUtf8.java doesn't have to be run in othervm
  • 3c27f91: 8271222: two runtime/Monitor tests don't check exit code
  • 049b2ad: 8015886: java/awt/Focus/DeiconifiedFrameLoosesFocus/DeiconifiedFrameLoosesFocus.java sometimes failed on ubuntu
  • fcc7d59: 8269342: CICrashAt=1 does not always catch first Java method
  • 8785737: 8269616: serviceability/dcmd/framework/VMVersionTest.java fails with Address already in use error
  • 3aadae2: 8271140: Fix native frame handling in vframeStream::asJavaVFrame()
  • b8f79a7: 8268873: Unnecessary Vector usage in java.base
  • ... and 42 more: https://git.openjdk.java.net/jdk/compare/9b93d816c182278427ef76ee803cc91c2d8b4223...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot closed this Jul 27, 2021
@openjdk openjdk bot added integrated and removed ready rfr labels Jul 27, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Jul 27, 2021

@igraves Pushed as commit bb508e1.

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

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