diff options
Diffstat (limited to 'common-logging/src/main/java/org/onap/policy/common/logging/eelf/EventData.java')
-rw-r--r-- | common-logging/src/main/java/org/onap/policy/common/logging/eelf/EventData.java | 30 |
1 files changed, 7 insertions, 23 deletions
diff --git a/common-logging/src/main/java/org/onap/policy/common/logging/eelf/EventData.java b/common-logging/src/main/java/org/onap/policy/common/logging/eelf/EventData.java index 23be38ba..87a96a19 100644 --- a/common-logging/src/main/java/org/onap/policy/common/logging/eelf/EventData.java +++ b/common-logging/src/main/java/org/onap/policy/common/logging/eelf/EventData.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP-Logging * ================================================================================ - * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017-2019, 2021 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,7 +21,9 @@ package org.onap.policy.common.logging.eelf; import java.time.Instant; +import lombok.AllArgsConstructor; import lombok.Getter; +import lombok.NoArgsConstructor; import lombok.Setter; /** @@ -29,32 +31,14 @@ import lombok.Setter; */ @Getter @Setter +@NoArgsConstructor +@AllArgsConstructor public class EventData { private String requestId = null; private Instant startTime = null; private Instant endTime = null; - // Default constructor takes no arguments. - // Is empty because instance variables are assigned - // their default values upon declaration. - public EventData() { - // See above comments for the reason this constructor is empty - } - - /** - * Create an instance. - * - * @param requestId the request ID - * @param startTime the start time - * @param endTime the end time - */ - public EventData(String requestId, Instant startTime, Instant endTime) { - this.requestId = requestId; - this.startTime = startTime; - this.endTime = endTime; - } - @Override public String toString() { return requestId + " Starting Time : " + this.startTime + " Ending Time : " + this.endTime; @@ -62,8 +46,8 @@ public class EventData { @Override public int hashCode() { - final int prime = 31; - int result = 1; + final var prime = 31; + var result = 1; result = prime * result + ((requestId == null) ? 0 : requestId.hashCode()); return result; } |