alex-plekhanov commented on a change in pull request #7648: IGNITE-12857 Put custom objects via REST URL: https://github.com/apache/ignite/pull/7648#discussion_r409667359
########## File path: modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorAbstractSelfTest.java ########## @@ -2878,6 +3134,341 @@ public void ref(CircularRef ref) { } } + /** */ + @JsonInclude(JsonInclude.Include.NON_NULL) + @SuppressWarnings("AssignmentOrReturnOfFieldWithMutableType") + public static class OuterClass { + /** */ + private long id; + + /** */ + private String name; + + /** */ + private double doubleVal; + + /** */ + private Boolean optional; + + /** */ + private ArrayList<Integer> list; + + /** */ + private Timestamp timestamp; + + /** */ + private long[] longs; + + /** */ + OuterClass() { + // No-op. + } + + /** */ + OuterClass(long id, String name, double doubleVal, List<Integer> list, @Nullable Boolean optional) { + this.id = id; + this.name = name; + this.doubleVal = doubleVal; + this.list = new ArrayList<>(list); + this.optional = optional; + } + + /** */ + public long getId() { + return id; + } + + /** */ + public String getName() { + return name; + } + + /** */ + public Boolean getOptional() { + return optional; + } + + /** */ + public double getDoubleVal() { + return doubleVal; + } + + /** */ + public ArrayList<Integer> getList() { + return list; + } + + /** */ + public Timestamp getTimestamp() { + return timestamp; + } + + /** */ + public long[] getLongs() { + return longs; + } + + /** {@inheritDoc} */ + @Override public boolean equals(Object o) { + if (this == o) + return true; + if (o == null || getClass() != o.getClass()) + return false; + OuterClass aClass = (OuterClass)o; + return id == aClass.id && + Double.compare(aClass.doubleVal, doubleVal) == 0 && + Objects.equals(name, aClass.name) && + Objects.equals(optional, aClass.optional) && + Objects.equals(list, aClass.list) && + Objects.equals(timestamp, aClass.timestamp) && + Arrays.equals(longs, aClass.longs); + } + + /** {@inheritDoc} */ + @Override public int hashCode() { + return Objects.hash(id, name, optional, doubleVal, list, timestamp, longs); + } + + /** {@inheritDoc} */ + @Override public String toString() { + return "OuterClass{" + + "id=" + id + + ", name='" + name + '\'' + + ", doubleVal=" + doubleVal + + ", optional=" + optional + + ", list=" + list + + ", timestamp=" + timestamp + + ", bytes=" + Arrays.toString(longs) + + '}'; + } + } + + /** */ + public enum COLOR { Review comment: `Color` + comments for each item by codestyle ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services