paradigmatic / Configrity

Simple, immutable and flexible configuration library for scala.
Other
132 stars 19 forks source link

Bug when saving/loading an empty String #13

Closed tomasherman closed 12 years ago

tomasherman commented 12 years ago

Hey there, it looks like I found another bug. It seems like configrity saves empty string like so:

 some.key = 

but isn't able to parse such format. It throws following error:

! org.streum.configrity.io.StandardFormat$ParserException: [7.12] failure: `}' expected but `=' found
! 
!   password = 
! 
!            ^
!   at org.streum.configrity.io.StandardFormat$Parser$class.parse(StandardFormat.scala:78)

Adding manually " " into config file resolves the issue.

paradigmatic commented 12 years ago

Thanks for reporting the bug, it's a good catch. I've committed a fix in the master branch (with more tests). I will release a new version this week-end.