mirror of https://github.com/zlatinb/muwire
handle empty line at end of file
parent
a14089f109
commit
afb5f80e0c
|
@ -36,6 +36,8 @@ class PersisterService {
|
|||
def slurper = new JsonSlurper()
|
||||
try {
|
||||
location.eachLine {
|
||||
if (it.trim().length() == 0)
|
||||
return
|
||||
def parsed = slurper.parseText it
|
||||
def event = fromJson parsed
|
||||
if (event != null)
|
||||
|
|
|
@ -151,7 +151,7 @@ class PersisterServiceLoadingTest {
|
|||
json2 = JsonOutput.toJson(json2)
|
||||
|
||||
persisted.append "$json1\n"
|
||||
persisted.append json2
|
||||
persisted.append "$json2\n"
|
||||
|
||||
PersisterService ps = new PersisterService(persisted, eventBus, 100, null)
|
||||
ps.start()
|
||||
|
|
Loading…
Reference in New Issue