Skip to content

Commit

Permalink
Cleaner
Browse files Browse the repository at this point in the history
  • Loading branch information
HyukjinKwon committed Feb 22, 2017
1 parent 3604855 commit ac5cc7d
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -136,7 +136,7 @@ object JavaTypeInference {
.filter(_.getReadMethod != null)
}

private def getJavaBeanReadableWritableProperties(
private def getJavaBeanReadableAndWritableProperties(
beanClass: Class[_]): Array[PropertyDescriptor] = {
getJavaBeanReadableProperties(beanClass).filter(_.getWriteMethod != null)
}
Expand Down Expand Up @@ -302,7 +302,7 @@ object JavaTypeInference {
keyData :: valueData :: Nil)

case other =>
val properties = getJavaBeanReadableWritableProperties(other)
val properties = getJavaBeanReadableAndWritableProperties(other)
val setters = properties.map { p =>
val fieldName = p.getName
val fieldType = typeToken.method(p.getReadMethod).getReturnType
Expand Down Expand Up @@ -419,7 +419,7 @@ object JavaTypeInference {
)

case other =>
val properties = getJavaBeanReadableWritableProperties(other)
val properties = getJavaBeanReadableAndWritableProperties(other)
CreateNamedStruct(properties.flatMap { p =>
val fieldName = p.getName
val fieldType = typeToken.method(p.getReadMethod).getReturnType
Expand Down

0 comments on commit ac5cc7d

Please sign in to comment.