Index: lucene/backwards/src/test/org/apache/lucene/store/MockRAMDirectory.java =================================================================== --- lucene/backwards/src/test/org/apache/lucene/store/MockRAMDirectory.java (revision 1040312) +++ lucene/backwards/src/test/org/apache/lucene/store/MockRAMDirectory.java (working copy) @@ -47,6 +47,9 @@ private Set unSyncedFiles; private Set createdFiles; volatile boolean crashed; + + // BACKWARDS-HACK: make the change in branch_3x be compatible with backwards + Map fileMap; // NOTE: we cannot initialize the Map here due to the // order in which our constructor actually does this @@ -54,7 +57,15 @@ // like super is called, then our members are initialized: Map openFiles; + @SuppressWarnings("unchecked") private synchronized void init() { + // BACKWARDS-HACK: make the change in branch_3x be compatible with backwards + try { + fileMap = (Map) RAMDirectory.class.getDeclaredField("fileMap").get(this); + } catch (Exception e) { + throw new RuntimeException("Inavlid backwards hack", e); + } + // end BACKWARDS-HACK if (openFiles == null) openFiles = new HashMap(); if (createdFiles == null)