-
Bug
-
Resolution: Unresolved
-
Major
-
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
[JENKINS-27169] Patch parameter plugin's patch code is OS dependent which fails to patch cross platform files
Summary | Original: Patch paramter plugin's patch code is OS dependent which fails to patch cross platform files | New: Patch parameter plugin's patch code is OS dependent which fails to patch cross platform files |
Description |
Original:
The test case in someTest class (https://github.com/jenkinsci/patch-parameter-plugin/commit/02c684a6e9d9fe40548c839ab15d2231306eb239 ) fails on windows. 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 |
New:
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 |
Submitted PR: https://github.com/jenkinsci/patch-parameter-plugin/pull/2