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

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        5d 19h 45m 1 Ulrich Stärk 22/Mar/10 14:18
        Jochen Kemnade made changes -
        Fix Version/s 5.1.0.8 [ 12314520 ]
        Ulrich Stärk made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ulrich Stärk made changes -
        Original Estimate 0h [ 0 ]
        Remaining Estimate 0h [ 0 ]
        Fix Version/s 5.1.0.8 [ 12314520 ]
        Fix Version/s 5.2.0 [ 12314122 ]
        Affects Version/s 5.2 [ 12313900 ]
        Component/s documentation [ 12312474 ]
        Ulrich Stärk made changes -
        Field Original Value New Value
        Assignee Ulrich Stärk [ ulrich.staerk ]
        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)?
        Stephan Schwab created issue -

          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