Enabling Code Formatter
[ccsdk/cds.git] / ms / error-catalog / core / src / main / kotlin / org / onap / ccsdk / cds / error / catalog / core / ErrorLibData.kt
index 4158cfa..6920901 100644 (file)
 package org.onap.ccsdk.cds.error.catalog.core
 
 import com.fasterxml.jackson.annotation.JsonFormat
-import org.slf4j.event.Level
 import org.onap.ccsdk.cds.error.catalog.core.ErrorMessageLibConstants.ERROR_CATALOG_DEFAULT_ERROR_CODE
+import org.slf4j.event.Level
 import java.time.LocalDateTime
 import java.time.ZoneId
 import java.util.Date
-import kotlin.collections.ArrayList
 
 open class ErrorPayload {
+
     var code: Int = ERROR_CATALOG_DEFAULT_ERROR_CODE
     var status: String = ""
+
     @get:JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
     var timestamp: Date = controllerDate()
     var message: String = ""
@@ -67,9 +68,11 @@ open class ErrorPayload {
     }
 
     fun isEqualTo(errorPayload: ErrorPayload): Boolean {
-        return (this.code == errorPayload.code && this.status == errorPayload.status && this.message == errorPayload.message &&
-            this.logLevel == errorPayload.logLevel && this.debugMessage == errorPayload.debugMessage &&
-            this.subErrors == errorPayload.subErrors)
+        return (
+            this.code == errorPayload.code && this.status == errorPayload.status && this.message == errorPayload.message &&
+                this.logLevel == errorPayload.logLevel && this.debugMessage == errorPayload.debugMessage &&
+                this.subErrors == errorPayload.subErrors
+            )
     }
 
     private fun controllerDate(): Date {
@@ -96,6 +99,7 @@ data class ErrorCatalog(
     val action: String,
     val cause: String
 ) {
+
     fun getMessage(): String {
         return "Cause: $cause ${System.lineSeparator()} Action : $action"
     }