Skip to content

Commit

Permalink
Upgrade check hardcoded
Browse files Browse the repository at this point in the history
  • Loading branch information
dgault committed Aug 28, 2024
1 parent 41e12f6 commit 75a7d8d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
32 changes: 16 additions & 16 deletions components/formats-bsd/src/loci/formats/UpgradeChecker.java
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public class UpgradeChecker {
};

/** Location of the OME registry. */
public static final String REGISTRY = "http://upgrade.openmicroscopy.org.uk";
public static final String REGISTRY = "http://www.openmicroscopy.org/qa3/registry/hit";

/** Value of "bioformats.caller" for Bio-Formats utilities. */
public static final String DEFAULT_CALLER = "Bio-Formats utilities";
Expand Down Expand Up @@ -198,28 +198,28 @@ public boolean newVersionAvailable(String registryID, String caller) {
final StringBuilder query = new StringBuilder(REGISTRY);
for (int i=0; i<REGISTRY_PROPERTIES.length; i++) {
if (i == 0) {
query.append("?");
// query.append("?");
}
else {
query.append(";");
// query.append(";");
}

query.append(REGISTRY_PROPERTIES[i]);
query.append("=");
// query.append(REGISTRY_PROPERTIES[i]);
// query.append("=");

if (i == 0) {
query.append(FormatTools.VERSION);
}
else {
try {
query.append(URLEncoder.encode(
System.getProperty(REGISTRY_PROPERTIES[i]), "UTF-8"));
}
catch (UnsupportedEncodingException e) {
LOGGER.warn("Failed to append query argument: " +
REGISTRY_PROPERTIES[i], e);
}
// query.append(FormatTools.VERSION);
}
// else {
// try {
// //query.append(URLEncoder.encode(
// // System.getProperty(REGISTRY_PROPERTIES[i]), "UTF-8"));
// }
// catch (UnsupportedEncodingException e) {
// LOGGER.warn("Failed to append query argument: " +
// REGISTRY_PROPERTIES[i], e);
// }
// }
}

System.setProperty(UPGRADE_CHECK_PROPERTY, "true");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public static void main(String[] args) {

boolean doInstall = args.length > 0 && args[0].equals("-install");

if (checker.newVersionAvailable(UpgradeChecker.DEFAULT_CALLER)) {
if (checker.newVersionAvailable(UpgradeChecker.REGISTRY_IMAGEJ, UpgradeChecker.DEFAULT_CALLER)) {
System.out.println("A newer stable version is available.");
}
else {
Expand Down

0 comments on commit 75a7d8d

Please sign in to comment.