Examples of InvalidObjectException


Examples of com.puzzlebazar.shared.InvalidObjectException

  public void attachToPuzzleDetails(HeyawakePuzzleDetails puzzleDetails)
      throws InvalidObjectException, ObjectAlreadyInitializedException  {
    super.attachToPuzzleDetails(puzzleDetails);

    if (getWidth() <= 0 || getHeight() <= 0) {
      throw new InvalidObjectException("HeyawakePuzzleDetails has an invalid width or height.");
    }

    if (rooms == null) {
      rooms = new ArrayList<HeyawakeRoom>();
    }
    if (stateArray == null) {
      stateArray = new HeyawakeCellState[getWidth()][getHeight()];
    } else if (stateArray.length != getWidth() ||
          stateArray[0].length != getWidth()) {
      throw new InvalidObjectException("Width or height of HeyawakePuzzle doesn't match that of HeyawakePuzzleDetails");
    }
  }
View Full Code Here

Examples of com.sun.grid.jgdi.configuration.reflect.InvalidObjectException

             "NONE",false, true );*/
    }
   
    public void validate(Object obj) throws InvalidObjectException {
        if( !(obj instanceof ClusterQueue) ) {
            throw new InvalidObjectException(obj, "obj is not an instanceof ClusterQueue");
        }
    }
View Full Code Here

Examples of gnu.classpath.jdwp.exception.InvalidObjectException

  public ObjectId get (long id)
    throws InvalidObjectException
  {
    ObjectId oid = (ObjectId) _idTable.get (new Long (id));
    if (oid == null)
      throw new InvalidObjectException (id);
    return oid;
  }
View Full Code Here

Examples of java.io.InvalidObjectException

          file = new File(parentDir, op.name);
          file.delete();
          deleteDir(parentDir);
        }
      } else {
        throw new InvalidObjectException("Unknow object in log.");
      }
    }
  }
View Full Code Here

Examples of java.io.InvalidObjectException

    /**
     * Resolves instances being deserialized to the predefined constants.
     */
    protected Object readResolve() throws InvalidObjectException {
        if (this.getClass() != TextAttribute.class) {
            throw new InvalidObjectException(
    "subclass didn't correctly implement readResolve");
        }
       
        TextAttribute instance = (TextAttribute) instanceMap.get(getName());
        if (instance != null) {
            return instance;
        } else {
            throw new InvalidObjectException("unknown attribute name");
        }
    }
View Full Code Here

Examples of java.io.InvalidObjectException

         *         resolved.
         * @return resolved DateFormat.Field constant
         */
        protected Object readResolve() throws InvalidObjectException {
            if (this.getClass() != DateFormat.Field.class) {
                throw new InvalidObjectException("subclass didn't correctly implement readResolve");
            }

            Object instance = instanceMap.get(getName());
            if (instance != null) {
                return instance;
            } else {
                throw new InvalidObjectException("unknown attribute name");
            }
        }
View Full Code Here

Examples of java.io.InvalidObjectException

     * @throws InvalidObjectException if the objects read from the stream is invalid.
     */
    private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
        in.defaultReadObject();
        if (choiceLimits.length != choiceFormats.length) {
            throw new InvalidObjectException(
                    "limits and format arrays of different length.");
        }
    }
View Full Code Here

Examples of java.io.InvalidObjectException

  port = -1;      // Argh
  is.defaultReadObject();
  try {
      new Parser(string).parse(false);
  } catch (URISyntaxException x) {
      IOException y = new InvalidObjectException("Invalid URI");
      y.initCause(x);
      throw y;
  }
    }
View Full Code Here

Examples of java.io.InvalidObjectException

    /**
      * prevent default deserialization
      */
    private void readObject(ObjectInputStream in) throws IOException,
        ClassNotFoundException {
            throw new InvalidObjectException("can't deserialize enum");
    }
View Full Code Here

Examples of java.io.InvalidObjectException

        ClassNotFoundException {
            throw new InvalidObjectException("can't deserialize enum");
    }

    private void readObjectNoData() throws ObjectStreamException {
        throw new InvalidObjectException("can't deserialize enum");
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.