Uploaded image for project: 'Undertow'
  1. Undertow
  2. UNDERTOW-1950

Fix NullPointerException in PreCompressedResourceSupplier

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 2.0.40.Final, 2.2.11.Final
    • None
    • Core
    • None

      A NullPointerException can occur when using a PreCompressedResourceSupplier and trying to access a file where only the compressed version exists:

      java.lang.NullPointerException: Cannot invoke "io.undertow.server.handlers.resource.Resource.getContentType(io.undertow.util.MimeMappings)" because "this.val$originalResource" is null
      	at io.undertow.server.handlers.resource.PreCompressedResourceSupplier$1.getContentType(PreCompressedResourceSupplier.java:121)
      	at io.undertow.server.handlers.resource.ResourceHandler$1.handleRequest(ResourceHandler.java:299)
      	at io.undertow.server.Connectors.executeRootHandler(Connectors.java:370)
      	at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:830)
      

              flaviarnn Flavia Rainone
              rhn-cservice-bbaranow Bartosz Baranowski
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: