Commit b9fd99e2 authored by Phillip Webb's avatar Phillip Webb

Polish

parent 3cf8e81a
...@@ -105,7 +105,8 @@ public class CachePublicMetrics implements PublicMetrics { ...@@ -105,7 +105,8 @@ public class CachePublicMetrics implements PublicMetrics {
} }
private Cache unwrapIfNecessary(Cache cache) { private Cache unwrapIfNecessary(Cache cache) {
if (ClassUtils.isPresent("org.springframework.cache.transaction.TransactionAwareCacheDecorator", if (ClassUtils.isPresent(
"org.springframework.cache.transaction.TransactionAwareCacheDecorator",
getClass().getClassLoader())) { getClass().getClassLoader())) {
return TransactionAwareCacheDecoratorHandler.unwrapIfNecessary(cache); return TransactionAwareCacheDecoratorHandler.unwrapIfNecessary(cache);
} }
...@@ -165,6 +166,7 @@ public class CachePublicMetrics implements PublicMetrics { ...@@ -165,6 +166,7 @@ public class CachePublicMetrics implements PublicMetrics {
} }
return cache; return cache;
} }
} }
} }
...@@ -340,7 +340,8 @@ public class ConfigurationPropertiesReportEndpoint ...@@ -340,7 +340,8 @@ public class ConfigurationPropertiesReportEndpoint
// that's what the metadata generator does. This filter is not used if there // that's what the metadata generator does. This filter is not used if there
// is JSON metadata for the property, so it's mainly for user-defined beans. // is JSON metadata for the property, so it's mainly for user-defined beans.
return (setter != null) return (setter != null)
|| ClassUtils.getPackageName(parentType).equals(ClassUtils.getPackageName(type)) || ClassUtils.getPackageName(parentType)
.equals(ClassUtils.getPackageName(type))
|| Map.class.isAssignableFrom(type) || Map.class.isAssignableFrom(type)
|| Collection.class.isAssignableFrom(type); || Collection.class.isAssignableFrom(type);
} }
......
/* /*
* Copyright 2012-2016 the original author or authors. * Copyright 2012-2017 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
......
/* /*
* Copyright 2012-2016 the original author or authors. * Copyright 2012-2017 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
...@@ -217,11 +217,9 @@ public class ConfigurationPropertiesReportEndpointSerializationTests { ...@@ -217,11 +217,9 @@ public class ConfigurationPropertiesReportEndpointSerializationTests {
Map<String, Object> propertiesMap = (Map<String, Object>) nestedProperties Map<String, Object> propertiesMap = (Map<String, Object>) nestedProperties
.get("properties"); .get("properties");
assertThat(propertiesMap).containsOnlyKeys("bar", "name", "map", "list"); assertThat(propertiesMap).containsOnlyKeys("bar", "name", "map", "list");
Map<String, Object> map = (Map<String, Object>) propertiesMap Map<String, Object> map = (Map<String, Object>) propertiesMap.get("map");
.get("map");
assertThat(map).containsOnly(entry("entryOne", true)); assertThat(map).containsOnly(entry("entryOne", true));
List<String> list = (List<String>) propertiesMap List<String> list = (List<String>) propertiesMap.get("list");
.get("list");
assertThat(list).containsExactly("abc"); assertThat(list).containsExactly("abc");
} }
......
/* /*
* Copyright 2012-2016 the original author or authors. * Copyright 2012-2017 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
...@@ -29,9 +29,8 @@ import org.springframework.context.annotation.Conditional; ...@@ -29,9 +29,8 @@ import org.springframework.context.annotation.Conditional;
/** /**
* {@link Conditional} that only matches when the specified bean classes and/or names are * {@link Conditional} that only matches when the specified bean classes and/or names are
* already contained in the {@link BeanFactory}. * already contained in the {@link BeanFactory}. When placed on a {@code @Bean} method,
* When placed on a {@code @Bean} method, the bean class default to the return type of * the bean class default to the return type of the factory method:
* the factory method:
* *
* <pre class="code"> * <pre class="code">
* &#064;Configuration * &#064;Configuration
......
/* /*
* Copyright 2012-2016 the original author or authors. * Copyright 2012-2017 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
...@@ -31,8 +31,8 @@ import org.springframework.context.annotation.Conditional; ...@@ -31,8 +31,8 @@ import org.springframework.context.annotation.Conditional;
* {@link Conditional} that only matches when the specified bean classes and/or names are * {@link Conditional} that only matches when the specified bean classes and/or names are
* not already contained in the {@link BeanFactory}. * not already contained in the {@link BeanFactory}.
* <p> * <p>
* When placed on a {@code @Bean} method, the bean class default to the return type of * When placed on a {@code @Bean} method, the bean class default to the return type of the
* the factory method: * factory method:
* *
* <pre class="code"> * <pre class="code">
* &#064;Configuration * &#064;Configuration
......
...@@ -102,10 +102,8 @@ public class SessionAutoConfiguration { ...@@ -102,10 +102,8 @@ public class SessionAutoConfiguration {
+ "auto-configured, check your configuration (session store " + "auto-configured, check your configuration (session store "
+ "type is '" + storeType.name().toLowerCase() + "')"); + "type is '" + storeType.name().toLowerCase() + "')");
} }
else { throw new IllegalArgumentException("No Spring Session store is "
throw new IllegalArgumentException("No Spring Session store is " + "configured: set the 'spring.session.store-type' property");
+ "configured: set the 'spring.session.store-type' property");
}
} }
} }
......
/* /*
* Copyright 2012-2016 the original author or authors. * Copyright 2012-2017 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment