Skip to content

Commit

Permalink
JENKINS-28553 added more feedback from #1716 pull request
Browse files Browse the repository at this point in the history
  * documented getInstance
  * used @checkfornull
  • Loading branch information
ManuelB committed Jun 17, 2015
1 parent 401512e commit 79f99e1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion core/src/main/java/hudson/util/PluginServletFilter.java
Expand Up @@ -27,6 +27,7 @@
import hudson.security.SecurityRealm;
import jenkins.model.Jenkins;

import javax.annotation.CheckForNull;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
Expand Down Expand Up @@ -71,8 +72,11 @@ public class PluginServletFilter implements Filter, ExtensionPoint {

/**
* Lookup the instance from servlet context.
*
* @param c the ServletContext most of the time taken from a Jenkins instance
* @return get the current PluginServletFilter if it is already available
*/
private static PluginServletFilter getInstance(ServletContext c) {
private static @CheckForNull PluginServletFilter getInstance(ServletContext c) {
return (PluginServletFilter)c.getAttribute(KEY);
}

Expand Down

0 comments on commit 79f99e1

Please sign in to comment.