mirror of https://github.com/apache/lucene.git
SOLR-12759: fix regexp
This commit is contained in:
parent
3f2975c27c
commit
9bc4b8d4fe
|
@ -45,8 +45,10 @@ public class ExtractingRequestHandlerTest extends SolrTestCaseJ4 {
|
|||
@BeforeClass
|
||||
public static void beforeClass() throws Exception {
|
||||
// Is the JDK/env affected by a known bug?
|
||||
if (!TimeZone.getDefault().getDisplayName(false, TimeZone.SHORT, Locale.US).matches("[A-Z]{3,4}([+-]\\d\\d(:\\d\\d)?)?")) {
|
||||
assert System.getProperty("java.version").startsWith("11") : "Is some other JVM affected? Or bad regex?";
|
||||
final String tzDisplayName = TimeZone.getDefault().getDisplayName(false, TimeZone.SHORT, Locale.US);
|
||||
if (!tzDisplayName.matches("[A-Z]{3,}([+-]\\d\\d(:\\d\\d)?)?")) {
|
||||
assertTrue("Is some other JVM affected? Or bad regex? TzDisplayName: " + tzDisplayName,
|
||||
System.getProperty("java.version").startsWith("11"));
|
||||
assumeTrue("SOLR-12759 JDK 11 (1st release) and Tika 1.x can result in extracting dates in a bad format.", false);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue