Kyle-Falconer / Court-Scheduler

3 stars 2 forks source link

Teams are no longer parsed in by the excel reader. #11

Closed Kyle-Falconer closed 10 years ago

Kyle-Falconer commented 10 years ago

This is a critical issue and has been present at least since 9691449f40958e2e63a579005023c079ccd12927 when I tried to pull down the latest and run it, it threw a null pointer exception when trying to output the string representation of a Team.

Kyle-Falconer commented 10 years ago

I have confirmed that this issue started after commit 9691449f40958e2e63a579005023c079ccd12927

Kyle-Falconer commented 10 years ago

I have this solved in the upcoming commit, it turned out to be the parsing of integers:

This is what we had, which worked:

    int index = cell.toString().indexOf(".");
    teamId = Integer.parseInt(cell.toString().substring(0,index));
    team.setTeamId(teamId);

This is what it was changed to, which didn't work:

     try {
        teamId = Integer.parseInt(cell.toString());
    }catch (NumberFormatException e) {
        e.printStackTrace();
    }
    team.setTeamId(teamId);
Kyle-Falconer commented 10 years ago

Resolved with commit 9fdf504d487efab1087683ad1dcd2e1606869650