Java Code Examples for java.io.InvalidClassException#initCause()

The following examples show how to use java.io.InvalidClassException#initCause() . These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
public Object readResolve() throws ObjectStreamException
{
    try
    {
        return ReflectionMethodCache.getZeroArgMethod(Class.forName(this.finderClassName), "getMithraObjectPortal").invoke(null, (Object[]) null);
    }
    catch (Exception e)
    {
        InvalidClassException invalidClassException = new InvalidClassException("could not find object portal for " + this.finderClassName);
        invalidClassException.initCause(e);
        throw invalidClassException;
    }
}
 
Example 2
public static InvalidClassException newInvalidClassException(final String className, final Throwable cause) {
    InvalidClassException exception = new InvalidClassException(className);
    exception.initCause(cause);
    return exception;
}