Uploaded image for project: 'Tapestry 5'
  1. Tapestry 5
  2. TAP5-2761

ResourceStreamer#streamResource(Resource, String, Set) throws NPE if providedChecksum is null

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 5.8.3
    • None
    • tapestry-core
    • None

    Description

      The documentation of org.apache.tapestry5.internal.services.ResourceStreamer.streamResource(Resource, String, Set<Options>) states it accepts null for its second argument (providedChecksum, but it doesn't.

      The org.apache.tapestry5.internal.services.ResourceStreamerImpl.streamResource(StreamableResource, String, Set<Options>), however, states that providedChecksum is allowed to be blank.

      The term "blank" can be understood in different ways:

      • Tools like Apache StringUtils interpret blank as "null or whitespace only"
      • Java's String class has a isBlank(), which obviously requires the instance to exist

      To make the behavior more obvious, the documentation should state "null or blank", and the underlying code should handle it accordingly.

      Attachments

        Activity

          People

            ben-ng Ben Weidig
            ben-ng Ben Weidig
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: