You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by bu...@apache.org on 2011/03/10 11:12:46 UTC

DO NOT REPLY [Bug 50909] New: [PATCH] fixed bugs in MODCAParser

https://issues.apache.org/bugzilla/show_bug.cgi?id=50909

           Summary: [PATCH] fixed bugs in MODCAParser
           Product: Fop
           Version: all
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: general
        AssignedTo: fop-dev@xmlgraphics.apache.org
        ReportedBy: peter.hancock@gmail.com


Created an attachment (id=26757)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=26757)
PATCH

Under uncertain conditions, an EOFException is thrown by the MODCAParser when
invoking the mark/reset methods of a BufferedInputStream that wraps an input
stream of MODCA data.  This patch provides a parsing solution that does not
rely on mark() and reset().

MODCAParser now correctly serializes structured fields that contain extension
data.

Patch includes unit test.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 50909] [PATCH] fixed bugs in MODCAParser

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50909

--- Comment #1 from Chris Bowditch <bo...@hotmail.com> 2011-04-19 08:30:14 EDT ---
Hi Peter,

I've taken a look at your patch and have some observations:

1. I am wondering why you have moved the class UnparsedStructuredField from a
separate class file to an inner class of MODCAParser. It may be a matter of
personal taste but I think inner classes are really only suitable for small
classes that are not used elsewhere. The Unit text classes reference this inner
class and you've had to include it in the imports statement.
2. Your changes to readNextStructedField remove the checks for CR/LF. I think
these are required in case the AFP Resource being parsed contains any line
data. Are you sure its safe to remove them?

Thanks,

Chris

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 50909] [PATCH] fixed bugs in MODCAParser

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50909

Peter Hancock <pe...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |CLOSED

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 50909] [PATCH] fixed bugs in MODCAParser

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50909

Peter Hancock <pe...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #3 from Peter Hancock <pe...@gmail.com> 2011-05-17 11:12:20 UTC ---
fixed in commit 1104135

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 50909] [PATCH] fixed bugs in MODCAParser

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50909

--- Comment #2 from Peter Hancock <pe...@gmail.com> 2011-04-20 06:13:30 EDT ---
Hi Chris,

1 - I agree that UnparsedStructuredField should probably be a top level class.  

2 - I removed the checks for CR/LF because there was no extra action being
taken during byte stream iteration:
The current iteration logic

while 
    if CR/LF
        continue
    else if CARRIAGE_CONTROL 
        break

is just equivalent to

while 
    if CARRIAGE_CONTROL 
        break


I will ammend and commit the patch shortly.

Thanks for your comments,

Pete

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.