Uploaded image for project: 'Tapestry'
  1. Tapestry
  2. TAPESTRY-1147

AjaxShellDelegate will only compile/run under Java 6

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 4.1.1
    • 4.1.1
    • Framework
    • None

    Description

      AjaxShellDelegate will only compile (& run) under Java 6 because it uses a new method on String that was introduced in Java 6.

      Line 92 calls String.isEmpty() when checking the contents of Locale.getCountry()

      dojoConfig.put("locale", locale.getLanguage().toLowerCase()
      + ((locale.getCountry() != null && !locale.getCountry().isEmpty())
      ? "-" + locale.getCountry().toLowerCase()
      : ""));

      Changing the check to length() > 0 fixes the problem

      dojoConfig.put("locale", locale.getLanguage().toLowerCase()
      + ((locale.getCountry() != null && locale.getCountry().length() > 0)
      ? "-" + locale.getCountry().toLowerCase()
      : ""));

      Attachments

        Activity

          People

            jkuhnert Jesse Kuhnert
            bpsommerville Ben Sommerville
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: