m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/pl/edu/mimuw/cloudatlas/client
diff options
context:
space:
mode:
authorMagdalena GrodziƄska <mag.grodzinska@gmail.com>2020-01-15 04:46:19 +0100
committerGitHub <noreply@github.com>2020-01-15 04:46:19 +0100
commit97f644e3a983c6a24d26cb04b57b96a42afaa089 (patch)
tree6875ba1b10c804d728925c9cb282b404cd3c20f6 /src/main/java/pl/edu/mimuw/cloudatlas/client
parent8678d8c922b439ff4a58e4b139c4085515a890f0 (diff)
parent0cb7ded87955286f950d2802fc6a0d1c9c26726a (diff)
Merge pull request #123 from m-chrzan/clean_udup
Add cleaning to UDUP
Diffstat (limited to 'src/main/java/pl/edu/mimuw/cloudatlas/client')
-rw-r--r--src/main/java/pl/edu/mimuw/cloudatlas/client/ClientController.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/pl/edu/mimuw/cloudatlas/client/ClientController.java b/src/main/java/pl/edu/mimuw/cloudatlas/client/ClientController.java
index 5f34fe9..f147b2a 100644
--- a/src/main/java/pl/edu/mimuw/cloudatlas/client/ClientController.java
+++ b/src/main/java/pl/edu/mimuw/cloudatlas/client/ClientController.java
@@ -133,9 +133,9 @@ public class ClientController {
return "contactsForm";
}
- private Set<ValueContact> parseContactsString(DataStringInput contactsInput) throws Exception {
+ public static Set<ValueContact> parseContactsString(String contactsInput) throws Exception {
Gson gson = new Gson();
- Map<String, ArrayList> contactStrings = gson.fromJson(contactsInput.getString(), Map.class);
+ Map<String, ArrayList> contactStrings = gson.fromJson(contactsInput, Map.class);
Set<ValueContact> contactObjects = new HashSet<ValueContact>();
ArrayList<Double> cAddr;
byte[] inetArray = new byte[4];
@@ -160,7 +160,7 @@ public class ClientController {
Set<ValueContact> contactObjects;
try {
- contactObjects = parseContactsString(contactsObject);
+ contactObjects = parseContactsString(contactsObject.getString());
this.agentApi.setFallbackContacts(contactObjects);
} catch (Exception e) {
success = false;
@@ -263,7 +263,7 @@ public class ClientController {
case "Contact":
DataStringInput contactsString = new DataStringInput();
contactsString.setString(attributeObject.getValueString());
- attributeValue = parseContactsString(contactsString).iterator().next();
+ attributeValue = parseContactsString(contactsString.getString()).iterator().next();
break;
case "List":
List parsedListValue = gson.fromJson(attributeObject.getValueString(), List.class);