Skip to content

Commit 8cc7dfc

Browse files
author
gursajan
committed
change name of method
1 parent 366ec47 commit 8cc7dfc

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/main/java/graphql/language/AstPrinter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ private String value(Value value) {
472472
} else if (value instanceof FloatValue) {
473473
return valueOf(((FloatValue) value).getValue());
474474
} else if (value instanceof StringValue) {
475-
return wrap("\"", valueOf(graphQLStringify(((StringValue) value).getValue())), "\"");
475+
return wrap("\"", valueOf(escapeString(((StringValue) value).getValue())), "\"");
476476
} else if (value instanceof EnumValue) {
477477
return valueOf(((EnumValue) value).getName());
478478
} else if (value instanceof BooleanValue) {
@@ -533,7 +533,7 @@ private String join(String delim, String... args) {
533533
*
534534
* @return the encoded string
535535
*/
536-
static String graphQLStringify(String stringValue) {
536+
static String escapeString(String stringValue) {
537537
StringBuilder sb = new StringBuilder();
538538
for (char ch : stringValue.toCharArray()) {
539539
switch (ch) {

src/test/groovy/graphql/language/AstPrinterTest.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,7 @@ extend input Input @directive {
582582
def "1105 - encoding of json strings"() {
583583

584584
when:
585-
def json = AstPrinter.graphQLStringify(strValue)
585+
def json = AstPrinter.escapeString(strValue)
586586

587587
then:
588588
json == expected

0 commit comments

Comments
 (0)