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

NON_STATIC_PATTERN_COMPILE_CALL still thrown for static Derivatives of Predicate #18

Open
afrin216 opened this issue Jan 17, 2017 · 0 comments

Comments

@afrin216
Copy link

afrin216 commented Jan 17, 2017

Great addition. We just started using this in our project and the error descriptions thrown out for each bug is very informative and much appreciated.

I have a small issue to report:

private static final Predicate<String> predicateString = Pattern.compile("test").asPredicate() throws NON_STATIC_PATTERN_COMPILE_CALL even though logically the pattern is compiled once.

The workaround we used was to create a redundant static Pattern object and then use that to create another static predicate.

private static final Pattern patternString = Pattern.compile("test");
private static final Predicate<String> predicateString = patternString.asPredicate();

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

No branches or pull requests

1 participant