@@ -357,48 +357,12 @@ public abstract class IgniteUtils extends CommonUtils {
357
357
/** JDK string. */
358
358
private static String jdkStr ;
359
359
360
- /** Indicates whether current OS is Windows 95. */
361
- private static boolean win95 ;
362
-
363
- /** Indicates whether current OS is Windows 98. */
364
- private static boolean win98 ;
365
-
366
- /** Indicates whether current OS is Windows NT. */
367
- private static boolean winNt ;
368
-
369
- /** Indicates whether current OS is Windows Vista. */
370
- private static boolean winVista ;
371
-
372
- /** Indicates whether current OS is Windows 7. */
373
- private static boolean win7 ;
374
-
375
- /** Indicates whether current OS is Windows 8. */
376
- private static boolean win8 ;
377
-
378
- /** Indicates whether current OS is Windows 8.1. */
379
- private static boolean win81 ;
380
-
381
360
/** Indicates whether current OS is some version of Windows. */
382
- private static boolean unknownWin ;
383
-
384
- /** Indicates whether current OS is Windows 2000. */
385
- private static boolean win2k ;
386
-
387
- /** Indicates whether current OS is Windows XP. */
388
- private static boolean winXp ;
389
-
390
- /** Indicates whether current OS is Windows Server 2003. */
391
- private static boolean win2003 ;
392
-
393
- /** Indicates whether current OS is Windows Server 2008. */
394
- private static boolean win2008 ;
361
+ private static boolean win ;
395
362
396
363
/** Indicates whether current OS is UNIX flavor. */
397
364
private static boolean unix ;
398
365
399
- /** Indicates whether current OS is Solaris. */
400
- private static boolean solaris ;
401
-
402
366
/** Indicates whether current OS is Linux flavor. */
403
367
private static boolean linux ;
404
368
@@ -601,32 +565,8 @@ public abstract class IgniteUtils extends CommonUtils {
601
565
String osLow = osName .toLowerCase ();
602
566
603
567
// OS type detection.
604
- if (osLow .contains ("win" )) {
605
- if (osLow .contains ("95" ))
606
- win95 = true ;
607
- else if (osLow .contains ("98" ))
608
- win98 = true ;
609
- else if (osLow .contains ("nt" ))
610
- winNt = true ;
611
- else if (osLow .contains ("2000" ))
612
- win2k = true ;
613
- else if (osLow .contains ("vista" ))
614
- winVista = true ;
615
- else if (osLow .contains ("xp" ))
616
- winXp = true ;
617
- else if (osLow .contains ("2003" ))
618
- win2003 = true ;
619
- else if (osLow .contains ("2008" ))
620
- win2008 = true ;
621
- else if (osLow .contains ("7" ))
622
- win7 = true ;
623
- else if (osLow .contains ("8.1" ))
624
- win81 = true ;
625
- else if (osLow .contains ("8" ))
626
- win8 = true ;
627
- else
628
- unknownWin = true ;
629
- }
568
+ if (osLow .contains ("win" ))
569
+ win = true ;
630
570
else if (osLow .contains ("mac os" ))
631
571
mac = true ;
632
572
else {
@@ -638,10 +578,7 @@ else if (osLow.contains("mac os"))
638
578
break ;
639
579
}
640
580
641
- // UNIX name detection.
642
- if (osLow .contains ("olaris" ) || osLow .contains ("sunos" ))
643
- solaris = true ;
644
- else if (osLow .contains ("inux" ))
581
+ if (osLow .contains ("inux" ))
645
582
linux = true ;
646
583
}
647
584
@@ -5762,15 +5699,6 @@ public static boolean isMacOs() {
5762
5699
return mac ;
5763
5700
}
5764
5701
5765
- /**
5766
- * Indicates whether current OS is Solaris.
5767
- *
5768
- * @return {@code true} if current OS is Solaris (SPARC or x86) - {@code false} otherwise.
5769
- */
5770
- public static boolean isSolaris () {
5771
- return solaris ;
5772
- }
5773
-
5774
5702
/**
5775
5703
* Indicates whether current OS is UNIX flavor.
5776
5704
*
@@ -5786,8 +5714,7 @@ public static boolean isUnix() {
5786
5714
* @return {@code true} if current OS is Windows (any versions) - {@code false} otherwise.
5787
5715
*/
5788
5716
public static boolean isWindows () {
5789
- return win7 || win8 || win81 || winXp || win95 || win98 || winNt || win2k ||
5790
- win2003 || win2008 || winVista || unknownWin ;
5717
+ return win ;
5791
5718
}
5792
5719
5793
5720
/**
0 commit comments