jax-ws
  1. jax-ws
  2. JAX_WS-1140

NullpointerException in endpointfactory when passing in nullable parameter

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Blocker Blocker
    • Resolution: Unresolved
    • Affects Version/s: 2.2.2, 2.2.3, 2.2.4, 2.2.5, 2.2.6, 2.2.7, 2.2.8
    • Fix Version/s: None
    • Component/s: runtime
    • Labels:
      None

      Description

      EndpointFactory create method crashes with a nullpointer exception when passing a null binding.
      Looks like it was updated some time after version 2.2.1 which doesn't contain this issue.

      The create method:
      create(
      Class<T> implType, boolean processHandlerAnnotation, @Nullable Invoker invoker,
      @Nullable QName serviceName, @Nullable QName portName,
      @Nullable Container container, @Nullable WSBinding binding,
      @Nullable SDDocumentSource primaryWsdl,
      @Nullable Collection<? extends SDDocumentSource> metadata,
      EntityResolver resolver, boolean isTransportSynchronous, boolean isStandard)

      The method resulting in a nullpointer exception:

      public static MetadataReader getExternalMetadatReader(Class<?> implType, WSBinding binding)

      { com.oracle.webservices.api.databinding.ExternalMetadataFeature ef = binding.getFeature( com.oracle.webservices.api.databinding.ExternalMetadataFeature.class); if (ef != null) return ef.getMetadataReader(implType.getClassLoader()); return null; }

      I guess it should be updated to:

      public static MetadataReader getExternalMetadatReader(Class<?> implType, WSBinding binding) {
      if ( binding == null )

      { return null; }

      com.oracle.webservices.api.databinding.ExternalMetadataFeature ef = binding.getFeature(
      com.oracle.webservices.api.databinding.ExternalMetadataFeature.class);
      if (ef != null)
      return ef.getMetadataReader(implType.getClassLoader());
      return null;
      }

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Unassigned
            Reporter:
            pasfilip
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: