Remove unnecessary reference to JSONException in TextSearchFacet

This commit is contained in:
Antonin Delpeuch 2018-11-19 17:09:55 +00:00
parent c9786d0f9a
commit f02b3edd0b

View File

@ -35,8 +35,6 @@ package com.google.refine.browsing.facets;
import java.util.regex.Pattern; import java.util.regex.Pattern;
import org.json.JSONException;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.refine.browsing.FilteredRecords; import com.google.refine.browsing.FilteredRecords;
import com.google.refine.browsing.FilteredRows; import com.google.refine.browsing.FilteredRows;
@ -138,7 +136,7 @@ public class TextSearchFacet implements Facet {
_config._caseSensitive ? 0 : Pattern.CASE_INSENSITIVE); _config._caseSensitive ? 0 : Pattern.CASE_INSENSITIVE);
} catch (java.util.regex.PatternSyntaxException e) { } catch (java.util.regex.PatternSyntaxException e) {
PatternSyntaxExceptionParser err = new PatternSyntaxExceptionParser(e); PatternSyntaxExceptionParser err = new PatternSyntaxExceptionParser(e);
throw new JSONException(err.getUserMessage()); throw new IllegalArgumentException(err.getUserMessage());
} }
} else if (!_config._caseSensitive) { } else if (!_config._caseSensitive) {
_query = _query.toLowerCase(); _query = _query.toLowerCase();