Skip to content

NON_STATIC_PATTERN_COMPILE_CALL still thrown for static Derivatives of Predicate #18

@afrin216

Description

@afrin216

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();

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions