Skip to content

Commit a476950

Browse files
committed
remove usage of deprecated Jackson API
1 parent e0323d9 commit a476950

9 files changed

Lines changed: 11 additions & 11 deletions

File tree

base/src/main/java/pl/edu/icm/unity/base/attribute/AttributeType.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ public void fromJsonBase(ObjectNode main)
286286
if (main.has("metadata"))
287287
{
288288
JsonNode metaNode = main.get("metadata");
289-
Iterator<Entry<String, JsonNode>> it = metaNode.fields();
289+
Iterator<Entry<String, JsonNode>> it = metaNode.properties().iterator();
290290
Map<String, String> meta = getMetadata();
291291
while(it.hasNext())
292292
{

base/src/main/java/pl/edu/icm/unity/base/registration/invitation/FormPrefill.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,12 +208,12 @@ void fromJson(ObjectNode json)
208208

209209
n = json.get("messageParams");
210210
if (n != null)
211-
n.fields().forEachRemaining(field -> messageParams.put(field.getKey(), field.getValue().asText()));
211+
n.properties().iterator().forEachRemaining(field -> messageParams.put(field.getKey(), field.getValue().asText()));
212212
}
213213

214214
private void fill(JsonNode root, Map<Integer, GroupSelection> allowedGroups)
215215
{
216-
root.fields().forEachRemaining(field ->
216+
root.properties().iterator().forEachRemaining(field ->
217217
allowedGroups.put(Integer.parseInt(field.getKey()),
218218
parseTree(field.getValue(), GroupSelection.class))
219219
);
@@ -222,7 +222,7 @@ private void fill(JsonNode root, Map<Integer, GroupSelection> allowedGroups)
222222

223223
protected <T> void fill(JsonNode root, Map<Integer, PrefilledEntry<T>> map, Class<T> clazz)
224224
{
225-
root.fields().forEachRemaining(field ->
225+
root.properties().iterator().forEachRemaining(field ->
226226
{
227227
ObjectNode el = (ObjectNode) field.getValue();
228228
map.put(Integer.parseInt(field.getKey()), toPrefilledEntry(el, clazz));

console/src/main/java/io/imunity/console/views/maintenance/audit_log/AuditEventEntry.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ String formatDetails()
148148
return "";
149149

150150
StringBuilder formatted = new StringBuilder();
151-
Iterator<Entry<String, JsonNode>> fields = auditEvent.getDetails().fields();
151+
Iterator<Entry<String, JsonNode>> fields = auditEvent.getDetails().properties().iterator();
152152
fields.forEachRemaining(field ->
153153
{
154154
formatted.append(field.getKey()).append(": ").append(field.getValue().toString()).append(", ");

storage/src/main/java/pl/edu/icm/unity/store/migration/from1_9/UpdateFrom1_9_x.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ private void updateInvitation(ObjectNode target, UpdateContext ctx)
261261
target.put("lastSentTime", lastSent*1000);
262262
}
263263
ObjectNode attributesOld = (ObjectNode) target.get("attributes");
264-
attributesOld.fields().forEachRemaining(field ->
264+
attributesOld.properties().iterator().forEachRemaining(field ->
265265
{
266266
ObjectNode el = (ObjectNode) field.getValue();
267267
ObjectNode oldEntry = (ObjectNode) el.get("attribute");

storage/src/main/java/pl/edu/icm/unity/store/migration/to2_7/UpdateHelperTo2_6.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ static Optional<ObjectNode> updateInvitation(ObjectNode invitation, Map<String,
8282
return Optional.empty();
8383
}
8484

85-
Iterator<Entry<String, JsonNode>> fields = groupSelections.fields();
85+
Iterator<Entry<String, JsonNode>> fields = groupSelections.properties().iterator();
8686
while(fields.hasNext())
8787
{
8888
Entry<String, JsonNode> next = fields.next();

storage/src/main/java/pl/edu/icm/unity/store/migration/to3_0/JsonDumpUpdateFromV7.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public InputStream update(InputStream is) throws IOException
6161
private ObjectNode insertFiles(ObjectNode contents)
6262
{
6363
ObjectNode newContents = new ObjectNode(JsonNodeFactory.instance);
64-
Iterator<Map.Entry<String, JsonNode>> fields = contents.fields();
64+
Iterator<Map.Entry<String, JsonNode>> fields = contents.properties().iterator();
6565
while(fields.hasNext()){
6666
Map.Entry<String, JsonNode> entry = fields.next();
6767
newContents.putPOJO(entry.getKey(), entry.getValue());

storage/src/main/java/pl/edu/icm/unity/store/migration/to3_1/JsonDumpUpdateFromV8.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public InputStream update(InputStream is) throws IOException
5757
private ObjectNode insertAuditEvents(ObjectNode contents)
5858
{
5959
ObjectNode newContents = new ObjectNode(JsonNodeFactory.instance);
60-
Iterator<Map.Entry<String, JsonNode>> fields = contents.fields();
60+
Iterator<Map.Entry<String, JsonNode>> fields = contents.properties().iterator();
6161
while(fields.hasNext()) {
6262
Map.Entry<String, JsonNode> entry = fields.next();
6363
newContents.putPOJO(entry.getKey(), entry.getValue());

storage/src/main/java/pl/edu/icm/unity/store/migration/to3_3/JsonDumpUpdateFromV10.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public InputStream update(InputStream is) throws IOException
7070
private ObjectNode insertPolicyDocumentsAndMessages(ObjectNode contents)
7171
{
7272
ObjectNode newContents = new ObjectNode(JsonNodeFactory.instance);
73-
Iterator<Map.Entry<String, JsonNode>> fields = contents.fields();
73+
Iterator<Map.Entry<String, JsonNode>> fields = contents.properties().iterator();
7474
while (fields.hasNext())
7575
{
7676
Map.Entry<String, JsonNode> entry = fields.next();

storage/src/main/java/pl/edu/icm/unity/store/migration/to3_7/JsonDumpUpdateFromV13.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public InputStream update(InputStream is) throws IOException
5757
private ObjectNode insertIdpStatistics(ObjectNode contents)
5858
{
5959
ObjectNode newContents = new ObjectNode(JsonNodeFactory.instance);
60-
Iterator<Map.Entry<String, JsonNode>> fields = contents.fields();
60+
Iterator<Map.Entry<String, JsonNode>> fields = contents.properties().iterator();
6161
while (fields.hasNext())
6262
{
6363
Map.Entry<String, JsonNode> entry = fields.next();

0 commit comments

Comments
 (0)