i'm working on a Springboot project where I need to send some emails. This is part of the code:
import javax.mail.internet.MimeBodyPart;
import javax.mail.internet.MimeMessage;
import javax.mail.internet.MimeMultipart;
.
.
.
.
try {
Properties prop = System.getProperties();
prop.put("mail.smtp.auth", "true");
Session session = Session.getInstance(prop, null);
Message msg = new MimeMessage(session);
.
.
.
}
when running a sonarqube analysis, I get this error with Sonar 8.9.6:

I really cannot undesrtand how this is possible since, in an other branch, I have the exact same code and the issue is not arised. the issue is blocker and so is preventing me to pass quality gate.
Any ideas?