From b95b51bfdc30db84baecd3bc3c28f5892c68500b Mon Sep 17 00:00:00 2001 From: Damian Minkov Date: Thu, 7 Feb 2008 16:08:52 +0000 Subject: [PATCH] check for changed details before modify --- .../icq/OperationSetServerStoredAccountInfoIcqImpl.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/net/java/sip/communicator/impl/protocol/icq/OperationSetServerStoredAccountInfoIcqImpl.java b/src/net/java/sip/communicator/impl/protocol/icq/OperationSetServerStoredAccountInfoIcqImpl.java index 03dda5ddf..f5cfb6979 100644 --- a/src/net/java/sip/communicator/impl/protocol/icq/OperationSetServerStoredAccountInfoIcqImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/icq/OperationSetServerStoredAccountInfoIcqImpl.java @@ -490,6 +490,10 @@ public boolean replaceDetail(GenericDetail currentDetailValue, if(!newDetailValue.getClass().equals(currentDetailValue.getClass())) throw new ClassCastException("New value to be replaced is not as the current one"); + // if values are the same no change + if(currentDetailValue.equals(newDetailValue)) + return true; + boolean isFound = false; Vector alreadySetDetails = new Vector(); Iterator iter = infoRetreiver.getDetails(uin, currentDetailValue.getClass()); @@ -503,7 +507,6 @@ public boolean replaceDetail(GenericDetail currentDetailValue, // most of the multiple details require saving at one time, like Spoken Language // we are placing it at the right place. replacing the old one alreadySetDetails.add(newDetailValue); - logger.info("ooooooooooooo found old " + item); } else alreadySetDetails.add(item); @@ -571,7 +574,6 @@ public boolean replaceDetail(GenericDetail currentDetailValue, case 0x0154 : cmd.setNickName(((StringDetail)newDetailValue).getString()); break; case 0x0140 : cmd.setFirstName(((StringDetail)newDetailValue).getString()); break; case 0x014A : - logger.info("ooooo replacing last name " + ((StringDetail)newDetailValue).getString()); cmd.setLastName(((StringDetail)newDetailValue).getString()); break; case 0x015E : cmd.setEmail(((StringDetail)newDetailValue).getString(), false); break; case 0x0190 : cmd.setHomeCity(((StringDetail)newDetailValue).getString()); break; @@ -676,7 +678,7 @@ else if(newDetailValue.equals(ServerStoredDetails.GenderDetail.MALE)) /** * Waiting for Acknowledge package and success byte. - * To set that the operation was succesful + * To set that the operation was successful */ private class SuccessResponseListener implements SnacRequestListener