Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating jackson and commonsio #25

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package com.ifountain.opsgenie.client.script.util;

import com.fasterxml.jackson.core.Version;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.module.SimpleModule;
import com.ifountain.opsgenie.client.script.util.deserializer.RecipientDeserializer;
import com.ifountain.opsgenie.client.util.JsonUtils;
import com.opsgenie.oas.sdk.model.Recipient;
import org.codehaus.jackson.JsonNode;
import org.codehaus.jackson.Version;
import org.codehaus.jackson.map.ObjectMapper;
import org.codehaus.jackson.map.module.SimpleModule;
import org.joda.time.DateTime;
import org.joda.time.format.DateTimeFormat;

Expand Down Expand Up @@ -160,7 +160,7 @@ public static List<Recipient> getAsRecipientList(Map params, String propName) th
if (objectList != null) {
for (Map objectEntry : objectList) {
JsonNode jsonNode = mapper.valueToTree(objectEntry);
listElements.add(mapper.readValue(jsonNode, Recipient.class));
listElements.add(mapper.convertValue(jsonNode, Recipient.class));
}
return listElements;
}
Expand All @@ -170,7 +170,7 @@ public static List<Recipient> getAsRecipientList(Map params, String propName) th
public static Recipient getAsRecipient(Map params) throws Exception {

JsonNode jsonNode = mapper.valueToTree(params);
return mapper.readValue(jsonNode, Recipient.class);
return mapper.convertValue(jsonNode, Recipient.class);

}
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package com.ifountain.opsgenie.client.script.util.deserializer;

import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
import com.ifountain.opsgenie.client.OpsGenieClientConstants;
import com.ifountain.opsgenie.client.util.JsonUtils;
import com.opsgenie.oas.sdk.model.*;
import org.codehaus.jackson.JsonNode;
import org.codehaus.jackson.JsonParser;
import org.codehaus.jackson.map.DeserializationContext;
import org.codehaus.jackson.map.ObjectMapper;
import org.codehaus.jackson.map.deser.std.StdDeserializer;

import java.io.IOException;
import java.text.ParseException;
Expand Down Expand Up @@ -61,4 +61,4 @@ public Recipient deserialize(JsonParser jp, DeserializationContext ctxt)
}
return new Recipient();
}
}
}
4 changes: 2 additions & 2 deletions sdk-swagger/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ apply from: 'pom.gradle'

ext {
swagger_annotations_version = "1.5.8"
jackson_version = "2.7.5"
jackson_version = "2.11.4"
jersey_version = "1.19.1"
jodatime_version = "2.9.4"
junit_version = "4.12"
commons_lang3_version = "3.5"
commons_io_version = "2.5"
commons_io_version = "2.11.0"
migbase64_version = "2.2"
javax_validation_api_version = "1.1.0.Final"
}
Expand Down
1 change: 1 addition & 0 deletions sdk/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ dependencies {
compile 'org.apache.httpcomponents:httpcore:4.2.5'
compile 'org.apache.httpcomponents:httpmime:4.2.5'
compile 'org.apache.httpcomponents:httpclient:4.2.5'
compile 'com.fasterxml.jackson.core:jackson-databind:2.11.4'
compile 'org.codehaus.jackson:jackson-mapper-lgpl:1.9.3'

testCompile project(':test')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
package com.ifountain.opsgenie.client.model;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.ifountain.opsgenie.client.OpsGenieClientConstants;
import com.ifountain.opsgenie.client.OpsGenieClientValidationException;
import com.ifountain.opsgenie.client.util.JsonUtils;
import org.codehaus.jackson.annotate.JsonIgnore;
import org.codehaus.jackson.annotate.JsonPropertyOrder;
import org.codehaus.jackson.map.annotate.JsonSerialize;
import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion;

import java.util.Map;

Expand All @@ -16,7 +15,7 @@
*
* @author Sezgin Kucukkaraaslan
*/
@JsonSerialize(include = Inclusion.NON_NULL)
@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL)
@JsonPropertyOrder(alphabetic = true)
public abstract class BaseRequest<T extends BaseResponse,K extends BaseRequest> implements Request {
private String apiKey;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.ifountain.opsgenie.client.model;

import org.codehaus.jackson.annotate.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnore;

import java.util.Map;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.ifountain.opsgenie.client.model;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.ifountain.opsgenie.client.util.JsonUtils;
import org.codehaus.jackson.annotate.JsonIgnore;
import org.codehaus.jackson.annotate.JsonIgnoreProperties;

import java.io.IOException;
import java.text.ParseException;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.ifountain.opsgenie.client.model;

import org.codehaus.jackson.annotate.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnore;

import java.util.TimeZone;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.ifountain.opsgenie.client.model;

import org.codehaus.jackson.annotate.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnore;

/**
* Interface for OpsGenie service api requests.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.ifountain.opsgenie.client.model.account;

import com.fasterxml.jackson.annotation.JsonUnwrapped;
import com.ifountain.opsgenie.client.model.BaseResponse;
import com.ifountain.opsgenie.client.model.beans.Account;
import org.codehaus.jackson.annotate.JsonUnwrapped;

/**
* Represents OpsGenie service response for get account request.
Expand Down Expand Up @@ -31,4 +31,4 @@ public Account getAccount() {
public void setAccount(Account account) {
this.account = account;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import com.ifountain.opsgenie.client.model.BaseRequest;
import com.ifountain.opsgenie.client.model.BaseResponse;
import org.codehaus.jackson.annotate.JsonProperty;
import com.fasterxml.jackson.annotation.JsonProperty;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import com.ifountain.opsgenie.client.model.BaseRequest;
import com.ifountain.opsgenie.client.model.BaseResponse;
import org.codehaus.jackson.annotate.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnore;

/**
* Abstract Container for the alert requests.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import com.ifountain.opsgenie.client.model.BaseResponse;
import com.ifountain.opsgenie.client.model.beans.Alert;
import org.codehaus.jackson.annotate.JsonUnwrapped;
import com.fasterxml.jackson.annotation.JsonUnwrapped;

/**
* Represents the OpsGenie service response for an get alert request.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import com.ifountain.opsgenie.client.OpsGenieClientConstants;
import com.ifountain.opsgenie.client.OpsGenieClientValidationException;
import org.codehaus.jackson.annotate.JsonProperty;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
* Container for the parameters to make a list alert logs api call.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import com.ifountain.opsgenie.client.model.BaseResponse;
import com.ifountain.opsgenie.client.model.beans.AlertLog;
import org.codehaus.jackson.annotate.JsonProperty;
import com.fasterxml.jackson.annotation.JsonProperty;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import com.ifountain.opsgenie.client.OpsGenieClientConstants;
import com.ifountain.opsgenie.client.OpsGenieClientValidationException;
import org.codehaus.jackson.annotate.JsonProperty;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
* Container for the parameters to make a list alert notes api call.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import com.ifountain.opsgenie.client.model.BaseResponse;
import com.ifountain.opsgenie.client.model.beans.AlertNote;
import org.codehaus.jackson.annotate.JsonProperty;
import com.fasterxml.jackson.annotation.JsonProperty;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.ifountain.opsgenie.client.model.alert;

import org.codehaus.jackson.annotate.JsonProperty;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
* Container for the parameters to make a list alerts api call.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.ifountain.opsgenie.client.model.alert;

import com.ifountain.opsgenie.client.util.Strings;
import org.codehaus.jackson.annotate.JsonProperty;
import com.fasterxml.jackson.annotation.JsonProperty;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.ifountain.opsgenie.client.model.alert;

import com.ifountain.opsgenie.client.util.Strings;
import org.codehaus.jackson.annotate.JsonProperty;
import com.fasterxml.jackson.annotation.JsonProperty;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.ifountain.opsgenie.client.model.alert;

import com.ifountain.opsgenie.client.model.ObjectWithTimeZone;
import org.codehaus.jackson.annotate.JsonProperty;
import com.fasterxml.jackson.annotation.JsonProperty;

import java.util.Date;
import java.util.TimeZone;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import com.ifountain.opsgenie.client.model.BaseRequest;

import org.codehaus.jackson.annotate.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnore;

/**
* Container for the parameters to enable/disable alert policy.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.ifountain.opsgenie.client.model.beans;

import org.codehaus.jackson.annotate.JsonProperty;
import com.fasterxml.jackson.annotation.JsonProperty;

import java.util.List;
import java.util.Map;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
package com.ifountain.opsgenie.client.model.beans;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.ifountain.opsgenie.client.util.JsonUtils;
import org.codehaus.jackson.annotate.JsonIgnoreProperties;
import org.codehaus.jackson.annotate.JsonPropertyOrder;
import org.codehaus.jackson.map.annotate.JsonSerialize;
import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion;

import java.text.ParseException;
import java.util.Map;

@JsonPropertyOrder(alphabetic = true)
@JsonSerialize(include = Inclusion.NON_NULL)
@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
public abstract class Bean implements IBean {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.ifountain.opsgenie.client.model.beans;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.ifountain.opsgenie.client.OpsGenieClientConstants;

import org.codehaus.jackson.annotate.JsonCreator;
import org.codehaus.jackson.annotate.JsonValue;

/**
* Condition bean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import com.ifountain.opsgenie.client.OpsGenieClientConstants;

import org.codehaus.jackson.annotate.JsonCreator;
import org.codehaus.jackson.annotate.JsonValue;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;

/**
* Contact bean
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.ifountain.opsgenie.client.model.beans;

import org.codehaus.jackson.annotate.JsonCreator;
import org.codehaus.jackson.annotate.JsonValue;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;

public class EscalationRule extends Bean {
private String notify;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import com.ifountain.opsgenie.client.OpsGenieClientConstants;
import com.ifountain.opsgenie.client.model.ConvertFromTimeZone;

import org.codehaus.jackson.annotate.JsonProperty;
import com.fasterxml.jackson.annotation.JsonProperty;

import java.text.ParseException;
import java.text.SimpleDateFormat;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
package com.ifountain.opsgenie.client.model.beans;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.ifountain.opsgenie.client.OpsGenieClientConstants;

import org.codehaus.jackson.annotate.JsonCreator;
import org.codehaus.jackson.annotate.JsonValue;

import java.util.List;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
package com.ifountain.opsgenie.client.model.beans;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.ifountain.opsgenie.client.OpsGenieClientConstants;
import com.ifountain.opsgenie.client.model.ConvertFromTimeZone;

import org.codehaus.jackson.annotate.JsonProperty;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.ifountain.opsgenie.client.model.beans;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.ifountain.opsgenie.client.OpsGenieClientConstants;
import com.ifountain.opsgenie.client.model.ConvertFromTimeZone;

import org.codehaus.jackson.annotate.JsonProperty;

import java.text.ParseException;
import java.text.SimpleDateFormat;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.ifountain.opsgenie.client.model.beans;

import org.codehaus.jackson.annotate.JsonCreator;
import org.codehaus.jackson.annotate.JsonValue;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;

@Deprecated
public class ScheduleRestrictionTime {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
package com.ifountain.opsgenie.client.model.beans;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.ifountain.opsgenie.client.model.ObjectWithTimeZone;

import org.codehaus.jackson.annotate.JsonIgnore;
import org.codehaus.jackson.annotate.JsonProperty;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;
Expand Down
Loading