Skip to content

Commit c71e052

Browse files
author
Stephane Landelle
committed
Minor removeQuote clean up
1 parent 0ac3941 commit c71e052

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

api/src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -578,12 +578,12 @@ public static int convertExpireField(String timestring) throws Exception {
578578
}
579579

580580
private final static String removeQuote(String s) {
581-
if (s.startsWith("\"")) {
582-
s = s.substring(1);
583-
}
581+
if (MiscUtil.isNonEmpty(s)) {
582+
if (s.charAt(0) == '"')
583+
s = s.substring(1);
584584

585-
if (s.endsWith("\"")) {
586-
s = s.substring(0, s.length() - 1);
585+
if (s.charAt(s.length() - 1) == '"')
586+
s = s.substring(0, s.length() - 1);
587587
}
588588
return s;
589589
}

0 commit comments

Comments
 (0)