Example usage for java.lang AssertionError AssertionError

List of usage examples for java.lang AssertionError AssertionError

Introduction

In this page you can find the example usage for java.lang AssertionError AssertionError.

Prototype

public AssertionError(double detailMessage) 

Source Link

Document

Constructs an AssertionError with its detail message derived from the specified double, which is converted to a string as defined in section 15.18.1.1 of The Java™ Language Specification.

Usage

From source file:com.sunchenbin.store.feilong.core.io.InputStreamUtil.java

/** Don't let anyone instantiate this class. */
private InputStreamUtil() {
    //AssertionError?. ?????. ???.
    //see Effective Java 2nd
    throw new AssertionError("No " + getClass().getName() + " instances for you!");
}

From source file:edu.emory.cci.aiw.cvrg.eureka.common.comm.UnaryOperator.java

@Override
boolean evaluate(Map<String, List<Proposition>> propMap) {
    switch (this.op) {
    case NOT://w w  w  .  j  a v a2  s  . co m
        return !this.node.evaluate(propMap);
    default:
        throw new AssertionError("Invalid op " + this.op);
    }
}

From source file:bit.changepurse.wdk.util.CheckedExceptionMethods.java

private CheckedExceptionMethods() {
    throw new AssertionError("No bit.coinage.wdk.utils.CheckedExceptionMethods instances for you!");
}

From source file:com.feilong.commons.core.util.ListUtil.java

/** Don't let anyone instantiate this class. */
private ListUtil() {
    //AssertionError?. ?????. ???.
    //see Effective Java 2nd
    throw new AssertionError("No " + getClass().getName() + " instances for you!");
}

From source file:com.alibaba.otter.shared.common.utils.cmd.StreamCopier.java

public StreamCopier(InputStream stream, OutputStream out, String identifier) {
    if ((stream == null) || (out == null)) {
        throw new AssertionError("null streams not allowed");
    }/*from  w  ww. j av a 2s .  c om*/

    this.reader = new BufferedReader(new InputStreamReader(stream));
    this.out = out;
    this.identifier = identifier;
    this.setName("Stream Copier");
    this.setDaemon(true);
}

From source file:org.ambraproject.wombat.util.ReproxyUtil.java

private ReproxyUtil() {
    throw new AssertionError("Not instantiable");
}

From source file:edu.emory.bmi.aiw.i2b2export.output.ProviderDataOutputFormatter.java

public void format(BufferedWriter writer) throws IOException {
    try {/*from  w w  w .j  a v a  2 s . c o m*/
        Class.forName("org.h2.Driver");
    } catch (ClassNotFoundException ex) {
        throw new AssertionError("Error parsing i2b2 metadata: " + ex);
    }
    try (Connection con = DriverManager.getConnection("jdbc:h2:mem:ProviderDataOutputFormatter")) {
        for (Observer provider : this.providers) {
            new ProviderDataRowOutputFormatter(this.config, provider, con).format(writer);
            writer.write(IOUtils.LINE_SEPARATOR);
        }
    } catch (SQLException ex) {
        throw new IOException("Error parsing i2b2 metadata: " + ex.getMessage());
    }

}

From source file:com.wavemaker.commons.util.SpringUtils.java

public static void throwSpringNotInitializedError(Class<?> uninitializedBean) {
    throw new AssertionError("Spring has not initialized " + uninitializedBean.getName());
}

From source file:guru.nidi.ramltester.spring.RamlMatcher.java

@Override
public void match(MvcResult result) throws Exception {
    final RamlReport report = testAgainst(result);
    if (!report.isEmpty()) {
        throw new AssertionError(report.toString());
    }//from w  w  w . j a v a  2  s  . c  o  m
}

From source file:com.github.ferstl.spring.jdbc.oracle.dsconfig.PoolProperties.java

private PoolProperties() {
    throw new AssertionError("Not instantiable");
}