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

The following examples show how to use java.io.InvalidClassException#initCause() . 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
Source File: MithraAbstractObjectPortal.java    From reladomo with Apache License 2.0 5 votes vote down vote up
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
Source File: DroolsObjectInputStream.java    From kogito-runtimes with Apache License 2.0 4 votes vote down vote up
public static InvalidClassException newInvalidClassException(final String className, final Throwable cause) {
    InvalidClassException exception = new InvalidClassException(className);
    exception.initCause(cause);
    return exception;
}