Open glassfishrobot opened 10 years ago
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 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; }
[2.2.2, 2.2.3, 2.2.4, 2.2.5, 2.2.6, 2.2.7, 2.2.8]
Reported by pasfilip
This issue was imported from java.net JIRA JAX_WS-1140
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 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; }
Affected Versions
[2.2.2, 2.2.3, 2.2.4, 2.2.5, 2.2.6, 2.2.7, 2.2.8]