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

Regexes won't compile on SDK34 #130

Open
luca020400 opened this issue Oct 17, 2023 · 0 comments
Open

Regexes won't compile on SDK34 #130

luca020400 opened this issue Oct 17, 2023 · 0 comments

Comments

@luca020400
Copy link
Contributor

luca020400 commented Oct 17, 2023

Seems like there is a regex related breaking change in ICU regex impl.
There's a few "negative lookahead" regexes used in the project ( aceditor and RegExLinkifyTextView )

For example (?<![vV][kK]-[gG][lL]-[cC][tT][sS].*)[Ii]ssue)
?<! requires a fixed len match, .* makes it non finite and it's currently crashing

10-17 17:05:20.783 21602 21602 E AndroidRuntime: java.util.regex.PatternSyntaxException: Look-behind pattern matches must have a bounded maximum length near index 65
10-17 17:05:20.783 21602 21602 E AndroidRuntime: ([fF]ix(?:es)?|[bB][uU][gG]|(?<![vV][kK]-[gG][lL]-[cC][tT][sS].*)[Ii]ssue)(:|:?\s+)(#?)(\d+)\b
10-17 17:05:20.783 21602 21602 E AndroidRuntime:                                                                  ^
10-17 17:05:20.783 21602 21602 E AndroidRuntime:        at com.android.icu.util.regex.PatternNative.compileImpl(Native Method)
10-17 17:05:20.783 21602 21602 E AndroidRuntime:        at com.android.icu.util.regex.PatternNative.<init>(PatternNative.java:53)
10-17 17:05:20.783 21602 21602 E AndroidRuntime:        at com.android.icu.util.regex.PatternNative.create(PatternNative.java:49)
10-17 17:05:20.783 21602 21602 E AndroidRuntime:        at java.util.regex.Pattern.compile(Pattern.java:3533)
10-17 17:05:20.783 21602 21602 E AndroidRuntime:        at java.util.regex.Pattern.<init>(Pattern.java:1419)
10-17 17:05:20.783 21602 21602 E AndroidRuntime:        at java.util.regex.Pattern.compile(Pattern.java:947)
10-17 17:05:20.783 21602 21602 E AndroidRuntime:        at com.ruesga.rview.widget.RegExLinkifyTextView$b.<init>(SourceFile:5)
10-17 17:05:20.783 21602 21602 E AndroidRuntime:        at com.ruesga.rview.widget.RegExLinkifyTextView$b.<init>(SourceFile:2)

I'll see if it's worth bringing that up with google....

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