fix issue with assertion in HystrixStreamTests, polish diamond operator and follow class field naming convention (#2703)

* fix assertion check

* polish: replace the type specification in this constructor call with the diamond operator ("<>"),
make EUREKA_PACKAGES final to avoid issue "static non-final field names should comply with a naming convention"
This commit is contained in:
Igor Suhorukov
2018-02-02 03:15:51 +03:00
committed by Ryan Baxter
parent b2ebfc0ecb
commit 24dfd4ae76
14 changed files with 20 additions and 20 deletions

View File

@@ -81,7 +81,7 @@ public class EurekaServerAutoConfiguration extends WebMvcConfigurerAdapter {
/**
* List of packages containing Jersey resources required by the Eureka server
*/
private static String[] EUREKA_PACKAGES = new String[] { "com.netflix.discovery",
private static final String[] EUREKA_PACKAGES = new String[] { "com.netflix.discovery",
"com.netflix.eureka" };
@Autowired
@@ -283,7 +283,7 @@ public class EurekaServerAutoConfiguration extends WebMvcConfigurerAdapter {
// Find classes in Eureka packages (or subpackages)
//
Set<Class<?>> classes = new HashSet<Class<?>>();
Set<Class<?>> classes = new HashSet<>();
for (String basePackage : EUREKA_PACKAGES) {
Set<BeanDefinition> beans = provider.findCandidateComponents(basePackage);
for (BeanDefinition bd : beans) {
@@ -295,7 +295,7 @@ public class EurekaServerAutoConfiguration extends WebMvcConfigurerAdapter {
// Construct the Jersey ResourceConfig
//
Map<String, Object> propsAndFeatures = new HashMap<String, Object>();
Map<String, Object> propsAndFeatures = new HashMap<>();
propsAndFeatures.put(
// Skip static content used by the webapp
ServletContainer.PROPERTY_WEB_PAGE_CONTENT_REGEX,