Package ptolemy.actor.util.test
Class FIFOQueueTest
- java.lang.Object
-
- ptolemy.actor.util.FIFOQueue
-
- ptolemy.actor.util.test.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)
-
-
Field Summary
-
Fields inherited from class ptolemy.actor.util.FIFOQueue
INFINITE_CAPACITY
-
-
Constructor Summary
Constructors Constructor Description FIFOQueueTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
clone()
Return a clone of this object.-
Methods inherited from class ptolemy.actor.util.FIFOQueue
clear, elementList, elements, get, getCapacity, getContainer, getHistoryCapacity, historyElementList, historyElements, historySize, isFull, put, setCapacity, setContainer, setHistoryCapacity, size, take
-
-