You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2013/07/29 10:43:25 UTC

svn commit: r1507972 - /ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyServices.java

Author: jleroux
Date: Mon Jul 29 08:43:25 2013
New Revision: 1507972

URL: http://svn.apache.org/r1507972
Log:
Casting here should compile in all cases

Modified:
    ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyServices.java

Modified: ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyServices.java?rev=1507972&r1=1507971&r2=1507972&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyServices.java (original)
+++ ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyServices.java Mon Jul 29 08:43:25 2013
@@ -26,7 +26,6 @@ import java.nio.ByteBuffer;
 import java.nio.charset.Charset;
 import java.sql.Timestamp;
 import java.util.Collection;
-import java.util.HashMap;
 import java.util.List;
 import java.util.Locale;
 import java.util.Map;
@@ -2095,9 +2094,8 @@ public class PartyServices {
                         lastEmailAddress = rec.get("emailAddress");
                     }
                     
-                    //Map<String, Object> postalAddress = UtilMisc.toMap("userLogin", userLogin); this seems to fail which older jdk version
-                    Map<String, Object> postalAddress = new HashMap<String, Object>();
-                    postalAddress.put("userLogin", userLogin);
+                    Map<String, Object> postalAddress = UtilMisc.toMap("userLogin", (Object) userLogin); // casting is here necessary for some compiler versions
+
                     Boolean postalAddressChanged = false;
                     if ("POSTAL_ADDRESS".equals(currentContactMechTypeId)) {
                         postalAddress.put("address1", rec.get("address1"));
@@ -2117,9 +2115,8 @@ public class PartyServices {
                         lastCountryGeoId = (String) postalAddress.get("countryGeoId");
                     }                            
                             
-                    //Map<String, Object> telecomNumber = UtilMisc.toMap("userLogin", userLogin); this seems to fail which older jdk version
-                    Map<String, Object> telecomNumber = new HashMap<String, Object>();
-                    telecomNumber.put("userLogin", userLogin);                    
+                    Map<String, Object> telecomNumber = UtilMisc.toMap("userLogin", (Object) userLogin); // casting is here necessary for some compiler versions
+
                     Boolean telecomNumberChanged = false;
                     if ("TELECOM_NUMBER".equals(currentContactMechTypeId)) {
                         telecomNumber.put("countryCode", rec.get("telCountryCode"));