List of usage examples for java.lang InternalError InternalError
public InternalError()
InternalError
with no detail message. From source file:Main.java
static void initReflection() { try {//from w w w . j a v a 2 s . c om // lightweight dispatcher dispatcherField = Container.class.getDeclaredField("dispatcher"); dispatcherField.setAccessible(true); Class<?> dispatcherCls = Class.forName("java.awt.LightweightDispatcher"); newLightweightDispatcher = dispatcherCls.getDeclaredConstructor(new Class[] { Container.class }); newLightweightDispatcher.setAccessible(true); dispatchMethod = dispatcherCls.getDeclaredMethod("dispatchEvent", AWTEvent.class); dispatchMethod.setAccessible(true); enableEvents = dispatcherCls.getDeclaredMethod("enableEvents", new Class[] { long.class }); enableEvents.setAccessible(true); } catch (Exception ex) { System.err.println(ex); InternalError err = new InternalError(); err.initCause(ex); throw err; } }
From source file:ArraySet.java
public Object clone() { try {//from w w w. j a v a 2 s . c om ArraySet newSet = (ArraySet) super.clone(); newSet.list = (ArrayList) list.clone(); return newSet; } catch (CloneNotSupportedException e) { throw new InternalError(); } }
From source file:com.echopf.contents.blogs.ECHOBlogQuery.java
/** * {@.en Finds entries from the remote server in a background thread.} * {@.ja ???????????}//from w w w . ja va 2 s. co m * * @param instanceId * {@.en the reference ID of the finding target instance} * {@.ja ?ID} * @param params * {@.en to control the output} * {@.ja <a href="http://echopf.com/docs/restapi/list"></a>} * @param callback * {@.en invoked after the finding is completed} * {@.ja ??????} */ public static void findInBackground(String instanceId, JSONObject params, FindCallback<ECHOEntryObject> callback) { try { doFind(false, callback, instanceId, params); } catch (ECHOException e) { throw new InternalError(); } }
From source file:com.echopf.contents.databases.ECHODatabaseQuery.java
/** * {@.en Finds records from the remote server in a background thread.} * {@.ja ???????????}// w w w . ja va 2 s . co m * * @param instanceId * {@.en the reference ID of the finding target instance} * {@.ja ?ID} * @param params * {@.en to control the output} * {@.ja <a href="http://echopf.com/docs/restapi/list"></a>} * @param callback * {@.en invoked after the finding is completed} * {@.ja ??????} */ public static void findInBackground(String instanceId, JSONObject params, FindCallback<ECHORecordObject> callback) { try { doFind(false, callback, instanceId, params); } catch (ECHOException e) { throw new InternalError(); } }
From source file:controllers.base.SecuredAction.java
public boolean hasVirus(File file) { if (file == null) { return false; }/*from w w w . j ava 2 s . c om*/ try { Process process = Runtime.getRuntime() .exec(Play.application().configuration().getString("application.virusChecker.command")); byte[] buffer = new byte[2048]; InputStream stream = FileUtils.openInputStream(file); while (IOUtils.read(stream, buffer, 0, 2048) != 0) { process.getOutputStream().write(buffer); } process.getOutputStream().close(); try { int result = process.waitFor(); if (result == 0) { return false; } else if (result == 1) { return true; } else { throw new InternalError(); } } catch (InterruptedException e) { return hasVirus(file); } } catch (IOException e) { throw new IllegalArgumentException(e); } }
From source file:net.gtaun.shoebill.data.Time.java
@Override public Time clone() { try {/* w w w. j a v a 2 s. com*/ return (Time) super.clone(); } catch (CloneNotSupportedException e) { throw new InternalError(); } }
From source file:com.echopf.members.ECHOMemberQuery.java
/** * {@.en Finds members from the remote server in a background thread.} * {@.ja ????????????}/*from w ww .ja va 2 s . co m*/ * * @param instanceId * {@.en the reference ID of the finding target instance} * {@.ja ??ID} * @param params * {@.en to control the output} * {@.ja <a href="http://echopf.com/docs/restapi/list"></a>} * @param callback * {@.en invoked after the finding is completed} * {@.ja ??????} */ public static void findInBackground(String instanceId, JSONObject params, FindCallback<ECHOMemberObject> callback) { try { doFind(false, callback, instanceId, params); } catch (ECHOException e) { throw new InternalError(); } }
From source file:net.gtaun.shoebill.data.WeaponData.java
@Override public WeaponData clone() { try {/*from w w w . j a v a 2s.c o m*/ return (WeaponData) super.clone(); } catch (CloneNotSupportedException e) { throw new InternalError(); } }
From source file:ArrayDictionary.java
/** * Clone this array dictionary.//from w w w.j a va 2 s. c o m * <p>As for hashtables, a shallow copy is made, the keys and elements * themselves are <em>not</em> cloned. * @return The clone. */ public Object clone() { try { ArrayDictionary cl = (ArrayDictionary) super.clone(); cl.values = new Object[values.length]; System.arraycopy(values, 0, cl.values, 0, values.length); cl.keys = new Object[values.length]; System.arraycopy(keys, 0, cl.keys, 0, keys.length); return cl; } catch (CloneNotSupportedException ex) { throw new InternalError(); } }
From source file:com.github.sourjson.SourJson.java
@Override public SourJson clone() { try {// w w w . j a v a 2s . c om SourJson clone = (SourJson) super.clone(); clone.tcache = (TranslaterCache) tcache.clone(); clone.exactTranslaters = (HashMap<Class<?>, SJTranslater<?>>) exactTranslaters.clone(); clone.hierarchyTranslaters = (LinkedHashMap<Class<?>, SJTranslater<?>>) hierarchyTranslaters.clone(); clone.knownClasses = (HashSet<Class<?>>) knownClasses.clone(); return clone; } catch (CloneNotSupportedException e) { throw new InternalError(); } }