Fix UnpackedObjectLoader.getBytes to return a copy
commit4c49ab5a4ec8555681ceabf17142a15bf90c2c24
authorShawn O. Pearce <spearce@spearce.org>
Wed, 1 Oct 2008 01:31:27 +0000 (30 18:31 -0700)
committerRobin Rosenberg <robin.rosenberg@dewire.com>
Fri, 3 Oct 2008 06:22:55 +0000 (3 08:22 +0200)
tree7b1a4979f39c9de841263ff8ccf81661d3211df4
parentbdcef76c5e960fa37e9248c0fe32d1dd5d98747d
Fix UnpackedObjectLoader.getBytes to return a copy

The contract for ObjectLoader.getBytes() says the caller can modify
the returned array.  UnpackedObjectLoader must copy the data and not
return its internal cached byte array.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
org.spearce.jgit/src/org/spearce/jgit/lib/ObjectLoader.java
org.spearce.jgit/src/org/spearce/jgit/lib/PackedObjectLoader.java
org.spearce.jgit/src/org/spearce/jgit/lib/UnpackedObjectLoader.java