Uploaded image for project: 'Tika'
  1. Tika
  2. TIKA-1137

Wasted work in WontBeSerializedError.writeObject()

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.3
    • Fix Version/s: None
    • Component/s: parser
    • Labels:
    • Environment:

      any

      Description

      The problem appears in version 1.3 and in revision 1494353. I
      attached a one-line patch that fixes it.

      In method "WontBeSerializedError.writeObject", the loop over
      "e.getStackTrace()" should break immediately after "found" is set to
      "true". All the iterations after "found" is set to "true" do not
      perform any useful work, at best they just set "found" again to
      "true".

      Method "embedInTempFile" in class "ExternalEmbedderTest" has a similar
      loop (over "embeddedMetadata.getValues(metadataName)"), and this loop
      breaks immediately after "foundExpectedValue" is set to "true", just
      like in the proposed patch.

        Attachments

        1. patch.diff
          0.6 kB
          Adrian Nistor

          Activity

            People

            • Assignee:
              tpalsulich Tyler Palsulich
              Reporter:
              adriannistor Adrian Nistor
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: