(Properties props, Authenticator authenticator)
| 235 | |
| 236 | // Constructor is not public |
| 237 | private Session(Properties props, Authenticator authenticator) { |
| 238 | this.props = props; |
| 239 | this.authenticator = authenticator; |
| 240 | |
| 241 | if (Boolean.valueOf(props.getProperty("mail.debug")).booleanValue()) |
| 242 | debug = true; |
| 243 | |
| 244 | initLogger(); |
| 245 | logger.log(Level.CONFIG, "Jakarta Mail version {0}", Version.version); |
| 246 | |
| 247 | // get the Class associated with the Authenticator |
| 248 | Class<?> cl; |
| 249 | if (authenticator != null) |
| 250 | cl = authenticator.getClass(); |
| 251 | else |
| 252 | cl = this.getClass(); |
| 253 | // load the resources |
| 254 | loadProviders(cl); |
| 255 | loadAddressMap(cl); |
| 256 | q = new EventQueue((Executor)props.get("mail.event.executor")); |
| 257 | } |
| 258 | |
| 259 | private final synchronized void initLogger() { |
| 260 | logger = new MailLogger(this.getClass(), "DEBUG", debug, getDebugOut()); |
nothing calls this directly
no test coverage detected