Show an error message for invalid server url
[pub/Android/ownCloud.git] / src / com / owncloud / android / utils / DisplayUtils.java
index 999700f..c18a0e4 100644 (file)
@@ -1,6 +1,10 @@
-/* ownCloud Android client application\r
+/**\r
+ *   ownCloud Android client application\r
+ *\r
+ *   @author Bartek Przybylski\r
+ *   @author David A. Velasco\r
  *   Copyright (C) 2011  Bartek Przybylski\r
- *   Copyright (C) 2012-2013 ownCloud Inc.\r
+ *   Copyright (C) 2015 ownCloud Inc.\r
  *\r
  *   This program is free software: you can redistribute it and/or modify\r
  *   it under the terms of the GNU General Public License version 2,\r
@@ -40,9 +44,6 @@ import com.owncloud.android.datamodel.OCFile;
 \r
 /**\r
  * A helper class for some string operations.\r
- * \r
- * @author Bartek Przybylski\r
- * @author David A. Velasco\r
  */\r
 public class DisplayUtils {\r
     \r
@@ -265,14 +266,14 @@ public class DisplayUtils {
             } else if (url.indexOf("@") != -1) {\r
                 hostStart = url.indexOf("@") + "@".length();\r
             }\r
-            \r
+\r
             int hostEnd = url.substring(hostStart).indexOf("/");\r
             // Handle URL which doesn't have a path (path is implicitly '/')\r
             hostEnd = (hostEnd == -1 ? url.length() : hostStart + hostEnd);\r
-            \r
+\r
             String host = url.substring(hostStart, hostEnd);\r
             host = (toASCII ? IDN.toASCII(host) : IDN.toUnicode(host));\r
-            \r
+\r
             return url.substring(0, hostStart) + host + url.substring(hostEnd);\r
         } else {\r
             return url;\r