mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-09-17 12:09:16 +00:00
Polish
See gh-48239
This commit is contained in:
+5
-2
@@ -33,7 +33,7 @@ import java.util.Map;
|
||||
*/
|
||||
public final class ConfigurationMetadataRepositoryJsonBuilder {
|
||||
|
||||
private Charset defaultCharset = StandardCharsets.UTF_8;
|
||||
private final Charset defaultCharset;
|
||||
|
||||
private final JsonReader reader = new JsonReader();
|
||||
|
||||
@@ -91,11 +91,14 @@ public final class ConfigurationMetadataRepositoryJsonBuilder {
|
||||
return result;
|
||||
}
|
||||
|
||||
private SimpleConfigurationMetadataRepository add(InputStream in, Charset charset) {
|
||||
private SimpleConfigurationMetadataRepository add(InputStream in, Charset charset) throws IOException {
|
||||
try {
|
||||
RawConfigurationMetadata metadata = this.reader.read(in, charset);
|
||||
return create(metadata);
|
||||
}
|
||||
catch (IOException ex) {
|
||||
throw ex;
|
||||
}
|
||||
catch (Exception ex) {
|
||||
throw new IllegalStateException("Failed to read configuration metadata", ex);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user