deepy
(Alex Nordlund)
July 17, 2019, 12:35pm
1
This contains a community-sponsored fix for the JAXB issues.
It solves the following issue: https://github.com/deepy/sonar-crowd/issues/25
by juggling the classloaders here: https://github.com/deepy/sonar-crowd/commit/020274b7d9242ea0db7715407d9bf88c96b2110c#diff-eec9a2047ceaa281e6db094b220fb518R58
I’m not overly happy with that workaround, so if anyone knows the proper way to do it I’d love a pointer or a PR
Colin
(Colin)
July 17, 2019, 12:52pm
2
It looks like this is done in the SonarQube codebase at least once so… you get a pass I think
send(emailMessage);
return true;
} catch (EmailException e) {
LOG.error("Unable to send email", e);
return false;
}
}
private void send(EmailMessage emailMessage) throws EmailException {
// Trick to correctly initialize javax.mail library
ClassLoader classloader = Thread.currentThread().getContextClassLoader();
Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
try {
LOG.trace("Sending email: {}", emailMessage);
String host = resolveHost();
Email email = createEmailWithMessage(emailMessage);
setHeaders(email, emailMessage, host);
setConnectionDetails(email);
setToAndFrom(email, emailMessage);
ganncamp
(G Ann Campbell)
July 17, 2019, 3:01pm
3
Hi @deepy ,
Is this your request to have the Marketplace updated? If so, I need you to submit a PR on the repository that holds the underlying data files (and include its URL in this thread )
Ann
ganncamp
(G Ann Campbell)
July 17, 2019, 3:04pm
4
Hi again,
Nevermind. Colin pointed out that it’s already in there. Since he’s on this, I’m going to bow out.
Ann