File tree Expand file tree Collapse file tree 1 file changed +12
-6
lines changed
src/main/java/dev/dsf/fhir/validator/implementation_guide Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -82,12 +82,18 @@ public Optional<String> getLatest(String versionPrefix)
82
82
.filter (e -> e .getKey () != null && e .getKey ().matches (versionPrefix + "\\ d+" )).map (Entry ::getKey )
83
83
.sorted (Comparator .comparingInt ((String v ) ->
84
84
{
85
- Pattern p = Pattern .compile (versionPrefix + "(\\ d+)" );
86
- Matcher matcher = p .matcher (v );
87
- if (matcher .matches ())
88
- return Integer .parseInt (matcher .group (1 ));
89
- else
90
- return -1 ;
85
+ try
86
+ {
87
+ Pattern p = Pattern .compile (versionPrefix + "(\\ d+)" );
88
+ Matcher matcher = p .matcher (v );
89
+ if (matcher .matches ())
90
+ return Integer .parseInt (matcher .group (1 ));
91
+ }
92
+ catch (NumberFormatException e )
93
+ {
94
+ }
95
+
96
+ return -1 ;
91
97
}).reversed ()).findFirst ();
92
98
}
93
99
}
You can’t perform that action at this time.
0 commit comments