Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 258370 Details for
Bug 483334
Apply patch does not work with non-ascii characters
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
possible fix
jgit_applypatch.txt (text/plain), 1.01 KB, created by
Silenio Quarti
on 2015-11-30 18:50:12 EST
(
hide
)
Description:
possible fix
Filename:
MIME Type:
Creator:
Silenio Quarti
Created:
2015-11-30 18:50:12 EST
Size:
1.01 KB
patch
obsolete
>diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/ApplyCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/ApplyCommand.java >index 6a945e4..cf95879 100644 >--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/ApplyCommand.java >+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/ApplyCommand.java >@@ -196,10 +196,10 @@ private void apply(File f, FileHeader fh) > oldLines.add(rt.getString(i)); > List<String> newLines = new ArrayList<String>(oldLines); > for (HunkHeader hh : fh.getHunks()) { >- StringBuilder hunk = new StringBuilder(); >- for (int j = hh.getStartOffset(); j < hh.getEndOffset(); j++) >- hunk.append((char) hh.getBuffer()[j]); >- RawText hrt = new RawText(hunk.toString().getBytes()); >+ byte[] b = new byte[hh.getEndOffset() - hh.getStartOffset()]; >+ System.arraycopy(hh.getBuffer(), hh.getStartOffset(), b, 0, >+ b.length); >+ RawText hrt = new RawText(b); > List<String> hunkLines = new ArrayList<String>(hrt.size()); > for (int i = 0; i < hrt.size(); i++) > hunkLines.add(hrt.getString(i));
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 483334
: 258370