File tree Expand file tree Collapse file tree
src/main/java/com/developerb/nmxmlp Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1515 */
1616package com .developerb .nmxmlp ;
1717
18- import com .google .common .base .Joiner ;
1918import com .google .common .io .ByteSource ;
2019import org .w3c .dom .Document ;
2120import org .w3c .dom .DocumentType ;
4746import java .util .Map ;
4847import java .util .Optional ;
4948import java .util .Set ;
49+ import java .util .StringJoiner ;
5050import java .util .TreeSet ;
5151import java .util .function .Function ;
5252import java .util .function .Predicate ;
@@ -969,6 +969,8 @@ public static class MissingAttribute extends Ex {
969969 }
970970
971971 public static class MissingNode extends Ex {
972+
973+
972974 MissingNode (Cursor cursor , String needle , int position , NodeList childNodes ) {
973975 super (cursor , "Unable to find '" + needle + "' with index " + position + " - Did you mean: " + summarize (childNodes ) + "?" );
974976 }
@@ -996,9 +998,15 @@ private static String summarize(NodeList childNodes) {
996998 }
997999 }
9981000
999- return Joiner .on (", " )
1000- .skipNulls ()
1001- .join (names );
1001+ StringJoiner joiner = new StringJoiner (", " );
1002+
1003+ for (String name : names ) {
1004+ if (name != null ) {
1005+ joiner .add (name );
1006+ }
1007+ }
1008+
1009+ return joiner .toString ();
10021010 }
10031011 }
10041012
You can’t perform that action at this time.
0 commit comments