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

Diff of /dao/DaoAdresseVedligehold/src/main/java/dk/daoas/adressevedligehold/AddressSourceBK.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 44  public class AddressSourceBK implements Line 44  public class AddressSourceBK implements
44                                  BufferedReader br1 = new BufferedReader(isr1)                                  BufferedReader br1 = new BufferedReader(isr1)
45                          ) {                          ) {
46                          String line = br1.readLine();                          String line = br1.readLine();
47                            
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;  
54                          if (numFields != 13) {                          if (parts.length != 13) {
55                                  throw new IOException("Not enough fields in CSV file. Found " + numFields + ", expected 13");                                  throw new IOException("Not enough fields in CSV file. Found " + parts.length + ", expected 13");
56                          }                          }
57                  }                  }
58    

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

  ViewVC Help
Powered by ViewVC 1.1.20