Merge branch 'hotfix/#26_incomplete_regex_throws_exception'

This commit is contained in:
Eyck Jentzsch 2020-03-11 07:35:42 +01:00
commit 8f76d816f1

View File

@ -15,6 +15,7 @@ import java.beans.PropertyChangeListener;
import java.lang.annotation.Annotation;
import java.util.Arrays;
import java.util.List;
import java.util.regex.PatternSyntaxException;
import javax.annotation.PostConstruct;
import javax.inject.Inject;
@ -469,7 +470,10 @@ public class DesignBrowser {
return true;
}
IWaveform p = (IWaveform) element;
if (p.getName().matches(searchString)) {
try {
if (p.getName().matches(searchString))
return true;
} catch (PatternSyntaxException e) {
return true;
}
return false;