google / google/error-prone

Extend InvalidPatternSyntax to catch regex "|" (maybe also in replaceAll)

Open
#272 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
7.2k
Forks
820
Avg merge
5h 9m
Merged PRs (30d)
50

Description

This looks pretty low value: I see ~5 instances of `split("|")` in submitted Google code and ~2 instances of `replaceAll("|", ...)`.

The best argument for the check is that most programmers probably catch the problem in development, possibly after beating their heads against the wall for a while. Maybe you can judge that from your experience with `split(".")`?

(Currently, `InvalidPatternSyntax` handles only `split(".")`, with no handling of `"|"` or `replaceAll`.)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.