use isNotBlank to avoid warning in log

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1176384 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2011-09-27 13:55:26 +00:00
parent 066197cdd2
commit afababf393
2 changed files with 12 additions and 3 deletions

View File

@ -178,7 +178,7 @@ public class DefaultDownloadRemoteIndexScheduler
return;
}
NetworkProxy networkProxy = null;
if ( remoteRepository.getRemoteDownloadNetworkProxyId() != null )
if ( StringUtils.isNotBlank( remoteRepository.getRemoteDownloadNetworkProxyId() ) )
{
networkProxy = networkProxyAdmin.getNetworkProxy( remoteRepository.getRemoteDownloadNetworkProxyId() );
if ( networkProxy == null )

View File

@ -42,16 +42,25 @@
<s:submit value="Update Repository"/>
</s:form>
<redback:ifAuthorized permission="archiva-run-indexer">
<s:form method="post" action="editRemoteRepository!downloadRemoteIndex" namespace="/admin" validate="false">
<s:form method="post" action="editRemoteRepository!downloadRemoteIndex" namespace="/admin" validate="false"
onsubmit="javascript:downloadRemote();">
<s:hidden name="repoid"/>
<s:checkbox name="now" label="Now" />
<s:checkbox name="fullDownload" label="Full download"/>
<s:submit value="download Remote Index"/>
<s:submit value="download Remote Index" onclick="javascript:downloadRemote();"/>
</s:form>
</redback:ifAuthorized>
<script type="text/javascript">
document.getElementById("editRemoteRepository_repository_name").focus();
function downloadRemote() {
$.ajax({
url: "test.html",
success: function(){
alert("ok");
}
});
}
</script>
</div>