/** * Returns the {@link URL} of a document that gives instructions on the actions to * be taken by a human. */ public URL getInstance() { URI instance = getProblem().getInstance(); if (instance == null) { throw new AcmeProtocolException("Instance URL required, but missing."); } try { return instance.toURL(); } catch (MalformedURLException ex) { throw new AcmeProtocolException("Bad instance URL: " + instance.toString(), ex); } }
/** * Returns the {@link URL} of a document that gives instructions on the actions to * be taken by a human. */ public URL getInstance() { URI instance = getProblem().getInstance(); if (instance == null) { throw new AcmeProtocolException("Instance URL required, but missing."); } try { return instance.toURL(); } catch (MalformedURLException ex) { throw new AcmeProtocolException("Bad instance URL: " + instance.toString(), ex); } }