-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Description
Hi all,
in com/google/inject/servlet/ServletDefinition.java, Line 215
pathInfo = requestUri.substring(getContextPath().length()).replaceAll("[/]{2,}", "/");
a NullPointerException is thrown when getContextPath() returns null. My understanding of the javadoc on javax.servlet.http.HttpServletRequest.getContextPath() is that it should never be null, but it happens.
In my case I'm running a dropwizard application with the elastic apm agent and graphql-java.
The elastic apm java agent calls this method at the end of an apm-transaction, with instrumentation enabled. It seems to work fine for all servlets, except the graphql one. I checked my setup/config multiple times, but cannot detect anything wrong.
Is there a chance we can introduce a null-check before calling length() on the context path?
Can I help with more info?
Thank you!
Metadata
Metadata
Assignees
Labels
No labels