You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by "Burn Lewis (JIRA)" <de...@uima.apache.org> on 2012/08/03 14:49:03 UTC

[jira] [Created] (UIMA-2453) Some JUnit tests fail with Java 7

Burn Lewis created UIMA-2453:
--------------------------------

             Summary: Some JUnit tests fail with Java 7
                 Key: UIMA-2453
                 URL: https://issues.apache.org/jira/browse/UIMA-2453
             Project: UIMA
          Issue Type: Bug
          Components: Core Java Framework
            Reporter: Burn Lewis
            Assignee: Burn Lewis
            Priority: Minor
             Fix For: 2.4.1SDK




--
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] (UIMA-2453) Some JUnit tests fail with Java 7

Posted by "Marshall Schor (JIRA)" <de...@uima.apache.org>.
     [ https://issues.apache.org/jira/browse/UIMA-2453?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Marshall Schor closed UIMA-2453.
--------------------------------

    Resolution: Fixed
    
> Some JUnit tests fail with Java 7
> ---------------------------------
>
>                 Key: UIMA-2453
>                 URL: https://issues.apache.org/jira/browse/UIMA-2453
>             Project: UIMA
>          Issue Type: Bug
>          Components: Core Java Framework
>         Environment: Java 7
>            Reporter: Burn Lewis
>            Assignee: Marshall Schor
>            Priority: Minor
>             Fix For: 2.4.1SDK
>
>
> Problem reported by Alan Sergeant

--
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] [Reopened] (UIMA-2453) Some JUnit tests fail with Java 7

Posted by "Burn Lewis (JIRA)" <de...@uima.apache.org>.
     [ https://issues.apache.org/jira/browse/UIMA-2453?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Burn Lewis reopened UIMA-2453:
------------------------------

      Assignee: Marshall Schor  (was: Burn Lewis)

Ooops - should have left open for Marshall
                
> Some JUnit tests fail with Java 7
> ---------------------------------
>
>                 Key: UIMA-2453
>                 URL: https://issues.apache.org/jira/browse/UIMA-2453
>             Project: UIMA
>          Issue Type: Bug
>          Components: Core Java Framework
>         Environment: Java 7
>            Reporter: Burn Lewis
>            Assignee: Marshall Schor
>            Priority: Minor
>             Fix For: 2.4.1SDK
>
>
> Problem reported by Alan Sergeant

--
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] (UIMA-2453) Some JUnit tests fail with Java 7

Posted by "Marshall Schor (JIRA)" <de...@uima.apache.org>.
    [ https://issues.apache.org/jira/browse/UIMA-2453?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13429490#comment-13429490 ] 

Marshall Schor commented on UIMA-2453:
--------------------------------------

It took a day to track this down.  I found that running the Junit test in Eclipse (the single class) worked with Java 7.  To get it to fail, I had to set JAVA_HOME to Java or a late Sun Java 6, and run "mvn test".  The failure was eventually traced to a bit of sloppy test code which, for this particular test, failed to specify one way or the other if the UIMA parser should be run as a "validating" parser or not.  It turns out that this is implemented as a stateful (remembered) aspect of the UIMA framework, settable by UIMAFrameWork Because this test class didn't specify, UIMAFramework.getXMLParser().enableSchemaValidation(true) (or false), it just got whatever setting a previous test left the parser in.  Maven surefire ran the junit tests in some order, which for Java 7 ended up running with schemaValidation set to true.  Before Java 7, the order ended up running with it set to false.

If schemavalidation is false, then the XML parser can't tell if white space is "ignorable" or not, so it assumes it's not, and calls the SAX handler "characters".  If it's true, then for ignorable white space it calls the SAX handler "ignorableWhiteSpace".  

The way UIMA's XML parser is implemented is to do SAX parsing, get SAX events, and transform them into a DOM using an "identity" XSLT transform.  (The reason for this design I don't know - it's from a long time ago).  The "identity" XSLT transform, for ignorable white space, ignores it...   Which means, it isn't captured in the DOM.  When preserving comments and white space, we need to capture it.  So, the fix is to change the logic for the SAX handlers use when parsing - if preserve comments is true, we'll convert an ignorableWhiteSpace call (only called by SAX when in validating mode) to a characters call - so the DOM will preserve the ignorable white space.
                
> Some JUnit tests fail with Java 7
> ---------------------------------
>
>                 Key: UIMA-2453
>                 URL: https://issues.apache.org/jira/browse/UIMA-2453
>             Project: UIMA
>          Issue Type: Bug
>          Components: Core Java Framework
>         Environment: Java 7
>            Reporter: Burn Lewis
>            Assignee: Marshall Schor
>            Priority: Minor
>             Fix For: 2.4.1SDK
>
>
> Problem reported by Alan Sergeant

--
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] (UIMA-2453) Some JUnit tests fail with Java 7

Posted by "Burn Lewis (JIRA)" <de...@uima.apache.org>.
     [ https://issues.apache.org/jira/browse/UIMA-2453?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Burn Lewis resolved UIMA-2453.
------------------------------

    Resolution: Fixed

Fixed one of the failing tests and another unreported one.
The failing testManyDelegates is under investigation, but is cosmetic ... the descriptors created are completely functional and only differ in white-space. 
                
> Some JUnit tests fail with Java 7
> ---------------------------------
>
>                 Key: UIMA-2453
>                 URL: https://issues.apache.org/jira/browse/UIMA-2453
>             Project: UIMA
>          Issue Type: Bug
>          Components: Core Java Framework
>         Environment: Java 7
>            Reporter: Burn Lewis
>            Assignee: Burn Lewis
>            Priority: Minor
>             Fix For: 2.4.1SDK
>
>
> Problem reported by Alan Sergeant

--
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] (UIMA-2453) Some JUnit tests fail with Java 7

Posted by "Burn Lewis (JIRA)" <de...@uima.apache.org>.
     [ https://issues.apache.org/jira/browse/UIMA-2453?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Burn Lewis updated UIMA-2453:
-----------------------------

    Description: Problem reported by Alan Sergeant
    Environment: Java 7
    
> Some JUnit tests fail with Java 7
> ---------------------------------
>
>                 Key: UIMA-2453
>                 URL: https://issues.apache.org/jira/browse/UIMA-2453
>             Project: UIMA
>          Issue Type: Bug
>          Components: Core Java Framework
>         Environment: Java 7
>            Reporter: Burn Lewis
>            Assignee: Burn Lewis
>            Priority: Minor
>             Fix For: 2.4.1SDK
>
>
> Problem reported by Alan Sergeant

--
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