Polish "Replace relevant code with lambda"
Closes gh-1454
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2016 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.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2012 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.
|
||||
|
||||
@@ -363,7 +363,7 @@ public class CommonAnnotationBeanPostProcessor extends InitDestroyAnnotationBean
|
||||
throw new IllegalStateException("@EJB annotation is not supported on static fields");
|
||||
}
|
||||
currElements.add(new EjbRefElement(field, field, null));
|
||||
}
|
||||
}
|
||||
else if (field.isAnnotationPresent(Resource.class)) {
|
||||
if (Modifier.isStatic(field.getModifiers())) {
|
||||
throw new IllegalStateException("@Resource annotation is not supported on static fields");
|
||||
|
||||
@@ -19,8 +19,6 @@ package org.springframework.context.annotation;
|
||||
import java.beans.PropertyDescriptor;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.LinkedHashSet;
|
||||
@@ -280,7 +278,7 @@ public class ConfigurationClassPostProcessor implements BeanDefinitionRegistryPo
|
||||
}
|
||||
|
||||
// Sort by previously determined @Order value, if applicable
|
||||
Collections.sort(configCandidates, (bd1, bd2) -> {
|
||||
configCandidates.sort((bd1, bd2) -> {
|
||||
int i1 = ConfigurationClassUtils.getOrder(bd1.getBeanDefinition());
|
||||
int i2 = ConfigurationClassUtils.getOrder(bd2.getBeanDefinition());
|
||||
return (i1 < i2) ? -1 : (i1 > i2) ? 1 : 0;
|
||||
|
||||
Reference in New Issue
Block a user