Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #4383 - avoid NPE from MultiPart Cleanup #4388

Closed
wants to merge 9 commits into from

Commits on Dec 3, 2019

  1. Issue #4383 - avoid NPE from MultiPart Cleanup

    Always assign _parts when constructed so it is never null.
    
    Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
    lachlan-roberts committed Dec 3, 2019
    1
    Copy the full SHA
    269e885 View commit details
    Browse the repository at this point in the history

Commits on Dec 4, 2019

  1. Issue #4383 - declare some MultiPartFormInputStream fields as final

    Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
    lachlan-roberts committed Dec 4, 2019
    Copy the full SHA
    bb931e4 View commit details
    Browse the repository at this point in the history
  2. Issue #4383 - mark other MultiPartFormInputStream fields as volatile

    Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
    lachlan-roberts committed Dec 4, 2019
    Copy the full SHA
    979f88f View commit details
    Browse the repository at this point in the history

Commits on Dec 10, 2019

  1. Issue #4383 - synchronize on getParts() and getPart() methods

    This will stop two threads from parsing at the same time.
    
    Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
    lachlan-roberts committed Dec 10, 2019
    Copy the full SHA
    6888e17 View commit details
    Browse the repository at this point in the history
  2. avoid creating BufferedInputStream if ServletInputStream isFinished

    Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
    lachlan-roberts committed Dec 10, 2019
    Copy the full SHA
    ad88b23 View commit details
    Browse the repository at this point in the history
  3. synchronize on deprecated method getParsedParts() as well

    Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
    lachlan-roberts committed Dec 10, 2019
    Copy the full SHA
    1e63c83 View commit details
    Browse the repository at this point in the history
  4. delay creation of handler until the MultiPartParser is created

    Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
    lachlan-roberts committed Dec 10, 2019
    Copy the full SHA
    9fdd454 View commit details
    Browse the repository at this point in the history

Commits on Dec 16, 2019

  1. Issue #4383 - use atomic state for multipart cleanup

    - Removed synchronization for parsing by two threads.
    
    - Introduced an atomic state to decide when it is safe to remove
    the parts. The call to deleteParts will now cancel the parsing and
    only delete the parts when the parser exits.
    
    Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
    lachlan-roberts committed Dec 16, 2019
    Copy the full SHA
    6d15071 View commit details
    Browse the repository at this point in the history

Commits on Dec 18, 2019

  1. parsing thread must call deleteParts if parsing when first deletePart…

    …s called
    
    use synchronized state instead of atomic reference
    
    Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
    lachlan-roberts committed Dec 18, 2019
    Copy the full SHA
    f8be500 View commit details
    Browse the repository at this point in the history