mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8303485: Replacing os.name for operating system customization
Reviewed-by: naoto, erikj, alanb
This commit is contained in:
parent
87b314a985
commit
6c3b10fb1d
13 changed files with 371 additions and 114 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2010, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2010, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -30,7 +30,7 @@ import java.io.FileDescriptor;
|
|||
|
||||
import jdk.internal.access.SharedSecrets;
|
||||
import jdk.internal.access.JavaIOFileDescriptorAccess;
|
||||
import sun.security.action.GetPropertyAction;
|
||||
import jdk.internal.util.OperatingSystem;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -39,8 +39,7 @@ import sun.security.action.GetPropertyAction;
|
|||
*/
|
||||
|
||||
public final class SdpSupport {
|
||||
private static final String os = GetPropertyAction.privilegedGetProperty("os.name");
|
||||
private static final boolean isSupported = os.equals("Linux");
|
||||
private static final boolean isSupported = OperatingSystem.isLinux();
|
||||
private static final JavaIOFileDescriptorAccess fdAccess =
|
||||
SharedSecrets.getJavaIOFileDescriptorAccess();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue