Tapestry
  1. Tapestry
  2. TAPESTRY-1147

AjaxShellDelegate will only compile/run under Java 6

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor 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()
      : ""));

        Activity

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development