camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [2/2] camel git commit: CAMEL-8288: Fixed CS
Date Fri, 06 Feb 2015 06:35:10 GMT
CAMEL-8288: Fixed CS


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/95163ca1
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/95163ca1
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/95163ca1

Branch: refs/heads/master
Commit: 95163ca141ad925673c4294287e4747f271e88ec
Parents: 466b77d
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Fri Feb 6 07:35:07 2015 +0100
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Fri Feb 6 07:35:07 2015 +0100

----------------------------------------------------------------------
 .../java/org/apache/camel/component/lucene/LuceneSearcher.java  | 2 +-
 .../java/org/apache/camel/processor/lucene/support/Hit.java     | 5 +++--
 .../camel/component/lucene/LuceneIndexAndQueryProducerTest.java | 5 ++---
 3 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/95163ca1/components/camel-lucene/src/main/java/org/apache/camel/component/lucene/LuceneSearcher.java
----------------------------------------------------------------------
diff --git a/components/camel-lucene/src/main/java/org/apache/camel/component/lucene/LuceneSearcher.java
b/components/camel-lucene/src/main/java/org/apache/camel/component/lucene/LuceneSearcher.java
index 7a0794a..9bc1a9e 100644
--- a/components/camel-lucene/src/main/java/org/apache/camel/component/lucene/LuceneSearcher.java
+++ b/components/camel-lucene/src/main/java/org/apache/camel/component/lucene/LuceneSearcher.java
@@ -71,7 +71,7 @@ public class LuceneSearcher {
         for (ScoreDoc hit : hits) {
             Document selectedDocument = indexSearcher.doc(hit.doc);
             Hit aHit = new Hit();
-            if(returnLuceneDocs) {
+            if (returnLuceneDocs) {
                 aHit.setDocument(selectedDocument);
             }
             aHit.setHitLocation(hit.doc);

http://git-wip-us.apache.org/repos/asf/camel/blob/95163ca1/components/camel-lucene/src/main/java/org/apache/camel/processor/lucene/support/Hit.java
----------------------------------------------------------------------
diff --git a/components/camel-lucene/src/main/java/org/apache/camel/processor/lucene/support/Hit.java
b/components/camel-lucene/src/main/java/org/apache/camel/processor/lucene/support/Hit.java
index 78a94bd..0b0c050 100644
--- a/components/camel-lucene/src/main/java/org/apache/camel/processor/lucene/support/Hit.java
+++ b/components/camel-lucene/src/main/java/org/apache/camel/processor/lucene/support/Hit.java
@@ -16,16 +16,17 @@
  */
 package org.apache.camel.processor.lucene.support;
 
-import org.apache.lucene.document.Document;
 import java.io.Serializable;
 
+import org.apache.lucene.document.Document;
+
 public class Hit implements Serializable {
     private static final long serialVersionUID = 1L;
 
     private int hitLocation;
     private float score;
     private String data;
-    private Document document;
+    private transient Document document;
 
     public int getHitLocation() {
         return hitLocation;

http://git-wip-us.apache.org/repos/asf/camel/blob/95163ca1/components/camel-lucene/src/test/java/org/apache/camel/component/lucene/LuceneIndexAndQueryProducerTest.java
----------------------------------------------------------------------
diff --git a/components/camel-lucene/src/test/java/org/apache/camel/component/lucene/LuceneIndexAndQueryProducerTest.java
b/components/camel-lucene/src/test/java/org/apache/camel/component/lucene/LuceneIndexAndQueryProducerTest.java
index 033f628..96fe2d5 100644
--- a/components/camel-lucene/src/test/java/org/apache/camel/component/lucene/LuceneIndexAndQueryProducerTest.java
+++ b/components/camel-lucene/src/test/java/org/apache/camel/component/lucene/LuceneIndexAndQueryProducerTest.java
@@ -215,11 +215,10 @@ public class LuceneIndexAndQueryProducerTest extends CamelTestSupport
{
                         Hits hits = exchange.getIn().getBody(Hits.class);
                         try {
                             printResults(hits);
-                        } catch (Exception e){
+                        } catch (Exception e) {
                             LOG.error(e.getMessage());
                             exchange.getOut().setBody(null);
                         }
-
                     }
 
                     private void printResults(Hits hits) throws Exception {
@@ -237,7 +236,7 @@ public class LuceneIndexAndQueryProducerTest extends CamelTestSupport
{
                     @Override
                     public void process(Exchange exchange) throws Exception {
                         Hits hits = exchange.getIn().getBody(Hits.class);
-                        if(hits == null) {
+                        if (hits == null) {
                             HashMap<String, String> map = new HashMap<String, String>();
                             map.put("NO_LUCENE_DOCS_ERROR", "NO LUCENE DOCS FOUND");
                             exchange.getContext().setProperties(map);


Mime
View raw message