Example usage for java.io InvalidObjectException InvalidObjectException

List of usage examples for java.io InvalidObjectException InvalidObjectException

Introduction

In this page you can find the example usage for java.io InvalidObjectException InvalidObjectException.

Prototype

public InvalidObjectException(String reason) 

Source Link

Document

Constructs an InvalidObjectException.

Usage

From source file:org.protempa.ValueClassification.java

private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException {
    s.defaultReadObject();/*w  ww .jav a  2  s.  c  o  m*/
    if (value == null) {
        throw new InvalidObjectException("id cannot be null");
    }
    if (lladId == null) {
        throw new InvalidObjectException("lowLevelAbstractionId cannot be null");
    }
    if (lladValue == null) {
        throw new InvalidObjectException("lowLevelValueDefName cannot be null");
    }
}

From source file:com.phoenixst.collections.FilteredCollection.java

private void readObject(ObjectInputStream in) throws ClassNotFoundException, IOException {
    in.defaultReadObject();/*w  w w.ja  v a 2  s .  c  om*/
    if (delegate == null) {
        throw new InvalidObjectException("Wrapped Collection is null.");
    }
    if (predicate == null) {
        throw new InvalidObjectException("Predicate is null.");
    }
}

From source file:com.phoenixst.plexus.DefaultOrientedForestView.java

private void readObject(ObjectInputStream in) throws ClassNotFoundException, IOException {
    in.defaultReadObject();//from w ww .j ava  2 s.  com
    if (graph == null) {
        throw new InvalidObjectException("Graph is null.");
    }
}

From source file:com.phoenixst.plexus.util.DefaultIncidentEdgeGetter.java

private void readObject(ObjectInputStream in) throws ClassNotFoundException, IOException {
    in.defaultReadObject();//from w w w  . ja  v  a 2s. c  o m
    if (graph == null) {
        throw new InvalidObjectException("Graph is null.");
    }
    if (traverserPredicate == null) {
        throw new InvalidObjectException("Traverser predicate is null.");
    }
}

From source file:net.zcarioca.jmx.servlet.handlers.RestRequestHandler.java

public Object getResponse(HttpServletRequest request) throws Exception {
    String path = request.getPathInfo();
    if (StringUtils.isBlank(path)) {
        throw new InvalidObjectException("Path not found");
    }//  ww w .  j  a v a2  s  .co m
    for (RestRequestPathProcessor processor : processors) {
        if (processor.getPathPattern().matcher(path).matches()) {
            return processor.getResponse(request, path);
        }
    }
    return null;
}

From source file:com.phoenixst.collections.AllPredicate.java

private void readObject(ObjectInputStream in) throws ClassNotFoundException, IOException {
    in.defaultReadObject();/*from   w  w w  . j  a v a 2  s.c om*/
    if (predicateArray == null) {
        throw new InvalidObjectException("Predicate array is null.");
    }
    if (containsNull(predicateArray)) {
        throw new InvalidObjectException("Predicate array has a null element.");
    }
}

From source file:com.phoenixst.collections.ClosureChain.java

private void readObject(ObjectInputStream in) throws ClassNotFoundException, IOException {
    in.defaultReadObject();/*from   w  w w. ja v  a2 s .c  o m*/
    if (closureArray == null) {
        throw new InvalidObjectException("Closure array is null.");
    }
    if (containsNull(closureArray)) {
        throw new InvalidObjectException("Closure array has a null element.");
    }
}

From source file:com.phoenixst.collections.CartesianProduct.java

private void readObject(ObjectInputStream in) throws ClassNotFoundException, IOException {
    in.defaultReadObject();/* w  w  w.  j a  va 2s  .  c o  m*/
    if (left == null) {
        throw new InvalidObjectException("Left operand is null.");
    }
    if (right == null) {
        throw new InvalidObjectException("Right operand is null.");
    }
}

From source file:org.grouplens.grapht.annotation.AnnotationProxy.java

/**
 * Customized {@code readObject} implementation to ensure the cached type is resolved.
 *
 * @param in The stream./*www.  ja va 2  s . c o m*/
 * @throws java.io.ObjectStreamException If there is an error reading the object from the stream.
 */
@SuppressWarnings("unchecked")
private void readObject(ObjectInputStream in) throws ObjectStreamException {
    try {
        in.defaultReadObject();
        cachedType = (Class<T>) annotationType.resolve();
    } catch (IOException e) {
        ObjectStreamException ex = new StreamCorruptedException("IO exception");
        ex.initCause(e);
        throw ex;
    } catch (ClassNotFoundException e) {
        ObjectStreamException ex = new InvalidObjectException("IO exception");
        ex.initCause(e);
        throw ex;
    }
}

From source file:com.phoenixst.collections.TransformerChain.java

private void readObject(ObjectInputStream in) throws ClassNotFoundException, IOException {
    in.defaultReadObject();//w  w  w .j a v a 2s  .  co m
    if (transformerArray == null) {
        throw new InvalidObjectException("Transformer array is null.");
    }
    if (containsNull(transformerArray)) {
        throw new InvalidObjectException("Transformer array has a null element.");
    }
}