projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
🔀 Merge branch 'release-79'
[Sone.git]
/
src
/
main
/
java
/
net
/
pterodactylus
/
sone
/
data
/
impl
/
SoneImpl.java
diff --git
a/src/main/java/net/pterodactylus/sone/data/impl/SoneImpl.java
b/src/main/java/net/pterodactylus/sone/data/impl/SoneImpl.java
index
ce0f5c1
..
3366448
100644
(file)
--- a/
src/main/java/net/pterodactylus/sone/data/impl/SoneImpl.java
+++ b/
src/main/java/net/pterodactylus/sone/data/impl/SoneImpl.java
@@
-19,6
+19,7
@@
package net.pterodactylus.sone.data.impl;
import static com.google.common.base.Preconditions.checkNotNull;
import static java.lang.String.format;
import static com.google.common.base.Preconditions.checkNotNull;
import static java.lang.String.format;
+import static java.nio.charset.StandardCharsets.UTF_8;
import static java.util.logging.Logger.getLogger;
import java.net.MalformedURLException;
import static java.util.logging.Logger.getLogger;
import java.net.MalformedURLException;
@@
-634,46
+635,46
@@
public class SoneImpl implements Sone {
@Override
public synchronized String getFingerprint() {
Hasher hash = Hashing.sha256().newHasher();
@Override
public synchronized String getFingerprint() {
Hasher hash = Hashing.sha256().newHasher();
- hash.putString(profile.getFingerprint());
+ hash.putString(profile.getFingerprint()
, UTF_8
);
- hash.putString("Posts(");
+ hash.putString("Posts("
, UTF_8
);
for (Post post : getPosts()) {
for (Post post : getPosts()) {
- hash.putString("Post("
).putString(post.getId()).putString(")"
);
+ hash.putString("Post("
, UTF_8).putString(post.getId(), UTF_8).putString(")", UTF_8
);
}
}
- hash.putString(")");
+ hash.putString(")"
, UTF_8
);
List<PostReply> replies = new ArrayList<>(getReplies());
Collections.sort(replies, Reply.TIME_COMPARATOR);
List<PostReply> replies = new ArrayList<>(getReplies());
Collections.sort(replies, Reply.TIME_COMPARATOR);
- hash.putString("Replies(");
+ hash.putString("Replies("
, UTF_8
);
for (PostReply reply : replies) {
for (PostReply reply : replies) {
- hash.putString("Reply("
).putString(reply.getId()).putString(")"
);
+ hash.putString("Reply("
, UTF_8).putString(reply.getId(), UTF_8).putString(")", UTF_8
);
}
}
- hash.putString(")");
+ hash.putString(")"
, UTF_8
);
List<String> likedPostIds = new ArrayList<>(getLikedPostIds());
Collections.sort(likedPostIds);
List<String> likedPostIds = new ArrayList<>(getLikedPostIds());
Collections.sort(likedPostIds);
- hash.putString("LikedPosts(");
+ hash.putString("LikedPosts("
, UTF_8
);
for (String likedPostId : likedPostIds) {
for (String likedPostId : likedPostIds) {
- hash.putString("Post("
).putString(likedPostId).putString(")"
);
+ hash.putString("Post("
, UTF_8).putString(likedPostId, UTF_8).putString(")", UTF_8
);
}
}
- hash.putString(")");
+ hash.putString(")"
, UTF_8
);
List<String> likedReplyIds = new ArrayList<>(getLikedReplyIds());
Collections.sort(likedReplyIds);
List<String> likedReplyIds = new ArrayList<>(getLikedReplyIds());
Collections.sort(likedReplyIds);
- hash.putString("LikedReplies(");
+ hash.putString("LikedReplies("
, UTF_8
);
for (String likedReplyId : likedReplyIds) {
for (String likedReplyId : likedReplyIds) {
- hash.putString("Reply("
).putString(likedReplyId).putString(")"
);
+ hash.putString("Reply("
, UTF_8).putString(likedReplyId, UTF_8).putString(")", UTF_8
);
}
}
- hash.putString(")");
+ hash.putString(")"
, UTF_8
);
- hash.putString("Albums(");
+ hash.putString("Albums("
, UTF_8
);
for (Album album : rootAlbum.getAlbums()) {
if (!Album.NOT_EMPTY.apply(album)) {
continue;
}
for (Album album : rootAlbum.getAlbums()) {
if (!Album.NOT_EMPTY.apply(album)) {
continue;
}
- hash.putString(album.getFingerprint());
+ hash.putString(album.getFingerprint()
, UTF_8
);
}
}
- hash.putString(")");
+ hash.putString(")"
, UTF_8
);
return hash.hash().toString();
}
return hash.hash().toString();
}