lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From markrmil...@apache.org
Subject svn commit: r833968 [10/10] - in /lucene/java/branches/flex_1458: ./ contrib/ contrib/analyzers/common/src/java/org/apache/lucene/analysis/ar/ contrib/analyzers/common/src/java/org/apache/lucene/analysis/br/ contrib/analyzers/common/src/java/org/apache...
Date Mon, 09 Nov 2009 04:02:02 GMT
Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/search/function/TestCustomScoreQuery.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/search/function/TestCustomScoreQuery.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/search/function/TestCustomScoreQuery.java
(original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/search/function/TestCustomScoreQuery.java
Mon Nov  9 04:01:50 2009
@@ -77,14 +77,17 @@
       super(q,qValSrc);
     }
     /*(non-Javadoc) @see org.apache.lucene.search.function.CustomScoreQuery#name() */
+    @Override
     public String name() {
       return "customAdd";
     }
     /*(non-Javadoc) @see org.apache.lucene.search.function.CustomScoreQuery#customScore(int,
float, float) */
+    @Override
     public float customScore(int doc, float subQueryScore, float valSrcScore) {
       return subQueryScore + valSrcScore;
     }
     /* (non-Javadoc)@see org.apache.lucene.search.function.CustomScoreQuery#customExplain(int,
org.apache.lucene.search.Explanation, org.apache.lucene.search.Explanation)*/
+    @Override
     public Explanation customExplain(int doc, Explanation subQueryExpl, Explanation valSrcExpl)
{
       float valSrcScore = valSrcExpl==null ? 0 : valSrcExpl.getValue();
       Explanation exp = new Explanation( valSrcScore + subQueryExpl.getValue(), "custom score:
sum of:");
@@ -103,10 +106,12 @@
       super(q,new ValueSourceQuery[]{qValSrc1,qValSrc2});
     }
     /*(non-Javadoc) @see org.apache.lucene.search.function.CustomScoreQuery#name() */
+    @Override
     public String name() {
       return "customMulAdd";
     }
     /*(non-Javadoc) @see org.apache.lucene.search.function.CustomScoreQuery#customScore(int,
float, float) */
+    @Override
     public float customScore(int doc, float subQueryScore, float valSrcScores[]) {
       if (valSrcScores.length == 0) {
         return subQueryScore;
@@ -117,6 +122,7 @@
       return (subQueryScore + valSrcScores[0]) * valSrcScores[1]; // we know there are two
     } 
     /* (non-Javadoc)@see org.apache.lucene.search.function.CustomScoreQuery#customExplain(int,
org.apache.lucene.search.Explanation, org.apache.lucene.search.Explanation)*/
+    @Override
     public Explanation customExplain(int doc, Explanation subQueryExpl, Explanation valSrcExpls[])
{
       if (valSrcExpls.length == 0) {
         return subQueryExpl;

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/search/function/TestDocValues.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/search/function/TestDocValues.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/search/function/TestDocValues.java
(original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/search/function/TestDocValues.java
Mon Nov  9 04:01:50 2009
@@ -99,6 +99,7 @@
      * @see org.apache.lucene.search.function.DocValues#floatVal(int)
      */
     /* @Override */
+    @Override
     public float floatVal(int doc) {
       return innerArray[doc];
     }
@@ -107,6 +108,7 @@
      * @see org.apache.lucene.search.function.DocValues#toString(int)
      */
     /* @Override */
+    @Override
     public String toString(int doc) {
       return Integer.toString(doc);
     }

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/search/payloads/PayloadHelper.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/search/payloads/PayloadHelper.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/search/payloads/PayloadHelper.java
(original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/search/payloads/PayloadHelper.java
Mon Nov  9 04:01:50 2009
@@ -48,6 +48,7 @@
 
 
 
+    @Override
     public TokenStream tokenStream(String fieldName, Reader reader) {
       TokenStream result = new LowerCaseTokenizer(reader);
       result = new PayloadFilter(result, fieldName);
@@ -66,6 +67,7 @@
       payloadAtt = addAttribute(PayloadAttribute.class);
     }
 
+    @Override
     public boolean incrementToken() throws IOException {
       
       if (input.incrementToken()) {

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/search/payloads/TestPayloadNearQuery.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/search/payloads/TestPayloadNearQuery.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/search/payloads/TestPayloadNearQuery.java
(original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/search/payloads/TestPayloadNearQuery.java
Mon Nov  9 04:01:50 2009
@@ -55,6 +55,7 @@
   }
 
   private class PayloadAnalyzer extends Analyzer {
+    @Override
     public TokenStream tokenStream(String fieldName, Reader reader) {
       TokenStream result = new LowerCaseTokenizer(reader);
       result = new PayloadFilter(result, fieldName);
@@ -73,6 +74,7 @@
       payAtt = addAttribute(PayloadAttribute.class);
     }
 
+    @Override
     public boolean incrementToken() throws IOException {
       boolean result = false;
       if (input.incrementToken() == true){
@@ -98,6 +100,7 @@
     return new PayloadNearQuery(clauses, 0, inOrder);
   }
 
+  @Override
   protected void setUp() throws Exception {
     super.setUp();
     RAMDirectory directory = new RAMDirectory();

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/search/payloads/TestPayloadTermQuery.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/search/payloads/TestPayloadTermQuery.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/search/payloads/TestPayloadTermQuery.java
(original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/search/payloads/TestPayloadTermQuery.java
Mon Nov  9 04:01:50 2009
@@ -64,6 +64,7 @@
   private class PayloadAnalyzer extends Analyzer {
 
 
+    @Override
     public TokenStream tokenStream(String fieldName, Reader reader) {
       TokenStream result = new LowerCaseTokenizer(reader);
       result = new PayloadFilter(result, fieldName);
@@ -83,6 +84,7 @@
       payloadAtt = addAttribute(PayloadAttribute.class);
     }
     
+    @Override
     public boolean incrementToken() throws IOException {
       boolean hasNext = input.incrementToken();
       if (hasNext) {
@@ -103,6 +105,7 @@
     }
   }
 
+  @Override
   protected void setUp() throws Exception {
     super.setUp();
     directory = new RAMDirectory();
@@ -279,6 +282,7 @@
   static class BoostingSimilarity extends DefaultSimilarity {
 
     // TODO: Remove warning after API has been finalized
+    @Override
     public float scorePayload(int docId, String fieldName, int start, int end, byte[] payload,
int offset, int length) {
       //we know it is size 4 here, so ignore the offset/length
       return payload[0];
@@ -287,26 +291,32 @@
     //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     //Make everything else 1 so we see the effect of the payload
     //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+    @Override
     public float lengthNorm(String fieldName, int numTerms) {
       return 1;
     }
 
+    @Override
     public float queryNorm(float sumOfSquaredWeights) {
       return 1;
     }
 
+    @Override
     public float sloppyFreq(int distance) {
       return 1;
     }
 
+    @Override
     public float coord(int overlap, int maxOverlap) {
       return 1;
     }
 
+    @Override
     public float idf(int docFreq, int numDocs) {
       return 1;
     }
 
+    @Override
     public float tf(float freq) {
       return freq == 0 ? 0 : 1;
     }

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/search/spans/JustCompileSearchSpans.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/search/spans/JustCompileSearchSpans.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/search/spans/JustCompileSearchSpans.java
(original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/search/spans/JustCompileSearchSpans.java
Mon Nov  9 04:01:50 2009
@@ -37,30 +37,37 @@
 
   static final class JustCompileSpans extends Spans {
 
+    @Override
     public int doc() {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
 
+    @Override
     public int end() {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
 
+    @Override
     public boolean next() throws IOException {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
 
+    @Override
     public boolean skipTo(int target) throws IOException {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
 
+    @Override
     public int start() {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
 
+    @Override
     public Collection getPayload() throws IOException {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
 
+    @Override
     public boolean isPayloadAvailable() {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
@@ -69,14 +76,17 @@
 
   static final class JustCompileSpanQuery extends SpanQuery {
 
+    @Override
     public String getField() {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
 
+    @Override
     public Spans getSpans(IndexReader reader) throws IOException {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
 
+    @Override
     public String toString(String field) {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
@@ -85,30 +95,37 @@
 
   static final class JustCompilePayloadSpans extends Spans {
 
+    @Override
     public Collection getPayload() throws IOException {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
 
+    @Override
     public boolean isPayloadAvailable() {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
 
+    @Override
     public int doc() {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
 
+    @Override
     public int end() {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
 
+    @Override
     public boolean next() throws IOException {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
 
+    @Override
     public boolean skipTo(int target) throws IOException {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
 
+    @Override
     public int start() {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
@@ -122,6 +139,7 @@
       super(spans, weight, similarity, norms);
     }
 
+    @Override
     protected boolean setFreqCurrentDoc() throws IOException {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/search/spans/TestBasics.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/search/spans/TestBasics.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/search/spans/TestBasics.java
(original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/search/spans/TestBasics.java
Mon Nov  9 04:01:50 2009
@@ -51,6 +51,7 @@
 public class TestBasics extends LuceneTestCase {
   private IndexSearcher searcher;
 
+  @Override
   public void setUp() throws Exception {
     super.setUp();
     RAMDirectory directory = new RAMDirectory();

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/search/spans/TestFieldMaskingSpanQuery.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/search/spans/TestFieldMaskingSpanQuery.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/search/spans/TestFieldMaskingSpanQuery.java
(original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/search/spans/TestFieldMaskingSpanQuery.java
Mon Nov  9 04:01:50 2009
@@ -49,6 +49,7 @@
 
   protected IndexSearcher searcher;
   
+  @Override
   public void setUp() throws Exception {
     super.setUp();
     RAMDirectory directory = new RAMDirectory();
@@ -114,6 +115,7 @@
     searcher = new IndexSearcher(directory, true);
   }
 
+  @Override
   public void tearDown() throws Exception {
     super.tearDown();
     searcher.close();
@@ -140,6 +142,7 @@
     // mask an anon SpanQuery class that rewrites to something else.
     SpanQuery q = new FieldMaskingSpanQuery
       (new SpanTermQuery(new Term("last", "sally")) {
+          @Override
           public Query rewrite(IndexReader reader) {
             return new SpanOrQuery(new SpanQuery[] {
               new SpanTermQuery(new Term("first", "sally")),

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/search/spans/TestNearSpansOrdered.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/search/spans/TestNearSpansOrdered.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/search/spans/TestNearSpansOrdered.java
(original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/search/spans/TestNearSpansOrdered.java
Mon Nov  9 04:01:50 2009
@@ -39,11 +39,13 @@
   public static final QueryParser qp =
     new QueryParser(Version.LUCENE_CURRENT, FIELD, new WhitespaceAnalyzer());
 
+  @Override
   public void tearDown() throws Exception {
     super.tearDown();
     searcher.close();
   }
   
+  @Override
   public void setUp() throws Exception {
     super.setUp();
     RAMDirectory directory = new RAMDirectory();

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/search/spans/TestPayloadSpans.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/search/spans/TestPayloadSpans.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/search/spans/TestPayloadSpans.java
(original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/search/spans/TestPayloadSpans.java
Mon Nov  9 04:01:50 2009
@@ -59,6 +59,7 @@
     super(s);
   }
 
+  @Override
   protected void setUp() throws Exception {
     super.setUp();
     PayloadHelper helper = new PayloadHelper();
@@ -472,6 +473,7 @@
 
   class PayloadAnalyzer extends Analyzer {
 
+    @Override
     public TokenStream tokenStream(String fieldName, Reader reader) {
       TokenStream result = new LowerCaseTokenizer(reader);
       result = new PayloadFilter(result, fieldName);
@@ -502,6 +504,7 @@
       payloadAtt = addAttribute(PayloadAttribute.class);
     }
 
+    @Override
     public boolean incrementToken() throws IOException {
       if (input.incrementToken()) {
         String token = new String(termAtt.termBuffer(), 0, termAtt.termLength());
@@ -522,6 +525,7 @@
   
   public class TestPayloadAnalyzer extends Analyzer {
 
+    @Override
     public TokenStream tokenStream(String fieldName, Reader reader) {
       TokenStream result = new LowerCaseTokenizer(reader);
       result = new PayloadFilter(result, fieldName);

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/search/spans/TestSpanExplanationsOfNonMatches.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/search/spans/TestSpanExplanationsOfNonMatches.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/search/spans/TestSpanExplanationsOfNonMatches.java
(original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/search/spans/TestSpanExplanationsOfNonMatches.java
Mon Nov  9 04:01:50 2009
@@ -33,6 +33,7 @@
    *
    * @see CheckHits#checkNoMatchExplanations
    */
+  @Override
   public void qtest(Query q, int[] expDocNrs) throws Exception {
     CheckHits.checkNoMatchExplanations(q, FIELD, searcher, expDocNrs);
   }

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/search/spans/TestSpans.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/search/spans/TestSpans.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/search/spans/TestSpans.java
(original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/search/spans/TestSpans.java
Mon Nov  9 04:01:50 2009
@@ -46,6 +46,7 @@
 
   public static final String field = "field";
 
+  @Override
   public void setUp() throws Exception {
     super.setUp();
     RAMDirectory directory = new RAMDirectory();
@@ -393,6 +394,7 @@
     int slop = 1;
 
     final Similarity sim = new DefaultSimilarity() {
+      @Override
       public float sloppyFreq(int distance) {
         return 0.0f;
       }
@@ -404,6 +406,7 @@
                                 makeSpanTermQuery("t2") },
                               slop,
                               ordered) {
+      @Override
       public Similarity getSimilarity(Searcher s) {
         return sim;
       }

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/search/spans/TestSpansAdvanced.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/search/spans/TestSpansAdvanced.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/search/spans/TestSpansAdvanced.java
(original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/search/spans/TestSpansAdvanced.java
Mon Nov  9 04:01:50 2009
@@ -49,6 +49,7 @@
     /**
      * Initializes the tests by adding 4 identical documents to the index.
      */
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
         super.setUp();
@@ -64,6 +65,7 @@
         searcher = new IndexSearcher(mDirectory, true);
     }
 
+    @Override
     protected void tearDown() throws Exception {
         super.tearDown();
         searcher.close();

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/search/spans/TestSpansAdvanced2.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/search/spans/TestSpansAdvanced2.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/search/spans/TestSpansAdvanced2.java
(original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/search/spans/TestSpansAdvanced2.java
Mon Nov  9 04:01:50 2009
@@ -35,6 +35,7 @@
     /**
      * Initializes the tests by adding documents to the index.
      */
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
 
@@ -99,6 +100,7 @@
      *
      * @throws IOException
      */
+    @Override
     public void testBooleanQueryWithSpanQueries() throws IOException {
 
         doTestBooleanQueryWithSpanQueries(searcher2, 0.73500174f);

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/store/MockRAMDirectory.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/store/MockRAMDirectory.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/store/MockRAMDirectory.java
(original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/store/MockRAMDirectory.java
Mon Nov  9 04:01:50 2009
@@ -77,6 +77,7 @@
     preventDoubleWrite = value;
   }
 
+  @Override
   public synchronized void sync(String name) throws IOException {
     maybeThrowDeterministicException();
     if (crashed)
@@ -170,6 +171,7 @@
     }
   }
 
+  @Override
   public synchronized void deleteFile(String name) throws IOException {
     deleteFile(name, false);
   }
@@ -191,6 +193,7 @@
     super.deleteFile(name);
   }
 
+  @Override
   public synchronized IndexOutput createOutput(String name) throws IOException {
     if (crashed)
       throw new IOException("cannot createOutput after crash");
@@ -231,6 +234,7 @@
     }
   }
 
+  @Override
   public synchronized IndexInput openInput(String name) throws IOException {
     RAMFile file = fileMap.get(name);
     if (file == null)
@@ -264,6 +268,7 @@
     return size;
   }
 
+  @Override
   public synchronized void close() {
     if (openFiles == null) {
       openFiles = new HashMap();

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/store/MockRAMInputStream.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/store/MockRAMInputStream.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/store/MockRAMInputStream.java
(original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/store/MockRAMInputStream.java
Mon Nov  9 04:01:50 2009
@@ -37,6 +37,7 @@
     this.dir = dir;
   }
 
+  @Override
   public void close() {
     super.close();
     // Pending resolution on LUCENE-686 we may want to
@@ -50,6 +51,7 @@
     }
   }
 
+  @Override
   public Object clone() {
     MockRAMInputStream clone = (MockRAMInputStream) super.clone();
     clone.isClone = true;

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/store/MockRAMOutputStream.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/store/MockRAMOutputStream.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/store/MockRAMOutputStream.java
(original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/store/MockRAMOutputStream.java
Mon Nov  9 04:01:50 2009
@@ -40,6 +40,7 @@
     this.name = name;
   }
 
+  @Override
   public void close() throws IOException {
     super.close();
 
@@ -51,16 +52,19 @@
     }
   }
 
+  @Override
   public void flush() throws IOException {
     dir.maybeThrowDeterministicException();
     super.flush();
   }
 
+  @Override
   public void writeByte(byte b) throws IOException {
     singleByte[0] = b;
     writeBytes(singleByte, 0, 1);
   }
   
+  @Override
   public void writeBytes(byte[] b, int offset, int len) throws IOException {
     long freeSpace = dir.maxSize - dir.sizeInBytes();
     long realUsage = 0;

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/store/TestBufferedIndexInput.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/store/TestBufferedIndexInput.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/store/TestBufferedIndexInput.java
(original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/store/TestBufferedIndexInput.java
Mon Nov  9 04:01:50 2009
@@ -176,31 +176,31 @@
    // reads up to the EOF will succeed. The EOF is determined by the
    // BufferedIndexInput's arbitrary length() value.
    public void testEOF() throws Exception {
-	   MyBufferedIndexInput input = new MyBufferedIndexInput(1024);
-	   // see that we can read all the bytes at one go:
-	   checkReadBytes(input, (int)input.length(), 0);  
-	   // go back and see that we can't read more than that, for small and
-	   // large overflows:
-	   int pos = (int)input.length()-10;
-	   input.seek(pos);
-	   checkReadBytes(input, 10, pos);  
-	   input.seek(pos);
-	   try {
-		   checkReadBytes(input, 11, pos);
+     MyBufferedIndexInput input = new MyBufferedIndexInput(1024);
+     // see that we can read all the bytes at one go:
+     checkReadBytes(input, (int)input.length(), 0);  
+     // go back and see that we can't read more than that, for small and
+     // large overflows:
+     int pos = (int)input.length()-10;
+     input.seek(pos);
+     checkReadBytes(input, 10, pos);  
+     input.seek(pos);
+     try {
+       checkReadBytes(input, 11, pos);
            fail("Block read past end of file");
        } catch (IOException e) {
            /* success */
        }
-	   input.seek(pos);
-	   try {
-		   checkReadBytes(input, 50, pos);
+     input.seek(pos);
+     try {
+       checkReadBytes(input, 50, pos);
            fail("Block read past end of file");
        } catch (IOException e) {
            /* success */
        }
-	   input.seek(pos);
-	   try {
-		   checkReadBytes(input, 100000, pos);
+     input.seek(pos);
+     try {
+       checkReadBytes(input, 100000, pos);
            fail("Block read past end of file");
        } catch (IOException e) {
            /* success */
@@ -210,34 +210,38 @@
     // byten emulates a file - byten(n) returns the n'th byte in that file.
     // MyBufferedIndexInput reads this "file".
     private static byte byten(long n){
-    	return (byte)(n*n%256);
+      return (byte)(n*n%256);
     }
     private static class MyBufferedIndexInput extends BufferedIndexInput {
-    	private long pos;
-    	private long len;
-    	public MyBufferedIndexInput(long len){
-    		this.len = len;
-    		this.pos = 0;
-    	}
-    	public MyBufferedIndexInput(){
-    		// an infinite file
-    		this(Long.MAX_VALUE);
-    	}
-		protected void readInternal(byte[] b, int offset, int length) throws IOException {
-			for(int i=offset; i<offset+length; i++)
-				b[i] = byten(pos++);
-		}
-
-		protected void seekInternal(long pos) throws IOException {
-			this.pos = pos;
-		}
-
-		public void close() throws IOException {
-		}
-
-		public long length() {
-			return len;
-		}
+      private long pos;
+      private long len;
+      public MyBufferedIndexInput(long len){
+        this.len = len;
+        this.pos = 0;
+      }
+      public MyBufferedIndexInput(){
+        // an infinite file
+        this(Long.MAX_VALUE);
+      }
+    @Override
+    protected void readInternal(byte[] b, int offset, int length) throws IOException {
+      for(int i=offset; i<offset+length; i++)
+        b[i] = byten(pos++);
+    }
+
+    @Override
+    protected void seekInternal(long pos) throws IOException {
+      this.pos = pos;
+    }
+
+    @Override
+    public void close() throws IOException {
+    }
+
+    @Override
+    public long length() {
+      return len;
+    }
     }
 
     public void testSetBufferSize() throws IOException {
@@ -300,6 +304,7 @@
         dir = new SimpleFSDirectory(path, null);
       }
 
+      @Override
       public IndexInput openInput(String name) throws IOException {
         return openInput(name, BufferedIndexInput.BUFFER_SIZE);
       }
@@ -316,6 +321,7 @@
         //System.out.println("tweak'd " + count + " buffer sizes");
       }
       
+      @Override
       public IndexInput openInput(String name, int bufferSize) throws IOException {
         // Make random changes to buffer size
         bufferSize = 1+(int) Math.abs(rand.nextInt() % 10);
@@ -324,40 +330,48 @@
         return f;
       }
 
+      @Override
       public IndexOutput createOutput(String name) throws IOException {
         return dir.createOutput(name);
       }
 
+      @Override
       public void close() throws IOException {
         dir.close();
       }
 
+      @Override
       public void deleteFile(String name)
         throws IOException
       {
         dir.deleteFile(name);
       }
+      @Override
       public void touchFile(String name)
         throws IOException
       {
         dir.touchFile(name);
       }
+      @Override
       public long fileModified(String name)
         throws IOException
       {
         return dir.fileModified(name);
       }
+      @Override
       public boolean fileExists(String name)
         throws IOException
       {
         return dir.fileExists(name);
       }
+      @Override
       public String[] listAll()
         throws IOException
       {
         return dir.listAll();
       }
 
+      @Override
       public long fileLength(String name) throws IOException {
         return dir.fileLength(name);
       }

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/store/TestHugeRamFile.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/store/TestHugeRamFile.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/store/TestHugeRamFile.java (original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/store/TestHugeRamFile.java Mon
Nov  9 04:01:50 2009
@@ -32,6 +32,7 @@
   private static class DenseRAMFile extends RAMFile {
     private long capacity = 0;
     private HashMap singleBuffers = new HashMap();
+    @Override
     byte[] newBuffer(int size) {
       capacity += size;
       if (capacity <= MAX_VALUE) {

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/store/TestLock.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/store/TestLock.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/store/TestLock.java (original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/store/TestLock.java Mon Nov
 9 04:01:50 2009
@@ -38,13 +38,16 @@
     private class LockMock extends Lock {
         public int lockAttempts;
 
+        @Override
         public boolean obtain() {
             lockAttempts++;
             return false;
         }
+        @Override
         public void release() {
             // do nothing
         }
+        @Override
         public boolean isLocked() {
             return false;
         }

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/store/TestLockFactory.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/store/TestLockFactory.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/store/TestLockFactory.java (original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/store/TestLockFactory.java Mon
Nov  9 04:01:50 2009
@@ -242,6 +242,7 @@
             this.numIteration = numIteration;
             this.dir = dir;
         }
+        @Override
         public void run() {
             WhitespaceAnalyzer analyzer = new WhitespaceAnalyzer();
             IndexWriter writer = null;
@@ -299,6 +300,7 @@
             this.numIteration = numIteration;
             this.dir = dir;
         }
+        @Override
         public void run() {
             IndexSearcher searcher = null;
             Query query = new TermQuery(new Term("content", "aaa"));
@@ -342,11 +344,13 @@
         public Map locksCreated = Collections.synchronizedMap(new HashMap());
         public int makeLockCount = 0;
 
+        @Override
         public void setLockPrefix(String lockPrefix) {    
             super.setLockPrefix(lockPrefix);
             lockPrefixSet = true;
         }
 
+        @Override
         synchronized public Lock makeLock(String lockName) {
             Lock lock = new MockLock();
             locksCreated.put(lockName, lock);
@@ -354,18 +358,22 @@
             return lock;
         }
 
+        @Override
         public void clearLock(String specificLockName) {}
 
         public class MockLock extends Lock {
             public int lockAttempts;
 
+            @Override
             public boolean obtain() {
                 lockAttempts++;
                 return true;
             }
+            @Override
             public void release() {
                 // do nothing
             }
+            @Override
             public boolean isLocked() {
                 return false;
             }

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/store/TestRAMDirectory.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/store/TestRAMDirectory.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/store/TestRAMDirectory.java
(original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/store/TestRAMDirectory.java
Mon Nov  9 04:01:50 2009
@@ -46,6 +46,7 @@
   private final int docsToAdd = 500;
   
   // setup the index
+  @Override
   public void setUp () throws Exception {
     super.setUp();
     String tempDir = System.getProperty("java.io.tmpdir");
@@ -114,6 +115,7 @@
     for (int i=0; i<numThreads; i++) {
       final int num = i;
       threads[i] = new Thread(){
+        @Override
         public void run() {
           for (int j=1; j<docsPerThread; j++) {
             Document doc = new Document();
@@ -153,6 +155,7 @@
     assertTrue("contains more then just header", headerSize < bos.size());
   } 
 
+  @Override
   public void tearDown() throws Exception {
     super.tearDown();
     // cleanup 

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/store/TestWindowsMMap.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/store/TestWindowsMMap.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/store/TestWindowsMMap.java (original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/store/TestWindowsMMap.java Mon
Nov  9 04:01:50 2009
@@ -30,60 +30,61 @@
 import org.apache.lucene.search.IndexSearcher;
 
 public class TestWindowsMMap extends LuceneTestCase {
-	
-	private final static String alphabet = "abcdefghijklmnopqrstuvwzyz";
-	private Random random;
-	
-	public void setUp() throws Exception {
-		super.setUp();
-		random = newRandom();
-	}
-	
-	private String randomToken() {
-		int tl = 1 + random.nextInt(7);
-		StringBuilder sb = new StringBuilder();
-		for(int cx = 0; cx < tl; cx ++) {
-			int c = random.nextInt(25);
-			sb.append(alphabet.substring(c, c+1));
-		}
-		return sb.toString();
-	}
-	
-	private String randomField() {
-		int fl = 1 + random.nextInt(3);
-		StringBuilder fb = new StringBuilder();
-		for(int fx = 0; fx < fl; fx ++) {
-			fb.append(randomToken());
-			fb.append(" ");
-		}
-		return fb.toString();
-	}
-	
-	private final static String storePathname = 
+  
+  private final static String alphabet = "abcdefghijklmnopqrstuvwzyz";
+  private Random random;
+  
+  @Override
+  public void setUp() throws Exception {
+    super.setUp();
+    random = newRandom();
+  }
+  
+  private String randomToken() {
+    int tl = 1 + random.nextInt(7);
+    StringBuilder sb = new StringBuilder();
+    for(int cx = 0; cx < tl; cx ++) {
+      int c = random.nextInt(25);
+      sb.append(alphabet.substring(c, c+1));
+    }
+    return sb.toString();
+  }
+  
+  private String randomField() {
+    int fl = 1 + random.nextInt(3);
+    StringBuilder fb = new StringBuilder();
+    for(int fx = 0; fx < fl; fx ++) {
+      fb.append(randomToken());
+      fb.append(" ");
+    }
+    return fb.toString();
+  }
+  
+  private final static String storePathname = 
     new File(System.getProperty("tempDir"),"testLuceneMmap").getAbsolutePath();
 
-	public void testMmapIndex() throws Exception {
-		FSDirectory storeDirectory;
-		storeDirectory = new MMapDirectory(new File(storePathname), null);
+  public void testMmapIndex() throws Exception {
+    FSDirectory storeDirectory;
+    storeDirectory = new MMapDirectory(new File(storePathname), null);
 
-		// plan to add a set of useful stopwords, consider changing some of the
-		// interior filters.
-		StandardAnalyzer analyzer = new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT,
Collections.emptySet());
-		// TODO: something about lock timeouts and leftover locks.
-		IndexWriter writer = new IndexWriter(storeDirectory, analyzer, true, IndexWriter.MaxFieldLength.LIMITED);
-		IndexSearcher searcher = new IndexSearcher(storeDirectory, true);
-		
-		for(int dx = 0; dx < 1000; dx ++) {
-			String f = randomField();
-			Document doc = new Document();
-			doc.add(new Field("data", f, Field.Store.YES, Field.Index.ANALYZED));	
-			writer.addDocument(doc);
-		}
-		
-		searcher.close();
-		writer.close();
+    // plan to add a set of useful stopwords, consider changing some of the
+    // interior filters.
+    StandardAnalyzer analyzer = new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT,
Collections.emptySet());
+    // TODO: something about lock timeouts and leftover locks.
+    IndexWriter writer = new IndexWriter(storeDirectory, analyzer, true, IndexWriter.MaxFieldLength.LIMITED);
+    IndexSearcher searcher = new IndexSearcher(storeDirectory, true);
+    
+    for(int dx = 0; dx < 1000; dx ++) {
+      String f = randomField();
+      Document doc = new Document();
+      doc.add(new Field("data", f, Field.Store.YES, Field.Index.ANALYZED));	
+      writer.addDocument(doc);
+    }
+    
+    searcher.close();
+    writer.close();
                 rmDir(new File(storePathname));
-	}
+  }
 
         private void rmDir(File dir) {
           File[] files = dir.listFiles();

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/util/LuceneTestCase.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/util/LuceneTestCase.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/util/LuceneTestCase.java (original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/util/LuceneTestCase.java Mon
Nov  9 04:01:50 2009
@@ -58,6 +58,7 @@
     super(name);
   }
 
+  @Override
   protected void setUp() throws Exception {
     super.setUp();
     ConcurrentMergeScheduler.setTestMode();
@@ -81,6 +82,7 @@
     return getClass().getName() + "." + getName();
   }
 
+  @Override
   protected void tearDown() throws Exception {
     try {
       // this isn't as useful as calling directly from the scope where the 

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/util/TestCloseableThreadLocal.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/util/TestCloseableThreadLocal.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/util/TestCloseableThreadLocal.java
(original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/util/TestCloseableThreadLocal.java
Mon Nov  9 04:01:50 2009
@@ -43,6 +43,7 @@
   }
 
   public class InitValueThreadLocal extends CloseableThreadLocal {
+    @Override
     protected Object initialValue() {
       return TEST_VALUE;
     } 

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/util/TestFieldCacheSanityChecker.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/util/TestFieldCacheSanityChecker.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/util/TestFieldCacheSanityChecker.java
(original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/util/TestFieldCacheSanityChecker.java
Mon Nov  9 04:01:50 2009
@@ -38,6 +38,7 @@
 
   private static final int NUM_DOCS = 1000;
 
+  @Override
   protected void setUp() throws Exception {
     super.setUp();
 
@@ -76,6 +77,7 @@
     readerX = new MultiReader(new IndexReader[] { readerA, readerB });
   }
 
+  @Override
   public void tearDown() throws Exception {
     super.tearDown();
     readerA.close();

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/util/TestPriorityQueue.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/util/TestPriorityQueue.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/util/TestPriorityQueue.java
(original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/util/TestPriorityQueue.java
Mon Nov  9 04:01:50 2009
@@ -30,6 +30,7 @@
             initialize(count);
         }
 
+        @Override
         protected boolean lessThan(Integer a, Integer b) {
             return (a < b);
         }

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/util/TestStringIntern.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/util/TestStringIntern.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/util/TestStringIntern.java (original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/util/TestStringIntern.java Mon
Nov  9 04:01:50 2009
@@ -57,6 +57,7 @@
     for (int i=0; i<nThreads; i++) {
       final int seed = i;
       threads[i] = new Thread() {
+        @Override
         public void run() {
           Random rand = new Random(seed);
           String[] myInterned = new String[testStrings.length];



Mime
View raw message