-
Bug
-
Resolution: Done
-
Minor
-
2.0-beta-2
-
None
-
None
When using RESTEasy links with an EL security constraint, and no @LinkELProvider annotation on the method, nor on the class, and the package-info.java is not defined, then we get this NPE:
java.lang.NullPointerException
at org.jboss.resteasy.links.impl.RESTUtils.findLinkELProvider(RESTUtils.java:286)
at org.jboss.resteasy.links.impl.RESTUtils.getELProvider(RESTUtils.java:292)
at org.jboss.resteasy.links.impl.RESTUtils.getELContext(RESTUtils.java:307)
at org.jboss.resteasy.links.impl.RESTUtils.checkConstraint(RESTUtils.java:171)
at org.jboss.resteasy.links.impl.RESTUtils.processLinkResource(RESTUtils.java:131)
at org.jboss.resteasy.links.impl.RESTUtils.processLinkResources(RESTUtils.java:113)
at org.jboss.resteasy.links.impl.RESTUtils.addDiscovery(RESTUtils.java:56)
at org.jboss.resteasy.links.impl.LinkDecorator$1.beforeMarshal(LinkDecorator.java:27)
at com.sun.xml.internal.bind.v2.runtime.XMLSerializer.fireBeforeMarshalEvents(XMLSerializer.java:740)
at com.sun.xml.internal.bind.v2.runtime.XMLSerializer.childAsRoot(XMLSerializer.java:479)
at com.sun.xml.internal.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:314)
at com.sun.xml.internal.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.java:243)
at javax.xml.bind.helpers.AbstractMarshallerImpl.marshal(AbstractMarshallerImpl.java:75)
at org.jboss.resteasy.plugins.providers.jaxb.AbstractJAXBProvider.writeTo(AbstractJAXBProvider.java:105)
at org.jboss.resteasy.core.interception.MessageBodyWriterContextImpl.proceed(MessageBodyWriterContextImpl.java:117)
at org.jboss.resteasy.plugins.interceptors.encoding.GZIPEncodingInterceptor.write(GZIPEncodingInterceptor.java:48)
at org.jboss.resteasy.core.interception.MessageBodyWriterContextImpl.proceed(MessageBodyWriterContextImpl.java:123)
at org.jboss.resteasy.core.ServerResponse.writeTo(ServerResponse.java:186)