DESCRIPTION

tmf: improve validation for custom parsers

text: is the file a file, readable and have at least 1 byte of data.
xml: validate the xml

Signed-off-by: Ivy Mitchell xxx@xxx.xxx

COMMENTS

author: Braxton Mccarthy
date: 2013-07-31 00:38:53.000000000

Patch Set 1: Code-Review-1

(5 comments)

Good initiative! Small comments, also:

- Missing Change-Id. Make sure to use the one that Gerrit assigned to this patch.
- Some quick tests could be added. A simple try-expect-success and try-expect-failure, for both types. You can use code files, XML files and binary files (like .png's) from the source tree itself ;)

Line:242, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/parsers/custom/CustomXmlTrace.java -> put the { on the same line

Line:243, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/parsers/custom/CustomXmlTrace.java -> keep the comment on one line (could go on the line above)

Line:296, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/parsers/custom/CustomXmlTrace.java -> auto-format likes to split those, but it looks better on one line

Line:300, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/parsers/custom/CustomXmlTrace.java -> idem

Line:521, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/parsers/custom/CustomXmlTrace.java -> why do you create a String here? Is it even gonna work with an empty array?
Why not use new ByteArrayInputStream(new byte[10]) or something?

-------------------------------------
