Skip to content

Regexes won't compile on SDK34 #130

@luca020400

Description

@luca020400

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....

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions