Skip to content

Commit 6b9c9b0

Browse files
committed
http SynBioHub registry now gets updated to https.
1 parent ee3a4c1 commit 6b9c9b0

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/main/java/edu/utah/ece/async/sboldesigner/sbol/editor/dialog/RegistryInputDialog.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -664,9 +664,25 @@ public void mouseClicked(MouseEvent e) {
664664
* Wraps SynBioHubFrontend creation so legacy locations can be used.
665665
*/
666666
private SynBioHubFrontend createSynBioHubFrontend(String location, String uriPrefix) {
667+
// update location and SynBioHub location if not using https
667668
if (location == "http://synbiohub.org") {
668669
location = "https://synbiohub.org";
670+
671+
// This isn't elegant, but should work
672+
ArrayList<Registry> oldRegistries = new ArrayList<Registry>();
673+
for (int i = 3; i < Registries.get().size(); i++) {
674+
oldRegistries.add(Registries.get().get(i));
675+
}
676+
677+
Registries.get().restoreDefaults();
678+
679+
for (Registry r : oldRegistries) {
680+
Registries.get().add(r);
681+
}
682+
683+
Registries.get().save();
669684
}
685+
670686
return new SynBioHubFrontend(location, uriPrefix);
671687
}
672688
}

0 commit comments

Comments
 (0)