mirror of
https://github.com/igniterealtime/Spark.git
synced 2025-10-29 19:57:28 +00:00
BrowserLauncher: remove toLowerCase()
This commit is contained in:
parent
fb6333a50f
commit
8669fc3b8e
@ -32,7 +32,8 @@ public class BrowserLauncher {
|
|||||||
try {
|
try {
|
||||||
Desktop.getDesktop().browse(new URI(url));
|
Desktop.getDesktop().browse(new URI(url));
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
Runtime.getRuntime().exec("xdg-open " + url);
|
// fallback on Linux
|
||||||
|
Runtime.getRuntime().exec("xdg-open " + url);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
File f = new File(url);
|
File f = new File(url);
|
||||||
@ -40,7 +41,7 @@ public class BrowserLauncher {
|
|||||||
try {
|
try {
|
||||||
Desktop.getDesktop().open(f);
|
Desktop.getDesktop().open(f);
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
if (!url.toLowerCase().startsWith("//")) {
|
if (!url.startsWith("//")) {
|
||||||
url = "//" + url;
|
url = "//" + url;
|
||||||
}
|
}
|
||||||
Desktop.getDesktop().browse(new URI("http:" + url));
|
Desktop.getDesktop().browse(new URI("http:" + url));
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user