Skip to content

Commit b44cd6c

Browse files
committed
add warnings to scheduled removal deprecations
1 parent a0f342d commit b44cd6c

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/main/java/com/falsepattern/lib/internal/Share.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,8 @@ public final class Share {
4545
throw new RuntimeException(e);
4646
}
4747
}
48+
49+
public static void deprecatedWarning(Throwable stacktrace) {
50+
LOG.warn("DEPRECATED API CALLED!", stacktrace);
51+
}
4852
}

src/main/java/com/falsepattern/lib/updates/UpdateChecker.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
import com.falsepattern.lib.DeprecationDetails;
2424
import com.falsepattern.lib.StableAPI;
25+
import com.falsepattern.lib.internal.Share;
2526
import com.falsepattern.lib.internal.impl.updates.UpdateCheckerImpl;
2627

2728
import net.minecraft.util.IChatComponent;
@@ -124,6 +125,7 @@ public static List<IChatComponent> updateListToChatMessages(String initiator, Li
124125
@DeprecationDetails.RemovedInVersion("0.13")
125126
@StableAPI.Expose
126127
public static List<ModUpdateInfo> fetchUpdates(String url) throws UpdateCheckException {
128+
Share.deprecatedWarning(new Throwable());
127129
return UpdateCheckerImpl.fetchUpdates(url);
128130
}
129131

@@ -136,6 +138,7 @@ public static List<ModUpdateInfo> fetchUpdates(String url) throws UpdateCheckExc
136138
replacement = "fetchUpdatesAsyncV2")
137139
@DeprecationDetails.RemovedInVersion("0.13")
138140
public static CompletableFuture<List<ModUpdateInfo>> fetchUpdatesAsync(String url) {
141+
Share.deprecatedWarning(new Throwable());
139142
return UpdateCheckerImpl.fetchUpdatesAsync(url);
140143
}
141144
//endregion

0 commit comments

Comments
 (0)