This is the issue: private static List<WildcardImportResolver> resolvers;
is used like a poor man's singleton so, when concurrent calls stat hitting getImportResolvers, sooner or later a concurrent modification exception is thrown.
The simpler solutions is to wrap the body of getImportResolvers in synchronized (JavaSourceImpl.class) {} block but I'm sure there are also more elegant fixes.
This is the issue:
private static List<WildcardImportResolver> resolvers;is used like a poor man's singleton so, when concurrent calls stat hitting
getImportResolvers, sooner or later a concurrent modification exception is thrown.The simpler solutions is to wrap the body of getImportResolvers in
synchronized (JavaSourceImpl.class) {}block but I'm sure there are also more elegant fixes.