why my last condition not passing?Please help
package com.codegym.task.task19.task1919;
import java.io.*;
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.*;
import java.util.Set;
/*
Calculating salaries
*/
public class Solution {
public static void main(String[] args) throws IOException {
TreeMap<String,Double> tmap = new TreeMap< String,Double>();
FileReader fr = new FileReader(args[0]);
fr.close();
BufferedReader br = new BufferedReader(fr);
while(br.ready())
{
String a = br.readLine();
String [] str = a.split(" ");
String name = str[0];
double value = Double.parseDouble(str[1]);
if (!tmap.containsKey(name)) {
tmap.put(name, value);
} else {
tmap.replace(name, tmap.get(name) + value);
}
}
Map<String, Double> treeMap = new TreeMap<>(tmap);
for (Map.Entry<String, Double> pair : treeMap.entrySet())
{
System.out.println(pair.getKey() + " " + pair.getValue());
}
}
}