donaldp 01/12/29 16:51:10
Modified: proposal/myrmidon/src/java/org/apache/myrmidon/framework
Os.java
Log:
Renamed the constants to have constant-y names
Revision Changes Path
1.5 +14 -14
jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/framework/Os.java
Index: Os.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/framework/Os.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- Os.java 23 Dec 2001 06:25:36 -0000 1.4
+++ Os.java 30 Dec 2001 00:51:09 -0000 1.5
@@ -23,13 +23,13 @@
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 @@
boolean isVersion = true;
if( version != null )
{
- isVersion = version.equals( m_osVersion );
+ isVersion = version.equals( OS_VERSION );
}
return isVersion;
}
@@ -128,7 +128,7 @@
boolean isArch = true;
if( arch != null )
{
- isArch = arch.equals( m_osArch );
+ isArch = arch.equals( OS_ARCH );
}
return isArch;
}
@@ -138,7 +138,7 @@
boolean isName = true;
if( name != null )
{
- isName = name.equals( m_osName );
+ isName = name.equals( OS_NAME );
}
return isName;
}
@@ -150,28 +150,28 @@
{
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
{
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>