Code Review
/
aaf
/
authz.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Merge "AAF-892- move the variable to follow rules"
[aaf/authz.git]
/
cadi
/
core
/
src
/
main
/
java
/
org
/
onap
/
aaf
/
cadi
/
PropAccess.java
diff --git
a/cadi/core/src/main/java/org/onap/aaf/cadi/PropAccess.java
b/cadi/core/src/main/java/org/onap/aaf/cadi/PropAccess.java
index
994e325
..
9f4b4b9
100644
(file)
--- a/
cadi/core/src/main/java/org/onap/aaf/cadi/PropAccess.java
+++ b/
cadi/core/src/main/java/org/onap/aaf/cadi/PropAccess.java
@@
-3,6
+3,8
@@
* org.onap.aaf
* ===========================================================================
* Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
* org.onap.aaf
* ===========================================================================
* Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
+ *
+ * Modifications Copyright (C) 2018 IBM.
* ===========================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* ===========================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@
-21,12
+23,14
@@
package org.onap.aaf.cadi;
package org.onap.aaf.cadi;
+import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintStream;
import java.io.PrintWriter;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintStream;
import java.io.PrintWriter;
+import java.io.StringBufferInputStream;
import java.io.StringWriter;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.io.StringWriter;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
@@
-43,6
+47,7
@@
import org.onap.aaf.cadi.util.Split;
public class PropAccess implements Access {
// Sonar says cannot be static... it's ok. not too many PropAccesses created.
private final SimpleDateFormat iso8601 = newISO8601();
public class PropAccess implements Access {
// Sonar says cannot be static... it's ok. not too many PropAccesses created.
private final SimpleDateFormat iso8601 = newISO8601();
+ private Symm symm;
public static SimpleDateFormat newISO8601() {
return new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ");
public static SimpleDateFormat newISO8601() {
return new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ");
@@
-50,7
+55,7
@@
public class PropAccess implements Access {
public static final Level DEFAULT = Level.AUDIT;
public static final Level DEFAULT = Level.AUDIT;
- private Symm symm;
+
private int level;
private Properties props;
private List<String> recursionProtection = null;
private int level;
private Properties props;
private List<String> recursionProtection = null;
@@
-303,6
+308,11
@@
public class PropAccess implements Access {
if (o!=null) {
if(o.getClass().isArray()) {
first = write(first,sb,(Object[])o);
if (o!=null) {
if(o.getClass().isArray()) {
first = write(first,sb,(Object[])o);
+ } else if(o instanceof Throwable) {
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ PrintStream ps = new PrintStream(baos);
+ ((Throwable)o).printStackTrace(ps);
+ sb.append(baos.toString());
} else {
s=o.toString();
if (first) {
} else {
s=o.toString();
if (first) {