kaiyaok2 commented on PR #1754:
URL: https://github.com/apache/tika/pull/1754#issuecomment-2105684175
> getMimeRepository
@THausherr I think it might the case. I wrote this dummy test, and it fails
under surefire:
```
@Test
public void testResetRepo() throws Exception {
TikaConfig config0 = TikaConfig.getDefaultConfig();
MimeTypes repo0 = config0.getMimeRepository();
MimeType testType0 = new MimeType(MediaType.parse("baz/bar"));
String pattern = "rtg_sst_grb_0\\.5\\.\\d{9}";
repo0.addPattern(testType0, pattern, true);
TikaConfig config1 = TikaConfig.getDefaultConfig();
MimeTypes repo1 = config1.getMimeRepository();
MimeType testType1 = new MimeType(MediaType.parse("baz/bar"));
repo1.addPattern(testType1, pattern, true);
}
```
Error Message:
```
[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed:
0.857 s <<< FAILURE! -- in org.apache.tika.mime.TestMimeTypes
[ERROR] org.apache.tika.mime.TestMimeTypes.testResetRepo -- Time elapsed:
0.846 s <<< ERROR!
org.apache.tika.mime.MimeTypeException: Conflicting glob pattern:
rtg_sst_grb_0\.5\.\d{9}
at org.apache.tika.mime.Patterns.addGlob(Patterns.java:123)
at org.apache.tika.mime.Patterns.add(Patterns.java:71)
at org.apache.tika.mime.MimeTypes.addPattern(MimeTypes.java:450)
at
org.apache.tika.mime.TestMimeTypes.testResetRepo(TestMimeTypes.java:873)
...
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]