Browse Source
* pr/47980: Polish "Add since to deprecations in config metadata JSON files" Add since to deprecations in config metadata JSON files Add since attribute to uses of DeprecatedConfigurationProperty Closes gh-47980pull/48129/head
15 changed files with 1221 additions and 516 deletions
@ -0,0 +1,49 @@
@@ -0,0 +1,49 @@
|
||||
/* |
||||
* Copyright 2012-present 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. |
||||
* You may obtain a copy of the License at |
||||
* |
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
|
||||
package org.springframework.boot.build.architecture.annotations; |
||||
|
||||
import java.lang.annotation.ElementType; |
||||
import java.lang.annotation.Retention; |
||||
import java.lang.annotation.RetentionPolicy; |
||||
import java.lang.annotation.Target; |
||||
|
||||
/** |
||||
* {@code @DeprecatedConfigurationProperty} analogue for architecture checks. |
||||
*/ |
||||
@Target(ElementType.METHOD) |
||||
@Retention(RetentionPolicy.RUNTIME) |
||||
public @interface TestDeprecatedConfigurationProperty { |
||||
|
||||
/** |
||||
* The reason for the deprecation. |
||||
* @return the deprecation reason |
||||
*/ |
||||
String reason() default ""; |
||||
|
||||
/** |
||||
* The field that should be used instead (if any). |
||||
* @return the replacement field |
||||
*/ |
||||
String replacement() default ""; |
||||
|
||||
/** |
||||
* The version in which the property became deprecated. |
||||
* @return the version |
||||
*/ |
||||
String since() default ""; |
||||
|
||||
} |
||||
@ -0,0 +1,35 @@
@@ -0,0 +1,35 @@
|
||||
/* |
||||
* Copyright 2012-present 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. |
||||
* You may obtain a copy of the License at |
||||
* |
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
|
||||
package org.springframework.boot.build.architecture.configurationproperties; |
||||
|
||||
import org.springframework.boot.build.architecture.annotations.TestDeprecatedConfigurationProperty; |
||||
|
||||
public class DeprecatedConfigurationPropertySince { |
||||
|
||||
private String property; |
||||
|
||||
@TestDeprecatedConfigurationProperty(reason = "no longer used") |
||||
@Deprecated |
||||
public String getProperty() { |
||||
return this.property; |
||||
} |
||||
|
||||
public void setProperty(String property) { |
||||
this.property = property; |
||||
} |
||||
|
||||
} |
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue