Closed fanticqq closed 7 years ago
But anyway many thanks for the contribution! In case if you find any other problem it could be better to create an issue first so we can discuss if changes needed or not. This may save your time 💸
btw I suppose you use Paper in one of your apps? If you can expose this info publicly – please add your app into https://github.com/pilgr/Paper/issues/92 Thanks!
To be honest I don't think those changes are needed.
kryoOutput.flush()
andkryoOutput.close()
has to be called inside try{} to be handled incatch(KryoException)
.backupFile.delete()
must be called only if everything is OK. In your PR it's called before kryoOutput.flush().fileStream
is not required. Calling forkryoOutput.close()
closes underlying OutputStream as well.PaperDbException
in order to provide more information about the problem. This means an app will crash at this moment and any of the unclosed streams doesn't matter.