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

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

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

revision 2852 by torben, Tue Jan 26 22:24:13 2016 UTC revision 2861 by torben, Thu Jan 28 11:03:14 2016 UTC
# Line 48  public class AddressSourceFD implements Line 48  public class AddressSourceFD implements
48                          br = new BufferedReader(isr);                          br = new BufferedReader(isr);
49                                                    
50                          String line = br.readLine();                          String line = br.readLine();
51                            
52                            if (line == null) {
53                                    throw new IOException("Can't read 1st line - is file empty?");
54                            }      
55                            
56                          String[] parts = line.split(";");                          String[] parts = line.split(";");
57                          int numFields = parts.length;                          if (parts.length != 9) {
58                          if (numFields != 9) {                                  throw new IOException("Not enough fields in CSV file. Found " + parts.length + ", expected 9");
                                 throw new IOException("Not enough fields in CSV file. Found " + numFields + ", expected 9");  
59                          }                          }
60    
61    

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

  ViewVC Help
Powered by ViewVC 1.1.20