-
Notifications
You must be signed in to change notification settings - Fork 145
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
java.lang.ClassCastException: java.util.regex.Matcher$ImmutableMatchResult cannot be cast to java.util.regex.Matcher #165
Comments
Turns out the build was running "exec env -" and running inside a new environment, which was picking up my JDK9 EA install as the JDK it was running against. Once I removed that the build worked fine :) |
It is unfortunate that this shouldn't work in JDK9 anymore.
There seems to be no way to clone a Matcher.
I wonder how we can implement the regex functionality in a compatible way.
|
Not so fast, @talios ! The solution can only be a rewrite of the existing functionality in such a way that the type Some background may be in order here: Because in the case where there is no way to clone the state of a Matcher, you can't use the technique known as defensive copying. The idea is here, that you don't work on the Matcher passed by the user, but on a clone, and then return the new Matcher as result. This way, each Matcher object is used only one time inside the library, and appears immutable to the outside. However, somehow I realized that the method
And this did work, until now. Apparently,JDK9 introduces a new, non-public The only thing I don't understand is why, in the world, can't |
It turned out to be useless. This reverts commit ec92c01.
The following functionality is gone or changed:
The first argument is the
This reflects the usual Java syntax, except that the |
I'm experimenting with using the bazel.io build tool from Google to build a simple Frege app ([https://github.com/talios/fregebzl](repo is here), and I'm getting the following out of the compiler:
This is when running:
from the build.
I suspect from the trace this is something tripping when parsing the command line arguments, when I run those commands manually in my terminal the build seems to execute fine.
This is using
frege3.22.525-g704b834.jar
.The text was updated successfully, but these errors were encountered: