Allow to override internal static fields#578
Allow to override internal static fields#578jbescos wants to merge 6 commits intojakartaee:masterfrom
Conversation
Signed-off-by: Jorge Bescos Gascon <jorge.bescos.gascon@oracle.com>
Signed-off-by: Jorge Bescos Gascon <jorge.bescos.gascon@oracle.com>
| if (context == null) | ||
| context = new MessageContext(part); | ||
| return context; | ||
| public MessageContext getMessageContext() { |
There was a problem hiding this comment.
why was synchronized removed?
There was a problem hiding this comment.
There is no point to have it synchronized because the context is instanced now in the constructor. It is not possible that 2 threads obtain a different instance by calling that method.
api/pom.xml
Outdated
| <forkCount>2</forkCount> | ||
| <reuseForks>false</reuseForks> | ||
| <!-- Test service loader is not loaded if modules are enabled --> | ||
| <useModulePath>false</useModulePath> |
There was a problem hiding this comment.
for this to work, tests need their own module-info, there are more ways to make it work
Signed-off-by: Jorge Bescos Gascon <jorge.bescos.gascon@oracle.com>
jmehrens
left a comment
There was a problem hiding this comment.
I like the version. Much cleaner than what we started with.
| prop.put("mail.mime.decodefilename", Boolean.TRUE); | ||
| prop.put("mail.mime.ignoremultipartencoding", Boolean.FALSE); | ||
| prop.put("mail.mime.allowutf8", Boolean.FALSE); | ||
| prop.put("mail.mime.cachemultipart", Boolean.FALSE); |
There was a problem hiding this comment.
If I recall correctly, we are expecting String key and String values. It must work because toString gets called on the value.
Signed-off-by: Jorge Bescos Gascon <jorge.bescos.gascon@oracle.com>
|
Notice that these changes breaks the TCK and I created a PR for that: It is about setting the system property at the begging of the test. As mail-tck is going to dramatically change here: jakartaee/mail-tck#29 |
Signed-off-by: Jorge Bescos Gascon <jorge.bescos.gascon@oracle.com>
| protected MimeBodyPart createMimeBodyPart(InputStream is) | ||
| throws MessagingException { | ||
| return new MimeBodyPart(is); | ||
| if (ds != null && ds instanceof MimePartDataSource) { |
There was a problem hiding this comment.
I think this should simply be:
if (ds instanceof MessageAware)
followed by a cast to MessageAware instead of MimePartDataSource
Signed-off-by: Jorge Bescos Gascon <jorge.bescos.gascon@oracle.com>
|
Setting this as a draft meanwhile this comment is not implemented: #578 (review) |
I have closed this PR #515 and address it in this new PR. This is because of the conflicts after the split of API and Implementation.