mirror of
https://github.com/correl/mage.git
synced 2024-11-15 03:00:16 +00:00
Removed useless else case
This commit is contained in:
parent
98c2b171de
commit
aa96caa554
1 changed files with 5 additions and 7 deletions
|
@ -57,9 +57,7 @@ public class URLHandler {
|
|||
} catch (IOException | URISyntaxException ex) {
|
||||
// do nothing
|
||||
}
|
||||
} else {
|
||||
//do nothing
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -76,11 +74,11 @@ public class URLHandler {
|
|||
for (String item : parts) {
|
||||
try {
|
||||
URL url = new URL(item);
|
||||
// The item is a valid URL
|
||||
// The item is already a valid URL
|
||||
output = output + "<a href=\"" + url + "\">" + url + "</a> ";
|
||||
|
||||
} catch (MalformedURLException e) {
|
||||
//The item might still be an URL
|
||||
//The item might still be a URL
|
||||
if (item.startsWith("www.")) {
|
||||
output = output + "<a href=\"" + item + "\">" + item + "</a> ";
|
||||
} else {
|
||||
|
@ -103,10 +101,10 @@ public class URLHandler {
|
|||
for (String item : parts) {
|
||||
try {
|
||||
URL url = new URL(item);
|
||||
// The item is a valid URL
|
||||
// The item is already a valid URL
|
||||
output = url.toString();
|
||||
} catch (MalformedURLException e) {
|
||||
//The item might still be an URL
|
||||
//The item might still be a URL
|
||||
if (item.startsWith("www.")) {
|
||||
output = "http://" + item;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue