git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'task/JAL-3236_install4j_linux_unix_userland_installers' into develop
[jalview.git]
/
getdown
/
src
/
getdown
/
core
/
src
/
main
/
java
/
com
/
threerings
/
getdown
/
data
/
Application.java
diff --git
a/getdown/src/getdown/core/src/main/java/com/threerings/getdown/data/Application.java
b/getdown/src/getdown/core/src/main/java/com/threerings/getdown/data/Application.java
index
182b057
..
7376cdb
100644
(file)
--- a/
getdown/src/getdown/core/src/main/java/com/threerings/getdown/data/Application.java
+++ b/
getdown/src/getdown/core/src/main/java/com/threerings/getdown/data/Application.java
@@
-1061,10
+1061,10
@@
public class Application
if (j > -1) {
ext = filename.substring(j+1);
}
if (j > -1) {
ext = filename.substring(j+1);
}
- if (startupFileExtensions.contains(ext.toLowerCase())) {
+ if (locatorFileExtension.equals(ext.toLowerCase())) {
+ // this file extension should have been dealt with in Getdown class
+ } else {
_appargs.add(0, "-open");
_appargs.add(0, "-open");
- } else if (locatorFileExtension.equals(ext.toLowerCase())) {
- // deal with this when first encountered in Getdown!
}
}
}
}
@@
-1791,10
+1791,20
@@
public class Application
}
public void newAppbase (URL url) {
}
public void newAppbase (URL url) {
- if ((url.getHost().endsWith(".jalview.org") || url.equals("jalview.org"))) {
+ if (
+ url.getHost().equals(locatorDomain)
+ || (allowLocatorSubdomains && url.getHost().endsWith("."+locatorDomain))
+ || (allowLocatorFileProtocol && url.getProtocol().equals("file") && url.getHost().equals(""))
+ ) {
newAppbase = url;
newAppbase = url;
+ log.info("Appbase set to Java Version Locator url '"+url.toString()+"'");
+ return;
}
}
- log.info("Java Version Locator url '"+url.toString()+"' does not have a jalview.org domain. Ignoring");
+ log.info("Java Version Locator url '"+url.toString()+"' does not have satisfy domain rules ("
+ +(allowLocatorFileProtocol?"file:///|":"")
+ +"https://"
+ +(allowLocatorSubdomains?"[*.]":locatorDomain)
+ +"). Ignoring");
}
protected final EnvConfig _envc;
}
protected final EnvConfig _envc;
@@
-1862,7
+1872,9
@@
public class Application
protected static final String ENV_VAR_PREFIX = "%ENV.";
protected static final Pattern ENV_VAR_PATTERN = Pattern.compile("%ENV\\.(.*?)%");
protected static final String ENV_VAR_PREFIX = "%ENV.";
protected static final Pattern ENV_VAR_PATTERN = Pattern.compile("%ENV\\.(.*?)%");
+ protected static final String locatorDomain = "jalview.org";
+ protected boolean allowLocatorSubdomains = true;
+ protected boolean allowLocatorFileProtocol = true;
- public static final List<String> startupFileExtensions = Arrays.asList(new String[] { "jvp" });
public static final String locatorFileExtension = "jvl";
}
public static final String locatorFileExtension = "jvl";
}