mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
catch PatternSyntaxException in FilterDialog (EA-93807)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
* Copyright 2000-2017 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -30,6 +30,7 @@ import javax.swing.text.BadLocationException;
|
||||
import java.awt.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.util.regex.PatternSyntaxException;
|
||||
|
||||
class FilterDialog extends DialogWrapper {
|
||||
private final JTextField myRegexpField = new JTextField();
|
||||
@@ -147,7 +148,8 @@ class FilterDialog extends DialogWrapper {
|
||||
|
||||
try {
|
||||
checkRegexp(myRegexpField.getText());
|
||||
} catch (InvalidExpressionException e) {
|
||||
}
|
||||
catch (InvalidExpressionException | PatternSyntaxException e) {
|
||||
Messages.showMessageDialog(getContentPane(), e.getMessage(), ToolsBundle.message("tools.filters.add.regex.invalid.title"), Messages.getErrorIcon());
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user