Minor fixes - unused imports and generics
git-svn-id: http://webgoat.googlecode.com/svn/trunk@143 4033779f-a91e-0410-96ef-6bf7bf53c507
This commit is contained in:
parent
661d8bcf62
commit
d39975c299
@ -113,11 +113,11 @@ public class SummaryReportCardScreen extends LessonAdapter
|
||||
}
|
||||
t.addElement(makeUserSummaryHeader());
|
||||
|
||||
for (Iterator userIter = UserTracker.instance().getAllUsers(
|
||||
for (Iterator<String> userIter = UserTracker.instance().getAllUsers(
|
||||
WebSession.WEBGOAT_USER).iterator(); userIter.hasNext();)
|
||||
{
|
||||
|
||||
String user = (String) userIter.next();
|
||||
String user = userIter.next();
|
||||
t.addElement(makeUserSummaryRow(s, user));
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
package org.owasp.webgoat.session;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.sql.Connection;
|
||||
import java.sql.DriverManager;
|
||||
|
@ -442,12 +442,12 @@ public class ECSFactory
|
||||
* @return Description of the Return Value
|
||||
*/
|
||||
|
||||
public static Element makePulldown(String name, List options)
|
||||
public static Element makePulldown(String name, List<String> options)
|
||||
{
|
||||
|
||||
Select s = new Select(name);
|
||||
|
||||
s.addElement((String[]) options.toArray(new String[options.size()]));
|
||||
s.addElement(options.toArray(new String[options.size()]));
|
||||
|
||||
return (s);
|
||||
}
|
||||
@ -542,7 +542,7 @@ public class ECSFactory
|
||||
*/
|
||||
|
||||
public static Element makeSelect(boolean diffNames, Select select,
|
||||
String name, Vector options, String[] list, String selected)
|
||||
String name, Vector<Option> options, String[] list, String selected)
|
||||
{
|
||||
|
||||
return makeSelect(diffNames, select, name, options, list, selected, 1);
|
||||
@ -563,7 +563,7 @@ public class ECSFactory
|
||||
*/
|
||||
|
||||
public static Select makeSelect(boolean diffNames, Select select,
|
||||
String name, Vector options, String[] list, String selected,
|
||||
String name, Vector<Option> options, String[] list, String selected,
|
||||
int rowsShowing)
|
||||
{
|
||||
|
||||
@ -582,8 +582,7 @@ public class ECSFactory
|
||||
|
||||
String label = list[loop + 1];
|
||||
|
||||
org.apache.ecs.html.Option o = new org.apache.ecs.html.Option(
|
||||
value);
|
||||
Option o = new Option(value);
|
||||
|
||||
if (loop == 0)
|
||||
{
|
||||
|
@ -106,11 +106,11 @@ public class UserTracker
|
||||
}
|
||||
|
||||
|
||||
public Collection getAllUsers(String roleName)
|
||||
public Collection<String> getAllUsers(String roleName)
|
||||
{
|
||||
synchronized (usersDB)
|
||||
{
|
||||
Collection allUsers = new ArrayList();
|
||||
Collection<String> allUsers = new ArrayList<String>();
|
||||
try
|
||||
{
|
||||
usersDB.open();
|
||||
|
@ -17,7 +17,6 @@ import java.util.Vector;
|
||||
|
||||
import javax.servlet.ServletContext;
|
||||
import javax.servlet.http.Cookie;
|
||||
import javax.servlet.http.HttpServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user