Avoid NPE

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@740087 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Hiram R. Chirino 2009-02-02 19:38:04 +00:00
parent 662aee8f21
commit c01e182cfd
1 changed files with 2 additions and 0 deletions

View File

@ -100,6 +100,8 @@ public class LinkedNodeList<T extends LinkedNode<T>> {
* @return * @return
*/ */
public T rotate() { public T rotate() {
if( head ==null )
return null;
return head = head.getNextCircular(); return head = head.getNextCircular();
} }