File tree Expand file tree Collapse file tree 2 files changed +19
-14
lines changed
src/main/java/net/apnic/rdap/conformance Expand file tree Collapse file tree 2 files changed +19
-14
lines changed Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ private static Result getDocRefProto(String document,
8888 return proto ;
8989 }
9090
91- private static void runNonRdapTests (List <Test > tests )
91+ private static void runNonRdapTests (Context c , List <Test > tests )
9292 {
9393 /* Relative URI in the HTTP request. */
9494 Result relative = new Result ();
@@ -204,7 +204,7 @@ public X509Certificate[] getAcceptedIssuers() {
204204 * are fairly niche, and in many cases can't easily be fixed
205205 * by implementers anyway. See e.g.
206206 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=414636. */
207- // runNonRdapTests(tests);
207+ // runNonRdapTests(c, tests);
208208
209209 /* application/json content-type. This is deliberately using
210210 * an invalid status code with inverted sense, because so long
Original file line number Diff line number Diff line change @@ -343,7 +343,7 @@ public String toString() {
343343 for (int i = 0 ; i < slen ; i ++) {
344344 char c = path .charAt (i );
345345 if (Character .isISOControl (c )) {
346- epath .append ("{\\ x " + ((int ) c ) + "}" );
346+ epath .append ("{" + ((int ) c ) + "}" );
347347 } else {
348348 epath .append (c );
349349 }
@@ -354,16 +354,21 @@ public String toString() {
354354 nodeMapped .add (nodeToString (n ));
355355 }
356356
357- return
358- Joiner .on ("," ).join (
359- Arrays .asList (getTestName (),
360- epath .toString (),
361- getStatusAsString (),
362- getCode (),
363- getInfo (),
364- Joiner .on (":" ).join (nodeMapped ),
365- getDocument (),
366- getReference ())
367- );
357+ List <String > elements =
358+ Arrays .asList (getTestName (),
359+ epath .toString (),
360+ getStatusAsString (),
361+ getCode (),
362+ getInfo (),
363+ Joiner .on (":" ).join (nodeMapped ),
364+ getDocument (),
365+ getReference ());
366+
367+ List <String > elementsEscaped = new ArrayList <String >();
368+ for (String n : elements ) {
369+ elementsEscaped .add (n .replaceAll ("," , "{44}" ));
370+ }
371+
372+ return Joiner .on ("," ).join (elementsEscaped );
368373 }
369374}
You can’t perform that action at this time.
0 commit comments