Skip to content

Commit

Permalink
-- Remove raw type usage, add type check parameter.
Browse files Browse the repository at this point in the history
-- Remove unused variable and unused imports.
  • Loading branch information
muzir committed Feb 23, 2016
1 parent daa05dd commit 25f08ea
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public void doPost(HttpServletRequest request, HttpServletResponse response) thr
// property file. No other control parameters are supported at this time.
if (!property.equals(EMPTY_STRING))
{
Enumeration e = session.getParser().getParameterNames();
Enumeration<String> e = session.getParser().getParameterNames();

while (e.hasMoreElements())
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ public class HammerHead extends HttpServlet {

final Logger logger = LoggerFactory.getLogger(HammerHead.class);

private static final String WELCOMED = "welcomed";

/**
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,31 @@
*/
package org.owasp.webgoat.application;

import com.google.common.collect.Maps;
import org.owasp.webgoat.HammerHead;
import org.owasp.webgoat.lessons.LessonServletMapping;
import org.owasp.webgoat.plugins.PluginsLoader;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider;
import org.springframework.core.type.filter.AnnotationTypeFilter;

import javax.servlet.ServletContext;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.servlet.ServletRegistration;
import java.io.IOException;
import java.io.InputStream;
import java.nio.file.Paths;
import java.sql.Driver;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.util.Enumeration;
import java.util.Map;
import java.util.Set;
import java.util.jar.Attributes;
import java.util.jar.Manifest;

import javax.servlet.ServletContext;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.servlet.ServletRegistration;

import org.owasp.webgoat.HammerHead;
import org.owasp.webgoat.lessons.LessonServletMapping;
import org.owasp.webgoat.plugins.PluginsLoader;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider;
import org.springframework.core.type.filter.AnnotationTypeFilter;

/**
* Web application lifecycle listener.
*
Expand All @@ -55,7 +54,6 @@ public void contextInitialized(ServletContextEvent sce) {

private void loadServlets(ServletContextEvent sce) {
final ServletContext servletContext = sce.getServletContext();
Map<String, Class> controllers = Maps.newHashMap();
ClassPathScanningCandidateComponentProvider provider = new ClassPathScanningCandidateComponentProvider(
false);
provider.addIncludeFilter(new AnnotationTypeFilter(LessonServletMapping.class));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ public String[] getMissingParameters(String[] requestuired) {
*
* @return The parameterNames value
*/
public Enumeration getParameterNames() {
public Enumeration<String> getParameterNames() {
if (request == null) {
return (null);
}
Expand Down

0 comments on commit 25f08ea

Please sign in to comment.