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

[Bug]: double slash in string causes a "string is not properly closed" error #27

Open
derklaro opened this issue May 30, 2024 · 0 comments
Assignees

Comments

@derklaro
Copy link

What happened?

Hi! I was trying to quickly try something with the playground and stumbled upon the following issue:

When trying to execute the following code snipping in the playgroud, I get an error report stating A string is not properly closed. However, as probably visisble, all string in the example are properly closed and the code executes just fine a regular jshell:

System.out.println("https://google.de".concat("hello-world?x=y"));
|  Welcome to JShell -- Version 22.0.1
|  For an introduction type: /help intro

jshell> System.out.println("https://google.de".concat("hello-world?x=y"));
https://google.dehello-world?x=y

This seems to be somehow related to the double slash in the first string, as the following executes just fine:

System.out.println("https:/google.de".concat("hello-world?x=y")); // works
System.out.println("/".concat("hello-world?x=y")); // works
System.out.println("//".concat("hello-world?x=y")); // doesn't work

OS

Windows

What browsers are you seeing the problem on?

Chrome

Contact Details (optional)

No response

Additional information

No response

@delabassee delabassee self-assigned this Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants