Skip to content

Commit 091fab8

Browse files
author
Julian Kast
committed
Since overwrite is set to true by default, I removed it form constructors and added it to the top of the classes
1 parent 823c495 commit 091fab8

2 files changed

Lines changed: 3 additions & 11 deletions

File tree

android/sdl_android/src/main/java/com/smartdevicelink/managers/file/filetypes/SdlArtwork.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,7 @@ public class SdlArtwork extends SdlFile implements Cloneable{
5151
/**
5252
* Creates a new instance of SdlArtwork
5353
*/
54-
public SdlArtwork(){
55-
super();
56-
}
54+
public SdlArtwork() {}
5755

5856
/**
5957
* Creates a new instance of SdlArtwork

android/sdl_android/src/main/java/com/smartdevicelink/managers/file/filetypes/SdlFile.java

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,12 @@ public class SdlFile{
5050
private boolean persistentFile;
5151
private boolean isStaticIcon;
5252
// Overwrite property by default is set to true in SdlFile constructors indicating that a file can be overwritten
53-
private boolean overwrite;
53+
private boolean overwrite = true;
5454

5555
/**
5656
* Creates a new instance of SdlFile
5757
*/
58-
public SdlFile(){
59-
overwrite = true;
60-
}
58+
public SdlFile() { }
6159

6260
/**
6361
* Creates a new instance of SdlFile
@@ -71,7 +69,6 @@ public SdlFile(@NonNull String fileName, @NonNull FileType fileType, int id, boo
7169
this.fileType = fileType;
7270
this.id = id;
7371
this.persistentFile = persistentFile;
74-
overwrite = true;
7572
}
7673

7774
/**
@@ -86,7 +83,6 @@ public SdlFile(@NonNull String fileName, @NonNull FileType fileType, Uri uri, bo
8683
this.fileType = fileType;
8784
this.uri = uri;
8885
this.persistentFile = persistentFile;
89-
overwrite = true;
9086
}
9187

9288
/**
@@ -101,7 +97,6 @@ public SdlFile(@NonNull String fileName, @NonNull FileType fileType, byte[] data
10197
this.fileType = fileType;
10298
this.fileData = data;
10399
this.persistentFile = persistentFile;
104-
overwrite = true;
105100
}
106101

107102
/**
@@ -113,7 +108,6 @@ public SdlFile(@NonNull StaticIconName staticIconName){
113108
this.fileData = staticIconName.toString().getBytes();
114109
this.persistentFile = false;
115110
this.isStaticIcon = true;
116-
overwrite = true;
117111
}
118112

119113
/**

0 commit comments

Comments
 (0)