[spring-extensions] 06/10: JPAR-85 - Add missing final keywords to catch clauses.
Tom Zeller
tzeller at dragonacea.biz
Mon May 16 21:56:52 EDT 2016
This is an automated email from the git hooks/post-receive script.
tzeller pushed a commit to branch JPAR-85
in repository spring-extensions.
commit b04c1ab6913a737c65675858398d1e1e7ab5c565
Author: Tom Zeller <tzeller at dragonacea.biz>
AuthorDate: Mon May 16 20:51:42 2016 -0500
JPAR-85 - Add missing final keywords to catch clauses.
---
.../ext/spring/resource/FileBackedHTTPResource.java | 14 +++++++-------
.../net/shibboleth/ext/spring/resource/HTTPResource.java | 6 +++---
.../net/shibboleth/ext/spring/resource/SVNResource.java | 8 ++++----
.../ext/spring/service/ReloadableSpringService.java | 2 +-
.../java/net/shibboleth/ext/spring/util/SpringSupport.java | 2 +-
5 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/src/main/java/net/shibboleth/ext/spring/resource/FileBackedHTTPResource.java b/src/main/java/net/shibboleth/ext/spring/resource/FileBackedHTTPResource.java
index ad9221c..b9a7b79 100644
--- a/src/main/java/net/shibboleth/ext/spring/resource/FileBackedHTTPResource.java
+++ b/src/main/java/net/shibboleth/ext/spring/resource/FileBackedHTTPResource.java
@@ -137,7 +137,7 @@ public class FileBackedHTTPResource extends HTTPResource {
log.debug("{}: Copying file.", getDescription());
ByteStreams.copy(input, out);
log.debug("{}: Copy done.", getDescription());
- } catch (IOException e) {
+ } catch (final IOException e) {
// try to tidy up
backingResource.getFile().delete();
log.error("{}: Copy failed", getDescription(), e);
@@ -154,12 +154,12 @@ public class FileBackedHTTPResource extends HTTPResource {
try {
final InputStream stream = super.getInputStream();
return saveAndClone(stream);
- } catch (IOException ex) {
+ } catch (final IOException ex) {
log.debug("{} Error obtaining HTTPResource InputStream or creating backing file", getDescription(), ex);
log.warn("{} HTTP resource was inaccessible for getInputStream(), trying backing file.", getDescription());
try {
return new FileInputStream(backingResource.getFile());
- } catch (IOException e) {
+ } catch (final IOException e) {
log.error("FileBackedHTTPResource {}: Could not read backing file", getDescription(), e);
throw e;
}
@@ -173,7 +173,7 @@ public class FileBackedHTTPResource extends HTTPResource {
final HttpResponse response;
try {
response = getResourceHeaders();
- } catch (IOException e) {
+ } catch (final IOException e) {
log.info("{}: Could not reach URL, trying file", getDescription(), e);
return backingResource.exists();
}
@@ -190,7 +190,7 @@ public class FileBackedHTTPResource extends HTTPResource {
try {
return super.contentLength();
- } catch (IOException e) {
+ } catch (final IOException e) {
log.info("{}: Could not reach URL, trying file", getDescription(), e);
return backingResource.contentLength();
}
@@ -200,7 +200,7 @@ public class FileBackedHTTPResource extends HTTPResource {
@Override public long lastModified() throws IOException {
try {
return super.lastModified();
- } catch (IOException e) {
+ } catch (final IOException e) {
log.info("{}: Could not reach URL, trying file", getDescription(), e);
return backingResource.lastModified();
}
@@ -217,7 +217,7 @@ public class FileBackedHTTPResource extends HTTPResource {
String urlAsString;
try {
urlAsString = getURL().toString();
- } catch (IOException e) {
+ } catch (final IOException e) {
urlAsString = "<unknown>";
}
diff --git a/src/main/java/net/shibboleth/ext/spring/resource/HTTPResource.java b/src/main/java/net/shibboleth/ext/spring/resource/HTTPResource.java
index 8cdeff2..810680b 100644
--- a/src/main/java/net/shibboleth/ext/spring/resource/HTTPResource.java
+++ b/src/main/java/net/shibboleth/ext/spring/resource/HTTPResource.java
@@ -186,7 +186,7 @@ public class HTTPResource extends AbstractIdentifiedInitializableComponent imple
final HttpResponse response;
try {
response = getResourceHeaders();
- } catch (IOException e) {
+ } catch (final IOException e) {
return false;
}
int httpStatusCode = response.getStatusLine().getStatusCode();
@@ -213,7 +213,7 @@ public class HTTPResource extends AbstractIdentifiedInitializableComponent imple
@Override public URI getURI() throws IOException {
try {
return resourceURL.toURI();
- } catch (URISyntaxException ex) {
+ } catch (final URISyntaxException ex) {
throw new NestedIOException("Invalid URI [" + resourceURL + "]", ex);
}
}
@@ -242,7 +242,7 @@ public class HTTPResource extends AbstractIdentifiedInitializableComponent imple
reportCachingStatus(context);
EntityUtils.consume(httpResponse.getEntity());
return httpResponse;
- } catch (IOException e) {
+ } catch (final IOException e) {
throw new IOException("Error contacting remote resource " + resourceURL.toString(), e);
} finally {
closeResponse(httpResponse);
diff --git a/src/main/java/net/shibboleth/ext/spring/resource/SVNResource.java b/src/main/java/net/shibboleth/ext/spring/resource/SVNResource.java
index b4f99b6..f9f2a86 100644
--- a/src/main/java/net/shibboleth/ext/spring/resource/SVNResource.java
+++ b/src/main/java/net/shibboleth/ext/spring/resource/SVNResource.java
@@ -115,7 +115,7 @@ public class SVNResource extends AbstractIdentifiedInitializableComponent implem
try {
checkWorkingCopyDirectory(workingCopy);
workingCopyDirectory = workingCopy;
- } catch (IOException e) {
+ } catch (final IOException e) {
throw new BeanCreationException(e.getMessage());
}
@@ -133,7 +133,7 @@ public class SVNResource extends AbstractIdentifiedInitializableComponent implem
log.error("Resource file " + resourceFile + " does not exist in SVN working copy directory "
+ workingCopy.getAbsolutePath());
}
- } catch (IOException e) {
+ } catch (final IOException e) {
throw new BeanCreationException(e.getMessage());
}
}
@@ -362,7 +362,7 @@ public class SVNResource extends AbstractIdentifiedInitializableComponent implem
try {
checkoutOrUpdateResource();
return getFile().exists();
- } catch (IOException e) {
+ } catch (final IOException e) {
return false;
}
}
@@ -392,7 +392,7 @@ public class SVNResource extends AbstractIdentifiedInitializableComponent implem
try {
return new URI(getProtocol(), null, remoteRepository.getHost(), remoteRepository.getPort(), getFullPath(),
null, null);
- } catch (URISyntaxException e) {
+ } catch (final URISyntaxException e) {
throw new IOException(e);
}
}
diff --git a/src/main/java/net/shibboleth/ext/spring/service/ReloadableSpringService.java b/src/main/java/net/shibboleth/ext/spring/service/ReloadableSpringService.java
index f9f9841..2649e02 100644
--- a/src/main/java/net/shibboleth/ext/spring/service/ReloadableSpringService.java
+++ b/src/main/java/net/shibboleth/ext/spring/service/ReloadableSpringService.java
@@ -237,7 +237,7 @@ public class ReloadableSpringService<T> extends AbstractReloadableService<T> imp
public final void start() {
try {
initialize();
- } catch (ComponentInitializationException e) {
+ } catch (final ComponentInitializationException e) {
throw new BeanInitializationException("Could not start service", e);
}
}
diff --git a/src/main/java/net/shibboleth/ext/spring/util/SpringSupport.java b/src/main/java/net/shibboleth/ext/spring/util/SpringSupport.java
index 8d43fb2..d5dd647 100644
--- a/src/main/java/net/shibboleth/ext/spring/util/SpringSupport.java
+++ b/src/main/java/net/shibboleth/ext/spring/util/SpringSupport.java
@@ -245,7 +245,7 @@ public final class SpringSupport {
try {
bean = beanFactory.getBean(clazz);
LOG.debug("created spring bean {}", bean);
- } catch (NoSuchBeanDefinitionException e) {
+ } catch (final NoSuchBeanDefinitionException e) {
LOG.debug("no spring bean configured of type {}", clazz);
}
return bean;
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list