/**
* Used to deserialize a subclass instance that wasn't a subclass instance when it was serialized.
* Since that means we can't deserialize our seed, we generate a new one with the {@link
* DefaultSeedGenerator}.
* @throws InvalidObjectException if the {@link DefaultSeedGenerator} fails.
*/
@SuppressWarnings("OverriddenMethodCallDuringObjectConstruction") private void readObjectNoData()
throws InvalidObjectException {
LOG.warn("BaseRandom.readObjectNoData() invoked; using DefaultSeedGenerator");
try {
fallbackSetSeed();
} catch (final RuntimeException e) {
throw (InvalidObjectException) (new InvalidObjectException(
"Failed to deserialize or generate a seed").initCause(e.getCause()));
}
initTransientFields();
setSeedInternal(seed);
}
BaseRandom.java 文件源码
java
阅读 29
收藏 0
点赞 0
评论 0
项目:BetterRandom
作者:
评论列表
文章目录