Skip to content

Commit

Permalink
minor change
Browse files Browse the repository at this point in the history
  • Loading branch information
stataru8 committed Nov 27, 2024
1 parent 813b755 commit f1e000d
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -374,10 +374,12 @@ private void applyJettyConfiguration() throws Exception {
if (emptyConfigFile != null) {
// by default the file is not physically there
if (!emptyConfigFile.createNewFile()) {
try (InputStream resourceStream = bundle.getResource(fileName).openStream();
FileOutputStream fos = new FileOutputStream(emptyConfigFile)) {
resourceStream.transferTo(fos);
}
emptyConfigFile.delete();
emptyConfigFile.createNewFile();
}
try (InputStream resourceStream = bundle.getResource(fileName).openStream();
FileOutputStream fos = new FileOutputStream(emptyConfigFile)) {
resourceStream.transferTo(fos);
}
URL emptyConfigURL = emptyConfigFile.toURL();
new XmlConfiguration(jettyFactory.newResource(emptyConfigURL));
Expand Down

0 comments on commit f1e000d

Please sign in to comment.