Fix compiler warnings and polish
Fix various compiler warnings and apply a little polish.
This commit is contained in:
@@ -24,7 +24,6 @@ import javax.lang.model.element.VariableElement;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import org.springframework.boot.configurationsample.simple.DeprecatedProperties;
|
||||
import org.springframework.boot.configurationsample.simple.DeprecatedSingleProperty;
|
||||
import org.springframework.boot.configurationsample.simple.SimpleCollectionProperties;
|
||||
import org.springframework.boot.configurationsample.simple.SimpleProperties;
|
||||
@@ -196,14 +195,15 @@ public class JavaBeanPropertyDescriptorTests extends PropertyDescriptorTests {
|
||||
@Test
|
||||
@SuppressWarnings("deprecation")
|
||||
public void javaBeanDeprecatedPropertyOnClass() throws IOException {
|
||||
process(DeprecatedProperties.class, (roundEnv, metadataEnv) -> {
|
||||
TypeElement ownerElement = roundEnv
|
||||
.getRootElement(DeprecatedProperties.class);
|
||||
JavaBeanPropertyDescriptor property = createPropertyDescriptor(ownerElement,
|
||||
"name");
|
||||
assertItemMetadata(metadataEnv, property).isProperty()
|
||||
.isDeprecatedWithNoInformation();
|
||||
});
|
||||
process(org.springframework.boot.configurationsample.simple.DeprecatedProperties.class,
|
||||
(roundEnv, metadataEnv) -> {
|
||||
TypeElement ownerElement = roundEnv.getRootElement(
|
||||
org.springframework.boot.configurationsample.simple.DeprecatedProperties.class);
|
||||
JavaBeanPropertyDescriptor property = createPropertyDescriptor(
|
||||
ownerElement, "name");
|
||||
assertItemMetadata(metadataEnv, property).isProperty()
|
||||
.isDeprecatedWithNoInformation();
|
||||
});
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -25,7 +25,6 @@ import javax.lang.model.element.VariableElement;
|
||||
import org.junit.Test;
|
||||
|
||||
import org.springframework.boot.configurationsample.lombok.LombokDefaultValueProperties;
|
||||
import org.springframework.boot.configurationsample.lombok.LombokDeprecatedProperties;
|
||||
import org.springframework.boot.configurationsample.lombok.LombokDeprecatedSingleProperty;
|
||||
import org.springframework.boot.configurationsample.lombok.LombokExplicitProperties;
|
||||
import org.springframework.boot.configurationsample.lombok.LombokInnerClassProperties;
|
||||
@@ -229,14 +228,15 @@ public class LombokPropertyDescriptorTests extends PropertyDescriptorTests {
|
||||
@Test
|
||||
@SuppressWarnings("deprecation")
|
||||
public void lombokDeprecatedPropertyOnClass() throws IOException {
|
||||
process(LombokDeprecatedProperties.class, (roundEnv, metadataEnv) -> {
|
||||
TypeElement ownerElement = roundEnv
|
||||
.getRootElement(LombokDeprecatedProperties.class);
|
||||
LombokPropertyDescriptor property = createPropertyDescriptor(ownerElement,
|
||||
"name");
|
||||
assertItemMetadata(metadataEnv, property).isProperty()
|
||||
.isDeprecatedWithNoInformation();
|
||||
});
|
||||
process(org.springframework.boot.configurationsample.lombok.LombokDeprecatedProperties.class,
|
||||
(roundEnv, metadataEnv) -> {
|
||||
TypeElement ownerElement = roundEnv.getRootElement(
|
||||
org.springframework.boot.configurationsample.lombok.LombokDeprecatedProperties.class);
|
||||
LombokPropertyDescriptor property = createPropertyDescriptor(
|
||||
ownerElement, "name");
|
||||
assertItemMetadata(metadataEnv, property).isProperty()
|
||||
.isDeprecatedWithNoInformation();
|
||||
});
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -23,6 +23,7 @@ import java.util.Map;
|
||||
* A pojo with a complex generic signature.
|
||||
*
|
||||
* @author Stephane Nicoll
|
||||
* @param <T> the generic type
|
||||
*/
|
||||
public class UpperBoundGenericPojo<T extends Enum<T>> {
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@ import org.springframework.boot.configurationsample.DefaultValue;
|
||||
*
|
||||
* @author Stephane Nicoll
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
public class ImmutableCollectionProperties {
|
||||
|
||||
private final List<String> names;
|
||||
|
||||
@@ -27,6 +27,7 @@ import org.springframework.boot.configurationsample.ConfigurationProperties;
|
||||
*/
|
||||
@Data
|
||||
@ConfigurationProperties("default")
|
||||
@SuppressWarnings("unused")
|
||||
public class LombokDefaultValueProperties {
|
||||
|
||||
private String description = "my description";
|
||||
|
||||
@@ -30,6 +30,7 @@ import org.springframework.boot.configurationsample.ConfigurationProperties;
|
||||
@Setter
|
||||
@ConfigurationProperties(prefix = "deprecated")
|
||||
@Deprecated
|
||||
@SuppressWarnings("unused")
|
||||
public class LombokDeprecatedProperties {
|
||||
|
||||
private String name;
|
||||
|
||||
@@ -27,6 +27,7 @@ import org.springframework.boot.configurationsample.ConfigurationProperties;
|
||||
*/
|
||||
@Data
|
||||
@ConfigurationProperties("singledeprecated")
|
||||
@SuppressWarnings("unused")
|
||||
public class LombokDeprecatedSingleProperty {
|
||||
|
||||
@Deprecated
|
||||
|
||||
Reference in New Issue
Block a user