File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
src/main/java/com/atomgraph/linkeddatahub/resource/admin Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -91,12 +91,18 @@ public Response post(@FormParam("uri") String ontologyURI, @HeaderParam("Referer
9191 {
9292 URI ontologyDocURI = UriBuilder .fromUri (ontologyURI ).fragment (null ).build (); // skip fragment from the ontology URI to get its graph URI
9393 if (log .isDebugEnabled ()) log .debug ("Purge ontology document with URI '{}' from frontend proxy cache" , ontologyDocURI );
94- purge (getApplication ().getFrontendProxy (), ontologyDocURI .toString ());
94+ try (Response response = purge (getApplication ().getFrontendProxy (), ontologyDocURI .toString ()))
95+ {
96+ // Response automatically closed by try-with-resources
97+ }
9598 }
9699 if (getApplication ().getService ().getBackendProxy () != null )
97100 {
98101 if (log .isDebugEnabled ()) log .debug ("Ban ontology with URI '{}' from backend proxy cache" , ontologyURI );
99- ban (getApplication ().getService ().getBackendProxy (), ontologyURI );
102+ try (Response response = ban (getApplication ().getService ().getBackendProxy (), ontologyURI ))
103+ {
104+ // Response automatically closed by try-with-resources
105+ }
100106 }
101107
102108 // !!! we need to reload the ontology model before returning a response, to make sure the next request already gets the new version !!!
You can’t perform that action at this time.
0 commit comments