From c3ce4f0f90a0793bf4aa758a929b794d002a1428 Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Tue, 4 Jan 2022 15:12:18 +0100 Subject: [PATCH] Polish contribution See gh-27823 --- .../context/index/processor/MetadataStore.java | 4 ++-- .../core/LocalVariableTableParameterNameDiscoverer.java | 6 +++--- .../http/converter/BufferedImageHttpMessageConverter.java | 6 +++--- .../http/converter/ResourceHttpMessageConverter.java | 6 +++--- .../http/converter/ResourceRegionHttpMessageConverter.java | 6 +++--- .../web/socket/messaging/StompSubProtocolHandler.java | 6 +++--- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/spring-context-indexer/src/main/java/org/springframework/context/index/processor/MetadataStore.java b/spring-context-indexer/src/main/java/org/springframework/context/index/processor/MetadataStore.java index 8593fc7508..8585b89bea 100644 --- a/spring-context-indexer/src/main/java/org/springframework/context/index/processor/MetadataStore.java +++ b/spring-context-indexer/src/main/java/org/springframework/context/index/processor/MetadataStore.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2018 the original author or authors. + * Copyright 2002-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -62,7 +62,7 @@ class MetadataStore { private CandidateComponentsMetadata readMetadata(InputStream in) throws IOException { - try (in){ + try (in) { return PropertiesMarshaller.read(in); } } diff --git a/spring-core/src/main/java/org/springframework/core/LocalVariableTableParameterNameDiscoverer.java b/spring-core/src/main/java/org/springframework/core/LocalVariableTableParameterNameDiscoverer.java index 70a2a6adf6..f20807f119 100644 --- a/spring-core/src/main/java/org/springframework/core/LocalVariableTableParameterNameDiscoverer.java +++ b/spring-core/src/main/java/org/springframework/core/LocalVariableTableParameterNameDiscoverer.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2019 the original author or authors. + * Copyright 2002-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -101,8 +101,8 @@ public class LocalVariableTableParameterNameDiscoverer implements ParameterNameD } return NO_DEBUG_INFO_MAP; } - // We cannot use try-with-resources here as, potential, exception upon closing - // would still bubble up the stack + // We cannot use try-with-resources here for the InputStream, since we have + // custom handling of the close() method in a finally-block. try { ClassReader classReader = new ClassReader(is); Map map = new ConcurrentHashMap<>(32); diff --git a/spring-web/src/main/java/org/springframework/http/converter/BufferedImageHttpMessageConverter.java b/spring-web/src/main/java/org/springframework/http/converter/BufferedImageHttpMessageConverter.java index 7a020f25c0..0dbfc02f09 100644 --- a/spring-web/src/main/java/org/springframework/http/converter/BufferedImageHttpMessageConverter.java +++ b/spring-web/src/main/java/org/springframework/http/converter/BufferedImageHttpMessageConverter.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2019 the original author or authors. + * Copyright 2002-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -169,8 +169,8 @@ public class BufferedImageHttpMessageConverter implements HttpMessageConverter