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
Batch work and client
[aaf/authz.git]
/
cadi
/
core
/
src
/
main
/
java
/
org
/
onap
/
aaf
/
cadi
/
util
/
CSV.java
diff --git
a/cadi/core/src/main/java/org/onap/aaf/cadi/util/CSV.java
b/cadi/core/src/main/java/org/onap/aaf/cadi/util/CSV.java
index
a834db5
..
a395887
100644
(file)
--- a/
cadi/core/src/main/java/org/onap/aaf/cadi/util/CSV.java
+++ b/
cadi/core/src/main/java/org/onap/aaf/cadi/util/CSV.java
@@
-57,6
+57,10
@@
public class CSV {
processAll = false;
}
processAll = false;
}
+ public String name() {
+ return csv.getName();
+ }
+
public CSV processAll() {
processAll = true;
return this;
public CSV processAll() {
processAll = true;
return this;
@@
-85,7
+89,7
@@
public class CSV {
List<String> row = new ArrayList<>();
boolean quotes=false;
boolean escape=false;
List<String> row = new ArrayList<>();
boolean quotes=false;
boolean escape=false;
- char c;
+ char c
= 0
;
for(int i=0;i<line.length();++i) {
switch(c=line.charAt(i)) {
case '"':
for(int i=0;i<line.length();++i) {
switch(c=line.charAt(i)) {
case '"':
@@
-124,7
+128,7
@@
public class CSV {
sb.append(c);
}
}
sb.append(c);
}
}
- if(sb.length()>0) {
+ if(sb.length()>0
|| c==','
) {
row.add(sb.toString());
sb.setLength(0);
}
row.add(sb.toString());
sb.setLength(0);
}
@@
-197,9
+201,10
@@
public class CSV {
* Note: CSV files do not actually support Comments as a standard, but it is useful
* @param comment
*/
* Note: CSV files do not actually support Comments as a standard, but it is useful
* @param comment
*/
- public void comment(String comment) {
+ public void comment(String comment
, Object ... objs
) {
ps.print("# ");
ps.print("# ");
- ps.println(comment);
+ ps.printf(comment,objs);
+ ps.println();
}
public void flush() {
}
public void flush() {