mirror of
https://github.com/facebook/react-native.git
synced 2026-11-18 20:19:07 +00:00
Fix MissingOverrideAnnotation: Add @Override to flex methods (#55502)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/55502 This change adds missing Override annotations to three methods in LayoutShadowNode that override methods from the parent class: - setFlex(float) - setFlexGrow(float) - setFlexShrink(float) These methods call super.setFlex/setFlexGrow/setFlexShrink, indicating they override parent methods and should have Override annotations for code clarity and compiler checking. changelog: [internal] internal Reviewed By: alanleedev Differential Revision: D92021000 fbshipit-source-id: 28a4d0676c18d99dddb173066964cd8c5ea321ac
This commit is contained in:
1 parent
e803a3499d
commit
283442ca39
1 file changed
+3
+3
@@ -230,6 +230,7 @@ public class LayoutShadowNode extends ReactShadowNodeImpl {
|
||||
maxHeight.recycle();
|
||||
}
|
||||
|
||||
@Override
|
||||
@ReactProp(name = ViewProps.FLEX, defaultFloat = 0f)
|
||||
public void setFlex(float flex) {
|
||||
if (isVirtual()) {
|
||||
@@ -238,6 +239,7 @@ public class LayoutShadowNode extends ReactShadowNodeImpl {
|
||||
super.setFlex(flex);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ReactProp(name = ViewProps.FLEX_GROW, defaultFloat = 0f)
|
||||
public void setFlexGrow(float flexGrow) {
|
||||
if (isVirtual()) {
|
||||
@@ -309,6 +311,7 @@ public class LayoutShadowNode extends ReactShadowNodeImpl {
|
||||
gap.recycle();
|
||||
}
|
||||
|
||||
@Override
|
||||
@ReactProp(name = ViewProps.FLEX_SHRINK, defaultFloat = 0f)
|
||||
public void setFlexShrink(float flexShrink) {
|
||||
if (isVirtual()) {
|
||||
|
||||
Reference in new issue
Block a user