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

Fix whitespace in path crashes the server #204

Merged
merged 2 commits into from
Jun 22, 2020

Conversation

alisabzevari
Copy link
Contributor

To fix #200,

This PR fixes the whitespace issue that results crashing the server at initialization phase.

@@ -1,8 +1,9 @@
package org.javacs.kt.util

import java.nio.charset.StandardCharsets
import org.eclipse.core.runtime.URIUtil
Copy link
Owner

Choose a reason for hiding this comment

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

Is there a way to get this URI conversion behavior without pulling in a new dependency on the Eclipse runtime?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried to write the conversion code myself but then I realized URI are more complicated that I thought (Like Datetime 😉). This is the source code for URIUtil.fromString.

Copy link
Owner

@fwcd fwcd May 31, 2020

Choose a reason for hiding this comment

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

Are there other characters than spaces that we would have to handle? If not, we could just do a replacement of spaces by %20.

This seems to be a somewhat common issue.

@alisabzevari alisabzevari requested a review from fwcd May 30, 2020 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Whitespace in path crashes the server.
2 participants