#1082: Add "since" to Deprecation annotations

By: DerFrZocker <derrieple@gmail.com>
This commit is contained in:
Bukkit/Spigot
2024-11-25 07:52:33 +11:00
parent 98f6ab9a04
commit 0023e5549a
257 changed files with 1523 additions and 1176 deletions

View File

@@ -209,7 +209,7 @@ public abstract class FileConfiguration extends MemoryConfiguration {
* {@link FileConfigurationOptions#getHeader()} instead.
*/
@NotNull
@Deprecated
@Deprecated(since = "1.18.1")
protected String buildHeader() {
return "";
}

View File

@@ -67,7 +67,7 @@ public class FileConfigurationOptions extends MemoryConfigurationOptions {
* @deprecated use getHeader() instead.
*/
@NotNull
@Deprecated
@Deprecated(since = "1.18.1")
public String header() {
StringBuilder stringHeader = new StringBuilder();
for (String line : header) {
@@ -105,7 +105,7 @@ public class FileConfigurationOptions extends MemoryConfigurationOptions {
* @deprecated use setHeader() instead
*/
@NotNull
@Deprecated
@Deprecated(since = "1.18.1")
public FileConfigurationOptions header(@Nullable String value) {
this.header = (value == null) ? Collections.emptyList() : Collections.unmodifiableList(Arrays.asList(value.split("\\n")));
return this;
@@ -183,7 +183,7 @@ public class FileConfigurationOptions extends MemoryConfigurationOptions {
*
* @deprecated Call {@link #parseComments()} instead.
*/
@Deprecated
@Deprecated(since = "1.18.1")
public boolean copyHeader() {
return parseComments;
}
@@ -195,7 +195,7 @@ public class FileConfigurationOptions extends MemoryConfigurationOptions {
* @deprecated Call {@link #parseComments(boolean)} instead.
*/
@NotNull
@Deprecated
@Deprecated(since = "1.18.1")
public FileConfigurationOptions copyHeader(boolean value) {
parseComments = value;
return this;

View File

@@ -42,12 +42,12 @@ public class YamlConfiguration extends FileConfiguration {
/**
* @deprecated unused, not intended to be API
*/
@Deprecated
@Deprecated(since = "1.18.1")
protected static final String COMMENT_PREFIX = "# ";
/**
* @deprecated unused, not intended to be API
*/
@Deprecated
@Deprecated(since = "1.18.1")
protected static final String BLANK_CONFIG = "{}\n";
private final DumperOptions yamlDumperOptions;
private final LoaderOptions yamlLoaderOptions;

View File

@@ -46,7 +46,7 @@ public class YamlConfigurationOptions extends FileConfigurationOptions {
@NotNull
@Override
@Deprecated
@Deprecated(since = "1.18.1")
public YamlConfigurationOptions header(@Nullable String value) {
super.header(value);
return this;
@@ -68,7 +68,7 @@ public class YamlConfigurationOptions extends FileConfigurationOptions {
@NotNull
@Override
@Deprecated
@Deprecated(since = "1.18.1")
public YamlConfigurationOptions copyHeader(boolean value) {
super.copyHeader(value);
return this;

View File

@@ -17,7 +17,7 @@ public class YamlConstructor extends SafeConstructor {
/**
* @deprecated options required
*/
@Deprecated
@Deprecated(since = "1.19.4")
public YamlConstructor() {
this(new LoaderOptions());
}

View File

@@ -15,7 +15,7 @@ public class YamlRepresenter extends Representer {
/**
* @deprecated options required
*/
@Deprecated
@Deprecated(since = "1.19.4")
public YamlRepresenter() {
this(new DumperOptions());
}