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() 

Source Link

Document

Constructs an AssertionError with no detail message.

Usage

From source file:com.alexshabanov.springrestapi.support.ProfileController.java

@RequestMapping(value = PROFILE_RESOURCE, method = RequestMethod.POST)
@ResponseBody/*from  w w w. j  ava2s . co  m*/
public Profile upgradeProfile(@RequestBody Profile profile) {
    throw new AssertionError(); // should be mocked
}

From source file:org.gdg.frisbee.android.api.OkStack.java

@Override
protected HttpURLConnection createConnection(URL url) throws IOException {
    OkHttpClient client = new OkHttpClient();
    SSLContext sslContext;//ww  w .ja  va 2s. c o  m
    try {
        TrustManager[] trustAllCerts = new TrustManager[] {
                new GdgTrustManager(App.getInstance().getApplicationContext()) };

        sslContext = SSLContext.getInstance("TLS");
        sslContext.init(null, trustAllCerts, new java.security.SecureRandom());
    } catch (GeneralSecurityException e) {
        throw new AssertionError(); // The system has no TLS. Just give up.
    }
    client.setSslSocketFactory(sslContext.getSocketFactory());
    return client.open(url);
}

From source file:com.laxser.blitz.web.var.PrivateVar.java

/**
 * ??
 */
private PrivateVar() {
    throw new AssertionError();
}

From source file:org.terracotta.VideoRepository.java

@Cacheable
public Video read(int id) {
    throw new AssertionError();
}

From source file:eu.scape_project.droid_identify.hadoop.HadoopJobCliConfig.java

/**
 * Clone object// w w w  . j a v  a  2  s  .c o m
 * @return cloned object
 */
@Override
public HadoopJobCliConfig clone() {
    try {
        return (HadoopJobCliConfig) super.clone();
    } catch (CloneNotSupportedException ex) {
        LOG.error("CloneNotSupportedException:", ex);
        throw new AssertionError();
    }
}

From source file:net.lmxm.ute.utils.PathUtils.java

/**
 * Instantiates a new path utils.
 */
private PathUtils() {
    throw new AssertionError();
}

From source file:org.fusesource.restygwt.server.complex.DTOTypeResolver.java

@Override
public String idFromBaseType() {
    throw new AssertionError();
}

From source file:com.roche.sequencing.bioinformatics.common.utils.Md5CheckSumUtil.java

public static String md5SumWithSkippingCommentLines(IInputStreamFactory inputStreamFactory)
        throws FileNotFoundException, IOException {
    InputStream inputStream;/* www .  j  a v  a 2  s . co m*/
    if (GZipUtil.isCompressed(inputStreamFactory)) {
        inputStream = new GZIPInputStream(inputStreamFactory.createInputStream());
    } else {
        inputStream = new BufferedInputStream(inputStreamFactory.createInputStream());
    }

    MessageDigest md5SumDigest = null;
    try {
        md5SumDigest = MessageDigest.getInstance("MD5");
    } catch (NoSuchAlgorithmException e) {
        throw new AssertionError();
    }

    try {
        byte[] character = new byte[1024];
        StringBuilder currentLine = new StringBuilder();
        int readChars = 0;
        while ((readChars = inputStream.read(character)) != -1) {
            for (int i = 0; i < readChars; ++i) {
                char currentCharacter = (char) character[i];
                if (currentCharacter == StringUtil.NEWLINE_SYMBOL) {
                    currentLine.append(currentCharacter);
                    String line = currentLine.toString();
                    if (!line.startsWith("#")) {
                        md5SumDigest.update(line.getBytes());
                    }

                    currentLine = new StringBuilder();

                } else {
                    currentLine.append(currentCharacter);
                }
            }
        }
    } finally {
        inputStream.close();
    }
    String md5Sum = Hex.encodeHexString(md5SumDigest.digest());
    return md5Sum;
}

From source file:com.yoncabt.ebr.util.ResultSetDeserializer.java

public List<Object[]> getData() {
    List<Object[]> ret = new ArrayList<>();
    JSONArray arr = jo.getJSONArray("values");
    for (int i = 0; i < arr.length(); i++) {
        List<Object> column = new ArrayList<>();
        JSONArray row = arr.getJSONArray(i);
        for (int j = 0; j < types.size(); j++) {
            if (row.isNull(j)) {
                column.add(null);/*from ww w  .  j a v  a 2s. c  om*/
            } else {
                switch (types.get(j)) {
                case DATE:
                    column.add(new Date(row.getLong(j)));
                    break;
                case STRING:
                    column.add(row.getString(j));
                    break;
                case INTEGER:
                    column.add(row.getInt(j));
                    break;
                case LONG:
                    column.add(row.getLong(j));
                    break;
                case DOUBLE:
                    column.add(row.getDouble(j));
                    break;
                default:
                    throw new AssertionError();
                }
            }
        }
        ret.add(column.toArray());
    }
    return ret;
}

From source file:com.facebook.util.StandardObjectMapper.java

private StandardObjectMapper() {
    throw new AssertionError();
}