/[projects]/dao/DaoAdresseVedligehold/src/main/java/dk/daoas/adressevedligehold/AddressSourceDAO.java
ViewVC logotype

Diff of /dao/DaoAdresseVedligehold/src/main/java/dk/daoas/adressevedligehold/AddressSourceDAO.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2857 by torben, Thu Jan 28 10:30:01 2016 UTC revision 2861 by torben, Thu Jan 28 11:03:14 2016 UTC
# Line 45  public class AddressSourceDAO implements Line 45  public class AddressSourceDAO implements
45                          br = new BufferedReader(isr);                          br = new BufferedReader(isr);
46                                                    
47                          String line = br.readLine();                          String line = br.readLine();
48                            if (line == null) {
49                                    throw new IOException("Can't read 1st line - is file empty?");
50                            }                      
51                            
52                          String[] parts = line.split(";");                          String[] parts = line.split(";");
53                          int numFields = parts.length;                          if (parts.length != 17) {
54                          if (numFields != 17) {                                  throw new IOException("Not enough fields in CSV file. Found " + parts.length + ", expected 17");
                                 throw new IOException("Not enough fields in CSV file. Found " + numFields + ", expected 17");  
55                          }                          }
56    
57    

Legend:
Removed from v.2857  
changed lines
  Added in v.2861

  ViewVC Help
Powered by ViewVC 1.1.20