You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by "Rob Vesse (Created) (JIRA)" <ji...@apache.org> on 2012/01/19 23:22:39 UTC

[jira] [Created] (JENA-200) TSVInput does not check for malformed header row

TSVInput does not check for malformed header row
------------------------------------------------

                 Key: JENA-200
                 URL: https://issues.apache.org/jira/browse/JENA-200
             Project: Jena
          Issue Type: Bug
          Components: ARQ
    Affects Versions: ARQ 2.9.1
            Reporter: Rob Vesse
            Priority: Minor
             Fix For: ARQ 2.9.1
         Attachments: TSVEmptyNullHeaderPatch.patch

As a side effect of discovering JENA-199 I noticed that TSVInput does not check for a malformed header row (null/empty)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (JENA-200) TSVInput does not check for malformed header row

Posted by "Andy Seaborne (Assigned) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JENA-200?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andy Seaborne reassigned JENA-200:
----------------------------------

    Assignee: Andy Seaborne
    
> TSVInput does not check for malformed header row
> ------------------------------------------------
>
>                 Key: JENA-200
>                 URL: https://issues.apache.org/jira/browse/JENA-200
>             Project: Jena
>          Issue Type: Bug
>          Components: ARQ
>    Affects Versions: ARQ 2.9.1
>            Reporter: Rob Vesse
>            Assignee: Andy Seaborne
>            Priority: Minor
>             Fix For: ARQ 2.9.1
>
>         Attachments: TSVEmptyNullHeaderPatch.patch, TSVInputPatchNullHeader2.patch, TSVInputPatchNullHeader3.patch
>
>
> As a side effect of discovering JENA-199 I noticed that TSVInput does not check for a malformed header row (null/empty)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (JENA-200) TSVInput does not check for malformed header row

Posted by "Rob Vesse (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JENA-200?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rob Vesse updated JENA-200:
---------------------------

    Attachment: TSVInputPatchNullHeader3.patch

This is a further revision to Andy's patch.

It adds an additional check on empty lines because if there is two or more variables then even if the row is empty it should contain some tab separators, an empty line is only valid to represent an empty row if there is zero/one variables since in those cases there would be no tab separators on any line

Also adds further tests

This should be applied in place of Andy's patch since it incorporates all those changes and just includes the additional checks and tests
                
> TSVInput does not check for malformed header row
> ------------------------------------------------
>
>                 Key: JENA-200
>                 URL: https://issues.apache.org/jira/browse/JENA-200
>             Project: Jena
>          Issue Type: Bug
>          Components: ARQ
>    Affects Versions: ARQ 2.9.1
>            Reporter: Rob Vesse
>            Priority: Minor
>             Fix For: ARQ 2.9.1
>
>         Attachments: TSVEmptyNullHeaderPatch.patch, TSVInputPatchNullHeader2.patch, TSVInputPatchNullHeader3.patch
>
>
> As a side effect of discovering JENA-199 I noticed that TSVInput does not check for a malformed header row (null/empty)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (JENA-200) TSVInput does not check for malformed header row

Posted by "Rob Vesse (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JENA-200?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rob Vesse updated JENA-200:
---------------------------

    Attachment: TSVEmptyNullHeaderPatch.patch

Adds a check in TSVInput for null/empty header row

Adds tests that check that these cases cause the exception to be thrown along with some test naming and refactoring in TestResultSetFormat2
                
> TSVInput does not check for malformed header row
> ------------------------------------------------
>
>                 Key: JENA-200
>                 URL: https://issues.apache.org/jira/browse/JENA-200
>             Project: Jena
>          Issue Type: Bug
>          Components: ARQ
>    Affects Versions: ARQ 2.9.1
>            Reporter: Rob Vesse
>            Priority: Minor
>             Fix For: ARQ 2.9.1
>
>         Attachments: TSVEmptyNullHeaderPatch.patch
>
>
> As a side effect of discovering JENA-199 I noticed that TSVInput does not check for a malformed header row (null/empty)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (JENA-200) TSVInput does not check for malformed header row

Posted by "Rob Vesse (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JENA-200?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13191231#comment-13191231 ] 

Rob Vesse commented on JENA-200:
--------------------------------

Yes, sorry I missed that case in my original patch for streaming input.

As per my previous comment I've attached a revised version of your patch which adds an additional check for illegal input
                
> TSVInput does not check for malformed header row
> ------------------------------------------------
>
>                 Key: JENA-200
>                 URL: https://issues.apache.org/jira/browse/JENA-200
>             Project: Jena
>          Issue Type: Bug
>          Components: ARQ
>    Affects Versions: ARQ 2.9.1
>            Reporter: Rob Vesse
>            Priority: Minor
>             Fix For: ARQ 2.9.1
>
>         Attachments: TSVEmptyNullHeaderPatch.patch, TSVInputPatchNullHeader2.patch, TSVInputPatchNullHeader3.patch
>
>
> As a side effect of discovering JENA-199 I noticed that TSVInput does not check for a malformed header row (null/empty)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (JENA-200) TSVInput does not check for malformed header row

Posted by "Hudson (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JENA-200?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13192003#comment-13192003 ] 

Hudson commented on JENA-200:
-----------------------------

Integrated in Jena_ARQ #422 (See [https://builds.apache.org/job/Jena_ARQ/422/])
    JENA-200 TSVInput header row processing.

andy : 
Files : 
* /incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/sparql/resultset/TSVInput.java
* /incubator/jena/Jena2/ARQ/trunk/src/main/java/com/hp/hpl/jena/sparql/resultset/TSVInputIterator.java
* /incubator/jena/Jena2/ARQ/trunk/src/test/java/com/hp/hpl/jena/sparql/resultset/TestResultSetFormat1.java
* /incubator/jena/Jena2/ARQ/trunk/src/test/java/com/hp/hpl/jena/sparql/resultset/TestResultSetFormat2.java

                
> TSVInput does not check for malformed header row
> ------------------------------------------------
>
>                 Key: JENA-200
>                 URL: https://issues.apache.org/jira/browse/JENA-200
>             Project: Jena
>          Issue Type: Bug
>          Components: ARQ
>    Affects Versions: ARQ 2.9.1
>            Reporter: Rob Vesse
>            Assignee: Andy Seaborne
>            Priority: Minor
>             Fix For: ARQ 2.9.1
>
>         Attachments: TSVEmptyNullHeaderPatch.patch, TSVInputPatchNullHeader2.patch, TSVInputPatchNullHeader3.patch
>
>
> As a side effect of discovering JENA-199 I noticed that TSVInput does not check for a malformed header row (null/empty)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (JENA-200) TSVInput does not check for malformed header row

Posted by "Andy Seaborne (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JENA-200?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andy Seaborne updated JENA-200:
-------------------------------

    Attachment: TSVInputPatchNullHeader2.patch

A result set of no variables is legal.  Consider "SELECT * {}".  The output should be two lines of no characters.

It's one for the header of no variables, one for the result row of no bindings.

There is something wrong though as outputing that in TSV and reading it in again with "arq.rset" is wrong (looks one variable of name "").

The code needs to handle both null and empty string as special cases (header reading and row reading).

Patch attached - this includes the tests from the first patch so no need to process both patches.
                
> TSVInput does not check for malformed header row
> ------------------------------------------------
>
>                 Key: JENA-200
>                 URL: https://issues.apache.org/jira/browse/JENA-200
>             Project: Jena
>          Issue Type: Bug
>          Components: ARQ
>    Affects Versions: ARQ 2.9.1
>            Reporter: Rob Vesse
>            Priority: Minor
>             Fix For: ARQ 2.9.1
>
>         Attachments: TSVEmptyNullHeaderPatch.patch, TSVInputPatchNullHeader2.patch
>
>
> As a side effect of discovering JENA-199 I noticed that TSVInput does not check for a malformed header row (null/empty)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (JENA-200) TSVInput does not check for malformed header row

Posted by "Andy Seaborne (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JENA-200?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andy Seaborne resolved JENA-200.
--------------------------------

    Resolution: Fixed

Patch applied (+ more tests).

                
> TSVInput does not check for malformed header row
> ------------------------------------------------
>
>                 Key: JENA-200
>                 URL: https://issues.apache.org/jira/browse/JENA-200
>             Project: Jena
>          Issue Type: Bug
>          Components: ARQ
>    Affects Versions: ARQ 2.9.1
>            Reporter: Rob Vesse
>            Assignee: Andy Seaborne
>            Priority: Minor
>             Fix For: ARQ 2.9.1
>
>         Attachments: TSVEmptyNullHeaderPatch.patch, TSVInputPatchNullHeader2.patch, TSVInputPatchNullHeader3.patch
>
>
> As a side effect of discovering JENA-199 I noticed that TSVInput does not check for a malformed header row (null/empty)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Closed] (JENA-200) TSVInput does not check for malformed header row

Posted by "Andy Seaborne (Closed) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JENA-200?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andy Seaborne closed JENA-200.
------------------------------

    
> TSVInput does not check for malformed header row
> ------------------------------------------------
>
>                 Key: JENA-200
>                 URL: https://issues.apache.org/jira/browse/JENA-200
>             Project: Jena
>          Issue Type: Bug
>          Components: ARQ
>    Affects Versions: ARQ 2.9.1
>            Reporter: Rob Vesse
>            Assignee: Andy Seaborne
>            Priority: Minor
>             Fix For: ARQ 2.9.1
>
>         Attachments: TSVEmptyNullHeaderPatch.patch, TSVInputPatchNullHeader2.patch, TSVInputPatchNullHeader3.patch
>
>
> As a side effect of discovering JENA-199 I noticed that TSVInput does not check for a malformed header row (null/empty)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira