Les, this is starting too look like a problem with the serialization,
although it may have been already fixed in your world.
This seems to be the issue in SimpleSession:
the bitMask is being set if !expired, but written if expired.
private short getAlteredFieldsBitMask() {
int bitMask = 0;
bitMask = id != null ? bitMask | ID_BIT_MASK : bitMask;
bitMask = startTimestamp != null ? bitMask |
START_TIMESTAMP_BIT_MASK : bitMask;
bitMask = stopTimestamp != null ? bitMask | STOP_TIMESTAMP_BIT_MASK
: bitMask;
bitMask = lastAccessTime != null ? bitMask |
LAST_ACCESS_TIME_BIT_MASK : bitMask;
bitMask = timeout != 0l ? bitMask | TIMEOUT_BIT_MASK : bitMask;
bitMask = !expired ? bitMask | EXPIRED_BIT_MASK : bitMask;
bitMask = host != null ? bitMask | HOST_BIT_MASK : bitMask;
bitMask = !CollectionUtils.isEmpty(attributes) ? bitMask |
ATTRIBUTES_BIT_MASK : bitMask;
return (short) bitMask;
}
private void writeObject(ObjectOutputStream out) throws IOException {
out.defaultWriteObject();
short alteredFieldsBitMask = getAlteredFieldsBitMask();
out.writeShort(alteredFieldsBitMask);
if (id != null) {
out.writeObject(id);
}
if (startTimestamp != null) {
out.writeObject(startTimestamp);
}
if (stopTimestamp != null) {
out.writeObject(stopTimestamp);
}
if (lastAccessTime != null) {
out.writeObject(lastAccessTime);
}
if (timeout != 0l) {
out.writeLong(timeout);
}
if (expired) {
out.writeBoolean(expired);
}
if (host != null) {
out.writeUTF(host);
}
if (!CollectionUtils.isEmpty(attributes)) {
out.writeObject(attributes);
}
}
Now this is happening with the package that I am getting through maven, I
have not grabbed the latest source from the repository.
http://incubator.apache.org/shiro is timing out right now for me and I was
wondering if the shiro maven packages get updated without getting a version
bump.
--
View this message in context:
http://shiro-user.582556.n2.nabble.com/serialization-problem-with-SimpleSession-tp5537015p5539256.html
Sent from the Shiro User mailing list archive at Nabble.com.