kolasu
kolasu copied to clipboard
Minor code improvements on LIonWeb
I took a look at the com.strumenta.kolasu.lionweb, and found a few improvements I suggest to implement:
- Use of
whenstatements instead of nestedif-elseones, e.g. in JSONComparison - get rid of the
.asJsonObjectin favor ofissmart-casting, e.g. in JSONComparison - Add the JsonPrimitive case in JSONComparison
- Apply
@Synchronizedinstead of explicitsynchronizedblocks, e.g. in BiMap - execute containment checks with the
inoperator instead ofcontainsKeys(), e.g. in BiMap - improve thread safety with mutex.withLock, e.g. in PerformanceLogger
- add a
try-finallyblock where operations are executed, e.g. in PerformanceLogger#log
A PR will follow