private URI metadataUriFromRegistry(String key) { try { return uriRegistry.find(metadataKey(key)); } catch (IllegalArgumentException ignored) { return null; } }
public AppRegistration find(String name, String type) { try { URI uri = this.uriRegistry.find(key(name, type)); return new AppRegistration(name, type, uri, this.resourceLoader); } catch (IllegalArgumentException e) { return null; } }
if (registry.find(key) != null) {
if (registry.find(key) != null) {
public AppRegistration find(String name, ApplicationType type) { try { String key = key(name, type); URI uri = this.uriRegistry.find(key); URI metadataUri = metadataUriFromRegistry(key); return new AppRegistration(name, type, uri, metadataUri); } catch (IllegalArgumentException e) { return null; // ignore and treat as not found } }