Mark model fields final

Summary: These are already considered immutable, but not marked in their class.

Reviewed By: emilsjolander

Differential Revision: D6759564

fbshipit-source-id: 810dc8a9730fb330760d2aedecafcea81cf25cb1
This commit is contained in:
Pascal Hartig
2018-01-22 02:48:53 -08:00
committed by Facebook Github Bot
parent 42778f687b
commit 80f8aa3c7e
17 changed files with 23 additions and 21 deletions

View File

@@ -33,13 +33,13 @@ public class YogaNode {
private List<YogaNode> mChildren;
private YogaMeasureFunction mMeasureFunction;
private YogaBaselineFunction mBaselineFunction;
private long mNativePointer;
private final long mNativePointer;
private Object mData;
/* Those flags needs be in sync with YGJNI.cpp */
private final static int MARGIN = 1;
private final static int PADDING = 2;
private final static int BORDER = 4;
private static final int MARGIN = 1;
private static final int PADDING = 2;
private static final int BORDER = 4;
@DoNotStrip
private int mEdgeSetFlag = 0;
@@ -100,6 +100,7 @@ public class YogaNode {
}
private native void jni_YGNodeFree(long nativePointer);
@Override
protected void finalize() throws Throwable {
try {
jni_YGNodeFree(mNativePointer);
@@ -170,7 +171,8 @@ public class YogaNode {
return child;
}
public @Nullable
@Nullable
public
YogaNode getParent() {
return mParent;
}