Skip to content

Commit

Permalink
Remove checking BR class name
Browse files Browse the repository at this point in the history
  • Loading branch information
skydoves committed Feb 20, 2021
1 parent e55515e commit 6471272
Showing 1 changed file with 0 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ object BindingManager {
/** A map for holding information of the generated fields in the BR class. */
private var bindingFieldsMap: HashMap<String, Int>? = 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"

Expand All @@ -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()
Expand Down

0 comments on commit 6471272

Please sign in to comment.