Example usage for java.lang InternalError InternalError

List of usage examples for java.lang InternalError InternalError

Introduction

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

Prototype

public InternalError() 

Source Link

Document

Constructs an InternalError with no detail message.

Usage

From source file:com.echopf.members.ECHOMemberObject.java

public void deleteInBackground(DeleteCallback<ECHOMemberObject> callback) {
    try {/*from  w  ww  .ja v a 2s.  c o  m*/
        doDelete(false, callback);
    } catch (ECHOException e) {
        throw new InternalError();
    }
}

From source file:com.echopf.contents.databases.ECHORecordObject.java

public void deleteInBackground(DeleteCallback<ECHORecordObject> callback) {
    try {/*www  . j a  v a  2 s.co  m*/
        doDelete(false, callback);
    } catch (ECHOException e) {
        throw new InternalError();
    }
}

From source file:com.echopf.contents.blogs.ECHOEntryObject.java

public void deleteInBackground(DeleteCallback<ECHOEntryObject> callback) {
    try {//w  w w  .  j a  v  a  2s . c  om
        doDelete(false, callback);
    } catch (ECHOException e) {
        throw new InternalError();
    }
}

From source file:com.echopf.members.ECHOMembersGroupObject.java

public void deleteInBackground(DeleteCallback<ECHOMembersGroupObject> callback) {
    try {/* ww w .  j  ava  2 s .com*/
        doDelete(false, callback);
    } catch (ECHOException e) {
        throw new InternalError();
    }
}

From source file:com.echopf.contents.ECHOContentsCategoryObject.java

public void deleteInBackground(DeleteCallback<ECHOContentsCategoryObject> callback) {
    try {/*from  w  w  w  .  ja  v a 2s. com*/
        doDelete(false, callback);
    } catch (ECHOException e) {
        throw new InternalError();
    }
}

From source file:org.opencustomer.webapp.util.menu.Menu.java

@Override
public Object clone() {
    try {/*w  w  w  . ja v a  2  s  . c  om*/
        Menu menu = (Menu) super.clone();
        menu.items = (ArrayList<MenuItem>) this.items.clone();
        menu.items.clear();

        for (MenuItem item : this.items) {
            menu.items.add((MenuItem) item.clone());
        }

        if (this.activeItem != null) {
            activate(this.activeItem.getId());
        }

        return menu;

    } catch (CloneNotSupportedException e) {
        throw new InternalError();
    }
}

From source file:org.opencustomer.webapp.util.menu.MenuItem.java

@Override
public Object clone() {
    try {/*  w  w  w  . j  av  a2 s . c  o  m*/
        MenuItem item = (MenuItem) super.clone();

        item.childItems = (ArrayList<MenuItem>) this.childItems.clone();
        item.childItems.clear();
        for (MenuItem childItem : this.childItems) {
            MenuItem newChildItem = (MenuItem) childItem.clone();
            newChildItem.parentItem = item;
            item.childItems.add(newChildItem);
        }
        item.rights = rights.clone();

        return item;
    } catch (CloneNotSupportedException e) {
        throw new InternalError();
    }
}

From source file:com.agimatec.validation.jsr303.AgimatecValidatorFactory.java

@SuppressWarnings({ "CloneDoesntDeclareCloneNotSupportedException" })
@Override//from   w ww .  j  a va 2 s.  com
public synchronized AgimatecValidatorFactory clone() {
    try {
        return (AgimatecValidatorFactory) super.clone();
    } catch (CloneNotSupportedException e) {
        throw new InternalError(); // VM bug.
    }
}

From source file:org.shredzone.cilla.view.ResourceView.java

/**
 * Sets up the internal cache for the resource's etag and content length.
 *
 * @param pack//from w ww. ja v a 2 s. c o  m
 *            Resource pack
 * @param name
 *            Resource name
 * @return Map key
 */
private String setup(String pack, String name) throws IOException {
    String key = pack + '/' + name;

    if (!(etagMap.containsKey(key) && sizeMap.containsKey(key))) {
        try (InputStream in = ResourceView.class.getResourceAsStream("/public/" + pack + '/' + name)) {
            MessageDigest md5 = MessageDigest.getInstance("MD5");
            md5.reset();

            int counter = 0;

            byte[] buffer = new byte[4096];
            int length;
            while ((length = in.read(buffer)) >= 0) {
                md5.update(buffer, 0, length);
                counter += length;
            }

            byte[] digest = md5.digest();
            etagMap.put(key, IntStream.range(0, digest.length)
                    .mapToObj(ix -> String.format("%02x", digest[ix] & 0xFF)).collect(joining("", "\"", "\"")));

            sizeMap.put(key, counter);
        } catch (NoSuchAlgorithmException ex) {
            // we expect no exception, since MD5 is a standard digester
            throw new InternalError();
        }
    }

    return key;
}

From source file:net.sf.eclipsecs.core.projectconfig.FileSet.java

/**
 * {@inheritDoc}/*w w  w  . ja v  a  2  s.  co m*/
 */
public FileSet clone() {
    try {
        FileSet clone = (FileSet) super.clone();

        // clone filesets
        List<FileMatchPattern> clonedPatterns = new LinkedList<FileMatchPattern>();
        for (FileMatchPattern pattern : mFileMatchPatterns) {
            clonedPatterns.add(pattern.clone());
        }
        clone.mFileMatchPatterns = clonedPatterns;

        return clone;
    } catch (CloneNotSupportedException e) {
        throw new InternalError(); // should never happen
    }
}