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

Patch parameter plugin's patch code is OS dependent which fails to patch cross platform files

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • patch-parameter-plugin
    • None
    • JDK 7, windows 7

      The test case in someTest class (https://github.com/jenkinsci/patch-parameter-plugin/commit/02c684a6e9d9fe40548c839ab15d2231306eb239 ) fails on windows. I am trying to use a patch file created on Unix machine on a windows machine. The code uses cloudbees/diff4j/ContextualPatch which internally uses BufferedReader to read files. BufferedReader does OS specific reading operation. So the end of file is causing the problem for the test case to pass when run on windows machine. Kindly see the attached images.

      Here is the link of ContextualPatch implementation https://github.com/cloudbees/diff4j/blob/master/src/main/java/com/cloudbees/diff/ContextualPatch.java

      Thank you for the help.
      H Shah

            Unassigned Unassigned
            hshah Harsh Shah
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: