Sync with latest bnd code for testing purposes
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1354104 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/bundleplugin/src/main/java/aQute/libg/cafs/CAFS.java b/bundleplugin/src/main/java/aQute/libg/cafs/CAFS.java
index db2a175..b97babc 100644
--- a/bundleplugin/src/main/java/aQute/libg/cafs/CAFS.java
+++ b/bundleplugin/src/main/java/aQute/libg/cafs/CAFS.java
@@ -23,8 +23,8 @@
* underlying idea in Git.
*/
public class CAFS implements Closeable, Iterable<SHA1> {
- final static byte[] CAFS = "CAFS".getBytes();
- final static byte[] CAFE = "CAFE".getBytes();
+ final static byte[] CAFS;
+ final static byte[] CAFE;
final static String INDEXFILE = "index.idx";
final static String STOREFILE = "store.cafs";
final static String ALGORITHM = "SHA-1";
@@ -42,6 +42,15 @@
RandomAccessFile store;
FileChannel channel;
+ static {
+ try {
+ CAFS = "CAFS".getBytes("UTF-8");
+ CAFE = "CAFE".getBytes("UTF-8");
+ } catch (Throwable e) {
+ throw new ExceptionInInitializerError(e);
+ }
+ }
+
/**
* Constructor for a Content Addressable File Store
*