File tree Expand file tree Collapse file tree
javaSE/javaSE/src/main/java/com/smartdevicelink/managers/file/filetypes Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -159,16 +159,10 @@ private Image createImageRPC() {
159159 */
160160 @ Override
161161 public SdlArtwork clone () {
162- try {
163- SdlArtwork artwork = (SdlArtwork ) super .clone ();
164- if (artwork != null ) {
165- artwork .imageRPC = artwork .createImageRPC ();
166- }
162+ SdlArtwork artwork = (SdlArtwork ) super .clone ();
163+ if (artwork != null ) {
164+ artwork .imageRPC = artwork .createImageRPC ();
167165 return artwork ;
168- } catch (CloneNotSupportedException e ) {
169- if (DebugTool .isDebugEnabled ()) {
170- throw new RuntimeException ("Clone not supported by super class" );
171- }
172166 }
173167 return null ;
174168 }
Original file line number Diff line number Diff line change 3535
3636import com .smartdevicelink .proxy .rpc .enums .FileType ;
3737import com .smartdevicelink .proxy .rpc .enums .StaticIconName ;
38+ import com .smartdevicelink .util .DebugTool ;
3839
3940import java .net .URI ;
4041import java .security .MessageDigest ;
@@ -366,4 +367,22 @@ public boolean equals(Object o) {
366367 // return comparison
367368 return hashCode () == o .hashCode ();
368369 }
370+
371+ /**
372+ * Creates a deep copy of the object
373+ *
374+ * @return deep copy of the object, null if an exception occurred
375+ */
376+ @ Override
377+ public SdlFile clone () {
378+ try {
379+ SdlFile fileClone = (SdlFile ) super .clone ();
380+ return fileClone ;
381+ } catch (CloneNotSupportedException e ) {
382+ if (DebugTool .isDebugEnabled ()) {
383+ throw new RuntimeException ("Clone not supported by super class" );
384+ }
385+ }
386+ return null ;
387+ }
369388}
You can’t perform that action at this time.
0 commit comments