code: @Override
      void setLocale(ULocale valid, ULocale actual) {
          // This method is called
          // by other protected functions that checks and makes sure that
          // valid and actual are not null before passing
          assert (valid == null) == (actual == null);
          // Another check we could do is that the actual locale is at
          // the same level or less specific than the valid locale.
          // TODO: Starting with Java 7, use Objects.equals(a, b).
          if(Utility.objectEquals(actual, tailoring.actualLocale)) {
              actualLocaleIsSameAsValid = false;
          } else {
              assert(Utility.objectEquals(actual, valid));
              actualLocaleIsSameAsValid = true;
          }
          // Do not modify tailoring.actualLocale:
          // We cannot be sure that that would be thread-safe.
          validLocale = valid;
      }
docs: {@inheritDoc}