Skip to content

Commit

Permalink
KNL-1522 javadoc, raw Iterator; org.sakaiproject.util.IteratorEnumer… (
Browse files Browse the repository at this point in the history
…sakaiproject#4320)

* KNL-1522 javadoc,  raw Iterator; org.sakaiproject.util.IteratorEnumeration => org.apache.commons.collections4.iterators.IteratorEnumeration;

* KNL-1522
  • Loading branch information
axxter99 authored and buckett committed Apr 24, 2017
1 parent 59e65c3 commit 66e2dca
Show file tree
Hide file tree
Showing 10 changed files with 73 additions and 34 deletions.
4 changes: 2 additions & 2 deletions kernel/api/src/main/java/org/sakaiproject/user/api/User.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public interface User extends Entity, Comparable

/**
* @return the time created.
* @deprecated see {link {@link #getCreatedDate()}
* @deprecated see {@link #getCreatedDate()}
*
*/
Time getCreatedTime();
Expand All @@ -57,7 +57,7 @@ public interface User extends Entity, Comparable

/**
* @return the time last modified.
* @deprecated see {link {@link #getModifiedDate()}
* @deprecated see {@link #getModifiedDate()}
*/
Time getModifiedTime();

Expand Down
4 changes: 4 additions & 0 deletions kernel/kernel-impl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,10 @@
<groupId>commons-validator</groupId>
<artifactId>commons-validator</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-collections4</artifactId>
</dependency>
<dependency>
<!-- for parsing CSV data from config service files -->
<groupId>net.sf.opencsv</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,32 @@
**********************************************************************************/
package org.sakaiproject.tool.impl;

import org.apache.commons.collections.iterators.IteratorChain;
import org.sakaiproject.thread_local.api.ThreadLocalManager;
import org.sakaiproject.tool.api.*;
import org.sakaiproject.util.IteratorEnumeration;
import java.io.Serializable;
import java.util.Date;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

import javax.servlet.ServletContext;
import javax.servlet.http.HttpSession;
import javax.servlet.http.HttpSessionBindingEvent;
import javax.servlet.http.HttpSessionBindingListener;
import javax.servlet.http.HttpSessionContext;
import java.io.Serializable;
import java.util.*;
import java.util.concurrent.ConcurrentHashMap;

import org.apache.commons.collections4.iterators.IteratorChain;
import org.apache.commons.collections4.iterators.IteratorEnumeration;
import org.sakaiproject.thread_local.api.ThreadLocalManager;
import org.sakaiproject.tool.api.ContextSession;
import org.sakaiproject.tool.api.NonPortableSession;
import org.sakaiproject.tool.api.Session;
import org.sakaiproject.tool.api.SessionAttributeListener;
import org.sakaiproject.tool.api.SessionBindingEvent;
import org.sakaiproject.tool.api.SessionBindingListener;
import org.sakaiproject.tool.api.SessionManager;
import org.sakaiproject.tool.api.SessionStore;
import org.sakaiproject.tool.api.ToolSession;

/**********************************************************************************************************************************************************************************************************************************************************
* Entity: ToolSession, ContextSession (and even HttpSession)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,44 @@

package org.sakaiproject.tool.impl;

import org.apache.commons.collections.iterators.IteratorChain;
import java.io.Serializable;
import java.lang.reflect.Array;
import java.util.Collection;
import java.util.Date;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;

import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import javax.servlet.http.HttpSessionBindingEvent;
import javax.servlet.http.HttpSessionBindingListener;
import javax.servlet.http.HttpSessionContext;

import org.apache.commons.collections4.iterators.IteratorChain;
import org.apache.commons.collections4.iterators.IteratorEnumeration;
import org.apache.commons.lang.mutable.MutableLong;
import org.sakaiproject.event.api.UsageSession;
import org.sakaiproject.id.api.IdManager;
import org.sakaiproject.thread_local.api.ThreadLocalManager;
import org.sakaiproject.tool.api.*;
import org.sakaiproject.util.IteratorEnumeration;
import org.sakaiproject.tool.api.ContextSession;
import org.sakaiproject.tool.api.NonPortableSession;
import org.sakaiproject.tool.api.RebuildBreakdownService;
import org.sakaiproject.tool.api.Session;
import org.sakaiproject.tool.api.SessionAttributeListener;
import org.sakaiproject.tool.api.SessionBindingEvent;
import org.sakaiproject.tool.api.SessionBindingListener;
import org.sakaiproject.tool.api.SessionManager;
import org.sakaiproject.tool.api.SessionStore;
import org.sakaiproject.tool.api.ToolSession;
import org.sakaiproject.util.RequestFilter;
import org.sakaiproject.util.ResourceLoader;

import javax.servlet.ServletContext;
import javax.servlet.http.*;
import java.io.Serializable;
import java.lang.reflect.Array;
import java.util.*;
import java.util.concurrent.ConcurrentHashMap;


/*************************************************************************************************************************************************
* Entity: Session Also is an HttpSession
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@
* <p>
* EmptyIterator is an iterator which is empty.
* </p>
* @deprecated use commons-collection instead, this will be removed after 2.9 - Dec 2011
* @deprecated use {@link org.apache.commons.collections4.iterators.EmptyIterator} instead, this will be removed after 2.9 - Dec 2011
*/
@Deprecated
public class EmptyIterator implements Iterator
public class EmptyIterator<E> implements Iterator<E>
{
public Object next()
public E next()
{
return null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@
* <p>
* EnumerationIterator is an iterator over an enumeration.
* </p>
* @deprecated use commons-collection instead, this will be removed after 2.9 - Dec 2011
* @deprecated use {@link org.apache.commons.collections4.iterators.EnumerationIterator} instead, this will be removed after 2.9 - Dec 2011
*/
@Deprecated
public class EnumerationIterator implements Iterator
public class EnumerationIterator<E> implements Iterator<E>
{
/** The enumeration over which this iterates. */
protected Enumeration m_enum = null;
Expand All @@ -41,9 +41,9 @@ public EnumerationIterator(Enumeration e)
m_enum = e;
}

public Object next()
public E next()
{
return m_enum.nextElement();
return (E) m_enum.nextElement();
}

public boolean hasNext()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@
* <p>
* IteratorEnumeration is an enumeration over an iterator.
* </p>
* @deprecated use commons-collection instead, this will be removed after 2.9 - Dec 2011
* @deprecated use {@link org.apache.commons.collections4.iterators.IteratorEnumeration} instead, this will be removed after 2.9 - Dec 2011
*/
@Deprecated
public class IteratorEnumeration implements Enumeration
public class IteratorEnumeration<E> implements Enumeration<E>
{
/** The iterator over which this enumerates. */
protected Iterator m_iterator = null;
Expand All @@ -46,8 +46,8 @@ public boolean hasMoreElements()
return m_iterator.hasNext();
}

public Object nextElement()
public E nextElement()
{
return m_iterator.next();
return (E) m_iterator.next();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
* @deprecated use commons-collection instead, this will be removed after 2.9 - Dec 2011
*/
@Deprecated
public class SortedIterator implements Iterator
public class SortedIterator<E> implements Iterator<E>
{
/** The sorted iterator. */
protected Iterator m_iterator = null;
Expand Down Expand Up @@ -78,9 +78,9 @@ public boolean hasNext()
*
* @return The next element in the iteration
*/
public Object next()
public E next()
{
return m_iterator.next();
return (E) m_iterator.next();
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import java.util.Stack;

/**
* StackIterator is both a java.util.Iterator and a stack (though not a java.util.Collection)
* StackIterator is both a {@link java.util.Iterator} and a stack (though not a {@link java.util.Collection})
*
* @deprecated use commons-collection instead, this will be removed after 2.9 - Dec 2011
*/
Expand Down
1 change: 1 addition & 0 deletions master/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1917,6 +1917,7 @@
<link>http://docs.oracle.com/javaee/5/api/</link>
<link>http://junit.sourceforge.net/javadoc/</link>
<link>http://commons.apache.org/proper/commons-lang/javadocs/api-release/</link>
<link>http://commons.apache.org/proper/commons-collections/javadocs/api-release/</link>
</links>
<breakiterator>true</breakiterator>
<verbose>false</verbose>
Expand Down

0 comments on commit 66e2dca

Please sign in to comment.