Precondition Validator

Java argument checks that throw

A Java library of static precondition checks. Its one class, Preconditions, returns silently when an argument is acceptable and throws at once when it is not.

ArchivedPersonalOpen source

Record

Kind
Package
Role
Author
Started
September 2020
Ended
June 2021
Licence
Apache-2.0

Technology1

Evidence11 sources

The GitHub repository is archivedrepogithub.com The LICENSE file is the unmodified text of the Apache License 2.0, still carrying the "[yyyy] [name of copyright owner]" placeholderlicencegithub.com The repository describes itself as providing "a variety of easy and intuitive validation functions" that "will free you from simple and redundant checking processes"repogithub.com The whole library is one package — a Preconditions class, an exception subpackage holding one type, and two package-info filessourcegithub.com Preconditions is final with a private constructor and 126 public static void methods over twelve require names, each name offered bare, with a detail message, and with a caller-supplied RuntimeExceptionsourcegithub.com A check that passes does nothing and returns; the only throw site is the RuntimeException overload, which the other two forms call with a default exception — NullPointerException for requireNonNull, IndexOutOfBoundsException for the three range families, and PreconditionFailedException for the restsourcegithub.com PreconditionFailedException is the library's own unchecked type, a final subclass of RuntimeException with the four standard constructorssourcegithub.com build.gradle sets a Java 11 toolchain, declares Guava as its only implementation dependency, publishes org.thinkit.common to GitHub Packages rather than to a public repository, and takes the published version from the Git tag through com.palantir.git-versionsourcegithub.com Four releases were published, v1.0.8 on 5 October 2020 through v1.1.1 on 6 June 2021; the third is tagged v1.09, while its release is titled "Precondition Validator v1.0.9"repogithub.com The earliest commit dated after the repository's creation is 470a62fa, "renamed", 25 September 2020, and it moves three exception classes within org.thinkit.commonrepogithub.com The README states the copyright as Kato Shinya, 2020, and its install section directs the reader to contact the author for a token to download the packagedocsgithub.com

Links2

Relations4 edges

Content FrameworkUsed byExternalised values and rules for Java EnvaliUsed byAnnotation-driven entity validation for Java EpitaphUsed byNamed presets for Java regular expressions Zenna DBUsed byAnnotation-driven JSON content mapping