You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by no...@apache.org on 2016/08/18 10:48:10 UTC
lucene-solr:master: SOLR-8995: reverting the previous change due to
compile error
Repository: lucene-solr
Updated Branches:
refs/heads/master dd31ff98b -> a98a6c36f
SOLR-8995: reverting the previous change due to compile error
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/a98a6c36
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/a98a6c36
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/a98a6c36
Branch: refs/heads/master
Commit: a98a6c36f808932d250fca96ad3c579fc13c138c
Parents: dd31ff9
Author: Noble Paul <no...@apache.org>
Authored: Thu Aug 18 16:17:53 2016 +0530
Committer: Noble Paul <no...@apache.org>
Committed: Thu Aug 18 16:17:53 2016 +0530
----------------------------------------------------------------------
.../org/apache/solr/update/TransactionLog.java | 19 +++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a98a6c36/solr/core/src/java/org/apache/solr/update/TransactionLog.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/update/TransactionLog.java b/solr/core/src/java/org/apache/solr/update/TransactionLog.java
index 860717f..f7213ed 100644
--- a/solr/core/src/java/org/apache/solr/update/TransactionLog.java
+++ b/solr/core/src/java/org/apache/solr/update/TransactionLog.java
@@ -87,15 +87,18 @@ public class TransactionLog implements Closeable {
int snapshot_numRecords;
// write a BytesRef as a byte array
- JavaBinCodec.ObjectResolver resolver = (o, codec) -> {
- if (o instanceof BytesRef) {
- BytesRef br = (BytesRef)o;
- codec.writeByteArray(br.bytes, br.offset, br.length);
- return null;
+ static final JavaBinCodec.ObjectResolver resolver = new JavaBinCodec.ObjectResolver() {
+ @Override
+ public Object resolve(Object o, JavaBinCodec codec) throws IOException {
+ if (o instanceof BytesRef) {
+ BytesRef br = (BytesRef)o;
+ codec.writeByteArray(br.bytes, br.offset, br.length);
+ return null;
+ }
+ // Fallback: we have no idea how to serialize this. Be noisy to prevent insidious bugs
+ throw new SolrException(SolrException.ErrorCode.SERVER_ERROR,
+ "TransactionLog doesn't know how to serialize " + o.getClass() + "; try implementing ObjectResolver?");
}
- // Fallback: we have no idea how to serialize this. Be noisy to prevent insidious bugs
- throw new SolrException(SolrException.ErrorCode.SERVER_ERROR,
- "TransactionLog doesn't know how to serialize " + o.getClass() + "; try implementing ObjectResolver?");
};
public class LogCodec extends JavaBinCodec {