Java: Skaner zatrzymuje się w nowej linii

Próbuję skanować pliki tekstowe i dodawać je do mapy, mapy i wszystko działa.Jednak wydaje się, że skaner zatrzymuje się, jeśli chodzi o „enter” w pliku tekstowym lub pustą linię. To jest mój problem

tutaj jest mój blok kodu dla skanera / mapera

class OneButtonListener implements ActionListener
{
    @Override
    public void actionPerformed(ActionEvent evt)
    {
        final JFileChooser oneFC = new JFileChooser();
        oneFC.showOpenDialog(AnalysisFrame.this);
        String newLine = null;
        oneFC.getName(null);
        int returnVal = 0;
        File fileOne = oneFC.getSelectedFile();

        Scanner input = null;        
        try {
            input = new Scanner(fileOne);
        } 
        catch (FileNotFoundException ex) {
            Logger.getLogger(AnalysisFrame.class.getName()).log(Level.SEVERE, null,
                            ex);
        }                       
        inputText = input.nextLine(); 
        String[] words = inputText.split("[ \n\t\r,.;:!?(){}]");

        for(int i = 0; i < words.length; i++){
            key = words[i].toLowerCase(); 

            if (words[i].length() > 1){
                if (mapOne.get(key) == null){
                    mapOne.put(key, 1);
                }
                else {
                    value1 = mapOne.get(key).intValue();
                    value1++;
                    apOne.put(key, value1);
                }
            } 
         }
     }
}

Dzięki za pomoc!

questionAnswers(4)

yourAnswerToTheQuestion