summaryrefslogtreecommitdiff
path: root/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/SimpleServletPostProcessor.java
diff options
context:
space:
mode:
Diffstat (limited to 'spring-webmvc/src/main/java/org/springframework/web/servlet/handler/SimpleServletPostProcessor.java')
-rw-r--r--spring-webmvc/src/main/java/org/springframework/web/servlet/handler/SimpleServletPostProcessor.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/SimpleServletPostProcessor.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/SimpleServletPostProcessor.java
index 49e2e3c8..d6fef3b6 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/SimpleServletPostProcessor.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/SimpleServletPostProcessor.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2012 the original author or authors.
+ * Copyright 2002-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,7 +18,6 @@ package org.springframework.web.servlet.handler;
import java.util.Collections;
import java.util.Enumeration;
-import java.util.HashSet;
import javax.servlet.Servlet;
import javax.servlet.ServletConfig;
import javax.servlet.ServletContext;
@@ -126,6 +125,11 @@ public class SimpleServletPostProcessor implements
}
}
+ @Override
+ public boolean requiresDestruction(Object bean) {
+ return (bean instanceof Servlet);
+ }
+
/**
* Internal implementation of the {@link ServletConfig} interface,
@@ -159,7 +163,7 @@ public class SimpleServletPostProcessor implements
@Override
public Enumeration<String> getInitParameterNames() {
- return Collections.enumeration(new HashSet<String>());
+ return Collections.enumeration(Collections.<String>emptySet());
}
}