提交 d773642e 编写于 作者: O Oleg Nenashev

Suppress warning about writing static SystemProperties#theContext from a non-static method

上级 92a7385f
......@@ -25,6 +25,7 @@ package jenkins.util;
import edu.umd.cs.findbugs.annotations.CheckForNull;
import edu.umd.cs.findbugs.annotations.Nullable;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import hudson.EnvVars;
import java.util.logging.Level;
import java.util.logging.Logger;
......@@ -87,6 +88,8 @@ public class SystemProperties implements ServletContextListener {
* Called by the servlet container to initialize the {@link ServletContext}.
*/
@Override
@SuppressFBWarnings(value = "ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD",
justification = "Currently Jenkins instance may have one ond only one context")
public void contextInitialized(ServletContextEvent event) {
theContext = event.getServletContext();
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册