aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-base
diff options
context:
space:
mode:
authorolivier lamy <olamy@apache.org>2016-09-14 10:51:21 +1000
committerolivier lamy <olamy@apache.org>2016-09-14 10:51:21 +1000
commitc997c883f02a5107d0ac6ecf8db210801e202f7e (patch)
treededaef65aea4eb51b61a86eb5fd44dcfcdff3e34 /archiva-modules/archiva-base
parentbd10f7b8a2ff638bb4b3796321425cac9db5476a (diff)
downloadarchiva-c997c883f02a5107d0ac6ecf8db210801e202f7e.tar.gz
archiva-c997c883f02a5107d0ac6ecf8db210801e202f7e.zip
use StringUtils to shorter code
Signed-off-by: olivier lamy <olamy@apache.org>
Diffstat (limited to 'archiva-modules/archiva-base')
-rw-r--r--archiva-modules/archiva-base/archiva-proxy-common/src/main/java/org/apache/archiva/proxy/common/WagonFactoryRequest.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/archiva-modules/archiva-base/archiva-proxy-common/src/main/java/org/apache/archiva/proxy/common/WagonFactoryRequest.java b/archiva-modules/archiva-base/archiva-proxy-common/src/main/java/org/apache/archiva/proxy/common/WagonFactoryRequest.java
index 40544022d..e348899ef 100644
--- a/archiva-modules/archiva-base/archiva-proxy-common/src/main/java/org/apache/archiva/proxy/common/WagonFactoryRequest.java
+++ b/archiva-modules/archiva-base/archiva-proxy-common/src/main/java/org/apache/archiva/proxy/common/WagonFactoryRequest.java
@@ -19,6 +19,7 @@ package org.apache.archiva.proxy.common;
*/
import org.apache.archiva.admin.model.beans.NetworkProxy;
+import org.apache.commons.lang.StringUtils;
import java.util.HashMap;
import java.util.Map;
@@ -45,7 +46,7 @@ public class WagonFactoryRequest
private String userAgent = DEFAULT_USER_AGENT;
static {
- if (System.getProperty(USER_AGENT_SYSTEM_PROPERTY)!=null && !"".equals(System.getProperty(USER_AGENT_SYSTEM_PROPERTY))) {
+ if ( StringUtils.isNotBlank( System.getProperty( USER_AGENT_SYSTEM_PROPERTY))) {
DEFAULT_USER_AGENT=System.getProperty(USER_AGENT_SYSTEM_PROPERTY);
}
}