geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickmcgu...@apache.org
Subject svn commit: r509956 - in /geronimo/specs/trunk/geronimo-javamail_1.4_spec/src/main/java/javax/mail: Service.java Session.java
Date Wed, 21 Feb 2007 10:07:06 GMT
Author: rickmcguire
Date: Wed Feb 21 02:07:05 2007
New Revision: 509956

URL: http://svn.apache.org/viewvc?view=rev&rev=509956
Log:
GERONIMO-2806 mail.null.host property not resolved by SMTPTransport class


Modified:
    geronimo/specs/trunk/geronimo-javamail_1.4_spec/src/main/java/javax/mail/Service.java
    geronimo/specs/trunk/geronimo-javamail_1.4_spec/src/main/java/javax/mail/Session.java

Modified: geronimo/specs/trunk/geronimo-javamail_1.4_spec/src/main/java/javax/mail/Service.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-javamail_1.4_spec/src/main/java/javax/mail/Service.java?view=diff&rev=509956&r1=509955&r2=509956
==============================================================================
--- geronimo/specs/trunk/geronimo-javamail_1.4_spec/src/main/java/javax/mail/Service.java
(original)
+++ geronimo/specs/trunk/geronimo-javamail_1.4_spec/src/main/java/javax/mail/Service.java
Wed Feb 21 02:07:05 2007
@@ -141,7 +141,9 @@
                 // it is possible that this could return null (rare).  If it does, try to
get a
                 // value from a protocol specific session variable.
                 if (host == null) {
-                    host = session.getProperty("mail." + protocol + ".host");
+                	if (protocol != null) {
+                		host = session.getProperty("mail." + protocol + ".host");
+                	}
                 }
             }
             // this may still be null...get the global mail property
@@ -161,7 +163,9 @@
                 }
                 // user still null?  We have several levels of properties to try yet
                 if (user == null) {
-                    user = session.getProperty("mail." + protocol + ".user");
+                	if (protocol != null) {
+                		user = session.getProperty("mail." + protocol + ".user");
+                	}
                 }
             }
 

Modified: geronimo/specs/trunk/geronimo-javamail_1.4_spec/src/main/java/javax/mail/Session.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-javamail_1.4_spec/src/main/java/javax/mail/Session.java?view=diff&rev=509956&r1=509955&r2=509956
==============================================================================
--- geronimo/specs/trunk/geronimo-javamail_1.4_spec/src/main/java/javax/mail/Session.java
(original)
+++ geronimo/specs/trunk/geronimo-javamail_1.4_spec/src/main/java/javax/mail/Session.java
Wed Feb 21 02:07:05 2007
@@ -475,6 +475,9 @@
 
     private Service getService(Provider provider, URLName name) throws NoSuchProviderException
{
         try {
+            if (name == null) {
+                name = new URLName(provider.getProtocol(), null, -1, null, null, null); 
+           }
             ClassLoader cl = getClassLoader();
             Class clazz = cl.loadClass(provider.getClassName());
             Constructor ctr = clazz.getConstructor(PARAM_TYPES);



Mime
View raw message