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

Expression Issues (CronExpression.java and GenericsUtils.java)

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.4.3
    • Fix Version/s: 5.5.0
    • Component/s: tapestry-ioc
    • Labels:

      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

            People

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

              Dates

              • Created:
                Updated:
                Resolved: