Fix warnings reported in Eclipse
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2023 the original author or authors.
|
||||
* Copyright 2012-2025 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.
|
||||
@@ -97,6 +97,7 @@ class MetadataStore {
|
||||
/**
|
||||
* Write the module {@link ConfigurationMetadata} to the filesystem.
|
||||
* @param metadata the metadata to write
|
||||
* @throws IOException when the write fails
|
||||
*/
|
||||
void writeMetadata(ConfigurationMetadata metadata) throws IOException {
|
||||
writeMetadata(metadata, () -> createMetadataResource(METADATA_PATH));
|
||||
@@ -107,6 +108,7 @@ class MetadataStore {
|
||||
* filesystem.
|
||||
* @param metadata the metadata to write
|
||||
* @param typeElement the type to write metadata for
|
||||
* @throws IOException when the write fails
|
||||
*/
|
||||
void writeMetadata(ConfigurationMetadata metadata, TypeElement typeElement) throws IOException {
|
||||
writeMetadata(metadata, () -> createMetadataResource(SOURCE_METADATA_PATH.apply(typeElement, this.typeUtils)));
|
||||
|
||||
@@ -22,10 +22,13 @@ package org.springframework.boot.configurationsample.source;
|
||||
*/
|
||||
public class ImmutableSource {
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private final String name;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private final String description;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private final String type;
|
||||
|
||||
public ImmutableSource(String name, String description, String type) {
|
||||
|
||||
@@ -27,10 +27,13 @@ import lombok.Setter;
|
||||
@Setter
|
||||
public class LombokSource {
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private String name;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private String description;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private String type;
|
||||
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
package org.springframework.boot.configurationsample.source;
|
||||
|
||||
/**
|
||||
/*
|
||||
* Record type with manual metadata. This illustrates the case where the type of a
|
||||
* property is defined in a separate class and source-based metadata cannot be discovered.
|
||||
*/
|
||||
|
||||
@@ -25,11 +25,13 @@ public class ImmutablePropertiesSource {
|
||||
/**
|
||||
* Description of this simple property.
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
private final String name;
|
||||
|
||||
/**
|
||||
* Whether it is enabled.
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
private final boolean enabled;
|
||||
|
||||
public ImmutablePropertiesSource(@DefaultValue("boot") String name, boolean enabled) {
|
||||
|
||||
@@ -29,11 +29,13 @@ public class LombokPropertiesSource {
|
||||
/**
|
||||
* Description of this simple property.
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
private String name = "boot";
|
||||
|
||||
/**
|
||||
* Whether it is enabled.
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
private boolean enabled;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user