Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-65798

GitSCMFile::content() use stream directly

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • git-plugin
    • None

      GitSCMFile::content() creates a ByteArrayInputStream with the content of the file requested instead of returning the stream provided by jgit.

      Basically base class SCMFile already has a method contentAsBytes() which would convert the stream into a byte[] if really required.

      So in this case jgit itself might hold the files content already as byte[], GitSCMFile::content creates a new copy and SCMFile::contentAsBytes creates the next instance.

            scddev Dietmar Scheidl
            scddev Dietmar Scheidl
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: