mirror of
https://github.com/zxing/zxing.git
synced 2025-02-02 05:41:08 -08:00
Don't add a newline at the front of a ParsedResult.
git-svn-id: https://zxing.googlecode.com/svn/trunk@498 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
a4568587a0
commit
0ddf4bcf96
|
@ -50,7 +50,10 @@ public abstract class ParsedResult {
|
|||
|
||||
protected static void maybeAppend(String value, StringBuffer result) {
|
||||
if (value != null) {
|
||||
result.append('\n');
|
||||
// Don't add a newline before the first value
|
||||
if (result.length() > 0) {
|
||||
result.append('\n');
|
||||
}
|
||||
result.append(value);
|
||||
}
|
||||
}
|
||||
|
@ -58,7 +61,9 @@ public abstract class ParsedResult {
|
|||
protected static void maybeAppend(String[] value, StringBuffer result) {
|
||||
if (value != null) {
|
||||
for (int i = 0; i < value.length; i++) {
|
||||
result.append('\n');
|
||||
if (result.length() > 0) {
|
||||
result.append('\n');
|
||||
}
|
||||
result.append(value[i]);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue