提交 40cd277b 编写于 作者: J Juergen Hoeller

ReloadableResourceBundleMessageSource prevents accidental exposure of incomplete holder

Issue: SPR-12177
上级 0cf472b1
......@@ -451,11 +451,11 @@ public class ReloadableResourceBundleMessageSource extends AbstractMessageSource
*/
protected PropertiesHolder getProperties(String filename) {
PropertiesHolder propHolder = this.cachedProperties.get(filename);
long originalTimestamp = -1;
long originalTimestamp = -2;
if (propHolder != null) {
originalTimestamp = propHolder.getRefreshTimestamp();
if (originalTimestamp < 0 || originalTimestamp > System.currentTimeMillis() - this.cacheMillis) {
if (originalTimestamp == -1 || originalTimestamp > System.currentTimeMillis() - this.cacheMillis) {
// Up to date
return propHolder;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册