1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-19 14:15:50 +02:00

trivial change - null pointer check

This commit is contained in:
David McKnight 2009-03-03 16:19:03 +00:00
parent 7f470070eb
commit 0373d5104e

View file

@ -1115,10 +1115,19 @@ public abstract class RemoteFile implements IRemoteFile, IAdaptable, Comparable
String path = this.getAbsolutePath();
//String otherHost = other.getHostName();
String alias1 = this.getParentRemoteFileSubSystem().getHostAliasName();
String alias2 = other.getParentRemoteFileSubSystem().getHostAliasName();
IRemoteFileSubSystem ss1 = this.getParentRemoteFileSubSystem();
IRemoteFileSubSystem ss2 = other.getParentRemoteFileSubSystem();
String alias1 = ""; //$NON-NLS-1$
if (ss1 != null){
alias1 = ss1.getHostAliasName();
}
String alias2 = "";
if (ss2 != null){
alias2 = ss2.getHostAliasName();
}
//return getHostName().equals(otherHost) && path.equals(otherPath);
return alias1.equals(alias2) && path.equals(otherPath);
}
else