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

AjaxShellDelegate will only compile/run under Java 6

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 4.1.1
    • Fix Version/s: 4.1.1
    • Component/s: Framework
    • Labels:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: