Skip to content

Commit

Permalink
updated original fix from pull request codahale#42
Browse files Browse the repository at this point in the history
  • Loading branch information
artgon committed Aug 7, 2012
1 parent 178e78d commit 4b24b52
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<groupId>com.codahale</groupId>
<artifactId>jerkson_2.9.1</artifactId>
<version>0.6.0-Matygo</version>
<version>0.6.1-Matygo</version>
<name>Jerkson for Scala</name>

<properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,7 @@ class CaseClassDeserializer(config: DeserializationConfig,
values += value
} else {
// see if a default value was supplied
paramDefault match {
case Some(v) => values += v
case None =>
}
paramDefault.foreach(values += _())
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ object CaseClassSigParser {
catch {
case _ => None // indicates no default value was supplied
}
val defaultValue = defaultMethod.map(m => Some(m.invoke(companionObject))).getOrElse(None)
val defaultValue = defaultMethod.map(m => () => m.invoke(companionObject))

Tuple3(ms.name, typeRef2JavaType(t, factory, classLoader), defaultValue) :: Nil
}
Expand Down

0 comments on commit 4b24b52

Please sign in to comment.