diff --git a/litho-rendercore/src/main/java/com/facebook/rendercore/RenderUnit.java b/litho-rendercore/src/main/java/com/facebook/rendercore/RenderUnit.java index 16ccdf9cae0..64e7d7aa8f4 100644 --- a/litho-rendercore/src/main/java/com/facebook/rendercore/RenderUnit.java +++ b/litho-rendercore/src/main/java/com/facebook/rendercore/RenderUnit.java @@ -210,7 +210,7 @@ private static void addExtension( // list. boolean found = false; for (int i = extensions.size() - 1; i >= 0; i--) { - if (extensions.get(i).equalTypes(extension)) { + if (extensions.get(i).binder.getClass() == extension.binder.getClass()) { extensions.remove(i); found = true; break; @@ -419,23 +419,10 @@ public static Extension extension( return new Extension<>(model, binder); } - boolean equalTypes(Extension extension) { - return model.getClass() == extension.model.getClass() - && binder.getClass() == extension.binder.getClass(); - } - boolean shouldUpdate( final Extension prevExtension, final @Nullable Object currentLayoutData, final @Nullable Object nextLayoutData) { - if (!equalTypes(prevExtension)) { - throw new IllegalArgumentException( - "The types to operate on do not match!\nNew model: " - + model - + ", old model: " - + prevExtension.model); - } - return binder.shouldUpdate(prevExtension.model, model, currentLayoutData, nextLayoutData); }