|
From: mike d. <md...@st...> - 2000-01-06 16:41:30
|
On Thu, 6 Jan 2000, Scott Wyatt wrote:
> public static String getTempDir()
> {
> String separator = System.getProperty
> ("file.separator");
>
> ** Changed the conditions from == to equals().
>
> if(separator.equals("/") && (new File
> ("/tmp")).exists())
this shouldn't matter. the String separator is the value of a System
property, and is therefore and intern()'d string. since all String
literals are also intern()'d, '==' should work the same as
String.equals() (since two intern()'d Strings that are equivalent a la
String.equals() are the *same* Object in the VM).
-md
|