From 64712726a89797f917c7244578632d5ba6849295 Mon Sep 17 00:00:00 2001 From: skydoves Date: Sun, 21 Feb 2021 03:39:59 +0900 Subject: [PATCH] Remove checking BR class name --- .../main/java/com/skydoves/bindables/BindingManager.kt | 8 -------- 1 file changed, 8 deletions(-) diff --git a/bindables/src/main/java/com/skydoves/bindables/BindingManager.kt b/bindables/src/main/java/com/skydoves/bindables/BindingManager.kt index d2e2c69..c2ca4b0 100644 --- a/bindables/src/main/java/com/skydoves/bindables/BindingManager.kt +++ b/bindables/src/main/java/com/skydoves/bindables/BindingManager.kt @@ -33,9 +33,6 @@ object BindingManager { /** A map for holding information of the generated fields in the BR class. */ private var bindingFieldsMap: HashMap? = null - /** A binding resource class that generated by the DataBinding processor. */ - private const val BR: String = "BR" - /** Java Bean conventions for presenting a boolean. */ private const val JAVA_BEAN_BOOLEAN: String = "is" @@ -50,13 +47,8 @@ object BindingManager { * * @param bindingClass The `BR` class that generated by the DataBinding processor. * @return The size of the stored fields. - * @throws IllegalArgumentException If we bind non `BR` class into the manager. */ fun bind(bindingClass: KClass<*>): Int { - if (bindingClass.simpleName != BR) { - throw IllegalArgumentException("We can bind only `BR` class that generated by the DataBinding processor.") - } - synchronized(this) { if (bindingFieldsMap.isNullOrEmpty()) { bindingFieldsMap = HashMap()