Skip to content

Commit

Permalink
Properly annotate with @deprecated methods that are just deprecated i…
Browse files Browse the repository at this point in the history
…n JavaDoc (#45570)

Summary:
Pull Request resolved: #45570

We do have several methods/classes that are `deprecated` in the JavaDoc but not
with an annotation. That's not correct as users will never get those deprecation otherwise
and we'll be forced to keep both implementation around for a longer time.

Changelog:
[Internal] [Changed] - Properly annotate with Deprecated methods that are just deprecated in JavaDoc

Reviewed By: javache

Differential Revision: D60036159

fbshipit-source-id: 466072d6a3fb4f1220e1dc3deaa51a46c714a388
  • Loading branch information
cortinico authored and facebook-github-bot committed Jul 22, 2024
1 parent 43c32e1 commit c1a8ae4
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ private static Dialog createAppCompatDialog(
*
* @deprecated non-AppCompat dialogs are deprecated and will be removed in a future version.
*/
@Deprecated(since = "0.75.0", forRemoval = true)
private static Dialog createAppDialog(
Context activityContext, Bundle arguments, DialogInterface.OnClickListener fragment) {
android.app.AlertDialog.Builder builder = new android.app.AlertDialog.Builder(activityContext);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ public void setBorderStyle(@Nullable String style) {
/**
* @deprecated Use {@link #setBorderRadius(BorderRadiusProp, LengthPercentage)} instead.
*/
@Deprecated(since = "0.75.0", forRemoval = true)
public void setRadius(float radius) {
@Nullable Float boxedRadius = Float.isNaN(radius) ? null : Float.valueOf(radius);
if (boxedRadius == null) {
Expand All @@ -279,6 +280,7 @@ public void setRadius(float radius) {
/**
* @deprecated Use {@link #setBorderRadius(BorderRadiusProp, LengthPercentage)} instead.
*/
@Deprecated(since = "0.75.0", forRemoval = true)
public void setRadius(float radius, int position) {
@Nullable Float boxedRadius = Float.isNaN(radius) ? null : Float.valueOf(radius);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@
/**
* @deprecated Please use {@link CSSBackgroundDrawable} instead
*/
@Deprecated(since = "0.75.0", forRemoval = true)
public class ReactViewBackgroundDrawable extends CSSBackgroundDrawable {
/**
* @deprecated Please use {@link CSSBackgroundDrawable} instead
*/
@Deprecated(since = "0.75.0", forRemoval = true)
public ReactViewBackgroundDrawable(Context context) {
super(context);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,7 @@ public void setBorderColor(int position, @Nullable Integer color) {
/**
* @deprecated Use {@link #setBorderRadius(BorderRadiusProp, Float)} instead.
*/
@Deprecated(since = "0.75.0", forRemoval = true)
public void setBorderRadius(float borderRadius) {
CSSBackgroundDrawable backgroundDrawable = getOrCreateReactViewBackground();
backgroundDrawable.setRadius(borderRadius);
Expand All @@ -320,6 +321,7 @@ public void setBorderRadius(float borderRadius) {
/**
* @deprecated Use {@link #setBorderRadius(BorderRadiusProp, Float)} instead.
*/
@Deprecated(since = "0.75.0", forRemoval = true)
public void setBorderRadius(float borderRadius, int position) {
CSSBackgroundDrawable backgroundDrawable = getOrCreateReactViewBackground();
backgroundDrawable.setRadius(borderRadius, position);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ public void setBorderRadius(ReactViewGroup view, int index, Dynamic rawBorderRad
/**
* @deprecated Use {@link #setBorderRadius(ReactViewGroup, int, Dynamic)} instead.
*/
@Deprecated(since = "0.75.0", forRemoval = true)
public void setBorderRadius(ReactViewGroup view, int index, float borderRadius) {
setBorderRadius(view, index, new DynamicFromObject(borderRadius));
}
Expand Down

0 comments on commit c1a8ae4

Please sign in to comment.