summaryrefslogtreecommitdiffstats
path: root/auth
diff options
context:
space:
mode:
authorArundathi Patil <arundpil@in.ibm.com>2018-12-17 23:07:25 +0530
committerIBM602-PC0F1E3C\Arundathi <arundpil@in.ibm.com>2018-12-17 23:07:35 +0530
commit7c57402f9ca8c65212943892e6e923d1c742cdcb (patch)
tree744e23f6bbc26e93b173160400a2fba22934b99a /auth
parent52c89c9940544c1b2db1dd1e0ce9b22e2fcdca42 (diff)
Sonar Fix: X509.java
Fixed sonar issues/code-smells across this file. Issue-ID: AAF-677 Change-Id: I098338c0eaaea38398ce3dc559011e7cc85171d3 Signed-off-by: Arundathi Patil <arundpil@in.ibm.com>
Diffstat (limited to 'auth')
-rw-r--r--auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/helpers/X509.java12
1 files changed, 8 insertions, 4 deletions
diff --git a/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/helpers/X509.java b/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/helpers/X509.java
index 0ffaa8f5..3cbf90fa 100644
--- a/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/helpers/X509.java
+++ b/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/helpers/X509.java
@@ -3,6 +3,8 @@
* org.onap.aaf
* ===========================================================================
* Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
+ *
+ * Modifications Copyright © 2018 IBM.
* ===========================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -21,7 +23,6 @@
package org.onap.aaf.auth.batch.helpers;
-import java.io.IOException;
import java.nio.ByteBuffer;
import java.security.cert.X509Certificate;
import java.util.Iterator;
@@ -42,7 +43,10 @@ import com.datastax.driver.core.SimpleStatement;
import com.datastax.driver.core.Statement;
public class X509 {
- public final String ca,id,x500,x509;
+ public final String ca;
+ public final String id;
+ public final String x500;
+ public final String x509;
public ByteBuffer serial;
public X509(String ca, String id, String x500, String x509, ByteBuffer serial) {
@@ -104,12 +108,12 @@ public class X509 {
}
- public void row(CSV.Writer cw, X509Certificate x509Cert) throws IOException {
+ public void row(CSV.Writer cw, X509Certificate x509Cert) {
cw.row("x509",ca,Hash.toHex(serial.array()),Chrono.dateOnlyStamp(x509Cert.getNotAfter()),x500);
}
- public static void row(StringBuilder sb, List<String> row) throws IOException {
+ public static void row(StringBuilder sb, List<String> row) {
sb.append("DELETE from authz.x509 WHERE ca='");
sb.append(row.get(1));
sb.append("' AND serial=");