common-lang
A core library providing functionality missing from system libraries.
Information flow
Case classes to mark the information flow of data in the system:
Sensitive[A]
marks a value as containing sensitive information, e.g. personally identifiable information and returns a masked value fromtoString
helping to prevent inadvertent information leakage. Should be used for any property or parameter that contains sensitive information.
For example:
case class User(id: String, username: Sensitive[String], ...)
Time
A Clock
trait and associated classes SystemClock
and StoppedClock
which are useful for main and test code respectively. Also includes a TimeSupport
trait to indicate dependence on time.
Note that when we transition to Java 8 the java.time
package will supersede these classes and they should be deprecated.
Jar Inspection
The JarManifest
class allows you to look up values in the JAR manifest.