Skip to content

Commit

Permalink
Fix wrong String split regex when checking OS version
Browse files Browse the repository at this point in the history
The "." character should be escaped as "\\." otherwise we get an empty String array
  • Loading branch information
Phillipus authored and elsazac committed Mar 20, 2024
1 parent 3a1aa2b commit b29afc1
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -869,7 +869,7 @@ private static Image getImage(Display display, InputStream input) {
* (https://github.com/eclipse-platform/eclipse.platform.swt/issues/772) ,Splash
* Screen gets flipped.As a workaround the image is flipped and returned.
*/
if (Integer.parseInt(System.getProperty("os.version").split(".")[0]) >= 14) { //$NON-NLS-1$ //$NON-NLS-2$
if (Integer.parseInt(System.getProperty("os.version").split("\\.")[0]) >= 14) { //$NON-NLS-1$ //$NON-NLS-2$
GC gc = new GC(image);
Transform tr = new Transform(display);
tr.setElements(1, 0, 0, -1, 0, 0);
Expand Down

0 comments on commit b29afc1

Please sign in to comment.