fix bug in data: generator
This commit is contained in:
parent
2e759604c1
commit
34e4da4f39
|
@ -722,7 +722,7 @@ public class HierarchicalTableGenerator extends TranslatingUtilities {
|
||||||
if (files.containsKey(filename))
|
if (files.containsKey(filename))
|
||||||
return files.get(filename);
|
return files.get(filename);
|
||||||
StringBuilder b = new StringBuilder();
|
StringBuilder b = new StringBuilder();
|
||||||
b.append("data: image/png;base64,");
|
b.append("data:image/png;base64,");
|
||||||
byte[] bytes;
|
byte[] bytes;
|
||||||
File file = new File(Utilities.path(dest, filename));
|
File file = new File(Utilities.path(dest, filename));
|
||||||
if (!file.exists()) // because sometime this is called real early before the files exist. it will be built again later because of this
|
if (!file.exists()) // because sometime this is called real early before the files exist. it will be built again later because of this
|
||||||
|
@ -785,7 +785,7 @@ public class HierarchicalTableGenerator extends TranslatingUtilities {
|
||||||
return files.get(filename);
|
return files.get(filename);
|
||||||
ByteArrayOutputStream bytes = new ByteArrayOutputStream();
|
ByteArrayOutputStream bytes = new ByteArrayOutputStream();
|
||||||
genImage(indents, hasChildren, lineColor, bytes);
|
genImage(indents, hasChildren, lineColor, bytes);
|
||||||
b.append("data: image/png;base64,");
|
b.append("data:image/png;base64,");
|
||||||
byte[] encodeBase64 = Base64.encodeBase64(bytes.toByteArray());
|
byte[] encodeBase64 = Base64.encodeBase64(bytes.toByteArray());
|
||||||
b.append(new String(encodeBase64));
|
b.append(new String(encodeBase64));
|
||||||
files.put(filename, b.toString());
|
files.put(filename, b.toString());
|
||||||
|
|
Loading…
Reference in New Issue