UnixPB: Update Regex For JDK symlinking#4295
Conversation
sxa
left a comment
There was a problem hiding this comment.
Any particular reason not to use .*? Or perhaps u.* for the jdk8 case. I'm not quite sure that the current version will pick it it properly but I could be mistaken.
Sample format: jdk8u482-b08
|
The issue with ^jdk8* - 8* means - no 8s, or one 8, or many 8s , so in actuality actually matching jdk* and ignoring the 8 element completely.. The new regex works as follows :
After jdk8, it allows either: In jdk8u432, the character after 8 is u, which is a non-digit, so it matches. For version 8 it will match anything like this.. jdk8 And for other versions... it uses the 2nd regex clause
jdk11.0.27+6 As the first clause is only meant to be used for JDK8, I've simplified the regex.. Suspect I was trying to have 1 regex to handle everything. |
Fixes #4294
Update the jdk install role to use more specific matching in the regex.
Checklist