I have the following code:
private String foo;
public void setFoo(String bar)
{
foo = bar + "bin/";
}
I expect this code to concat bar and "bin/"
using the overloaded '+'
operator. And when I do this same code sample in the debugger it works fine. For some reason though foo is always just equal to bar and never has the "bin/"
in it.
Actual code:
private String execpath_;
public void setMambaPath(String executable)
{
if (!(executable.endsWith("/")))
executable = executable.concat("/");
execpath_ = executable + "bin/";
}
elsewhere where execpath_ = just excutable without the bin/:
StringBuilder cmd = getSshCommand_();
cmd.append(execpath_ + "mambaService");
I don't use execpath_ anywhere else