aboutsummaryrefslogtreecommitdiff
path: root/modules/authmodule-eIDAS-v2/src/main
diff options
context:
space:
mode:
authorThomas <>2022-07-01 17:10:52 +0200
committerThomas <>2022-07-01 17:10:52 +0200
commit99351e33f4e3e47bb2496c9c656d671079876742 (patch)
tree47340ab696be9744a5bf55b2f7edf5aed9fdada2 /modules/authmodule-eIDAS-v2/src/main
parente3afbc7442ad3893e7615d50747c03f600eb1a1b (diff)
downloadNational_eIDAS_Gateway-99351e33f4e3e47bb2496c9c656d671079876742.tar.gz
National_eIDAS_Gateway-99351e33f4e3e47bb2496c9c656d671079876742.tar.bz2
National_eIDAS_Gateway-99351e33f4e3e47bb2496c9c656d671079876742.zip
refact(matching): make address-search sort result more resistent
Diffstat (limited to 'modules/authmodule-eIDAS-v2/src/main')
-rw-r--r--modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/controller/AdresssucheController.java19
1 files changed, 12 insertions, 7 deletions
diff --git a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/controller/AdresssucheController.java b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/controller/AdresssucheController.java
index 6faa35fd..a08128d3 100644
--- a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/controller/AdresssucheController.java
+++ b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/controller/AdresssucheController.java
@@ -230,13 +230,18 @@ public class AdresssucheController {
int extractInt(String s) {
if (StringUtils.isNotEmpty(s)) {
final String num = s.replaceAll("\\D", "");
- // return 0 if no digits found
- return num.isEmpty() ? 0 : Integer.parseInt(num);
-
- } else {
- return 0;
-
- }
+ try {
+ // return 0 if no digits found
+ return num.isEmpty() ? 0 : Integer.parseInt(num);
+
+ } catch (Exception e) {
+ log.info("Can not parse number from ZMR", e);
+
+ }
+ }
+
+ return 0;
+
}
};
}