Merge pull request #276 from corda/bogdan-date-to-localdatetime

replace java.Date with java.time
This commit is contained in:
bpaunescu 2018-01-16 19:53:08 +00:00 committed by GitHub
commit 52a6abefb5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 4 deletions

View File

@ -6,7 +6,6 @@ import net.corda.node.utilities.AffinityExecutor
import net.corda.nodeapi.internal.persistence.CordaPersistence
import net.corda.nodeapi.internal.persistence.NODE_DATABASE_PREFIX
import org.hibernate.Session
import java.text.SimpleDateFormat
import java.time.Duration
import java.time.LocalDateTime
import java.time.temporal.ChronoField
@ -37,7 +36,6 @@ class RunOnceService(private val database: CordaPersistence, private val machine
private val log = loggerFor<RunOnceService>()
private val running = AtomicBoolean(false)
private val simpleDateFormat = SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS")
init {
if (waitInterval <= updateInterval) {
@ -165,4 +163,4 @@ class RunOnceService(private val database: CordaPersistence, private val machine
return returnValue == 1
}
}
}

View File

@ -244,4 +244,4 @@ class RunOnceServiceTest {
assertTrue(result.timestamp is LocalDateTime)
return result
}
}
}