Rename reset() -> free() to be more in line with what it now does
Summary: Rename reset() -> free() to be more in line with what it now does as the default implementation is JNI Reviewed By: lucasr Differential Revision: D3992808 fbshipit-source-id: 8428ae33268d1417ce8642b741e47150a17bf077
This commit is contained in:
committed by
Facebook Github Bot
parent
1de914737a
commit
23acf2156f
@@ -58,10 +58,10 @@ public class CSSNode implements CSSNodeAPI<CSSNode> {
|
||||
|
||||
private native void jni_CSSNodeFree(long nativePointer);
|
||||
@Override
|
||||
public void reset() {
|
||||
public void free() {
|
||||
assertNativeInstance();
|
||||
if (mParent != null || (mChildren != null && mChildren.size() > 0)) {
|
||||
throw new IllegalStateException("You should not reset an attached CSSNode");
|
||||
throw new IllegalStateException("You should not free an attached CSSNode");
|
||||
}
|
||||
|
||||
jni_CSSNodeFree(mNativePointer);
|
||||
|
@@ -90,5 +90,5 @@ public interface CSSNodeAPI<CSSNodeType extends CSSNodeAPI> {
|
||||
void setData(Object data);
|
||||
Object getData();
|
||||
void init();
|
||||
void reset();
|
||||
void free();
|
||||
}
|
||||
|
@@ -63,7 +63,7 @@ public class CSSNodeDEPRECATED implements CSSNodeAPI<CSSNodeDEPRECATED> {
|
||||
|
||||
@Override
|
||||
public void init() {
|
||||
reset();
|
||||
free();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -640,9 +640,9 @@ public class CSSNodeDEPRECATED implements CSSNodeAPI<CSSNodeDEPRECATED> {
|
||||
* recycling {@link CSSNodeDEPRECATED} instances.
|
||||
*/
|
||||
@Override
|
||||
public void reset() {
|
||||
public void free() {
|
||||
if (mParent != null || (mChildren != null && mChildren.size() > 0)) {
|
||||
throw new IllegalStateException("You should not reset an attached CSSNodeDEPRECATED");
|
||||
throw new IllegalStateException("You should not free an attached CSSNodeDEPRECATED");
|
||||
}
|
||||
|
||||
style.reset();
|
||||
|
Reference in New Issue
Block a user