Class FIFOQueueTest

  • All Implemented Interfaces:
    java.lang.Cloneable

    public class FIFOQueueTest
    extends FIFOQueue
    This class is a test for the case whre FIFOQueue.clone() does not call super.clone(). FindBugs reports this as: "clone method does not call super.clone()"

    "This non-final class defines a clone() method that does not call super.clone(). If this class ("A") is extended by a subclass ("B"), and the subclass B calls super.clone(), then it is likely that B's clone() method will return an object of type A, which violates the standard contract for clone()."

    "If all clone() methods call super.clone(), then they are guaranteed to use Object.clone(), which always returns an object of the correct type."

    Since:
    Ptolemy II 10.0
    Version:
    $Id$
    Author:
    Christopher
    Pt.AcceptedRating:
    Red (liuj)
    Pt.ProposedRating:
    Red (cxh)
    • Constructor Detail

      • FIFOQueueTest

        public FIFOQueueTest()
    • Method Detail

      • clone

        public java.lang.Object clone()
                               throws java.lang.CloneNotSupportedException
        Return a clone of this object.
        Overrides:
        clone in class FIFOQueue
        Returns:
        A clone of this queue.
        Throws:
        java.lang.CloneNotSupportedException - If thrown by a parent class.