You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by lu...@apache.org on 2013/01/02 21:41:22 UTC

svn commit: r1428017 - /struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/util/URLUtil.java

Author: lukaszlenart
Date: Wed Jan  2 20:41:22 2013
New Revision: 1428017

URL: http://svn.apache.org/viewvc?rev=1428017&view=rev
Log:
Removes unused constants and adds some logging

Modified:
    struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/util/URLUtil.java

Modified: struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/util/URLUtil.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/util/URLUtil.java?rev=1428017&r1=1428016&r2=1428017&view=diff
==============================================================================
--- struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/util/URLUtil.java (original)
+++ struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/util/URLUtil.java Wed Jan  2 20:41:22 2013
@@ -27,10 +27,6 @@ import java.net.URL;
 public class URLUtil {
 
     private static final Logger LOG = LoggerFactory.getLogger(URLUtil.class);
-    public static final String JBOSS5_VFS = "vfs";
-    public static final String JBOSS5_VFSZIP = "vfszip";
-    public static final String JBOSS5_VFSMEMORY = "vfsmemory";
-    public static final String JBOSS5_VFSFILE = "vfsfile";
 
     /**
      * Verify That the given String is in valid URL format.
@@ -38,6 +34,9 @@ public class URLUtil {
      * @return a boolean indicating whether the URL seems to be incorrect.
      */
     public static boolean verifyUrl(String url) {
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("Checking if url [#0] is valid", url);
+        }
         if (url == null) {
             return false;
         }
@@ -52,6 +51,9 @@ public class URLUtil {
 
             return true;
         } catch (MalformedURLException e) {
+            if (LOG.isDebugEnabled()) {
+                LOG.debug("Url [#0] is invalid: #1", e, url, e.getMessage());
+            }
             return false;
         }
     }