All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.danielflower.mavenplugins.release.Guard Maven / Gradle / Ivy

Go to download

A maven release plugin built for multi-maven-module git repositories allowing continuous deployment

There is a newer version: 3.6.4
Show newest version
package com.github.danielflower.mavenplugins.release;

public class Guard {

    public static void notNull(String thing, Object value) {
        if (value == null) {
            throw new GuardException("The value for " + thing + " cannot be null");
        }
    }

    public static void notBlank(String thing, String value) {
        notNull(thing, value);
        if (value.trim().length() == 0) {
            throw new GuardException("The value for " + thing + " cannot be a blank string");
        }
    }

    public static class GuardException extends RuntimeException {
        public GuardException(String message) {
            super(message);
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy