brsanthu / data-exporter Goto Github PK
View Code? Open in Web Editor NEWdata-exporter is a Java library to export tabular data (like List of rows) into many output formats like Text-Table, CSV, Xml or Html.
data-exporter is a Java library to export tabular data (like List of rows) into many output formats like Text-Table, CSV, Xml or Html.
Hey there,
it's me again, decided to finally incorporate the new 1.0.4 release into my application, just to find that 'mvn test' fails (for quite a few tests). :[
Jokes aside though, it might be slight side-effects of your recent changes, or some local problem on my end. I forced Maven to install it anyway and the output of my software is (as far as I can see) exactly as before and exactly as expected.
If you can't reproduce the test fails I could provide you with my 'mvn test' log. Here's my Maven version information:
Apache Maven 3.1.1 (0728685237757ffbf44136acec0402957f723d9a; 2013-09-17 17:22:22+0200)
Maven home: /usr/share/maven-bin-3.1
Java version: 1.7.0_45, vendor: Oracle Corporation
Java home: /opt/icedtea-bin-7.2.4.3/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.14.0-gentoo", arch: "amd64", family: "unix"
Thanks!
When using the alignment MIDDLE_LEFT, MIDDLE_CENTER or MIDDLE_RIGHT, the text aligner ignores the cell height and generates several lines, only the first of which is actually shown in the output (when the cell height is 1). Unit tests do not uncover this bug because the cell content is too short to trigger it.
Caused by: java.lang.IllegalArgumentException: Height or width cannot be less than or equal to zero.
at com.brsanthu.dataexporter.TextAligner.align(TextAligner.java:191)
at com.brsanthu.dataexporter.TextAligner.align(TextAligner.java:184)
at com.brsanthu.dataexporter.TextAligner.getRowHeight(TextAligner.java:162)
at com.brsanthu.dataexporter.output.texttable.TextTableWriter.getMaxRowHeight(TextTableWriter.java:177)
at com.brsanthu.dataexporter.output.texttable.TextTableWriter.formatRowCells(TextTableWriter.java:129)
at com.brsanthu.dataexporter.output.texttable.TextTableWriter.writeRow(TextTableWriter.java:106)
at com.brsanthu.dataexporter.DataWriter.writeRows(DataWriter.java:124)
at com.brsanthu.dataexporter.DataExporter.addRows(DataExporter.java:183)
This is imho valid data, just handle it:
StringWriter out = new StringWriter();
TextTableExporter exporter = new TextTableExporter(out);
exporter.addColumn("foo");
exporter.addColumn("bar");
exporter.addRow("foo", null);
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.