src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/Container.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.  Oracle designates this

@@ -25,11 +25,10 @@
 
 package com.sun.xml.internal.ws.api.server;
 
 import java.util.Collection;
 import java.util.Collections;
-import java.util.HashSet;
 import java.util.Set;
 import java.util.concurrent.CopyOnWriteArraySet;
 
 import com.sun.istack.internal.NotNull;
 import com.sun.xml.internal.ws.api.Component;

@@ -89,10 +88,11 @@
 
     private static final class NoneContainer extends Container {
     }
 
     public <S> S getSPI(Class<S> spiType) {
+        if (components == null) return null;
         for (Component c : components) {
                 S s = c.getSPI(spiType);
                 if (s != null)
                         return s;
         }