--- dao/DaoAdresseVedligehold/src/main/java/dk/daoas/adressevedligehold/AddressManager.java 2016/01/28 11:07:07 2862 +++ dao/DaoAdresseVedligehold/src/main/java/dk/daoas/adressevedligehold/AddressManager.java 2016/01/28 13:36:37 2867 @@ -233,15 +233,17 @@ createFromEntry(entry); // if we get here there was no match - so we need to create it return; } - + boolean found = false; for (Address addr : litraList) { if (addr.husnrbogstav.equals(entry.litra) ) { updateAddress(addr, entry); - return; //Done for now - no need to look at the rest of the list + found = true; // 1 visit should be enough but as long as there's duplicates on gadeid+husnr+litra we will visit them all + //when the issue with duplicates is resolved this should be reverted to a return or break } } - - createFromEntry(entry); // if we get here there was no match - so we need to create it + if (found == false) { + createFromEntry(entry); // if we get here there was no match - so we need to create it + } } private void visitRange(AddressSourceEntry entry) { @@ -593,7 +595,9 @@ break; case "NS": bane = 204; - break; + break; + default: + throw new RuntimeException("Ukendt distributor" + a.distributor); //Silence findBugs } if (bane == null) {