codacy: No need to call String.valueOf to append to a string.

This commit is contained in:
AndyScherzinger 2018-09-20 17:01:16 +02:00
parent 6b59ade7bd
commit 3e5de81414
No known key found for this signature in database
GPG key ID: 6CADC7E3523C308B
4 changed files with 4 additions and 4 deletions

View file

@ -248,7 +248,7 @@ public class LocalFileListAdapter extends RecyclerView.Adapter<RecyclerView.View
if (MimeTypeUtil.isImage(file)) {
// Thumbnail in Cache?
Bitmap thumbnail = ThumbnailsCacheManager.getBitmapFromDiskCache(
ThumbnailsCacheManager.PREFIX_THUMBNAIL + String.valueOf(file.hashCode())
ThumbnailsCacheManager.PREFIX_THUMBNAIL + file.hashCode()
);
if (thumbnail != null) {
thumbnailView.setImageBitmap(thumbnail);

View file

@ -380,7 +380,7 @@ public class OCFileListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
if ((MimeTypeUtil.isImage(file) || MimeTypeUtil.isVideo(file)) && file.getRemoteId() != null) {
// Thumbnail in cache?
Bitmap thumbnail = ThumbnailsCacheManager.getBitmapFromDiskCache(
ThumbnailsCacheManager.PREFIX_THUMBNAIL + String.valueOf(file.getRemoteId())
ThumbnailsCacheManager.PREFIX_THUMBNAIL + file.getRemoteId()
);
if (thumbnail != null && !file.needsUpdateThumbnail()) {

View file

@ -211,7 +211,7 @@ public class TrashbinListAdapter extends RecyclerView.Adapter<RecyclerView.ViewH
if ((MimeTypeUtil.isImage(file) || MimeTypeUtil.isVideo(file)) && file.getRemoteId() != null) {
// Thumbnail in cache?
Bitmap thumbnail = ThumbnailsCacheManager.getBitmapFromDiskCache(
ThumbnailsCacheManager.PREFIX_THUMBNAIL + String.valueOf(file.getRemoteId())
ThumbnailsCacheManager.PREFIX_THUMBNAIL + file.getRemoteId()
);
if (thumbnail != null) {

View file

@ -289,7 +289,7 @@ public final class BitmapUtils {
// Splitting evenly the string
for (int i = 0; i < hash.length(); i++) {
result[i % modulo] = result[i % modulo] + String.valueOf(Integer.parseInt(hash.substring(i, i + 1), 16));
result[i % modulo] = result[i % modulo] + Integer.parseInt(hash.substring(i, i + 1), 16);
}
// Converting our data into a usable rgb format