Skip to content

Commit

Permalink
Pass anonymousClassDiffs within lambdas to parentMapper
Browse files Browse the repository at this point in the history
lucene/test-framework/src/java/org/apache/lucene/codecs/uniformsplit/UniformSplitRot13PostingsFormat.java
apache/lucene-solr@f43fe76

protected BlockEncoder getBlockEncoder() {
    return (blockBytes, length) -> {
      byte[] encodedBytes = Rot13CypherTestUtil.encode(blockBytes, Math.toIntExact(length));
      return new BlockEncoder.WritableBytes() {
        @OverRide
        public long size() {
          return encodedBytes.length;
        }

        @OverRide
        public void writeTo(DataOutput dataOutput) throws IOException {
          encoderCalled = true;
          dataOutput.writeBytes(encodedBytes, 0, encodedBytes.length);
        }
      };
    };
  }
  • Loading branch information
tsantalis committed Jan 4, 2025
1 parent 6f954da commit 93b8d9d
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1450,7 +1450,11 @@ else if(streamAPIStatements1.size() > 0 && streamAPIStatements2.size() == 0) {
}
}
boolean isomorphic = isomorphicCompositeStructure(innerNodes1, innerNodes2);
int anonymousMappers = this.anonymousClassDiffs.size();
processLeaves(leaves1, leaves2, new LinkedHashMap<String, String>(), isomorphic);
if(this.anonymousClassDiffs.size() > anonymousMappers && parentMapper != null) {
parentMapper.anonymousClassDiffs.addAll(this.anonymousClassDiffs);
}

processInnerNodes(innerNodes1, innerNodes2, leaves1, leaves2, new LinkedHashMap<String, String>(), containsCallToExtractedMethod(leaves2));

Expand Down

0 comments on commit 93b8d9d

Please sign in to comment.