-
Notifications
You must be signed in to change notification settings - Fork 810
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
[WW-5077] DMI aware pattern #425
Conversation
Coverage increased (+0.005%) to 47.102% when pulling 9b3a23e on WW-5077-dmi-aware into 89e02a4 on struts-2-5-x. |
@@ -35,7 +37,11 @@ | |||
private static final Logger LOG = LogManager.getLogger(DefaultAcceptedPatternsChecker.class); | |||
|
|||
public static final String[] ACCEPTED_PATTERNS = { | |||
"\\w+((\\.\\w+)|(\\[\\d+\\])|(\\(\\d+\\))|(\\['(\\w|[\\u4e00-\\u9fa5])+'\\])|(\\('(\\w|[\\u4e00-\\u9fa5])+'\\)))*" | |||
"\\w+((\\.\\w+)|(\\[\\d+])|(\\(\\d+\\))|(\\['(\\w|[\\u4e00-\\u9fa5])+'])|(\\('(\\w|[\\u4e00-\\u9fa5])+'\\)))*" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks strange for me. Closing escaped [ brackets with not-escaped ] brackets?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was suggested by IDEA, restored the previous version :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah sorry it was right.
And I spotted it's nice I think to refactor ((\\.\\w+)|(\\[\\d+\\])|(\\(\\d+\\))|(\\['(\\w|[\\u4e00-\\u9fa5])+'\\])|(\\('(\\w|[\\u4e00-\\u9fa5])+'\\)))*
part e.g. named EXTENSION_PATTERN
or so because it's same in both.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but I would like to keep them as is, it's easier to understand what's going on. Also future changes to the patterns want affect each other.
Refs WW-5077