Remove checked exceptions from @PostConstructs

Update all @PostConstruct methods to ensure that they don't throw
checked exceptions. Required to allow deployment of Spring Boot
applications on Glassfish.

Fixes gh-868
This commit is contained in:
Phillip Webb
2014-05-15 15:47:44 +01:00
parent 08a6efff46
commit fa7da5925b
5 changed files with 43 additions and 19 deletions

View File

@@ -18,7 +18,6 @@ package org.springframework.boot.actuate.autoconfigure;
import java.io.IOException;
import java.io.InputStream;
import java.net.URISyntaxException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
@@ -214,7 +213,7 @@ public class CrshAutoConfiguration {
}
@PostConstruct
public void init() throws Exception {
public void init() {
FS commandFileSystem = createFileSystem(this.properties
.getCommandPathPatterns());
FS configurationFileSystem = createFileSystem(this.properties
@@ -232,8 +231,7 @@ public class CrshAutoConfiguration {
start(context);
}
protected FS createFileSystem(String[] pathPatterns) throws IOException,
URISyntaxException {
protected FS createFileSystem(String[] pathPatterns) {
Assert.notNull(pathPatterns, "PathPatterns must not be null");
FS fileSystem = new FS();
for (String pathPattern : pathPatterns) {