Uploaded image for project: 'Pluto'
  1. Pluto
  2. PLUTO-144

Class PlutoTestCase does not compile under JDK1.4 (in container/src/test)

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.1.0-alpha1
    • 1.1.0-alpha1
    • portlet container
    • None

    Description

      org.apache.pluto.util.PlutoTestCase does not compile under JDK1.4. That's because you've used a new JDK1.5 method 'boolean String.contains(CharSequence)'.

      At line 68, method 'assertContains(String message, String expectedSubstring, String testString)':

      if(!testString.contains(expectedSubstring))

      { ^ method contains does not exist in JDK1.4 and previous version. fail(message); }

      This problem may be corrected as the following:

      //if(!testString.contains(expectedSubstring)) {
      if (testString.indexOf(expectedSubstring) < 0)

      { fail(message); }

      Attachments

        Activity

          People

            ddewolf David H. DeWolf
            heavyz @deprecated ZHENG Zhong
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: