Tapestry 5
  1. Tapestry 5
  2. TAP5-1054

Not able to pass an empty string as appName to PageTester

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.2, 5.1.0.5
    • Fix Version/s: 5.2.0
    • Component/s: tapestry-core
    • Labels:
      None

      Description

      On http://tapestry.apache.org/tapestry5.1/apidocs/org/apache/tapestry5/test/PageTester.html it states that one can pass in an empty string for appName to PageTester(appPackage, appName) or PageTester(appPackage, appName, contextPath, moduleClasses).

      Doing so causes an IllegalArgumentException:

      java.lang.IllegalArgumentException: Parameter appName was null or contained only whitespace.
      at org.apache.tapestry5.ioc.internal.util.Defense.notBlank(Defense.java:59)
      at org.apache.tapestry5.test.PageTester.<init>(PageTester.java:92)
      at org.apache.tapestry5.test.PageTester.<init>(PageTester.java:75)

        Activity

        Hide
        Ulrich Stärk added a comment -

        From a quick glance, the appName parameter is solely used to determine the module class name and therefore can be blank - especially since a module class doesn't have to be present. Am I missing something or is it OK to change Defense.notBlank(appName) to Defense.notNull(appName)?

        Show
        Ulrich Stärk added a comment - From a quick glance, the appName parameter is solely used to determine the module class name and therefore can be blank - especially since a module class doesn't have to be present. Am I missing something or is it OK to change Defense.notBlank(appName) to Defense.notNull(appName)?

          People

          • Assignee:
            Ulrich Stärk
            Reporter:
            Stephan Schwab
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development