Skip to content

Commit

Permalink
polished
Browse files Browse the repository at this point in the history
  • Loading branch information
Yegor Bugayenko committed Apr 20, 2015
1 parent 92a0b23 commit df508ff
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main/java/org/takes/rq/RqForm.java
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,11 @@ public Base(final Request req) throws IOException {
final String[] parts = pair.split("=", 2);
if (parts.length < 2) {
throw new IOException(
String.format("invalid form body pair: %s", pair)
String.format("invalid form body pair: %s", pair)
);
}
final String key = RqForm.Base.decode(
parts[0].trim().toLowerCase(Locale.ENGLISH)
parts[0].trim().toLowerCase(Locale.ENGLISH)
);
this.map.putIfAbsent(key, new LinkedList<String>());
this.map.get(key).add(RqForm.Base.decode(parts[1].trim()));
Expand All @@ -126,7 +126,7 @@ public Iterable<String> param(final CharSequence key) {
iter = new VerboseIterable<String>(
Collections.<String>emptyList(),
new Sprintf(
"there're no params by name \"%s\" among %d others: %s",
"there are no params \"%s\" among %d others: %s",
key, this.map.size(), this.map.keySet()
)
);
Expand All @@ -153,7 +153,7 @@ public Iterable<String> names() {
private static String decode(final CharSequence txt) {
try {
return URLDecoder.decode(
txt.toString(), Charset.defaultCharset().name()
txt.toString(), Charset.defaultCharset().name()
);
} catch (final UnsupportedEncodingException ex) {
throw new IllegalStateException(ex);
Expand Down

0 comments on commit df508ff

Please sign in to comment.