Skip to content
Open
Changes from 2 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
049fa74
Bootstrapping Mail 1.6 spec
jgallimore Aug 4, 2020
14800ed
1. MailSessionDefinition should use Repeatable annotation for Java EE…
jgallimore Aug 4, 2020
6d944d1
2. MimeMessage.updateHeaders should set Date header if not already set
jgallimore Aug 4, 2020
f1ec079
3. Update public API to use generics
jgallimore Aug 4, 2020
e830b3d
4. MailDateFormat changes for version 1.6
jgallimore Aug 4, 2020
438dfc0
5. Store, Transport, and Folder should implement AutoCloseable
jgallimore Aug 4, 2020
8d5bb71
6. The UIDFolder interface should have a getter for UIDNEXT
cesarhernandezgt Aug 4, 2020
4300b0c
6. The UIDFolder interface should have a getter for UIDNEXT
jgallimore Aug 4, 2020
6bdedcd
7. The UIDFolder interface should have a MAXUID constant
jgallimore Aug 4, 2020
473bb28
8. MimeMultipart should throw ParseException for parsing errors
jgallimore Aug 4, 2020
d3ec322
Stubs for 8. MimeMultipart should throw ParseException for parsing er…
jgallimore Aug 4, 2020
8f32fef
Add stubs for 11. Flags convenience methods
jgallimore Aug 4, 2020
229a022
Merge branch 'trunk' of https://github.com/jgallimore/geronimo-specs …
cesarhernandezgt Aug 4, 2020
8e74f2e
9. Support addressing i18n via RFC 6530/6531/6532
cesarhernandezgt Aug 4, 2020
ddf3fe4
10. Look for resource files in <java.home>/conf on JDK 1.9
cesarhernandezgt Aug 5, 2020
12f2e83
Merge pull request #1 from cesarhernandezgt/1.6
jgallimore Aug 5, 2020
d283809
Merge pull request #2 from cesarhernandezgt/1.6-10
jgallimore Aug 5, 2020
f246d8b
Implement new methods on Flags
jgallimore Aug 5, 2020
f57b170
fixes for signature test
cesarhernandezgt Aug 7, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 21 additions & 4 deletions geronimo-javamail_1.6_spec/src/main/java/javax/mail/Session.java
Original file line number Diff line number Diff line change
Expand Up @@ -552,17 +552,25 @@ private ClassLoader getClassLoader() {
private ProviderInfo loadProviders(final ClassLoader cl) {
// we create a merged map from reading all of the potential address map entries. The locations
// searched are:
// 1. java.home/lib/javamail.address.map
// 0. java.home/conf/javamail.address.map
// 1. java.home/lib/javamail.address.map
// 2. META-INF/javamail.address.map
// 3. META-INF/javamail.default.address.map
//
// JDK 1.9 adds a new <java.home>/conf directory to hold configuration
// files that were previously stored in <java.home>/lib. When using
// JavaMail on JDK 1.9, it should look for its (optional) configuration
// files in the <java.home>/conf directory.
final ProviderInfo info = new ProviderInfo();

// NOTE: Unlike the addressMap, we process these in the defined order. The loading routine
// will not overwrite entries if they already exist in the map.

try {
final File file = new File(System.getProperty("java.home"), "lib/javamail.providers");
File file = new File(System.getProperty("java.home"), "conf/javamail.providers");
if (!file.exists()){
file = new File(System.getProperty("java.home"), "lib/javamail.providers");
}
final InputStream is = new FileInputStream(file);
try {
loadProviders(info, is);
Expand Down Expand Up @@ -732,9 +740,15 @@ private void loadProviders(final ProviderInfo info, final InputStream is) throws
private static Map loadAddressMap(final ClassLoader cl) {
// we create a merged map from reading all of the potential address map entries. The locations
// searched are:
// 1. java.home/lib/javamail.address.map
// 0. java.home/conf/javamail.address.map
// 1. java.home/lib/javamail.address.map
// 2. META-INF/javamail.address.map
// 3. META-INF/javamail.default.address.map
//
// JDK 1.9 adds a new <java.home>/conf directory to hold configuration
// files that were previously stored in <java.home>/lib. When using
// JavaMail on JDK 1.9, it should look for its (optional) configuration
// files in the <java.home>/conf directory.
//
// if all of the above searches fail, we just set up some "default" defaults.

Expand Down Expand Up @@ -787,7 +801,10 @@ private static Map loadAddressMap(final ClassLoader cl) {


try {
final File file = new File(System.getProperty("java.home"), "lib/javamail.address.map");
File file = new File(System.getProperty("java.home"), "conf/javamail.address.map");
if (!file.exists()) {
file = new File(System.getProperty("java.home"), "lib/javamail.address.map");
}
final InputStream is = new FileInputStream(file);
try {
// load as a property file
Expand Down