MapExpressionHelper.SimpleChange.toString() missing space character

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P5
    • 9
    • Affects Version/s: 8u66
    • Component/s: javafx
    • x86_64
    • windows_7

      FULL PRODUCT VERSION :


      A DESCRIPTION OF THE PROBLEM :
      In the class com.sun.javafx.binding.MapExpressionHelper's inner class SimpleChange's toString() method, the message generated is missing a space character in the case where a put operation has been performed (addOp==true && removeOp==true). The first part of the message is generated with this code which does not add a space character before "by":

      builder.append("replaced ").append(old).append("by ").append(added);


      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      javafx.beans.property.MapProperty<String,String> mp = new javafx.beans.property.SimpleMapProperty<>(javafx.collections.FXCollections.observableHashMap());
      mp.addListener(new javafx.collections.MapChangeListener<String, String>(){
      @Override
      public void onChanged(
      javafx.collections.MapChangeListener.Change<? extends String, ? extends String> change) {
      System.out.println(change);
      }}
      );
      mp.put("a", "b");
      mp.put("a", "c");
      ---------- END SOURCE ----------

            Assignee:
            Vadim Pakhnushev
            Reporter:
            Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: