Skip to content

Commit

Permalink
Format code
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnNiang committed Dec 8, 2024
1 parent ed9fa4e commit b618791
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package run.halo.app.theme.finders.impl;


import static java.nio.charset.StandardCharsets.UTF_8;
import static org.apache.commons.lang3.ObjectUtils.defaultIfNull;
import static run.halo.app.extension.index.query.QueryFactory.and;
import static run.halo.app.extension.index.query.QueryFactory.equal;
Expand Down Expand Up @@ -173,8 +174,8 @@ private Mono<? extends CommentVo> filterCommentSensitiveData(CommentVo commentVo
var email = owner.getEmail();
if (StringUtils.isNotBlank(email)) {
var emailHash = Hashing.sha256()
.hashString(email.toLowerCase(), java.nio.charset.StandardCharsets.UTF_8)
.toString();
.hashString(email.toLowerCase(), UTF_8)
.toString();
if (specOwner.getAnnotations() == null) {
specOwner.setAnnotations(new HashMap<>(2));
}
Expand Down Expand Up @@ -227,7 +228,7 @@ private Mono<? extends ReplyVo> filterReplySensitiveData(ReplyVo replyVo) {
var email = owner.getEmail();
if (StringUtils.isNotBlank(email)) {
var emailHash = Hashing.sha256()
.hashString(email.toLowerCase(), java.nio.charset.StandardCharsets.UTF_8)
.hashString(email.toLowerCase(), UTF_8)
.toString();
if (specOwner.getAnnotations() == null) {
specOwner.setAnnotations(new HashMap<>(2));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,8 @@ String fakeReplyJson() {
"name":"",
"displayName":"fake-display-name",
"annotations":{
"email-hash": "79783106d88279c6c8f94f1f4dec22bdb9f90a8d14c9d6c6628a11430e236cbf"
"email-hash": \
"79783106d88279c6c8f94f1f4dec22bdb9f90a8d14c9d6c6628a11430e236cbf"
}
},
"creationTime": "2024-03-11T06:23:42.923294424Z",
Expand Down

0 comments on commit b618791

Please sign in to comment.