From 4a50fef5d3f2086c8c2a37eeaca037828d851ae8 Mon Sep 17 00:00:00 2001 From: Koji Suga Date: Sun, 16 Feb 2014 21:22:47 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=95=E3=82=A1=E3=82=A4=E3=83=AB=E3=81=8C?= =?UTF-8?q?=E5=AD=98=E5=9C=A8=E3=81=97=E3=81=AA=E3=81=84=E5=A0=B4=E5=90=88?= =?UTF-8?q?=E3=80=81=E3=82=BF=E3=82=A4=E3=83=A0=E3=82=B9=E3=82=BF=E3=83=B3?= =?UTF-8?q?=E3=83=97=E3=83=81=E3=82=A7=E3=83=83=E3=82=AF=E3=81=8C=E7=84=A1?= =?UTF-8?q?=E5=8A=B9=E3=81=AA=E3=81=A8=E3=81=8D=E3=81=AB=E3=83=81=E3=82=A7?= =?UTF-8?q?=E3=83=83=E3=82=AF=E3=81=97=E7=B6=9A=E3=81=91=E3=82=8B=E5=95=8F?= =?UTF-8?q?=E9=A1=8C=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mayaa/impl/source/ClassLoaderSourceDescriptor.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src-impl/org/seasar/mayaa/impl/source/ClassLoaderSourceDescriptor.java b/src-impl/org/seasar/mayaa/impl/source/ClassLoaderSourceDescriptor.java index 3edfb076f..082bb26c4 100644 --- a/src-impl/org/seasar/mayaa/impl/source/ClassLoaderSourceDescriptor.java +++ b/src-impl/org/seasar/mayaa/impl/source/ClassLoaderSourceDescriptor.java @@ -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; @@ -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; @@ -69,7 +71,7 @@ public void setSystemID(String systemID) { public boolean exists() { if (_url == null) { synchronized (this) { - if (_url == null) { + if (_url == null && needPrepareURL()) { prepareURL(); } } @@ -77,6 +79,10 @@ public boolean exists() { 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) {