summaryrefslogtreecommitdiff
path: root/javaSE
diff options
context:
space:
mode:
authorBilal Alsharifi <bilal.alsharifi@gmail.com>2020-09-10 10:28:14 -0400
committerBilal Alsharifi <bilal.alsharifi@gmail.com>2020-09-10 10:28:14 -0400
commitfd96983377fad92eefa3818fd24c58aee0b6180c (patch)
tree93d07cf2e477bf0ad25371be7109fd90b1247a6b /javaSE
parentad99dd774d1726a2b5f0901cf82b8ed62fb027e4 (diff)
downloadsdl_android-fd96983377fad92eefa3818fd24c58aee0b6180c.tar.gz
Fix warnings in managers part 2
Diffstat (limited to 'javaSE')
-rw-r--r--javaSE/javaSE/src/main/java/com/livio/BSON/BsonEncoder.java2
-rw-r--r--javaSE/javaSE/src/main/java/com/smartdevicelink/managers/SdlManager.java6
-rw-r--r--javaSE/javaSE/src/main/java/com/smartdevicelink/managers/file/filetypes/SdlArtwork.java2
-rw-r--r--javaSE/javaSE/src/main/java/com/smartdevicelink/managers/file/filetypes/SdlFile.java5
4 files changed, 8 insertions, 7 deletions
diff --git a/javaSE/javaSE/src/main/java/com/livio/BSON/BsonEncoder.java b/javaSE/javaSE/src/main/java/com/livio/BSON/BsonEncoder.java
index 22c47f6cb..3360b50fd 100644
--- a/javaSE/javaSE/src/main/java/com/livio/BSON/BsonEncoder.java
+++ b/javaSE/javaSE/src/main/java/com/livio/BSON/BsonEncoder.java
@@ -68,7 +68,7 @@ public class BsonEncoder {
}
/**
- * Goes thorugh the map and ensures that all the values included are supported by SDL. If they are not of a supported
+ * Goes through the map and ensures that all the values included are supported by SDL. If they are not of a supported
* value it is removed from the map
* @param map the map to be sanitized
* @return a sanitized HashMap with non-supported object type removes
diff --git a/javaSE/javaSE/src/main/java/com/smartdevicelink/managers/SdlManager.java b/javaSE/javaSE/src/main/java/com/smartdevicelink/managers/SdlManager.java
index 4dae813f6..e324ff3f3 100644
--- a/javaSE/javaSE/src/main/java/com/smartdevicelink/managers/SdlManager.java
+++ b/javaSE/javaSE/src/main/java/com/smartdevicelink/managers/SdlManager.java
@@ -129,9 +129,9 @@ public class SdlManager extends BaseSdlManager {
private void notifyDevListener(String info) {
if (managerListener != null) {
if (getState() == BaseSubManager.ERROR) {
- managerListener.onError((SdlManager) this, info, null);
+ managerListener.onError(this, info, null);
} else {
- managerListener.onStart((SdlManager) this);
+ managerListener.onStart(this);
}
}
}
@@ -160,7 +160,7 @@ public class SdlManager extends BaseSdlManager {
}
if (managerListener != null) {
- managerListener.onDestroy((SdlManager) this);
+ managerListener.onDestroy(this);
managerListener = null;
}
diff --git a/javaSE/javaSE/src/main/java/com/smartdevicelink/managers/file/filetypes/SdlArtwork.java b/javaSE/javaSE/src/main/java/com/smartdevicelink/managers/file/filetypes/SdlArtwork.java
index a63c3e27b..8df128e77 100644
--- a/javaSE/javaSE/src/main/java/com/smartdevicelink/managers/file/filetypes/SdlArtwork.java
+++ b/javaSE/javaSE/src/main/java/com/smartdevicelink/managers/file/filetypes/SdlArtwork.java
@@ -111,7 +111,7 @@ public class SdlArtwork extends SdlFile implements Cloneable{
@Override
- public void setType(FileType fileType) {
+ public void setType(@NonNull FileType fileType) {
if(fileType == null || fileType.equals(FileType.GRAPHIC_JPEG) || fileType.equals(FileType.GRAPHIC_PNG)
|| fileType.equals(FileType.GRAPHIC_BMP)){
super.setType(fileType);
diff --git a/javaSE/javaSE/src/main/java/com/smartdevicelink/managers/file/filetypes/SdlFile.java b/javaSE/javaSE/src/main/java/com/smartdevicelink/managers/file/filetypes/SdlFile.java
index bb1c170d4..1e75395d8 100644
--- a/javaSE/javaSE/src/main/java/com/smartdevicelink/managers/file/filetypes/SdlFile.java
+++ b/javaSE/javaSE/src/main/java/com/smartdevicelink/managers/file/filetypes/SdlFile.java
@@ -39,6 +39,7 @@ import com.smartdevicelink.proxy.rpc.enums.StaticIconName;
import java.net.URI;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
+import java.util.Arrays;
/**
* A class representing data to be uploaded to core
@@ -154,7 +155,7 @@ public class SdlFile{
/**
* Gets the location of the file
- * @return
+ * @return represents the path of the file
*/
public String getFilePath(){
return this.filePath;
@@ -317,7 +318,7 @@ public class SdlFile{
result += ((getName() == null) ? 0 : Integer.rotateLeft(getName().hashCode(), 1));
result += ((getURI() == null) ? 0 : Integer.rotateLeft(getURI().hashCode(), 2));
result += ((getFilePath() == null) ? 0 : Integer.rotateLeft(getFilePath().hashCode(), 3));
- result += ((getFileData() == null) ? 0 : Integer.rotateLeft(getFileData().hashCode(), 4));
+ result += ((getFileData() == null) ? 0 : Integer.rotateLeft(Arrays.hashCode(getFileData()), 4));
result += ((getType() == null) ? 0 : Integer.rotateLeft(getType().hashCode(), 5));
result += Integer.rotateLeft(Boolean.valueOf(isStaticIcon()).hashCode(), 6);
result += Integer.rotateLeft(Boolean.valueOf(isPersistent()).hashCode(), 7);