mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-10-07 08:16:34 +00:00
Fixing squid:S1854 - Dead stores should be removed
This commit is contained in:
1 parent
1b74e0ff67
commit
6e496e7c86
2 files changed
+8
-9
No files matched your search
+1
-2
@@ -70,10 +70,9 @@ public class RainbowFishSerializer {
|
||||
* @throws ClassNotFoundException
|
||||
*/
|
||||
public static RainbowFish readV1(String filename) throws IOException, ClassNotFoundException {
|
||||
Map<String, String> map = null;
|
||||
FileInputStream fileIn = new FileInputStream(filename);
|
||||
ObjectInputStream objIn = new ObjectInputStream(fileIn);
|
||||
map = (Map<String, String>) objIn.readObject();
|
||||
Map<String, String> map = (Map<String, String>) objIn.readObject();
|
||||
objIn.close();
|
||||
fileIn.close();
|
||||
return new RainbowFish(map.get("name"), Integer.parseInt(map.get("age")), Integer.parseInt(map
|
||||
|
||||
Reference in new issue
Block a user