File tree Expand file tree Collapse file tree 1 file changed +8
-20
lines changed
core/src/main/java/hudson/util Expand file tree Collapse file tree 1 file changed +8
-20
lines changed Original file line number Diff line number Diff line change @@ -462,26 +462,14 @@ public static ProcessTree get() {
462462 return new Windows (vetoes );
463463
464464 String os = Util .fixNull (System .getProperty ("os.name" ));
465- switch (os ) {
466- case "Linux" -> {
467- return new Linux (vetoes );
468- }
469- case "AIX" -> {
470- return new AIX (vetoes );
471- }
472- case "SunOS" -> {
473- return new Solaris (vetoes );
474- }
475- case "Mac OS X" -> {
476- return new Darwin (vetoes );
477- }
478- case "FreeBSD" -> {
479- return new FreeBSD (vetoes );
480- }
481- default -> {
482- return DEFAULT ;
483- }
484- }
465+ return switch (os ) {
466+ case "Linux" -> new Linux (vetoes );
467+ case "AIX" -> new AIX (vetoes );
468+ case "SunOS" -> new Solaris (vetoes );
469+ case "Mac OS X" -> new Darwin (vetoes );
470+ case "FreeBSD" -> new FreeBSD (vetoes );
471+ default -> DEFAULT ;
472+ };
485473 } catch (LinkageError e ) {
486474 LOGGER .log (Level .FINE , "Failed to load OS-specific implementation; reverting to the default" , e );
487475 enabled = false ;
You can’t perform that action at this time.
0 commit comments