-
Notifications
You must be signed in to change notification settings - Fork 25
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
PatternSyntaxException encountered on Windows #1
Comments
OK, thanks for the comment, I'll look into this as soon as I can. |
The problem is that the file separator on windows is a backslash, which needs to be quoted. I believe I resolved the problem by using Pattern.quote(File.separator). I just deployed this so please look for version 1.0.2. It can take an hour or two before it's available in the maven central repository. |
Will do. Thanks.
|
Did this solve your problem? Let me know so I can close this issue, thanks! |
Sorry for delay. Yes, the update is working fine. Thanks. |
Sean,
I do most of my dev on a Mac, but am trying to use your nifty plugin on a Windows box, and I'm getting the following error:
Caused by: java.util.regex.PatternSyntaxException: Unexpected internal error near index 1
^
at java.util.regex.Pattern.error(Unknown Source)
at java.util.regex.Pattern.compile(Unknown Source)
at java.util.regex.Pattern.(Unknown Source)
at java.util.regex.Pattern.compile(Unknown Source)
at java.lang.String.split(Unknown Source)
at java.lang.String.split(Unknown Source)
at com.github.seanroy.plugins.LambduhMojo.execute(LambduhMojo.java:98)
...
I think this can be resolved by changing line 98 of your code from:
String[] pieces = functionCode.split(File.separator);
to this:
String[] pieces = functionCode.split(File.separatorChar);
The text was updated successfully, but these errors were encountered: