From b4641204ffbefba014b5bae3de8207c8af265774 Mon Sep 17 00:00:00 2001 From: Emil Ivov Date: Wed, 22 Jul 2009 16:10:10 +0000 Subject: [PATCH] Fixes --- .../geolocation/GeolocationJabberUtils.java | 24 +++++++++++-------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/extensions/geolocation/GeolocationJabberUtils.java b/src/net/java/sip/communicator/impl/protocol/jabber/extensions/geolocation/GeolocationJabberUtils.java index 4ba227c17..91561feba 100644 --- a/src/net/java/sip/communicator/impl/protocol/jabber/extensions/geolocation/GeolocationJabberUtils.java +++ b/src/net/java/sip/communicator/impl/protocol/jabber/extensions/geolocation/GeolocationJabberUtils.java @@ -31,10 +31,10 @@ public class GeolocationJabberUtils * @param geolocExt the GeolocationExtension XML message * @return a Map with geolocation information */ - public static Map convertExtensionToMap( + public static Map convertExtensionToMap( GeolocationPacketExtension geolocExt) { - Map geolocMap = new Hashtable(); + Map geolocMap = new Hashtable(); addFloatToMap( geolocMap , OperationSetGeolocation.ALT @@ -119,7 +119,9 @@ public static Map convertExtensionToMap( * @param value the float var that we're adding to map against the * key key. */ - private static void addFloatToMap(Map map, String key, float value) + private static void addFloatToMap(Map map, + String key, + float value) { if (value != -1) { @@ -134,7 +136,9 @@ private static void addFloatToMap(Map map, String key, float value) * @param key String * @param value String */ - private static void addStringToMap(Map map, String key, String value) + private static void addStringToMap(Map map, + String key, + String value) { if (value != null) { @@ -150,20 +154,20 @@ private static void addStringToMap(Map map, String key, String value) * message */ public static GeolocationPacketExtension convertMapToExtension( - Map geolocation) + Map geolocation) { GeolocationPacketExtension geolocExt = new GeolocationPacketExtension(); - Set entries = geolocation.entrySet(); - Iterator itLine = entries.iterator(); + Set> entries = geolocation.entrySet(); + Iterator> itLine = entries.iterator(); while (itLine.hasNext()) { - Map.Entry line = (Entry) itLine.next(); + Entry line = itLine.next(); - String curParam = (String) line.getKey(); - String curValue = (String) line.getValue(); + String curParam = line.getKey(); + String curValue = line.getValue(); String prototype = Character.toUpperCase(curParam.charAt(0)) + curParam.substring(1);