You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note the following test @test
public void showKmsgIssueTest()
{
kvmsg msg = new kvmsg(0);
msg.setKey("mykey");
kvmsg clone = msg.dup();
clone.setKey(clone.getKey() + "theirkey");
// This should pass but does not in 0.5.3:
assert(clone.getKey().equals("mykeytheirkey"));
}
However with the following change in kvmsg it passes:
// Set message getKey as provided
public void setKey(String key)
{
byte[] msg = new byte[key.length()];
System.arraycopy(key.getBytes(ZMQ.CHARSET), 0, msg, 0, key.length());
frame[FRAME_KEY] = msg;
present[FRAME_KEY] = true;
this.key = null;// THIS LINE FIXES the test. Used in later getKey optimization....
}
The text was updated successfully, but these errors were encountered:
Note the following test
@test
public void showKmsgIssueTest()
{
kvmsg msg = new kvmsg(0);
msg.setKey("mykey");
kvmsg clone = msg.dup();
clone.setKey(clone.getKey() + "theirkey");
// This should pass but does not in 0.5.3:
assert(clone.getKey().equals("mykeytheirkey"));
}
However with the following change in kvmsg it passes:
// Set message getKey as provided
public void setKey(String key)
{
byte[] msg = new byte[key.length()];
System.arraycopy(key.getBytes(ZMQ.CHARSET), 0, msg, 0, key.length());
frame[FRAME_KEY] = msg;
present[FRAME_KEY] = true;
this.key = null;// THIS LINE FIXES the test. Used in later getKey optimization....
}
The text was updated successfully, but these errors were encountered: