public class Entity<T> {
-
+
private T entity;
-
+
private String contentType;
-
+
public static <T> Entity<T> json(T entity) {
- return new Entity<T>(entity, "application/json");
+ return new Entity<>(entity, "application/json");
}
-
+
public static <T> Entity<T> stream(T entity) {
- return new Entity<T>(entity, "application/octet-stream");
+ return new Entity<>(entity, "application/octet-stream");
}
public Entity(T entity, String contentType) {
public void setContentType(String contentType) {
this.contentType = contentType;
}
-
+
}
protected final int status;
// Make the response available for exception handling (includes body)
- protected final OpenStackResponse response;
+ protected final transient OpenStackResponse response;
public OpenStackResponseException(String message, int status) {
this.message = message;