Skip to content

Commit

Permalink
ファイルが存在しない場合、タイムスタンプチェックが無効なときにチェックし続ける問題を修正
Browse files Browse the repository at this point in the history
  • Loading branch information
ko-suga committed Feb 16, 2014
1 parent c2c9f44 commit 4a50fef
Showing 1 changed file with 8 additions and 2 deletions.
Expand Up @@ -20,7 +20,9 @@
import java.net.URL;
import java.util.Date;

import org.seasar.mayaa.impl.CONST_IMPL;
import org.seasar.mayaa.impl.ParameterAwareImpl;
import org.seasar.mayaa.impl.engine.EngineUtil;
import org.seasar.mayaa.impl.util.IOUtil;
import org.seasar.mayaa.impl.util.StringUtil;
import org.seasar.mayaa.source.SourceDescriptor;
Expand All @@ -30,7 +32,7 @@
* @author Koji Suga (Gluegent Inc.)
*/
public class ClassLoaderSourceDescriptor extends ParameterAwareImpl
implements SourceDescriptor {
implements SourceDescriptor, CONST_IMPL {

private static final long serialVersionUID = 1L;

Expand Down Expand Up @@ -69,14 +71,18 @@ public void setSystemID(String systemID) {
public boolean exists() {
if (_url == null) {
synchronized (this) {
if (_url == null) {
if (_url == null && needPrepareURL()) {
prepareURL();
}
}
}
return _url != null;
}

protected boolean needPrepareURL() {
return (_timestamp == null || EngineUtil.getEngineSettingBoolean(CHECK_TIMESTAMP, true));
}

protected void prepareURL() {
String path = (_root + getSystemID()).substring(1);
if (_neighbor != null) {
Expand Down

0 comments on commit 4a50fef

Please sign in to comment.