mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-08 06:53:45 +00:00
ICU-4882 Check for zero matches returned from detectAll().
X-SVN-Rev: 18696
This commit is contained in:
parent
bb2a656476
commit
0815b9b16a
1 changed files with 5 additions and 0 deletions
|
@ -249,6 +249,11 @@ public class DetectingViewer extends JFrame implements ActionListener
|
|||
char[] buffer = new char[1024];
|
||||
int bytesRead = 0;
|
||||
|
||||
if (matches == null || matches.length == 0) {
|
||||
errorDialog("Match Error", "No matches!");
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
StringBuffer sb = new StringBuffer();
|
||||
String encoding = matches[0].getName();
|
||||
|
|
Loading…
Add table
Reference in a new issue