From 68c5a1567e0b16d4ba1ca4e41d4fa69984c934b7 Mon Sep 17 00:00:00 2001 From: Peter Donald Date: Sun, 30 Dec 2001 00:51:09 +0000 Subject: [PATCH] Renamed the constants to have constant-y names git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@270439 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/myrmidon/framework/Os.java | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/proposal/myrmidon/src/java/org/apache/myrmidon/framework/Os.java b/proposal/myrmidon/src/java/org/apache/myrmidon/framework/Os.java index 99d1824af..e16adcf35 100644 --- a/proposal/myrmidon/src/java/org/apache/myrmidon/framework/Os.java +++ b/proposal/myrmidon/src/java/org/apache/myrmidon/framework/Os.java @@ -23,13 +23,13 @@ public class Os private static final Resources REZ = ResourceManager.getPackageResources( Os.class ); - private final static String m_osName = + private final static String OS_NAME = System.getProperty( "os.name" ).toLowerCase( Locale.US ); - private final static String m_osArch = + private final static String OS_ARCH = System.getProperty( "os.arch" ).toLowerCase( Locale.US ); - private final static String m_osVersion = + private final static String OS_VERSION = System.getProperty( "os.version" ).toLowerCase( Locale.US ); - private final static String m_pathSep = + private final static String PATH_SEP = System.getProperty( "path.separator" ); private String m_arch; @@ -118,7 +118,7 @@ public class Os boolean isVersion = true; if( version != null ) { - isVersion = version.equals( m_osVersion ); + isVersion = version.equals( OS_VERSION ); } return isVersion; } @@ -128,7 +128,7 @@ public class Os boolean isArch = true; if( arch != null ) { - isArch = arch.equals( m_osArch ); + isArch = arch.equals( OS_ARCH ); } return isArch; } @@ -138,7 +138,7 @@ public class Os boolean isName = true; if( name != null ) { - isName = name.equals( m_osName ); + isName = name.equals( OS_NAME ); } return isName; } @@ -150,28 +150,28 @@ public class Os { if( family.equals( "windows" ) ) { - isFamily = m_osName.indexOf( "windows" ) > -1; + isFamily = OS_NAME.indexOf( "windows" ) > -1; } else if( family.equals( "os/2" ) ) { - isFamily = m_osName.indexOf( "os/2" ) > -1; + isFamily = OS_NAME.indexOf( "os/2" ) > -1; } else if( family.equals( "netware" ) ) { - isFamily = m_osName.indexOf( "netware" ) > -1; + isFamily = OS_NAME.indexOf( "netware" ) > -1; } else if( family.equals( "dos" ) ) { - isFamily = m_pathSep.equals( ";" ) && !isFamily( "netware" ); + isFamily = PATH_SEP.equals( ";" ) && !isFamily( "netware" ); } else if( family.equals( "mac" ) ) { - isFamily = m_osName.indexOf( "mac" ) > -1; + isFamily = OS_NAME.indexOf( "mac" ) > -1; } else if( family.equals( "unix" ) ) { - isFamily = m_pathSep.equals( ":" ) && - ( !isFamily( "mac" ) || m_osName.endsWith( "x" ) ); + isFamily = PATH_SEP.equals( ":" ) && + ( !isFamily( "mac" ) || OS_NAME.endsWith( "x" ) ); } else {