Polishing

This commit is contained in:
Juergen Hoeller
2017-04-26 18:20:19 +02:00
parent 3daf626842
commit c668d9a473
8 changed files with 42 additions and 36 deletions

View File

@@ -1310,9 +1310,10 @@ public abstract class AnnotationUtils {
}
catch (InvocationTargetException ex) {
rethrowAnnotationConfigurationException(ex.getTargetException());
throw new IllegalStateException("Could not obtain annotation attribute value of " + attributeName, ex);
throw new IllegalStateException(
"Could not obtain value for annotation attribute '" + attributeName + "' on " + annotation, ex);
}
catch (Exception ex) {
catch (Throwable ex) {
return null;
}
}
@@ -1368,7 +1369,7 @@ public abstract class AnnotationUtils {
try {
return annotationType.getDeclaredMethod(attributeName).getDefaultValue();
}
catch (Exception ex) {
catch (Throwable ex) {
return null;
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2014 the original author or authors.
* Copyright 2002-2017 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.
@@ -81,7 +81,9 @@ public class ResourceEditor extends PropertyEditorSupport {
* @param ignoreUnresolvablePlaceholders whether to ignore unresolvable placeholders
* if no corresponding property could be found in the given {@code propertyResolver}
*/
public ResourceEditor(ResourceLoader resourceLoader, PropertyResolver propertyResolver, boolean ignoreUnresolvablePlaceholders) {
public ResourceEditor(ResourceLoader resourceLoader, PropertyResolver propertyResolver,
boolean ignoreUnresolvablePlaceholders) {
Assert.notNull(resourceLoader, "ResourceLoader must not be null");
this.resourceLoader = resourceLoader;
this.propertyResolver = propertyResolver;