Fix bad pathname settings.
This commit is contained in:
parent
5912bf9079
commit
9daeb06fc4
1 changed files with 40 additions and 20 deletions
|
@ -197,12 +197,18 @@ public class URLPresenter extends StringPresenter
|
|||
public void setSource(final String source)
|
||||
{
|
||||
//
|
||||
URL url;
|
||||
if (source == null)
|
||||
{
|
||||
url = null;
|
||||
this.source = null;
|
||||
this.sourcePathname = null;
|
||||
this.sourceTime = 0;
|
||||
super.setSource(null);
|
||||
}
|
||||
else if (source.matches(".+://.+"))
|
||||
else
|
||||
{
|
||||
//
|
||||
URL url;
|
||||
if (source.matches(".+://.+"))
|
||||
{
|
||||
try
|
||||
{
|
||||
|
@ -221,7 +227,21 @@ public class URLPresenter extends StringPresenter
|
|||
}
|
||||
|
||||
//
|
||||
setSource(url);
|
||||
if (url == null)
|
||||
{
|
||||
this.source = null;
|
||||
this.sourcePathname = source;
|
||||
this.sourceTime = 0;
|
||||
super.setSource(null);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.source = url;
|
||||
this.sourcePathname = source;
|
||||
this.sourceTime = 0;
|
||||
super.setSource(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -282,7 +302,7 @@ public class URLPresenter extends StringPresenter
|
|||
//
|
||||
if (this.source == null)
|
||||
{
|
||||
String errorMessage = "source not defined";
|
||||
String errorMessage = "source not defined (" + this.sourcePathname + ")";
|
||||
logger.error(errorMessage);
|
||||
throw new NullPointerException(errorMessage);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue