Use Hashtable.putIfAbsent in CSS constructor

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P5
    • 25
    • Affects Version/s: None
    • Component/s: client-libs

      We can use Hashtable.putIfAbsent instead of pair get/put methods.
      It's faster and cleaner.

              int n = CSS.Attribute.allAttributes.length;
              for (int i = 0; i < n; i++) {
                  CSS.Attribute key = CSS.Attribute.allAttributes[i];
                  if (valueConvertor.get(key) == null) {
                      valueConvertor.put(key, generic);
                  }
              }

            Assignee:
            Andrey Turbanov
            Reporter:
            Andrey Turbanov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: