Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[dsdp-tm-dev] RunUniversalCommand nullpointer is a bug?

Hi there,
I have a very nice piece of code now allowing me to find every TCF agents on the
lan. For this I have defined a SystemType which does not have a file subsystem
but has an ssh shell subsystem. I am using RunUniversalCommand to execute a
popup menu command on the concerned host but RemoteCommandHelpers is
implemented like this:

[RemoteCommandHelpers.java:146]
IRemoteFileSubSystemConfiguration fileSSF =
RemoteFileUtility.getFileSubSystemConfiguration(cmdSubSystem.getHost().getSystemType());

IRemoteFile pwd = ((RemoteCommandShell)defaultShell).getWorkingDirectory();
if (pwd == null || !pwd.getAbsolutePath().equals(path)){
	String cdCmd = "cd " + PathUtility.enQuoteUnix(path);
	if (!fileSSF.isUnixStyle()){
................

Thing is the doc of RemoteFileUtility.getFileSubSystemConfiguration states that
it can return null (and it does in my case cause I have no file subsystem) but
isUnixStyle() is called right after on the possibly null fileSSF, which causes
a nullpointerexception in my case.
Is this intended?
As a workaround I am currently setting the workingdir manually before the
if(pwd..)
cheers,
Jacques


Back to the top