Merge "Adding JUNITs for ONAP-PAP-REST"
[policy/engine.git] / ONAP-XACML / src / main / java / org / onap / policy / xacml / util / MetricsUtil.java
index 91e99b8..58f5a49 100644 (file)
@@ -2,7 +2,7 @@
  * ============LICENSE_START=======================================================
  * ONAP-XACML
  * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2018 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,6 +21,12 @@ package org.onap.policy.xacml.util;
 
 public class MetricsUtil {
        
+       private MetricsUtil() {
+               //
+               // private constructor to hide the implicit public one for utility class
+               // 
+       }
+       
        public static class AvgLatency {
                private long cumLatency = 0;
                private long count = 0;
@@ -34,7 +40,7 @@ public class MetricsUtil {
                        if (count == 0)
                                return 0;
                        
-                       return (cumLatency / count);
+                       return cumLatency / count;
                }
                
                public void reset() {