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

Expression Issues (CronExpression.java and GenericsUtils.java)

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 5.4.3
    • 5.5.0
    • tapestry-ioc

    Description

      Hi
      Please look following fragments of source code:
      1) tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/cron/CronExpression.java#L937

      for (; i < s.length() && (s.charAt(i) != ' ' || s.charAt(i) != '\t'); i++)
      

      Expression (s.charAt(i) != ' ' || s.charAt(i) != '\t') is always true.
      Probably, is should be:

      (s.charAt(i) != ' ' && s.charAt(i) != '\t')
      

      2) commons/src/main/java/org/apache/tapestry5/ioc/internal/util/GenericsUtils.java#L577

      isSuper ? toString(wt.getLowerBounds()) : toString(wt.getLowerBounds()));
      

      It is strange that the parts of the ternary operator are same.

      These possible defect found by AppChecker.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            jkemnade Jochen Kemnade
            AppChecker AppChecker
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment