Skip to content

Commit

Permalink
yegor256#47 fixed CR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
dmzaytsev committed Mar 26, 2015
1 parent 59b1bf4 commit 06ea1c6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/main/java/org/takes/facets/flash/RsFlash.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*/
package org.takes.facets.flash;

import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.util.Date;
import java.util.concurrent.TimeUnit;
import java.util.logging.Level;
Expand Down Expand Up @@ -83,7 +83,7 @@ public RsFlash(final String msg, final Level level, final String cookie) {
.append('/')
.append(msg)
.toString()
.getBytes(Charset.defaultCharset())
.getBytes(StandardCharsets.UTF_8)
),
"Path=/",
String.format(
Expand Down
8 changes: 3 additions & 5 deletions src/test/java/org/takes/facets/flash/RsFlashTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
package org.takes.facets.flash;

import java.io.IOException;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.util.logging.Level;
import javax.xml.bind.DatatypeConverter;
import org.hamcrest.MatcherAssert;
Expand Down Expand Up @@ -55,13 +55,11 @@ public void addsCookieToResponse() throws IOException {
new StringBuilder("Set-Cookie: RsFlash=")
.append(
DatatypeConverter.printBase64Binary(
new StringBuilder(
Level.INFO.getName()
)
new StringBuilder(Level.INFO.getName())
.append('/')
.append(msg)
.toString()
.getBytes(Charset.defaultCharset())
.getBytes(StandardCharsets.UTF_8)
)
).toString()
)
Expand Down

0 comments on commit 06ea1c6

Please sign in to comment.