Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public static long getIdeMemoryFootPrint() throws MemoryMeasurementFailedExcepti
public static long getProcessMemoryFootPrint(long pid) throws MemoryMeasurementFailedException {
String platform = getPlatform();
//System.out.println("PLATFORM = "+getPlatform());
if (platform.equals(SOLARIS)|platform.equals(LINUX)) {
if (platform.equals(LINUX)) {
// call unix method
return getProcessMemoryFootPrintOnUnix(pid);
} else if (platform.equals(WINDOWS)) {
Expand All @@ -98,13 +98,11 @@ public static long getProcessMemoryFootPrint(long pid) throws MemoryMeasurementF
/** */
private static final long UNKNOWN_VALUE = -1;

private static final String SOLARIS = "solaris";
private static final String LINUX = "linux";
private static final String WINDOWS = "win32";
private static final String UNKNOWN = "unknown";

private static final String [][] SUPPORTED_PLATFORMS = {
{"SunOS",SOLARIS},
{"Linux",LINUX},
{"Windows NT",WINDOWS},
{"Windows 2000",WINDOWS},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ public int waitResult() throws InterruptedException {
return -1;
}

if (osFamily == OSFamily.LINUX || osFamily == OSFamily.SUNOS) {
if (osFamily == OSFamily.LINUX) {
File f = new File("/proc/" + pid); // NOI18N

while (f.exists()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -586,13 +586,6 @@ private static boolean isMac() {
return result;
}

private static boolean isSolaris10 () {
String osName = System.getProperty ("os.name");
String osVersion = System.getProperty ("os.version");
boolean result = osName.startsWith ("SunOS") && "5.10".equals(osVersion);
return result;
}

/** If it is solaris or linux, we can use GTK where supported by getting
* the platform specific look and feel.
*
Expand All @@ -608,8 +601,7 @@ private static boolean shouldUseMetal() {
boolean result = !"Solaris".equals (osName) &&
!osName.startsWith ("SunOS") &&
!osName.endsWith ("Linux") ||
UIManager.getSystemLookAndFeelClassName().indexOf("Motif") > -1 ||
isSolaris10();
UIManager.getSystemLookAndFeelClassName().indexOf("Motif") > -1;
return result;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,6 @@ else if (osName.startsWith("Windows ")) // NOI18N
operatingSystem = OS_WIN_OTHER;
else if ("Solaris".equals (osName)) // NOI18N
operatingSystem = OS_SOLARIS;
else if (osName.startsWith ("SunOS")) // NOI18N
operatingSystem = OS_SOLARIS;
// JDK 1.4 b2 defines os.name for me as "Redhat Linux" -jglick
else if (osName.endsWith ("Linux")) // NOI18N
operatingSystem = OS_LINUX;
Expand All @@ -137,8 +135,6 @@ else if ("AIX".equals (osName)) // NOI18N
operatingSystem = OS_AIX;
else if ("Irix".equals (osName)) // NOI18N
operatingSystem = OS_IRIX;
else if ("SunOS".equals (osName)) // NOI18N
operatingSystem = OS_SUNOS;
else if ("Digital UNIX".equals (osName)) // NOI18N
operatingSystem = OS_TRU64;
else if ("OS/2".equals (osName)) // NOI18N
Expand Down
4 changes: 0 additions & 4 deletions platform/openide.util/src/org/openide/util/BaseUtilities.java
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,6 @@ public static int getOperatingSystem() {
operatingSystem = OS_WIN_OTHER;
} else if ("Solaris".equals(osName)) { // NOI18N
operatingSystem = OS_SOLARIS;
} else if (osName.startsWith("SunOS")) { // NOI18N
operatingSystem = OS_SOLARIS;
}
// JDK 1.4 b2 defines os.name for me as "Redhat Linux" -jglick
else if (osName.endsWith("Linux")) { // NOI18N
Expand All @@ -240,8 +238,6 @@ else if (osName.endsWith("Linux")) { // NOI18N
operatingSystem = OS_AIX;
} else if ("Irix".equals(osName)) { // NOI18N
operatingSystem = OS_IRIX;
} else if ("SunOS".equals(osName)) { // NOI18N
operatingSystem = OS_SUNOS;
} else if ("Digital UNIX".equals(osName)) { // NOI18N
operatingSystem = OS_TRU64;
} else if ("OS/2".equals(osName)) { // NOI18N
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,6 @@ static String getKeyStrokeAsText (KeyStroke keyStroke) {
if (Utilities.isMac()) {
// Mac cloverleaf symbol
sb.append ("\u2318+");
} else if (isSolaris()) {
// Sun meta symbol
sb.append ("\u25C6+");
} else {
sb.append ("Meta+");
}
Expand All @@ -203,9 +200,4 @@ static String getKeyStrokeAsText (KeyStroke keyStroke) {
));
return sb.toString ();
}

private static boolean isSolaris () {
String osName = System.getProperty ("os.name");
return osName != null && osName.startsWith ("SunOS");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -413,12 +413,6 @@ public static int getOperatingSystem(String osName) {
} else if (osName.startsWith("Windows ")) { // NOI18N

return OS_WIN_OTHER;
} else if ("Solaris".equals(osName)) { // NOI18N

return OS_SOLARIS;
} else if (osName.startsWith("SunOS")) { // NOI18N

return OS_SOLARIS;
} else if (osName.endsWith("Linux")) { // NOI18N

return OS_LINUX;
Expand All @@ -431,9 +425,6 @@ public static int getOperatingSystem(String osName) {
} else if ("Irix".equals(osName)) { // NOI18N

return OS_IRIX;
} else if ("SunOS".equals(osName)) { // NOI18N

return OS_SOLARIS;
} else if ("Digital UNIX".equals(osName)) { // NOI18N

return OS_TRU64;
Expand Down
Loading