The relevant test is failing in the toString method of DefaultMetadataService.java:
Code:
@Override
public final String toString() {
ToStringCreator tsc = new ToStringCreator(this);
tsc.append("validGets", validGets);
tsc.append("recursiveGets", recursiveGets);
tsc.append("cachePuts", cachePuts);
tsc.append("cacheHits", cacheHits);
tsc.append("cacheMisses", cacheMisses);
tsc.append("cacheEvictions", cacheEvictions);
tsc.append("cacheCurrentSize", getCacheSize());
tsc.append("cacheMaximumSize", getMaxCapacity());
return tsc.toString().replaceFirst("@[0-9a-f]{8}", ":");
}
The relevant test in DefaultMetadataServiceTest.java:
Code:
private static final String TO_STRING_FOR_NEW_INSTANCE =
"[DefaultMetadataService:" +
" validGets = 0," +
" recursiveGets = 0," +
" cachePuts = 0," +
" cacheHits = 0," +
" cacheMisses = 0," +
" cacheEvictions = 0," +
" cacheCurrentSize = 0," +
" cacheMaximumSize = 100000]";
@Test
public void testToStringOfNewInstance() {
assertEquals(TO_STRING_FOR_NEW_INSTANCE, new DefaultMetadataService().toString());
}
It looks to me it's the replaceFirst call that fails in the regex evaluation for some reason as the hashcode with ":" isn't replaced. I'm not sure what it could be though.
UPDATE
There seems to be a problem with the toString method of the DefaultMetadataService class in my version of openjdk7 which causes a crash before returning. Possibly this is related to the hash not being replaced.