--- dao/DaoAdresseVedligehold/src/main/java/dk/daoas/adressevedligehold/AddressManager.java 2016/01/28 11:30:10 2865 +++ dao/DaoAdresseVedligehold/src/main/java/dk/daoas/adressevedligehold/AddressManager.java 2016/01/28 12:14:50 2866 @@ -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) {