mx4j/src/core/mx4j/remote/resolver/iiop IIOPResolver.java,1.10,1.11
Simone Bordet <[email protected]> Sat, 04 Sep 2004 19:29:40 +0000
| Newsgroups | gmane.comp.java.mx4j.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/mx4j/mx4j/src/core/mx4j/remote/resolver/iiop
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4608/src/core/mx4j/remote/resolver/iiop
Modified Files:
IIOPResolver.java
Log Message:
Fix for bug #1021886: cannot use putAll() with a Properties, since it expects only Strings and the environment Map can contain non-String objects
Index: IIOPResolver.java
===================================================================
RCS file: /cvsroot/mx4j/mx4j/src/core/mx4j/remote/resolver/iiop/IIOPResolver.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** IIOPResolver.java 4 Sep 2004 15:44:10 -0000 1.10
--- IIOPResolver.java 4 Sep 2004 19:29:38 -0000 1.11
***************
*** 11,14 ****
--- 11,15 ----
import java.io.IOException;
import java.net.MalformedURLException;
+ import java.util.Iterator;
import java.util.Map;
import java.util.Properties;
***************
*** 112,116 ****
{
Properties props = new Properties();
! props.putAll(environment);
orb = ORB.init((String[])null, props);
}
--- 113,127 ----
{
Properties props = new Properties();
! // Using putAll() on a Properties is discouraged, since it expects only Strings
! for (Iterator i = environment.entrySet().iterator(); i.hasNext();)
! {
! Map.Entry entry = (Map.Entry)i.next();
! Object key = entry.getKey();
! Object value = entry.getValue();
! if (key instanceof String && value instanceof String)
! {
! props.setProperty((String)key, (String)value);
! }
! }
orb = ORB.init((String[])null, props);
}
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click