Fixing squid:S1854 - Dead stores should be removed

This commit is contained in:
Kirill Vlasov
2015-12-22 14:48:24 +05:00
parent 1b74e0ff67
commit 6e496e7c86
2 changed files with 8 additions and 9 deletions

View File

@ -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