diff --git a/core/src/main/java/org/apache/lucene/queryparser/classic/MapperQueryParser.java b/core/src/main/java/org/apache/lucene/queryparser/classic/MapperQueryParser.java index 1585acde3e9..fe0f640542e 100644 --- a/core/src/main/java/org/apache/lucene/queryparser/classic/MapperQueryParser.java +++ b/core/src/main/java/org/apache/lucene/queryparser/classic/MapperQueryParser.java @@ -55,8 +55,8 @@ import static org.elasticsearch.common.lucene.search.Queries.fixNegativeQueryIfN /** * A query parser that uses the {@link MapperService} in order to build smarter * queries based on the mapping information. - *

- *

Also breaks fields with [type].[name] into a boolean query that must include the type + *

+ * Also breaks fields with [type].[name] into a boolean query that must include the type * as well as the query on the name. */ public class MapperQueryParser extends QueryParser { diff --git a/core/src/main/java/org/apache/lucene/search/XFilteredDocIdSetIterator.java b/core/src/main/java/org/apache/lucene/search/XFilteredDocIdSetIterator.java index 0b3600e5717..92f2f443f0a 100644 --- a/core/src/main/java/org/apache/lucene/search/XFilteredDocIdSetIterator.java +++ b/core/src/main/java/org/apache/lucene/search/XFilteredDocIdSetIterator.java @@ -54,7 +54,7 @@ public abstract class XFilteredDocIdSetIterator extends DocIdSetIterator { * Validation method to determine whether a docid should be in the result set. * @param doc docid to be tested * @return true if input docid should be in the result set, false otherwise. - * @see #FilteredDocIdSetIterator(DocIdSetIterator) + * @see #XFilteredDocIdSetIterator(DocIdSetIterator) * @throws CollectionTerminatedException if the underlying iterator is exhausted. */ protected abstract boolean match(int doc); diff --git a/core/src/main/java/org/apache/lucene/search/suggest/analyzing/XAnalyzingSuggester.java b/core/src/main/java/org/apache/lucene/search/suggest/analyzing/XAnalyzingSuggester.java index bac323d63c6..5db4f932c67 100644 --- a/core/src/main/java/org/apache/lucene/search/suggest/analyzing/XAnalyzingSuggester.java +++ b/core/src/main/java/org/apache/lucene/search/suggest/analyzing/XAnalyzingSuggester.java @@ -100,7 +100,7 @@ import java.util.*; public class XAnalyzingSuggester extends Lookup { /** - * FST: + * FST<Weight,Surface>: * input is the analyzed form, with a null byte between terms * weights are encoded as costs: (Integer.MAX_VALUE-weight) * surface is the original, unanalyzed form. @@ -129,14 +129,14 @@ public class XAnalyzingSuggester extends Lookup { */ private final boolean preserveSep; - /** Include this flag in the options parameter to {@link + /** Include this flag in the options parameter to {@code * #XAnalyzingSuggester(Analyzer,Analyzer,int,int,int,boolean,FST,boolean,int,int,int,int,int)} to always * return the exact match first, regardless of score. This * has no performance impact but could result in * low-quality suggestions. */ public static final int EXACT_FIRST = 1; - /** Include this flag in the options parameter to {@link + /** Include this flag in the options parameter to {@code * #XAnalyzingSuggester(Analyzer,Analyzer,int,int,int,boolean,FST,boolean,int,int,int,int,int)} to preserve * token separators when matching. */ public static final int PRESERVE_SEP = 2; @@ -183,7 +183,7 @@ public class XAnalyzingSuggester extends Lookup { private long count = 0; /** - * Calls {@link #XAnalyzingSuggester(Analyzer,Analyzer,int,int,int,boolean,FST,boolean,int,int,int,int,int) + * Calls {@code #XAnalyzingSuggester(Analyzer,Analyzer,int,int,int,boolean,FST,boolean,int,int,int,int,int) * AnalyzingSuggester(analyzer, analyzer, EXACT_FIRST | * PRESERVE_SEP, 256, -1)} */ @@ -192,7 +192,7 @@ public class XAnalyzingSuggester extends Lookup { } /** - * Calls {@link #XAnalyzingSuggester(Analyzer,Analyzer,int,int,int,boolean,FST,boolean,int,int,int,int,int) + * Calls {@code #XAnalyzingSuggester(Analyzer,Analyzer,int,int,int,boolean,FST,boolean,int,int,int,int,int) * AnalyzingSuggester(indexAnalyzer, queryAnalyzer, EXACT_FIRST | * PRESERVE_SEP, 256, -1)} */ @@ -986,12 +986,12 @@ public long ramBytesUsed() { throw new UnsupportedOperationException(); } - /** cost -> weight */ + /** cost -> weight */ public static int decodeWeight(long encoded) { return (int)(Integer.MAX_VALUE - encoded); } - /** weight -> cost */ + /** weight -> cost */ public static int encodeWeight(long value) { if (value < 0 || value > Integer.MAX_VALUE) { throw new UnsupportedOperationException("cannot encode value: " + value); diff --git a/core/src/main/java/org/apache/lucene/search/suggest/analyzing/XFuzzySuggester.java b/core/src/main/java/org/apache/lucene/search/suggest/analyzing/XFuzzySuggester.java index 20f95c646fc..a4338f8a65a 100644 --- a/core/src/main/java/org/apache/lucene/search/suggest/analyzing/XFuzzySuggester.java +++ b/core/src/main/java/org/apache/lucene/search/suggest/analyzing/XFuzzySuggester.java @@ -115,7 +115,7 @@ public final class XFuzzySuggester extends XAnalyzingSuggester { } /** - * Creates a {@link FuzzySuggester} instance with an index & a query analyzer initialized with default values. + * Creates a {@link FuzzySuggester} instance with an index & a query analyzer initialized with default values. * * @param indexAnalyzer * Analyzer that will be used for analyzing suggestions while building the index. @@ -143,7 +143,7 @@ public final class XFuzzySuggester extends XAnalyzingSuggester { * @param maxGraphExpansions Maximum number of graph paths * to expand from the analyzed form. Set this to -1 for * no limit. - * @param maxEdits must be >= 0 and <= {@link org.apache.lucene.util.automaton.LevenshteinAutomata#MAXIMUM_SUPPORTED_DISTANCE} . + * @param maxEdits must be >= 0 and <= {@link org.apache.lucene.util.automaton.LevenshteinAutomata#MAXIMUM_SUPPORTED_DISTANCE} . * @param transpositions true if transpositions should be treated as a primitive * edit operation. If this is false, comparisons will implement the classic * Levenshtein algorithm. diff --git a/core/src/main/java/org/elasticsearch/ElasticsearchException.java b/core/src/main/java/org/elasticsearch/ElasticsearchException.java index 29e45654dd3..c95b907098e 100644 --- a/core/src/main/java/org/elasticsearch/ElasticsearchException.java +++ b/core/src/main/java/org/elasticsearch/ElasticsearchException.java @@ -55,7 +55,7 @@ public class ElasticsearchException extends RuntimeException implements ToXConte /** * Construct a ElasticsearchException with the specified detail message. * - * The message can be parameterized using {@code {}} as placeholders for the given + * The message can be parameterized using {} as placeholders for the given * arguments * * @param msg the detail message @@ -69,7 +69,7 @@ public class ElasticsearchException extends RuntimeException implements ToXConte * Construct a ElasticsearchException with the specified detail message * and nested exception. * - * The message can be parameterized using {@code {}} as placeholders for the given + * The message can be parameterized using {} as placeholders for the given * arguments * * @param msg the detail message diff --git a/core/src/main/java/org/elasticsearch/action/ActionFuture.java b/core/src/main/java/org/elasticsearch/action/ActionFuture.java index f2b1d87ee5e..26a9260b710 100644 --- a/core/src/main/java/org/elasticsearch/action/ActionFuture.java +++ b/core/src/main/java/org/elasticsearch/action/ActionFuture.java @@ -37,8 +37,8 @@ public interface ActionFuture extends Future { * Similar to {@link #get()}, just catching the {@link InterruptedException} and throwing * an {@link IllegalStateException} instead. Also catches * {@link java.util.concurrent.ExecutionException} and throws the actual cause instead. - *

- *

Note, the actual cause is unwrapped to the actual failure (for example, unwrapped + *

+ * Note, the actual cause is unwrapped to the actual failure (for example, unwrapped * from {@link org.elasticsearch.transport.RemoteTransportException}. The root failure is * still accessible using {@link #getRootFailure()}. */ @@ -48,8 +48,8 @@ public interface ActionFuture extends Future { * Similar to {@link #get(long, java.util.concurrent.TimeUnit)}, just catching the {@link InterruptedException} and throwing * an {@link IllegalStateException} instead. Also catches * {@link java.util.concurrent.ExecutionException} and throws the actual cause instead. - *

- *

Note, the actual cause is unwrapped to the actual failure (for example, unwrapped + *

+ * Note, the actual cause is unwrapped to the actual failure (for example, unwrapped * from {@link org.elasticsearch.transport.RemoteTransportException}. The root failure is * still accessible using {@link #getRootFailure()}. */ @@ -59,8 +59,8 @@ public interface ActionFuture extends Future { * Similar to {@link #get(long, java.util.concurrent.TimeUnit)}, just catching the {@link InterruptedException} and throwing * an {@link IllegalStateException} instead. Also catches * {@link java.util.concurrent.ExecutionException} and throws the actual cause instead. - *

- *

Note, the actual cause is unwrapped to the actual failure (for example, unwrapped + *

+ * Note, the actual cause is unwrapped to the actual failure (for example, unwrapped * from {@link org.elasticsearch.transport.RemoteTransportException}. The root failure is * still accessible using {@link #getRootFailure()}. * @@ -72,8 +72,8 @@ public interface ActionFuture extends Future { * Similar to {@link #get(long, java.util.concurrent.TimeUnit)}, just catching the {@link InterruptedException} and throwing * an {@link IllegalStateException} instead. Also catches * {@link java.util.concurrent.ExecutionException} and throws the actual cause instead. - *

- *

Note, the actual cause is unwrapped to the actual failure (for example, unwrapped + *

+ * Note, the actual cause is unwrapped to the actual failure (for example, unwrapped * from {@link org.elasticsearch.transport.RemoteTransportException}. The root failure is * still accessible using {@link #getRootFailure()}. */ @@ -83,8 +83,8 @@ public interface ActionFuture extends Future { * Similar to {@link #get(long, java.util.concurrent.TimeUnit)}, just catching the {@link InterruptedException} and throwing * an {@link IllegalStateException} instead. Also catches * {@link java.util.concurrent.ExecutionException} and throws the actual cause instead. - *

- *

Note, the actual cause is unwrapped to the actual failure (for example, unwrapped + *

+ * Note, the actual cause is unwrapped to the actual failure (for example, unwrapped * from {@link org.elasticsearch.transport.RemoteTransportException}. The root failure is * still accessible using {@link #getRootFailure()}. */ diff --git a/core/src/main/java/org/elasticsearch/action/DocumentRequest.java b/core/src/main/java/org/elasticsearch/action/DocumentRequest.java index b804d7f3858..fcfea39ab54 100644 --- a/core/src/main/java/org/elasticsearch/action/DocumentRequest.java +++ b/core/src/main/java/org/elasticsearch/action/DocumentRequest.java @@ -53,7 +53,6 @@ public interface DocumentRequest extends IndicesRequest { /** * Set the routing for this request - * @param routing * @return the Request */ T routing(String routing); diff --git a/core/src/main/java/org/elasticsearch/action/admin/cluster/health/ClusterHealthRequest.java b/core/src/main/java/org/elasticsearch/action/admin/cluster/health/ClusterHealthRequest.java index 32114f6ff9e..ba1e73311ec 100644 --- a/core/src/main/java/org/elasticsearch/action/admin/cluster/health/ClusterHealthRequest.java +++ b/core/src/main/java/org/elasticsearch/action/admin/cluster/health/ClusterHealthRequest.java @@ -126,7 +126,7 @@ public class ClusterHealthRequest extends MasterNodeReadRequest12" and "<12" for range. + * Waits for N number of nodes. Use "12" for exact mapping, ">12" and "<12" for range. */ public ClusterHealthRequest waitForNodes(String waitForNodes) { this.waitForNodes = waitForNodes; diff --git a/core/src/main/java/org/elasticsearch/action/admin/cluster/health/ClusterHealthRequestBuilder.java b/core/src/main/java/org/elasticsearch/action/admin/cluster/health/ClusterHealthRequestBuilder.java index 71153ae4cb4..f12ab123009 100644 --- a/core/src/main/java/org/elasticsearch/action/admin/cluster/health/ClusterHealthRequestBuilder.java +++ b/core/src/main/java/org/elasticsearch/action/admin/cluster/health/ClusterHealthRequestBuilder.java @@ -74,7 +74,7 @@ public class ClusterHealthRequestBuilder extends MasterNodeReadOperationRequestB } /** - * Waits for N number of nodes. Use "12" for exact mapping, ">12" and "<12" for range. + * Waits for N number of nodes. Use "12" for exact mapping, ">12" and "<12" for range. */ public ClusterHealthRequestBuilder setWaitForNodes(String waitForNodes) { request.waitForNodes(waitForNodes); diff --git a/core/src/main/java/org/elasticsearch/action/admin/cluster/repositories/delete/DeleteRepositoryRequest.java b/core/src/main/java/org/elasticsearch/action/admin/cluster/repositories/delete/DeleteRepositoryRequest.java index bb3b17bb07e..84ca8dcc667 100644 --- a/core/src/main/java/org/elasticsearch/action/admin/cluster/repositories/delete/DeleteRepositoryRequest.java +++ b/core/src/main/java/org/elasticsearch/action/admin/cluster/repositories/delete/DeleteRepositoryRequest.java @@ -30,7 +30,7 @@ import static org.elasticsearch.action.ValidateActions.addValidationError; /** * Unregister repository request. - *

+ *

* The unregister repository command just unregisters the repository. No data is getting deleted from the repository. */ public class DeleteRepositoryRequest extends AcknowledgedRequest { diff --git a/core/src/main/java/org/elasticsearch/action/admin/cluster/repositories/get/GetRepositoriesRequest.java b/core/src/main/java/org/elasticsearch/action/admin/cluster/repositories/get/GetRepositoriesRequest.java index b43dbf3d691..a0e6de916ff 100644 --- a/core/src/main/java/org/elasticsearch/action/admin/cluster/repositories/get/GetRepositoriesRequest.java +++ b/core/src/main/java/org/elasticsearch/action/admin/cluster/repositories/get/GetRepositoriesRequest.java @@ -41,7 +41,7 @@ public class GetRepositoriesRequest extends MasterNodeReadRequest + *

* If the list of repositories is empty or it contains a single element "_all", all registered repositories * are returned. * @@ -71,7 +71,7 @@ public class GetRepositoriesRequest extends MasterNodeReadRequest + *

* If the list of repositories is empty or it contains a single element "_all", all registered repositories * are returned. * diff --git a/core/src/main/java/org/elasticsearch/action/admin/cluster/repositories/put/PutRepositoryRequest.java b/core/src/main/java/org/elasticsearch/action/admin/cluster/repositories/put/PutRepositoryRequest.java index 3d0977fb9dd..efd364a07fd 100644 --- a/core/src/main/java/org/elasticsearch/action/admin/cluster/repositories/put/PutRepositoryRequest.java +++ b/core/src/main/java/org/elasticsearch/action/admin/cluster/repositories/put/PutRepositoryRequest.java @@ -41,7 +41,7 @@ import static org.elasticsearch.common.settings.Settings.writeSettingsToStream; /** * Register repository request. - *

+ *

* Registers a repository with given name, type and settings. If the repository with the same name already * exists in the cluster, the new repository will replace the existing repository. */ @@ -98,7 +98,6 @@ public class PutRepositoryRequest extends AcknowledgedRequest *

diff --git a/core/src/main/java/org/elasticsearch/action/admin/cluster/repositories/verify/VerifyRepositoryRequest.java b/core/src/main/java/org/elasticsearch/action/admin/cluster/repositories/verify/VerifyRepositoryRequest.java index 333057709fc..7166eedb72c 100644 --- a/core/src/main/java/org/elasticsearch/action/admin/cluster/repositories/verify/VerifyRepositoryRequest.java +++ b/core/src/main/java/org/elasticsearch/action/admin/cluster/repositories/verify/VerifyRepositoryRequest.java @@ -30,7 +30,7 @@ import static org.elasticsearch.action.ValidateActions.addValidationError; /** * Unregister repository request. - *

+ *

* The unregister repository command just unregisters the repository. No data is getting deleted from the repository. */ public class VerifyRepositoryRequest extends AcknowledgedRequest { diff --git a/core/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/create/CreateSnapshotRequest.java b/core/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/create/CreateSnapshotRequest.java index 4dbef01a325..41d3f9c3593 100644 --- a/core/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/create/CreateSnapshotRequest.java +++ b/core/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/create/CreateSnapshotRequest.java @@ -49,7 +49,7 @@ import static org.elasticsearch.common.xcontent.support.XContentMapValues.nodeBo /** * Create snapshot request - *

+ *

* The only mandatory parameter is repository name. The repository name has to satisfy the following requirements *

- *

* *

* Rebalancing settings can have the following values (non-casesensitive): @@ -51,7 +50,6 @@ import java.util.Locale; *

  • PRIMARIES - only primary shards are allowed to be balanced *
  • ALL - all shards are allowed to be balanced * - *

    * * @see Rebalance * @see Allocation diff --git a/core/src/main/java/org/elasticsearch/cluster/routing/allocation/decider/FilterAllocationDecider.java b/core/src/main/java/org/elasticsearch/cluster/routing/allocation/decider/FilterAllocationDecider.java index 138a08bdd2d..e0e2caaf04a 100644 --- a/core/src/main/java/org/elasticsearch/cluster/routing/allocation/decider/FilterAllocationDecider.java +++ b/core/src/main/java/org/elasticsearch/cluster/routing/allocation/decider/FilterAllocationDecider.java @@ -51,10 +51,8 @@ import static org.elasticsearch.cluster.node.DiscoveryNodeFilters.OpType.OR; *
      *
    1. required - filters required allocations. * If any required filters are set the allocation is denied if the index is not in the set of required to allocate on the filtered node
    2. - *

      *

    3. include - filters "allowed" allocations. * If any include filters are set the allocation is denied if the index is not in the set of include filters for the filtered node
    4. - *

      *

    5. exclude - filters "prohibited" allocations. * If any exclude filters are set the allocation is denied if the index is in the set of exclude filters for the filtered node
    6. *
    diff --git a/core/src/main/java/org/elasticsearch/cluster/routing/allocation/decider/ThrottlingAllocationDecider.java b/core/src/main/java/org/elasticsearch/cluster/routing/allocation/decider/ThrottlingAllocationDecider.java index 59d6cd101c4..ed6814d83af 100644 --- a/core/src/main/java/org/elasticsearch/cluster/routing/allocation/decider/ThrottlingAllocationDecider.java +++ b/core/src/main/java/org/elasticsearch/cluster/routing/allocation/decider/ThrottlingAllocationDecider.java @@ -31,17 +31,15 @@ import org.elasticsearch.node.settings.NodeSettingsService; * {@link ThrottlingAllocationDecider} controls the recovery process per node in * the cluster. It exposes two settings via the cluster update API that allow * changes in real-time: - *

    *

    - *

    + *

    * If one of the above thresholds is exceeded per node this allocation decider * will return {@link Decision#THROTTLE} as a hit to upstream logic to throttle * the allocation process to prevent overloading nodes due to too many concurrent recovery diff --git a/core/src/main/java/org/elasticsearch/common/Base64.java b/core/src/main/java/org/elasticsearch/common/Base64.java index f14885892e1..390b3708ffc 100644 --- a/core/src/main/java/org/elasticsearch/common/Base64.java +++ b/core/src/main/java/org/elasticsearch/common/Base64.java @@ -24,37 +24,33 @@ import java.util.Locale; /** *

    Encodes and decodes to and from Base64 notation.

    *

    Homepage: http://iharder.net/base64.

    - *

    - *

    Example:

    - *

    + *

    + * Example: + *

    * String encoded = Base64.encode( myByteArray ); - *
    + *
    * byte[] myByteArray = Base64.decode( encoded ); - *

    - *

    The options parameter, which appears in a few places, is used to pass + *

    + * The options parameter, which appears in a few places, is used to pass * several pieces of information to the encoder. In the "higher level" methods such as * encodeBytes( bytes, options ) the options parameter can be used to indicate such * things as first gzipping the bytes before encoding them, not inserting linefeeds, - * and encoding using the URL-safe and Ordered dialects.

    - *

    - *

    Note, according to RFC3548, + * and encoding using the URL-safe and Ordered dialects. + *

    + * Note, according to RFC3548, * Section 2.1, implementations should not add line feeds unless explicitly told * to do so. I've got Base64 set to this behavior now, although earlier versions - * broke lines by default.

    - *

    - *

    The constants defined in Base64 can be OR-ed together to combine options, so you - * might make a call like this:

    - *

    + * broke lines by default. + *

    + * The constants defined in Base64 can be OR-ed together to combine options, so you + * might make a call like this: + *

    * String encoded = Base64.encodeBytes( mybytes, Base64.GZIP | Base64.DO_BREAK_LINES ); - *

    to compress the data before encoding it and then making the output have newline characters.

    - *

    Also...

    + *

    to compress the data before encoding it and then making the output have newline characters. + *

    Also... * String encoded = Base64.encodeBytes( crazyString.getBytes() ); - *

    - *

    - *

    *

    * Change Log: - *

    * - *

    *

    * I am placing this code in the Public Domain. Do with it as you will. * This software comes with no guarantees or warranties but with * plenty of well-wishing instead! * Please visit http://iharder.net/base64 * periodically to check for updates or to contribute improvements. - *

    * * @author Robert Harder * @author rob@iharder.net @@ -669,8 +662,6 @@ public class Base64 { * Example: encodeBytes( myData, Base64.GZIP ) or *

    * Example: encodeBytes( myData, Base64.GZIP | Base64.DO_BREAK_LINES ) - *

    - *

    *

    As of v 2.3, if there is an error with the GZIP stream, * the method will throw an java.io.IOException. This is new to v2.3! * In earlier versions, it just returned a null value, but @@ -692,8 +683,8 @@ public class Base64 { /** * Encodes a byte array into Base64 notation. * Does not GZip-compress data. - *

    - *

    As of v 2.3, if there is an error, + *

    + * As of v 2.3, if there is an error, * the method will throw an java.io.IOException. This is new to v2.3! * In earlier versions, it just returned a null value, but * in retrospect that's a pretty poor way to handle it.

    @@ -733,12 +724,11 @@ public class Base64 { * Example: encodeBytes( myData, Base64.GZIP ) or *

    * Example: encodeBytes( myData, Base64.GZIP | Base64.DO_BREAK_LINES ) - *

    - *

    - *

    As of v 2.3, if there is an error with the GZIP stream, + *

    + * As of v 2.3, if there is an error with the GZIP stream, * the method will throw an java.io.IOException. This is new to v2.3! * In earlier versions, it just returned a null value, but - * in retrospect that's a pretty poor way to handle it.

    + * in retrospect that's a pretty poor way to handle it. * * @param source The data to convert * @param off Offset in array where conversion should begin @@ -1263,13 +1253,13 @@ public class Base64 { /** * Constructs a {@link Base64.InputStream} in * either ENCODE or DECODE mode. - *

    + *

    * Valid options:

              *   ENCODE or DECODE: Encode or Decode as data is read.
              *   DO_BREAK_LINES: break lines at 76 characters
    -         *     (only meaningful when encoding)
    +         *     (only meaningful when encoding)
              * 
    - *

    + *

    * Example: new Base64.InputStream( in, Base64.DECODE ) * * @param in the java.io.InputStream from which to read data. @@ -1470,13 +1460,13 @@ public class Base64 { /** * Constructs a {@link Base64.OutputStream} in * either ENCODE or DECODE mode. - *

    + *

    * Valid options:

              *   ENCODE or DECODE: Encode or Decode as data is read.
              *   DO_BREAK_LINES: don't break lines at 76 characters
    -         *     (only meaningful when encoding)
    +         *     (only meaningful when encoding)
              * 
    - *

    + *

    * Example: new Base64.OutputStream( out, Base64.ENCODE ) * * @param out the java.io.OutputStream to which data will be written. diff --git a/core/src/main/java/org/elasticsearch/common/Booleans.java b/core/src/main/java/org/elasticsearch/common/Booleans.java index 94adaeef654..6b1b9b016a7 100644 --- a/core/src/main/java/org/elasticsearch/common/Booleans.java +++ b/core/src/main/java/org/elasticsearch/common/Booleans.java @@ -80,7 +80,6 @@ public class Booleans { /*** * - * @param value * @return true/false * throws exception if string cannot be parsed to boolean */ diff --git a/core/src/main/java/org/elasticsearch/common/StopWatch.java b/core/src/main/java/org/elasticsearch/common/StopWatch.java index cc18e9332b5..f842dde68c4 100644 --- a/core/src/main/java/org/elasticsearch/common/StopWatch.java +++ b/core/src/main/java/org/elasticsearch/common/StopWatch.java @@ -30,14 +30,14 @@ import java.util.concurrent.TimeUnit; /** * Simple stop watch, allowing for timing of a number of tasks, * exposing total running time and running time for each named task. - *

    - *

    Conceals use of System.nanoTime(), improving the + *

    + * Conceals use of System.nanoTime(), improving the * readability of application code and reducing the likelihood of calculation errors. - *

    - *

    Note that this object is not designed to be thread-safe and does not + *

    + * Note that this object is not designed to be thread-safe and does not * use synchronization. - *

    - *

    This class is normally used to verify performance during proof-of-concepts + *

    + * This class is normally used to verify performance during proof-of-concepts * and in development, rather than as part of production applications. * * diff --git a/core/src/main/java/org/elasticsearch/common/Strings.java b/core/src/main/java/org/elasticsearch/common/Strings.java index 40d9602e2cd..08777696bc5 100644 --- a/core/src/main/java/org/elasticsearch/common/Strings.java +++ b/core/src/main/java/org/elasticsearch/common/Strings.java @@ -64,10 +64,10 @@ public class Strings { /** * Splits a backslash escaped string on the separator. - *

    + *

    * Current backslash escaping supported: *
    \n \t \r \b \f are escaped the same as a Java String - *
    Other characters following a backslash are produced verbatim (\c => c) + *
    Other characters following a backslash are produced verbatim (\c => c) * * @param s the string to split * @param separator the separator to split on @@ -131,7 +131,7 @@ public class Strings { /** * Check that the given CharSequence is neither null nor of length 0. * Note: Will return true for a CharSequence that purely consists of whitespace. - *

    +     * 
          * StringUtils.hasLength(null) = false
          * StringUtils.hasLength("") = false
          * StringUtils.hasLength(" ") = true
    @@ -174,7 +174,7 @@ public class Strings {
         /**
          * Check that the given CharSequence is either null or of length 0.
          * Note: Will return false for a CharSequence that purely consists of whitespace.
    -     * 

    +     * 
          * StringUtils.isEmpty(null) = true
          * StringUtils.isEmpty("") = true
          * StringUtils.isEmpty(" ") = false
    @@ -193,7 +193,7 @@ public class Strings {
          * Check whether the given CharSequence has actual text.
          * More specifically, returns true if the string not null,
          * its length is greater than 0, and it contains at least one non-whitespace character.
    -     * 

    +     * 
          * StringUtils.hasText(null) = false
          * StringUtils.hasText("") = false
          * StringUtils.hasText(" ") = false
    @@ -400,7 +400,7 @@ public class Strings {
          *
          * @param str the input String (e.g. "myString")
          * @return the quoted String (e.g. "'myString'"),
    -     *         or null if the input was null
    +     *         or null if the input was null
          */
         public static String quote(String str) {
             return (str != null ? "'" + str + "'" : null);
    diff --git a/core/src/main/java/org/elasticsearch/common/blobstore/support/AbstractLegacyBlobContainer.java b/core/src/main/java/org/elasticsearch/common/blobstore/support/AbstractLegacyBlobContainer.java
    index 9df7f26ad09..b95a7f28c58 100644
    --- a/core/src/main/java/org/elasticsearch/common/blobstore/support/AbstractLegacyBlobContainer.java
    +++ b/core/src/main/java/org/elasticsearch/common/blobstore/support/AbstractLegacyBlobContainer.java
    @@ -41,7 +41,7 @@ public abstract class AbstractLegacyBlobContainer extends AbstractBlobContainer
     
         /**
          * Creates a new {@link InputStream} for the given blob name
    -     * 

    + *

    * This method is deprecated and is used only for compatibility with older blob containers * The new blob containers should use readBlob/writeBlob methods instead */ @@ -50,7 +50,7 @@ public abstract class AbstractLegacyBlobContainer extends AbstractBlobContainer /** * Creates a new OutputStream for the given blob name - *

    + *

    * This method is deprecated and is used only for compatibility with older blob containers * The new blob containers should override readBlob/writeBlob methods instead */ diff --git a/core/src/main/java/org/elasticsearch/common/blobstore/url/URLBlobStore.java b/core/src/main/java/org/elasticsearch/common/blobstore/url/URLBlobStore.java index f330ce82441..813a12571ec 100644 --- a/core/src/main/java/org/elasticsearch/common/blobstore/url/URLBlobStore.java +++ b/core/src/main/java/org/elasticsearch/common/blobstore/url/URLBlobStore.java @@ -42,7 +42,7 @@ public class URLBlobStore extends AbstractComponent implements BlobStore { /** * Constructs new read-only URL-based blob store - *

    + *

    * The following settings are supported *

    *
    buffer_size
    @@ -98,8 +98,6 @@ public class URLBlobStore extends AbstractComponent implements BlobStore { /** * This operation is not supported by URL Blob Store - * - * @param path */ @Override public void delete(BlobPath path) { @@ -119,7 +117,6 @@ public class URLBlobStore extends AbstractComponent implements BlobStore { * * @param path relative path * @return Base URL + path - * @throws MalformedURLException */ private URL buildPath(BlobPath path) throws MalformedURLException { String[] paths = path.toArray(); diff --git a/core/src/main/java/org/elasticsearch/common/breaker/ChildMemoryCircuitBreaker.java b/core/src/main/java/org/elasticsearch/common/breaker/ChildMemoryCircuitBreaker.java index d87c31629d5..9284b7b50a2 100644 --- a/core/src/main/java/org/elasticsearch/common/breaker/ChildMemoryCircuitBreaker.java +++ b/core/src/main/java/org/elasticsearch/common/breaker/ChildMemoryCircuitBreaker.java @@ -102,10 +102,9 @@ public class ChildMemoryCircuitBreaker implements CircuitBreaker { * Add a number of bytes, tripping the circuit breaker if the aggregated * estimates are above the limit. Automatically trips the breaker if the * memory limit is set to 0. Will never trip the breaker if the limit is - * set < 0, but can still be used to aggregate estimations. + * set < 0, but can still be used to aggregate estimations. * @param bytes number of bytes to add to the breaker * @return number of "used" bytes so far - * @throws CircuitBreakingException */ @Override public double addEstimateBytesAndMaybeBreak(long bytes, String label) throws CircuitBreakingException { diff --git a/core/src/main/java/org/elasticsearch/common/breaker/CircuitBreaker.java b/core/src/main/java/org/elasticsearch/common/breaker/CircuitBreaker.java index afd8efdb8b4..7811ff35d56 100644 --- a/core/src/main/java/org/elasticsearch/common/breaker/CircuitBreaker.java +++ b/core/src/main/java/org/elasticsearch/common/breaker/CircuitBreaker.java @@ -66,7 +66,6 @@ public interface CircuitBreaker { * @param bytes number of bytes to add * @param label string label describing the bytes being added * @return the number of "used" bytes for the circuit breaker - * @throws CircuitBreakingException */ public double addEstimateBytesAndMaybeBreak(long bytes, String label) throws CircuitBreakingException; diff --git a/core/src/main/java/org/elasticsearch/common/breaker/MemoryCircuitBreaker.java b/core/src/main/java/org/elasticsearch/common/breaker/MemoryCircuitBreaker.java index d08d618e47e..b069456b5d4 100644 --- a/core/src/main/java/org/elasticsearch/common/breaker/MemoryCircuitBreaker.java +++ b/core/src/main/java/org/elasticsearch/common/breaker/MemoryCircuitBreaker.java @@ -75,7 +75,6 @@ public class MemoryCircuitBreaker implements CircuitBreaker { /** * Method used to trip the breaker - * @throws CircuitBreakingException */ @Override public void circuitBreak(String fieldName, long bytesNeeded) throws CircuitBreakingException { @@ -90,10 +89,9 @@ public class MemoryCircuitBreaker implements CircuitBreaker { * Add a number of bytes, tripping the circuit breaker if the aggregated * estimates are above the limit. Automatically trips the breaker if the * memory limit is set to 0. Will never trip the breaker if the limit is - * set < 0, but can still be used to aggregate estimations. + * set < 0, but can still be used to aggregate estimations. * @param bytes number of bytes to add to the breaker * @return number of "used" bytes so far - * @throws CircuitBreakingException */ @Override public double addEstimateBytesAndMaybeBreak(long bytes, String label) throws CircuitBreakingException { diff --git a/core/src/main/java/org/elasticsearch/common/collect/ImmutableOpenIntMap.java b/core/src/main/java/org/elasticsearch/common/collect/ImmutableOpenIntMap.java index ccadbcf0a4a..b807d48a971 100644 --- a/core/src/main/java/org/elasticsearch/common/collect/ImmutableOpenIntMap.java +++ b/core/src/main/java/org/elasticsearch/common/collect/ImmutableOpenIntMap.java @@ -32,7 +32,7 @@ import java.util.Map; /** * An immutable map implementation based on open hash map. - *

    + *

    * Can be constructed using a {@link #builder()}, or using {@link #builder(org.elasticsearch.common.collect.ImmutableOpenIntMap)} (which is an optimized * option to copy over existing content and modify it). */ @@ -47,7 +47,7 @@ public final class ImmutableOpenIntMap implements Iterable + *

    * Important note: For primitive type values, the value returned for a non-existing * key may not be the default value of the primitive type (it may be any value previously * assigned to that slot). @@ -91,8 +91,8 @@ public final class ImmutableOpenIntMap implements Iterable - *

    - *

    The index field inside the cursor gives the internal index inside + *

    + * The index field inside the cursor gives the internal index inside * the container's implementation. The interpretation of this index depends on * to the container. */ diff --git a/core/src/main/java/org/elasticsearch/common/collect/ImmutableOpenMap.java b/core/src/main/java/org/elasticsearch/common/collect/ImmutableOpenMap.java index 814df937e0c..47c1bdfb826 100644 --- a/core/src/main/java/org/elasticsearch/common/collect/ImmutableOpenMap.java +++ b/core/src/main/java/org/elasticsearch/common/collect/ImmutableOpenMap.java @@ -31,7 +31,7 @@ import java.util.Map; /** * An immutable map implementation based on open hash map. - *

    + *

    * Can be constructed using a {@link #builder()}, or using {@link #builder(ImmutableOpenMap)} (which is an optimized * option to copy over existing content and modify it). */ @@ -46,7 +46,7 @@ public final class ImmutableOpenMap implements Iterable + *

    * Important note: For primitive type values, the value returned for a non-existing * key may not be the default value of the primitive type (it may be any value previously * assigned to that slot). @@ -98,8 +98,8 @@ public final class ImmutableOpenMap implements Iterable - *

    - *

    The index field inside the cursor gives the internal index inside + *

    + * The index field inside the cursor gives the internal index inside * the container's implementation. The interpretation of this index depends on * to the container. */ diff --git a/core/src/main/java/org/elasticsearch/common/component/Lifecycle.java b/core/src/main/java/org/elasticsearch/common/component/Lifecycle.java index e6cbf264af3..7afccb3c5a0 100644 --- a/core/src/main/java/org/elasticsearch/common/component/Lifecycle.java +++ b/core/src/main/java/org/elasticsearch/common/component/Lifecycle.java @@ -23,15 +23,14 @@ package org.elasticsearch.common.component; /** * Lifecycle state. Allows the following transitions: *

      - *
    • INITIALIZED -> STARTED, STOPPED, CLOSED
    • - *
    • STARTED -> STOPPED
    • - *
    • STOPPED -> STARTED, CLOSED
    • - *
    • CLOSED ->
    • + *
    • INITIALIZED -> STARTED, STOPPED, CLOSED
    • + *
    • STARTED -> STOPPED
    • + *
    • STOPPED -> STARTED, CLOSED
    • + *
    • CLOSED ->
    • *
    - *

    - *

    Also allows to stay in the same state. For example, when calling stop on a component, the + *

    + * Also allows to stay in the same state. For example, when calling stop on a component, the * following logic can be applied: - *

    *

      * public void stop() {
      *  if (!lifeccycleState.moveToStopped()) {
    @@ -40,10 +39,9 @@ package org.elasticsearch.common.component;
      * // continue with stop logic
      * }
      * 
    - *

    - *

    Note, closed is only allowed to be called when stopped, so make sure to stop the component first. + *

    + * Note, closed is only allowed to be called when stopped, so make sure to stop the component first. * Here is how the logic can be applied: - *

    *

      * public void close() {
      *  if (lifecycleState.started()) {
    diff --git a/core/src/main/java/org/elasticsearch/common/compress/CompressorFactory.java b/core/src/main/java/org/elasticsearch/common/compress/CompressorFactory.java
    index 72c57a97a01..4af2e962d85 100644
    --- a/core/src/main/java/org/elasticsearch/common/compress/CompressorFactory.java
    +++ b/core/src/main/java/org/elasticsearch/common/compress/CompressorFactory.java
    @@ -112,7 +112,7 @@ public class CompressorFactory {
         }
     
         /**
    -     * Uncompress the provided data, data can be detected as compressed using {@link #isCompressed(byte[], int, int)}.
    +     * Uncompress the provided data, data can be detected as compressed using {@link #isCompressed(BytesReference)}.
          */
         public static BytesReference uncompressIfNeeded(BytesReference bytes) throws IOException {
             Compressor compressor = compressor(bytes);
    diff --git a/core/src/main/java/org/elasticsearch/common/geo/GeoUtils.java b/core/src/main/java/org/elasticsearch/common/geo/GeoUtils.java
    index 5c146598325..be06d4bd0e5 100644
    --- a/core/src/main/java/org/elasticsearch/common/geo/GeoUtils.java
    +++ b/core/src/main/java/org/elasticsearch/common/geo/GeoUtils.java
    @@ -207,7 +207,7 @@ public class GeoUtils {
     
         /**
          * Normalize latitude to lie within the -90 to 90 (both inclusive) range.
    -     * 

    + *

    * Note: You should not normalize longitude and latitude separately, * because when normalizing latitude it may be necessary to * add a shift of 180° in the longitude. @@ -231,7 +231,7 @@ public class GeoUtils { /** * Normalize the geo {@code Point} for its coordinates to lie within their * respective normalized ranges. - *

    + *

    * Note: A shift of 180° is applied in the longitude if necessary, * in order to normalize properly the latitude. * @@ -244,9 +244,9 @@ public class GeoUtils { /** * Normalize the geo {@code Point} for the given coordinates to lie within * their respective normalized ranges. - *

    + *

    * You can control which coordinate gets normalized with the two flags. - *

    + *

    * Note: A shift of 180° is applied in the longitude if necessary, * in order to normalize properly the latitude. * If normalizing latitude but not longitude, it is assumed that @@ -308,9 +308,6 @@ public class GeoUtils { * * @param parser {@link XContentParser} to parse the value from * @return new {@link GeoPoint} parsed from the parse - * - * @throws IOException - * @throws org.elasticsearch.ElasticsearchParseException */ public static GeoPoint parseGeoPoint(XContentParser parser) throws IOException, ElasticsearchParseException { return parseGeoPoint(parser, new GeoPoint()); @@ -329,9 +326,6 @@ public class GeoUtils { * @param parser {@link XContentParser} to parse the value from * @param point A {@link GeoPoint} that will be reset by the values parsed * @return new {@link GeoPoint} parsed from the parse - * - * @throws IOException - * @throws org.elasticsearch.ElasticsearchParseException */ public static GeoPoint parseGeoPoint(XContentParser parser, GeoPoint point) throws IOException, ElasticsearchParseException { double lat = Double.NaN; diff --git a/core/src/main/java/org/elasticsearch/common/geo/XShapeCollection.java b/core/src/main/java/org/elasticsearch/common/geo/XShapeCollection.java index 2cc4a097ed1..695db015eda 100644 --- a/core/src/main/java/org/elasticsearch/common/geo/XShapeCollection.java +++ b/core/src/main/java/org/elasticsearch/common/geo/XShapeCollection.java @@ -61,7 +61,7 @@ public class XShapeCollection extends ShapeCollection { /** * Spatial4J shapes have no knowledge of directed edges. For this reason, a bounding box - * that wraps the dateline can have a min longitude that is mathematically > than the + * that wraps the dateline can have a min longitude that is mathematically > than the * Rectangles' minX value. This is an issue for geometric collections (e.g., MultiPolygon * and ShapeCollection) Until geometry logic can be cleaned up in Spatial4J, ES provides * the following expansion algorithm for GeometryCollections diff --git a/core/src/main/java/org/elasticsearch/common/geo/builders/CircleBuilder.java b/core/src/main/java/org/elasticsearch/common/geo/builders/CircleBuilder.java index 27d7318c218..f1054e18663 100644 --- a/core/src/main/java/org/elasticsearch/common/geo/builders/CircleBuilder.java +++ b/core/src/main/java/org/elasticsearch/common/geo/builders/CircleBuilder.java @@ -68,7 +68,7 @@ public class CircleBuilder extends ShapeBuilder { /** * Set the radius of the circle - * @param radius radius of the circle (see {@link DistanceUnit.Distance}) + * @param radius radius of the circle (see {@link org.elasticsearch.common.unit.DistanceUnit.Distance}) * @return this */ public CircleBuilder radius(Distance radius) { diff --git a/core/src/main/java/org/elasticsearch/common/geo/builders/PointCollection.java b/core/src/main/java/org/elasticsearch/common/geo/builders/PointCollection.java index 8174efacfc6..de1db188b31 100644 --- a/core/src/main/java/org/elasticsearch/common/geo/builders/PointCollection.java +++ b/core/src/main/java/org/elasticsearch/common/geo/builders/PointCollection.java @@ -110,7 +110,6 @@ public abstract class PointCollection> extends Shap * @param builder builder to use * @param closed repeat the first point at the end of the array if it's not already defines as last element of the array * @return the builder - * @throws IOException */ protected XContentBuilder coordinatesToXcontent(XContentBuilder builder, boolean closed) throws IOException { builder.startArray(); diff --git a/core/src/main/java/org/elasticsearch/common/geo/builders/ShapeBuilder.java b/core/src/main/java/org/elasticsearch/common/geo/builders/ShapeBuilder.java index e33d63a40af..0c1a12de394 100644 --- a/core/src/main/java/org/elasticsearch/common/geo/builders/ShapeBuilder.java +++ b/core/src/main/java/org/elasticsearch/common/geo/builders/ShapeBuilder.java @@ -270,7 +270,7 @@ public abstract class ShapeBuilder implements ToXContent { * Create a new {@link ShapeBuilder} from {@link XContent} * @param parser parser to read the GeoShape from * @return {@link ShapeBuilder} read from the parser or null - * if the parsers current token has been + * if the parsers current token has been null * @throws IOException if the input could not be read */ public static ShapeBuilder parse(XContentParser parser) throws IOException { @@ -284,7 +284,7 @@ public abstract class ShapeBuilder implements ToXContent { * to the shape construction process (e.g., orientation) * todo: refactor to place build specific parameters in the SpatialContext * @return {@link ShapeBuilder} read from the parser or null - * if the parsers current token has been + * if the parsers current token has been null * @throws IOException if the input could not be read */ public static ShapeBuilder parse(XContentParser parser, GeoShapeFieldMapper geoDocMapper) throws IOException { @@ -385,7 +385,7 @@ public abstract class ShapeBuilder implements ToXContent { /** * Node used to represent a tree of coordinates. - *

    + *

    * Can either be a leaf node consisting of a Coordinate, or a parent with * children */ @@ -606,7 +606,6 @@ public abstract class ShapeBuilder implements ToXContent { /** * Transforms coordinates in the eastern hemisphere (-180:0) to a (180:360) range - * @param points */ protected static void translate(Coordinate[] points) { for (Coordinate c : points) { @@ -714,7 +713,6 @@ public abstract class ShapeBuilder implements ToXContent { * @param parser - parse utility object including source document * @param shapeMapper - field mapper needed for index specific parameters * @return ShapeBuilder - a builder instance used to create the geometry - * @throws IOException */ public static ShapeBuilder parse(XContentParser parser, GeoShapeFieldMapper shapeMapper) throws IOException { if (parser.currentToken() == XContentParser.Token.VALUE_NULL) { diff --git a/core/src/main/java/org/elasticsearch/common/http/client/HttpDownloadHelper.java b/core/src/main/java/org/elasticsearch/common/http/client/HttpDownloadHelper.java index b21935ee71d..ed2de6e5e7d 100644 --- a/core/src/main/java/org/elasticsearch/common/http/client/HttpDownloadHelper.java +++ b/core/src/main/java/org/elasticsearch/common/http/client/HttpDownloadHelper.java @@ -452,8 +452,8 @@ public class HttpDownloadHelper { /** * Has the download completed successfully? - *

    - *

    Re-throws any exception caught during executaion.

    + *

    + * Re-throws any exception caught during executaion.

    */ boolean wasSuccessful() throws IOException { if (ioexception != null) { diff --git a/core/src/main/java/org/elasticsearch/common/inject/AbstractModule.java b/core/src/main/java/org/elasticsearch/common/inject/AbstractModule.java index 86ef15875b8..7c0a5ce2680 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/AbstractModule.java +++ b/core/src/main/java/org/elasticsearch/common/inject/AbstractModule.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2006 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -32,7 +32,6 @@ import java.util.Objects; * a more readable configuration. Simply extend this class, implement {@link * #configure()}, and call the inherited methods which mirror those found in * {@link Binder}. For example: - *

    *

      * public class MyModule extends AbstractModule {
      *   protected void configure() {
    diff --git a/core/src/main/java/org/elasticsearch/common/inject/AbstractProcessor.java b/core/src/main/java/org/elasticsearch/common/inject/AbstractProcessor.java
    index 1fdc3775b0f..154ce88b245 100644
    --- a/core/src/main/java/org/elasticsearch/common/inject/AbstractProcessor.java
    +++ b/core/src/main/java/org/elasticsearch/common/inject/AbstractProcessor.java
    @@ -1,4 +1,4 @@
    -/**
    +/*
      * Copyright (C) 2008 Google Inc.
      *
      * Licensed under the Apache License, Version 2.0 (the "License");
    @@ -24,8 +24,8 @@ import java.util.List;
     
     /**
      * Abstract base class for creating an injector from module elements.
    - * 

    - *

    Extending classes must return {@code true} from any overridden + *

    + * Extending classes must return {@code true} from any overridden * {@code visit*()} methods, in order for the element processor to remove the * handled element. * diff --git a/core/src/main/java/org/elasticsearch/common/inject/Binder.java b/core/src/main/java/org/elasticsearch/common/inject/Binder.java index 93155131e9f..437591b8c51 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/Binder.java +++ b/core/src/main/java/org/elasticsearch/common/inject/Binder.java @@ -31,9 +31,8 @@ import java.lang.annotation.Annotation; * used to create an {@link Injector}. Guice provides this object to your * application's {@link Module} implementors so they may each contribute * their own bindings and other registrations. - *

    *

    The Guice Binding EDSL

    - *

    + *

    * Guice uses an embedded domain-specific language, or EDSL, to help you * create bindings simply and readably. This approach is great for overall * usability, but it does come with a small cost: it is difficult to @@ -42,7 +41,6 @@ import java.lang.annotation.Annotation; * examples below. To save space, these examples omit the opening * {@code binder}, just as you will if your module extends * {@link AbstractModule}. - *

    *

      *     bind(ServiceImpl.class);
    * @@ -112,7 +110,7 @@ import java.lang.annotation.Annotation; * contribute their own custom scopes for use here as well. * *
    - *     bind(new TypeLiteral<PaymentService<CreditCard>>() {})
    + *     bind(new TypeLiteral<PaymentService<CreditCard>>() {})
      *         .to(CreditCardPaymentService.class);
    * * This admittedly odd construct is the way to bind a parameterized type. It @@ -141,7 +139,7 @@ import java.lang.annotation.Annotation; * * Sets up a constant binding. Constant injections must always be annotated. * When a constant binding's value is a string, it is eligile for conversion to - * all primitive types, to {@link Enum#valueOf(Class, String) all enums}, and to + * all primitive types, to {@link Enum#valueOf all enums}, and to * {@link Class#forName class literals}. Conversions for other types can be * configured using {@link #convertToTypes(Matcher, TypeConverter) * convertToTypes()}. @@ -178,7 +176,7 @@ import java.lang.annotation.Annotation; * the problems at runtime, as soon as you try to create your Injector. * *

    The other methods of Binder such as {@link #bindScope}, - * {@link #bindInterceptor}, {@link #install}, {@link #requestStaticInjection}, + * {@link #install}, {@link #requestStaticInjection}, * {@link #addError} and {@link #currentStage} are not part of the Binding EDSL; * you can learn how to use these in the usual way, from the method * documentation. diff --git a/core/src/main/java/org/elasticsearch/common/inject/Binding.java b/core/src/main/java/org/elasticsearch/common/inject/Binding.java index b854d1df316..e0d0420fb04 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/Binding.java +++ b/core/src/main/java/org/elasticsearch/common/inject/Binding.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -24,8 +24,8 @@ import org.elasticsearch.common.inject.spi.Element; * A mapping from a key (type and optional annotation) to the strategy for getting instances of the * type. This interface is part of the introspection API and is intended primarily for use by * tools. - *

    - *

    Bindings are created in several ways: + *

    + * Bindings are created in several ways: *

      *
    • Explicitly in a module, via {@code bind()} and {@code bindConstant()} * statements: diff --git a/core/src/main/java/org/elasticsearch/common/inject/BindingAnnotation.java b/core/src/main/java/org/elasticsearch/common/inject/BindingAnnotation.java index 816c306b230..3d18b573ca0 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/BindingAnnotation.java +++ b/core/src/main/java/org/elasticsearch/common/inject/BindingAnnotation.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2006 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -26,7 +26,6 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME; * Annotates annotations which are used for binding. Only one such annotation * may apply to a single injection point. You must also annotate binder * annotations with {@code @Retention(RUNTIME)}. For example: - *

      *

        *   {@code @}Retention(RUNTIME)
        *   {@code @}Target({ FIELD, PARAMETER, METHOD })
      diff --git a/core/src/main/java/org/elasticsearch/common/inject/BindingProcessor.java b/core/src/main/java/org/elasticsearch/common/inject/BindingProcessor.java
      index 58ea0be016d..0ef8c26a69d 100644
      --- a/core/src/main/java/org/elasticsearch/common/inject/BindingProcessor.java
      +++ b/core/src/main/java/org/elasticsearch/common/inject/BindingProcessor.java
      @@ -1,4 +1,4 @@
      -/**
      +/*
        * Copyright (C) 2008 Google Inc.
        *
        * Licensed under the Apache License, Version 2.0 (the "License");
      diff --git a/core/src/main/java/org/elasticsearch/common/inject/BoundProviderFactory.java b/core/src/main/java/org/elasticsearch/common/inject/BoundProviderFactory.java
      index b1a0fcea459..57676f42c11 100644
      --- a/core/src/main/java/org/elasticsearch/common/inject/BoundProviderFactory.java
      +++ b/core/src/main/java/org/elasticsearch/common/inject/BoundProviderFactory.java
      @@ -1,4 +1,4 @@
      -/**
      +/*
        * Copyright (C) 2006 Google Inc.
        *
        * Licensed under the Apache License, Version 2.0 (the "License");
      diff --git a/core/src/main/java/org/elasticsearch/common/inject/ConfigurationException.java b/core/src/main/java/org/elasticsearch/common/inject/ConfigurationException.java
      index 4afc6530621..3aaed0d27ac 100644
      --- a/core/src/main/java/org/elasticsearch/common/inject/ConfigurationException.java
      +++ b/core/src/main/java/org/elasticsearch/common/inject/ConfigurationException.java
      @@ -1,4 +1,4 @@
      -/**
      +/*
        * Copyright (C) 2008 Google Inc.
        *
        * Licensed under the Apache License, Version 2.0 (the "License");
      diff --git a/core/src/main/java/org/elasticsearch/common/inject/ConstantFactory.java b/core/src/main/java/org/elasticsearch/common/inject/ConstantFactory.java
      index e451d04409b..d2fb6ae4121 100644
      --- a/core/src/main/java/org/elasticsearch/common/inject/ConstantFactory.java
      +++ b/core/src/main/java/org/elasticsearch/common/inject/ConstantFactory.java
      @@ -1,4 +1,4 @@
      -/**
      +/*
        * Copyright (C) 2006 Google Inc.
        *
        * Licensed under the Apache License, Version 2.0 (the "License");
      diff --git a/core/src/main/java/org/elasticsearch/common/inject/ConstructionProxy.java b/core/src/main/java/org/elasticsearch/common/inject/ConstructionProxy.java
      index d88e84d1ac7..391d9c8c56e 100644
      --- a/core/src/main/java/org/elasticsearch/common/inject/ConstructionProxy.java
      +++ b/core/src/main/java/org/elasticsearch/common/inject/ConstructionProxy.java
      @@ -1,4 +1,4 @@
      -/**
      +/*
        * Copyright (C) 2006 Google Inc.
        *
        * Licensed under the Apache License, Version 2.0 (the "License");
      diff --git a/core/src/main/java/org/elasticsearch/common/inject/ConstructionProxyFactory.java b/core/src/main/java/org/elasticsearch/common/inject/ConstructionProxyFactory.java
      index 081e43d6adc..9a0cd367e16 100644
      --- a/core/src/main/java/org/elasticsearch/common/inject/ConstructionProxyFactory.java
      +++ b/core/src/main/java/org/elasticsearch/common/inject/ConstructionProxyFactory.java
      @@ -1,4 +1,4 @@
      -/**
      +/*
        * Copyright (C) 2006 Google Inc.
        *
        * Licensed under the Apache License, Version 2.0 (the "License");
      diff --git a/core/src/main/java/org/elasticsearch/common/inject/ConstructorInjector.java b/core/src/main/java/org/elasticsearch/common/inject/ConstructorInjector.java
      index f732a0d36b4..c8792afef59 100644
      --- a/core/src/main/java/org/elasticsearch/common/inject/ConstructorInjector.java
      +++ b/core/src/main/java/org/elasticsearch/common/inject/ConstructorInjector.java
      @@ -1,4 +1,4 @@
      -/**
      +/*
        * Copyright (C) 2006 Google Inc.
        *
        * Licensed under the Apache License, Version 2.0 (the "License");
      diff --git a/core/src/main/java/org/elasticsearch/common/inject/ConstructorInjectorStore.java b/core/src/main/java/org/elasticsearch/common/inject/ConstructorInjectorStore.java
      index cca1f7e7b12..ce63da62d8d 100644
      --- a/core/src/main/java/org/elasticsearch/common/inject/ConstructorInjectorStore.java
      +++ b/core/src/main/java/org/elasticsearch/common/inject/ConstructorInjectorStore.java
      @@ -1,4 +1,4 @@
      -/**
      +/*
        * Copyright (C) 2009 Google Inc.
        *
        * Licensed under the Apache License, Version 2.0 (the "License");
      diff --git a/core/src/main/java/org/elasticsearch/common/inject/ContextualCallable.java b/core/src/main/java/org/elasticsearch/common/inject/ContextualCallable.java
      index 19ddf4f3fbe..b6d09e7e28b 100644
      --- a/core/src/main/java/org/elasticsearch/common/inject/ContextualCallable.java
      +++ b/core/src/main/java/org/elasticsearch/common/inject/ContextualCallable.java
      @@ -1,4 +1,4 @@
      -/**
      +/*
        * Copyright (C) 2006 Google Inc.
        *
        * Licensed under the Apache License, Version 2.0 (the "License");
      diff --git a/core/src/main/java/org/elasticsearch/common/inject/CreationException.java b/core/src/main/java/org/elasticsearch/common/inject/CreationException.java
      index 5c44111e600..4900efe6a3e 100644
      --- a/core/src/main/java/org/elasticsearch/common/inject/CreationException.java
      +++ b/core/src/main/java/org/elasticsearch/common/inject/CreationException.java
      @@ -1,4 +1,4 @@
      -/**
      +/*
        * Copyright (C) 2006 Google Inc.
        *
        * Licensed under the Apache License, Version 2.0 (the "License");
      diff --git a/core/src/main/java/org/elasticsearch/common/inject/DefaultConstructionProxyFactory.java b/core/src/main/java/org/elasticsearch/common/inject/DefaultConstructionProxyFactory.java
      index 437ad035450..b57f92e7958 100644
      --- a/core/src/main/java/org/elasticsearch/common/inject/DefaultConstructionProxyFactory.java
      +++ b/core/src/main/java/org/elasticsearch/common/inject/DefaultConstructionProxyFactory.java
      @@ -1,4 +1,4 @@
      -/**
      +/*
        * Copyright (C) 2006 Google Inc.
        *
        * Licensed under the Apache License, Version 2.0 (the "License");
      diff --git a/core/src/main/java/org/elasticsearch/common/inject/DeferredLookups.java b/core/src/main/java/org/elasticsearch/common/inject/DeferredLookups.java
      index c6ca9bab08a..40d589f37dc 100644
      --- a/core/src/main/java/org/elasticsearch/common/inject/DeferredLookups.java
      +++ b/core/src/main/java/org/elasticsearch/common/inject/DeferredLookups.java
      @@ -1,4 +1,4 @@
      -/**
      +/*
        * Copyright (C) 2009 Google Inc.
        *
        * Licensed under the Apache License, Version 2.0 (the "License");
      diff --git a/core/src/main/java/org/elasticsearch/common/inject/EncounterImpl.java b/core/src/main/java/org/elasticsearch/common/inject/EncounterImpl.java
      index fc2bd484b41..8b8b7b78218 100644
      --- a/core/src/main/java/org/elasticsearch/common/inject/EncounterImpl.java
      +++ b/core/src/main/java/org/elasticsearch/common/inject/EncounterImpl.java
      @@ -1,4 +1,4 @@
      -/**
      +/*
        * Copyright (C) 2009 Google Inc.
        *
        * Licensed under the Apache License, Version 2.0 (the "License");
      diff --git a/core/src/main/java/org/elasticsearch/common/inject/Exposed.java b/core/src/main/java/org/elasticsearch/common/inject/Exposed.java
      index 992da18d7cb..8e0598a8beb 100644
      --- a/core/src/main/java/org/elasticsearch/common/inject/Exposed.java
      +++ b/core/src/main/java/org/elasticsearch/common/inject/Exposed.java
      @@ -1,4 +1,4 @@
      -/**
      +/*
        * Copyright (C) 2008 Google Inc.
        *
        * Licensed under the Apache License, Version 2.0 (the "License");
      diff --git a/core/src/main/java/org/elasticsearch/common/inject/ExposedKeyFactory.java b/core/src/main/java/org/elasticsearch/common/inject/ExposedKeyFactory.java
      index 34f75474b81..0e001080fbe 100644
      --- a/core/src/main/java/org/elasticsearch/common/inject/ExposedKeyFactory.java
      +++ b/core/src/main/java/org/elasticsearch/common/inject/ExposedKeyFactory.java
      @@ -1,4 +1,4 @@
      -/**
      +/*
        * Copyright (C) 2008 Google Inc.
        *
        * Licensed under the Apache License, Version 2.0 (the "License");
      diff --git a/core/src/main/java/org/elasticsearch/common/inject/FactoryProxy.java b/core/src/main/java/org/elasticsearch/common/inject/FactoryProxy.java
      index a7f88f6a6d7..b275ea67a82 100644
      --- a/core/src/main/java/org/elasticsearch/common/inject/FactoryProxy.java
      +++ b/core/src/main/java/org/elasticsearch/common/inject/FactoryProxy.java
      @@ -1,4 +1,4 @@
      -/**
      +/*
        * Copyright (C) 2008 Google Inc.
        *
        * Licensed under the Apache License, Version 2.0 (the "License");
      diff --git a/core/src/main/java/org/elasticsearch/common/inject/Guice.java b/core/src/main/java/org/elasticsearch/common/inject/Guice.java
      index 7b303e5d684..128664c65a5 100644
      --- a/core/src/main/java/org/elasticsearch/common/inject/Guice.java
      +++ b/core/src/main/java/org/elasticsearch/common/inject/Guice.java
      @@ -21,8 +21,8 @@ import java.util.Arrays;
       /**
        * The entry point to the Guice framework. Creates {@link Injector}s from
        * {@link Module}s.
      - * 

      - *

      Guice supports a model of development that draws clear boundaries between + *

      + * Guice supports a model of development that draws clear boundaries between * APIs, Implementations of these APIs, Modules which configure these * implementations, and finally Applications which consist of a collection of * Modules. It is the Application, which typically defines your {@code main()} diff --git a/core/src/main/java/org/elasticsearch/common/inject/ImplementedBy.java b/core/src/main/java/org/elasticsearch/common/inject/ImplementedBy.java index 52e3509a287..652be0f3ed3 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/ImplementedBy.java +++ b/core/src/main/java/org/elasticsearch/common/inject/ImplementedBy.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2006 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/InheritingState.java b/core/src/main/java/org/elasticsearch/common/inject/InheritingState.java index d70f47a760c..12c317b1b08 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/InheritingState.java +++ b/core/src/main/java/org/elasticsearch/common/inject/InheritingState.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/Initializable.java b/core/src/main/java/org/elasticsearch/common/inject/Initializable.java index 01a48e7e3b8..26c3da5d3fb 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/Initializable.java +++ b/core/src/main/java/org/elasticsearch/common/inject/Initializable.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/Initializables.java b/core/src/main/java/org/elasticsearch/common/inject/Initializables.java index e1148bbe1f8..5704892070e 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/Initializables.java +++ b/core/src/main/java/org/elasticsearch/common/inject/Initializables.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/Initializer.java b/core/src/main/java/org/elasticsearch/common/inject/Initializer.java index f1288c57c07..1d68f163bfe 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/Initializer.java +++ b/core/src/main/java/org/elasticsearch/common/inject/Initializer.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/Inject.java b/core/src/main/java/org/elasticsearch/common/inject/Inject.java index c118c4db945..ff67b645f2b 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/Inject.java +++ b/core/src/main/java/org/elasticsearch/common/inject/Inject.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2006 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -27,23 +27,20 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME; * Annotates members of your implementation class (constructors, methods * and fields) into which the {@link Injector} should inject values. * The Injector fulfills injection requests for: - *

      *

        *
      • Every instance it constructs. The class being constructed must have * exactly one of its constructors marked with {@code @Inject} or must have a * constructor taking no parameters. The Injector then proceeds to perform * method and field injections. - *

        *

      • Pre-constructed instances passed to {@link Injector#injectMembers}, * {@link org.elasticsearch.common.inject.binder.LinkedBindingBuilder#toInstance(Object)} and * {@link org.elasticsearch.common.inject.binder.LinkedBindingBuilder#toProvider(Provider)}. * In this case all constructors are, of course, ignored. - *

        *

      • Static fields and methods of classes which any {@link Module} has * specifically requested static injection for, using * {@link Binder#requestStaticInjection}. *
      - *

      + *

      * In all cases, a member can be injected regardless of its Java access * specifier (private, default, protected, public). * diff --git a/core/src/main/java/org/elasticsearch/common/inject/InjectionRequestProcessor.java b/core/src/main/java/org/elasticsearch/common/inject/InjectionRequestProcessor.java index da87efa1b8e..e8b38b51330 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/InjectionRequestProcessor.java +++ b/core/src/main/java/org/elasticsearch/common/inject/InjectionRequestProcessor.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/Injector.java b/core/src/main/java/org/elasticsearch/common/inject/Injector.java index d7ee0e832e8..bfc1fb42db3 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/Injector.java +++ b/core/src/main/java/org/elasticsearch/common/inject/Injector.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2006 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -24,26 +24,25 @@ import java.util.Map; * for each type and uses bindings to inject them. This is the core of Guice, although you rarely * interact with it directly. This "behind-the-scenes" operation is what distinguishes dependency * injection from its cousin, the service locator pattern. - *

      - *

      Contains several default bindings: - *

      + *

      + * Contains several default bindings: *

        *
      • This {@link Injector} instance itself *
      • A {@code Provider} for each binding of type {@code T} *
      • The {@link java.util.logging.Logger} for the class being injected *
      • The {@link Stage} in which the Injector was created *
      - *

      + *

      * Injectors are created using the facade class {@link Guice}. - *

      - *

      An injector can also {@link #injectMembers(Object) inject the dependencies} of + *

      + * An injector can also {@link #injectMembers(Object) inject the dependencies} of * already-constructed instances. This can be used to interoperate with objects created by other * frameworks or services. - *

      - *

      Injectors can be {@link #createChildInjector(Iterable) hierarchical}. Child injectors inherit + *

      + * Injectors can be {@link #createChildInjector(Iterable) hierarchical}. Child injectors inherit * the configuration of their parent injectors, but the converse does not hold. - *

      - *

      The injector's {@link #getBindings() internal bindings} are available for introspection. This + *

      + * The injector's {@link #getBindings() internal bindings} are available for introspection. This * enables tools and extensions to operate on an injector reflectively. * * @author crazybob@google.com (Bob Lee) @@ -54,8 +53,8 @@ public interface Injector { /** * Injects dependencies into the fields and methods of {@code instance}. Ignores the presence or * absence of an injectable constructor. - *

      - *

      Whenever Guice creates an instance, it performs this injection automatically (after first + *

      + * Whenever Guice creates an instance, it performs this injection automatically (after first * performing constructor injection), so if you're able to let Guice create all your objects for * you, you'll never need to use this method. * @@ -90,13 +89,13 @@ public interface Injector { /** * Returns all explicit bindings. - *

      - *

      The returned map does not include bindings inherited from a {@link #getParent() parent + *

      + * The returned map does not include bindings inherited from a {@link #getParent() parent * injector}, should one exist. The returned map is guaranteed to iterate (for example, with * its {@link java.util.Map#entrySet()} iterator) in the order of insertion. In other words, * the order in which bindings appear in user Modules. - *

      - *

      This method is part of the Guice SPI and is intended for use by tools and extensions. + *

      + * This method is part of the Guice SPI and is intended for use by tools and extensions. */ Map, Binding> getBindings(); @@ -104,8 +103,8 @@ public interface Injector { * Returns the binding for the given injection key. This will be an explicit bindings if the key * was bound explicitly by a module, or an implicit binding otherwise. The implicit binding will * be created if necessary. - *

      - *

      This method is part of the Guice SPI and is intended for use by tools and extensions. + *

      + * This method is part of the Guice SPI and is intended for use by tools and extensions. * * @throws ConfigurationException if this injector cannot find or create the binding. */ @@ -115,8 +114,8 @@ public interface Injector { * Returns the binding for the given type. This will be an explicit bindings if the injection key * was bound explicitly by a module, or an implicit binding otherwise. The implicit binding will * be created if necessary. - *

      - *

      This method is part of the Guice SPI and is intended for use by tools and extensions. + *

      + * This method is part of the Guice SPI and is intended for use by tools and extensions. * * @throws ConfigurationException if this injector cannot find or create the binding. * @since 2.0 @@ -125,8 +124,8 @@ public interface Injector { /** * Returns all explicit bindings for {@code type}. - *

      - *

      This method is part of the Guice SPI and is intended for use by tools and extensions. + *

      + * This method is part of the Guice SPI and is intended for use by tools and extensions. */ List> findBindingsByType(TypeLiteral type); @@ -179,12 +178,12 @@ public interface Injector { * Returns a new injector that inherits all state from this injector. All bindings, scopes, * interceptors and type converters are inherited -- they are visible to the child injector. * Elements of the child injector are not visible to its parent. - *

      - *

      Just-in-time bindings created for child injectors will be created in an ancestor injector + *

      + * Just-in-time bindings created for child injectors will be created in an ancestor injector * whenever possible. This allows for scoped instances to be shared between injectors. Use * explicit bindings to prevent bindings from being shared with the parent injector. - *

      - *

      No key may be bound by both an injector and one of its ancestors. This includes just-in-time + *

      + * No key may be bound by both an injector and one of its ancestors. This includes just-in-time * bindings. The lone exception is the key for {@code Injector.class}, which is bound by each * injector to itself. * @@ -196,12 +195,12 @@ public interface Injector { * Returns a new injector that inherits all state from this injector. All bindings, scopes, * interceptors and type converters are inherited -- they are visible to the child injector. * Elements of the child injector are not visible to its parent. - *

      - *

      Just-in-time bindings created for child injectors will be created in an ancestor injector + *

      + * Just-in-time bindings created for child injectors will be created in an ancestor injector * whenever possible. This allows for scoped instances to be shared between injectors. Use * explicit bindings to prevent bindings from being shared with the parent injector. - *

      - *

      No key may be bound by both an injector and one of its ancestors. This includes just-in-time + *

      + * No key may be bound by both an injector and one of its ancestors. This includes just-in-time * bindings. The lone exception is the key for {@code Injector.class}, which is bound by each * injector to itself. * diff --git a/core/src/main/java/org/elasticsearch/common/inject/InjectorBuilder.java b/core/src/main/java/org/elasticsearch/common/inject/InjectorBuilder.java index 5f7175dcfec..4a9ba4ae3fc 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/InjectorBuilder.java +++ b/core/src/main/java/org/elasticsearch/common/inject/InjectorBuilder.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2006 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -30,8 +30,8 @@ import java.util.Set; * Builds a tree of injectors. This is a primary injector, plus child injectors needed for each * {@link Binder#newPrivateBinder() private environment}. The primary injector is not necessarily a * top-level injector. - *

      - *

      Injector construction happens in two phases. + *

      + * Injector construction happens in two phases. *

        *
      1. Static building. In this phase, we interpret commands, create bindings, and inspect * dependencies. During this phase, we hold a lock to ensure consistency with parent injectors. diff --git a/core/src/main/java/org/elasticsearch/common/inject/InjectorImpl.java b/core/src/main/java/org/elasticsearch/common/inject/InjectorImpl.java index 7aef2e7bb30..15fb181b56f 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/InjectorImpl.java +++ b/core/src/main/java/org/elasticsearch/common/inject/InjectorImpl.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2006 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/InjectorShell.java b/core/src/main/java/org/elasticsearch/common/inject/InjectorShell.java index 8acc7d7c721..aeb3f2e5e66 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/InjectorShell.java +++ b/core/src/main/java/org/elasticsearch/common/inject/InjectorShell.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/Injectors.java b/core/src/main/java/org/elasticsearch/common/inject/Injectors.java index 40a0ae1aba8..900d2588b52 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/Injectors.java +++ b/core/src/main/java/org/elasticsearch/common/inject/Injectors.java @@ -50,10 +50,10 @@ public class Injectors { /** * Returns an instance of the given type with the {@link org.elasticsearch.common.inject.name.Named} * annotation value. - *

        + *

        * This method allows you to switch this code * injector.getInstance(Key.get(type, Names.named(name))); - *

        + *

        * to the more concise * Injectors.getInstance(injector, type, name); */ diff --git a/core/src/main/java/org/elasticsearch/common/inject/InternalFactoryToProviderAdapter.java b/core/src/main/java/org/elasticsearch/common/inject/InternalFactoryToProviderAdapter.java index d748cec6ad7..8cffd7e63b4 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/InternalFactoryToProviderAdapter.java +++ b/core/src/main/java/org/elasticsearch/common/inject/InternalFactoryToProviderAdapter.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2006 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/Key.java b/core/src/main/java/org/elasticsearch/common/inject/Key.java index 92925c69b43..3af3b4e1a8a 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/Key.java +++ b/core/src/main/java/org/elasticsearch/common/inject/Key.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2006 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -27,21 +27,20 @@ import java.util.Objects; /** * Binding key consisting of an injection type and an optional annotation. * Matches the type and annotation at a point of injection. - *

        - *

        For example, {@code Key.get(Service.class, Transactional.class)} will + *

        + * For example, {@code Key.get(Service.class, Transactional.class)} will * match: - *

        *

          *   {@literal @}Inject
          *   public void setService({@literal @}Transactional Service service) {
          *     ...
          *   }
          * 
        - *

        - *

        {@code Key} supports generic types via subclassing just like {@link + *

        + * {@code Key} supports generic types via subclassing just like {@link * TypeLiteral}. - *

        - *

        Keys do not differentiate between primitive types (int, char, etc.) and + *

        + * Keys do not differentiate between primitive types (int, char, etc.) and * their correpsonding wrapper types (Integer, Character, etc.). Primitive * types will be replaced with their wrapper types when keys are created. * @@ -56,15 +55,15 @@ public class Key { /** * Constructs a new key. Derives the type from this class's type parameter. - *

        - *

        Clients create an empty anonymous subclass. Doing so embeds the type + *

        + * Clients create an empty anonymous subclass. Doing so embeds the type * parameter in the anonymous class's type hierarchy so we can reconstitute it * at runtime despite erasure. - *

        - *

        Example usage for a binding of type {@code Foo} annotated with + *

        + * Example usage for a binding of type {@code Foo} annotated with * {@code @Bar}: - *

        - *

        {@code new Key(Bar.class) {}}. + *

        + * {@code new Key(Bar.class) {}}. */ @SuppressWarnings("unchecked") protected Key(Class annotationType) { @@ -75,15 +74,15 @@ public class Key { /** * Constructs a new key. Derives the type from this class's type parameter. - *

        - *

        Clients create an empty anonymous subclass. Doing so embeds the type + *

        + * Clients create an empty anonymous subclass. Doing so embeds the type * parameter in the anonymous class's type hierarchy so we can reconstitute it * at runtime despite erasure. - *

        - *

        Example usage for a binding of type {@code Foo} annotated with + *

        + * Example usage for a binding of type {@code Foo} annotated with * {@code @Bar}: - *

        - *

        {@code new Key(new Bar()) {}}. + *

        + * {@code new Key(new Bar()) {}}. */ @SuppressWarnings("unchecked") protected Key(Annotation annotation) { @@ -95,14 +94,14 @@ public class Key { /** * Constructs a new key. Derives the type from this class's type parameter. - *

        - *

        Clients create an empty anonymous subclass. Doing so embeds the type + *

        + * Clients create an empty anonymous subclass. Doing so embeds the type * parameter in the anonymous class's type hierarchy so we can reconstitute it * at runtime despite erasure. - *

        - *

        Example usage for a binding of type {@code Foo}: - *

        - *

        {@code new Key() {}}. + *

        + * Example usage for a binding of type {@code Foo}: + *

        + * {@code new Key() {}}. */ @SuppressWarnings("unchecked") protected Key() { diff --git a/core/src/main/java/org/elasticsearch/common/inject/LookupProcessor.java b/core/src/main/java/org/elasticsearch/common/inject/LookupProcessor.java index 0bcfaa27c5d..9e85fb0f365 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/LookupProcessor.java +++ b/core/src/main/java/org/elasticsearch/common/inject/LookupProcessor.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/Lookups.java b/core/src/main/java/org/elasticsearch/common/inject/Lookups.java index b5eb6903206..915698374ae 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/Lookups.java +++ b/core/src/main/java/org/elasticsearch/common/inject/Lookups.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2009 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/MembersInjector.java b/core/src/main/java/org/elasticsearch/common/inject/MembersInjector.java index 3893bf197c0..0a4464a373e 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/MembersInjector.java +++ b/core/src/main/java/org/elasticsearch/common/inject/MembersInjector.java @@ -30,8 +30,8 @@ public interface MembersInjector { /** * Injects dependencies into the fields and methods of {@code instance}. Ignores the presence or * absence of an injectable constructor. - *

        - *

        Whenever Guice creates an instance, it performs this injection automatically (after first + *

        + * Whenever Guice creates an instance, it performs this injection automatically (after first * performing constructor injection), so if you're able to let Guice create all your objects for * you, you'll never need to use this method. * diff --git a/core/src/main/java/org/elasticsearch/common/inject/MembersInjectorImpl.java b/core/src/main/java/org/elasticsearch/common/inject/MembersInjectorImpl.java index 399a231461d..420897172f2 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/MembersInjectorImpl.java +++ b/core/src/main/java/org/elasticsearch/common/inject/MembersInjectorImpl.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2009 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/MembersInjectorStore.java b/core/src/main/java/org/elasticsearch/common/inject/MembersInjectorStore.java index d8ee0d77960..7b6f256bd4c 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/MembersInjectorStore.java +++ b/core/src/main/java/org/elasticsearch/common/inject/MembersInjectorStore.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2009 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/MessageProcessor.java b/core/src/main/java/org/elasticsearch/common/inject/MessageProcessor.java index 2acba6865ca..5bb1e5e8ee4 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/MessageProcessor.java +++ b/core/src/main/java/org/elasticsearch/common/inject/MessageProcessor.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/Module.java b/core/src/main/java/org/elasticsearch/common/inject/Module.java index 9af716d9282..f3a43d80f31 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/Module.java +++ b/core/src/main/java/org/elasticsearch/common/inject/Module.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2006 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -21,11 +21,11 @@ package org.elasticsearch.common.inject; * bindings, which will be used to create an {@link Injector}. A Guice-based * application is ultimately composed of little more than a set of * {@code Module}s and some bootstrapping code. - *

        - *

        Your Module classes can use a more streamlined syntax by extending + *

        + * Your Module classes can use a more streamlined syntax by extending * {@link AbstractModule} rather than implementing this interface directly. - *

        - *

        In addition to the bindings configured via {@link #configure}, bindings + *

        + * In addition to the bindings configured via {@link #configure}, bindings * will be created for all methods annotated with {@literal @}{@link Provides}. * Use scope and binding annotations on these methods to configure the * bindings. @@ -34,8 +34,8 @@ public interface Module { /** * Contributes bindings and other configurations for this module to {@code binder}. - *

        - *

        Do not invoke this method directly to install submodules. Instead use + *

        + * Do not invoke this method directly to install submodules. Instead use * {@link Binder#install(Module)}, which ensures that {@link Provides provider methods} are * discovered. */ diff --git a/core/src/main/java/org/elasticsearch/common/inject/OutOfScopeException.java b/core/src/main/java/org/elasticsearch/common/inject/OutOfScopeException.java index 14096a3e4c8..353fe7ca05f 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/OutOfScopeException.java +++ b/core/src/main/java/org/elasticsearch/common/inject/OutOfScopeException.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2007 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/PrivateBinder.java b/core/src/main/java/org/elasticsearch/common/inject/PrivateBinder.java index f6a429372d1..cc5e356aeec 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/PrivateBinder.java +++ b/core/src/main/java/org/elasticsearch/common/inject/PrivateBinder.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/PrivateElementProcessor.java b/core/src/main/java/org/elasticsearch/common/inject/PrivateElementProcessor.java index 2b7dc692996..855529149df 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/PrivateElementProcessor.java +++ b/core/src/main/java/org/elasticsearch/common/inject/PrivateElementProcessor.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/PrivateModule.java b/core/src/main/java/org/elasticsearch/common/inject/PrivateModule.java index a69ba75e0de..4413028f908 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/PrivateModule.java +++ b/core/src/main/java/org/elasticsearch/common/inject/PrivateModule.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -31,17 +31,16 @@ import java.lang.annotation.Annotation; * A module whose configuration information is hidden from its environment by default. Only bindings * that are explicitly exposed will be available to other modules and to the users of the injector. * This module may expose the bindings it creates and the bindings of the modules it installs. - *

        - *

        A private module can be nested within a regular module or within another private module using + *

        + * A private module can be nested within a regular module or within another private module using * {@link Binder#install install()}. Its bindings live in a new environment that inherits bindings, * type converters, scopes, and interceptors from the surrounding ("parent") environment. When you * nest multiple private modules, the result is a tree of environments where the injector's * environment is the root. - *

        - *

        Guice EDSL bindings can be exposed with {@link #expose(Class) expose()}. {@literal @}{@link + *

        + * Guice EDSL bindings can be exposed with {@link #expose(Class) expose()}. {@literal @}{@link * org.elasticsearch.common.inject.Provides Provides} bindings can be exposed with the {@literal @}{@link * Exposed} annotation: - *

        *

          * public class FooBarBazModule extends PrivateModule {
          *   protected void configure() {
        @@ -61,20 +60,20 @@ import java.lang.annotation.Annotation;
          *   }
          * }
          * 
        - *

        - *

        Private modules are implemented using {@link Injector#createChildInjector(Module[]) parent + *

        + * Private modules are implemented using {@link Injector#createChildInjector(Module[]) parent * injectors}. When it can satisfy their dependencies, just-in-time bindings will be created in the * root environment. Such bindings are shared among all environments in the tree. - *

        - *

        The scope of a binding is constrained to its environment. A singleton bound in a private + *

        + * The scope of a binding is constrained to its environment. A singleton bound in a private * module will be unique to its environment. But a binding for the same type in a different private * module will yield a different instance. - *

        - *

        A shared binding that injects the {@code Injector} gets the root injector, which only has + *

        + * A shared binding that injects the {@code Injector} gets the root injector, which only has * access to bindings in the root environment. An explicit binding that injects the {@code Injector} * gets access to all bindings in the child environment. - *

        - *

        To promote a just-in-time binding to an explicit binding, bind it: + *

        + * To promote a just-in-time binding to an explicit binding, bind it: *

          *   bind(FooImpl.class);
          * 
        diff --git a/core/src/main/java/org/elasticsearch/common/inject/ProvidedBy.java b/core/src/main/java/org/elasticsearch/common/inject/ProvidedBy.java index 6232dd70559..945de83cf91 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/ProvidedBy.java +++ b/core/src/main/java/org/elasticsearch/common/inject/ProvidedBy.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2006 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/Provider.java b/core/src/main/java/org/elasticsearch/common/inject/Provider.java index f9f446670d0..610062debe7 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/Provider.java +++ b/core/src/main/java/org/elasticsearch/common/inject/Provider.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2006 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -19,21 +19,17 @@ package org.elasticsearch.common.inject; /** * An object capable of providing instances of type {@code T}. Providers are used in numerous ways * by Guice: - *

        *

          *
        • When the default means for obtaining instances (an injectable or parameterless constructor) * is insufficient for a particular binding, the module can specify a custom {@code Provider} * instead, to control exactly how Guice creates or obtains instances for the binding. - *

          *

        • An implementation class may always choose to have a {@code Provider} instance injected, * rather than having a {@code T} injected directly. This may give you access to multiple * instances, instances you wish to safely mutate and discard, instances which are out of scope * (e.g. using a {@code @RequestScoped} object from within a {@code @SessionScoped} object), or * instances that will be initialized lazily. - *

          *

        • A custom {@link Scope} is implemented as a decorator of {@code Provider}, which decides * when to delegate to the backing provider and when to provide the instance some other way. - *

          *

        • The {@link Injector} offers access to the {@code Provider} it uses to fulfill requests * for a given key, via the {@link Injector#getProvider} methods. *
        diff --git a/core/src/main/java/org/elasticsearch/common/inject/ProviderToInternalFactoryAdapter.java b/core/src/main/java/org/elasticsearch/common/inject/ProviderToInternalFactoryAdapter.java index ceb016baedc..d7b6afbe6da 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/ProviderToInternalFactoryAdapter.java +++ b/core/src/main/java/org/elasticsearch/common/inject/ProviderToInternalFactoryAdapter.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2006 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/Provides.java b/core/src/main/java/org/elasticsearch/common/inject/Provides.java index 0920b854244..587005f8835 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/Provides.java +++ b/core/src/main/java/org/elasticsearch/common/inject/Provides.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2007 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/ProvisionException.java b/core/src/main/java/org/elasticsearch/common/inject/ProvisionException.java index 9497169d179..6fc7c30c7d9 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/ProvisionException.java +++ b/core/src/main/java/org/elasticsearch/common/inject/ProvisionException.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2006 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/Reflection.java b/core/src/main/java/org/elasticsearch/common/inject/Reflection.java index ba34e6a7a9c..22c542bb9ef 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/Reflection.java +++ b/core/src/main/java/org/elasticsearch/common/inject/Reflection.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/Scope.java b/core/src/main/java/org/elasticsearch/common/inject/Scope.java index ccaa4c8c8b2..dacb105fa3a 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/Scope.java +++ b/core/src/main/java/org/elasticsearch/common/inject/Scope.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2006 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -24,8 +24,8 @@ package org.elasticsearch.common.inject; * and then immediately forgets it. Associating a scope with a particular * binding allows the created instance to be "remembered" and possibly used * again for other injections. - *

        - *

        An example of a scope is {@link Scopes#SINGLETON}. + *

        + * An example of a scope is {@link Scopes#SINGLETON}. * * @author crazybob@google.com (Bob Lee) */ @@ -35,8 +35,8 @@ public interface Scope { * Scopes a provider. The returned provider returns objects from this scope. * If an object does not exist in this scope, the provider can use the given * unscoped provider to retrieve one. - *

        - *

        Scope implementations are strongly encouraged to override + *

        + * Scope implementations are strongly encouraged to override * {@link Object#toString} in the returned provider and include the backing * provider's {@code toString()} output. * diff --git a/core/src/main/java/org/elasticsearch/common/inject/ScopeAnnotation.java b/core/src/main/java/org/elasticsearch/common/inject/ScopeAnnotation.java index 7c6ab299c88..ea1dd376b29 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/ScopeAnnotation.java +++ b/core/src/main/java/org/elasticsearch/common/inject/ScopeAnnotation.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2006 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -26,7 +26,6 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME; * Annotates annotations which are used for scoping. Only one such annotation * may apply to a single implementation class. You must also annotate scope * annotations with {@code @Retention(RUNTIME)}. For example: - *

        *

          *   {@code @}Retention(RUNTIME)
          *   {@code @}Target(TYPE)
        diff --git a/core/src/main/java/org/elasticsearch/common/inject/ScopeBindingProcessor.java b/core/src/main/java/org/elasticsearch/common/inject/ScopeBindingProcessor.java
        index 187db3b9b81..97058673500 100644
        --- a/core/src/main/java/org/elasticsearch/common/inject/ScopeBindingProcessor.java
        +++ b/core/src/main/java/org/elasticsearch/common/inject/ScopeBindingProcessor.java
        @@ -1,4 +1,4 @@
        -/**
        +/*
          * Copyright (C) 2008 Google Inc.
          *
          * Licensed under the Apache License, Version 2.0 (the "License");
        diff --git a/core/src/main/java/org/elasticsearch/common/inject/Scopes.java b/core/src/main/java/org/elasticsearch/common/inject/Scopes.java
        index babc4bd65c0..f94460d7cae 100644
        --- a/core/src/main/java/org/elasticsearch/common/inject/Scopes.java
        +++ b/core/src/main/java/org/elasticsearch/common/inject/Scopes.java
        @@ -1,4 +1,4 @@
        -/**
        +/*
          * Copyright (C) 2006 Google Inc.
          *
          * Licensed under the Apache License, Version 2.0 (the "License");
        @@ -81,8 +81,8 @@ public class Scopes {
              * Injector obtains an instance of an object with "no scope", it injects this
              * instance then immediately forgets it.  When the next request for the same
              * binding arrives it will need to obtain the instance over again.
        -     * 

        - *

        This exists only in case a class has been annotated with a scope + *

        + * This exists only in case a class has been annotated with a scope * annotation such as {@link Singleton @Singleton}, and you need to override * this to "no scope" in your binding. * diff --git a/core/src/main/java/org/elasticsearch/common/inject/SingleFieldInjector.java b/core/src/main/java/org/elasticsearch/common/inject/SingleFieldInjector.java index a1375de789f..10ba17d86cd 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/SingleFieldInjector.java +++ b/core/src/main/java/org/elasticsearch/common/inject/SingleFieldInjector.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/SingleMemberInjector.java b/core/src/main/java/org/elasticsearch/common/inject/SingleMemberInjector.java index 791a4f8ca42..cca00751cd2 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/SingleMemberInjector.java +++ b/core/src/main/java/org/elasticsearch/common/inject/SingleMemberInjector.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/SingleMethodInjector.java b/core/src/main/java/org/elasticsearch/common/inject/SingleMethodInjector.java index 65f7b0692a8..9c407791160 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/SingleMethodInjector.java +++ b/core/src/main/java/org/elasticsearch/common/inject/SingleMethodInjector.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/SingleParameterInjector.java b/core/src/main/java/org/elasticsearch/common/inject/SingleParameterInjector.java index 372b4837f0b..b9570e1b81e 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/SingleParameterInjector.java +++ b/core/src/main/java/org/elasticsearch/common/inject/SingleParameterInjector.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/Singleton.java b/core/src/main/java/org/elasticsearch/common/inject/Singleton.java index eeca5e01852..68b05448e54 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/Singleton.java +++ b/core/src/main/java/org/elasticsearch/common/inject/Singleton.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2006 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/Stage.java b/core/src/main/java/org/elasticsearch/common/inject/Stage.java index f6969a20691..5533cae4c41 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/Stage.java +++ b/core/src/main/java/org/elasticsearch/common/inject/Stage.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2006 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/State.java b/core/src/main/java/org/elasticsearch/common/inject/State.java index 53d1bddd313..0388bb04a68 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/State.java +++ b/core/src/main/java/org/elasticsearch/common/inject/State.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/TypeConverterBindingProcessor.java b/core/src/main/java/org/elasticsearch/common/inject/TypeConverterBindingProcessor.java index ba711e401cb..485fab738a9 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/TypeConverterBindingProcessor.java +++ b/core/src/main/java/org/elasticsearch/common/inject/TypeConverterBindingProcessor.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/TypeListenerBindingProcessor.java b/core/src/main/java/org/elasticsearch/common/inject/TypeListenerBindingProcessor.java index 4139fc04f2d..533576ddf5e 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/TypeListenerBindingProcessor.java +++ b/core/src/main/java/org/elasticsearch/common/inject/TypeListenerBindingProcessor.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2009 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/TypeLiteral.java b/core/src/main/java/org/elasticsearch/common/inject/TypeLiteral.java index ee50b129dc3..81ee9cbbe67 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/TypeLiteral.java +++ b/core/src/main/java/org/elasticsearch/common/inject/TypeLiteral.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2006 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -31,28 +31,27 @@ import static org.elasticsearch.common.inject.internal.MoreTypes.canonicalize; * represent generic types, so this class does. Forces clients to create a * subclass of this class which enables retrieval the type information even at * runtime. - *

        - *

        For example, to create a type literal for {@code List}, you can + *

        + * For example, to create a type literal for {@code List}, you can * create an empty anonymous inner class: - *

        - *

        + *

        * {@code TypeLiteral> list = new TypeLiteral>() {};} - *

        - *

        This syntax cannot be used to create type literals that have wildcard + *

        + * This syntax cannot be used to create type literals that have wildcard * parameters, such as {@code Class} or {@code List}. * Such type literals must be constructed programatically, either by {@link * Method#getGenericReturnType extracting types from members} or by using the * {@link Types} factory class. - *

        - *

        Along with modeling generic types, this class can resolve type parameters. + *

        + * Along with modeling generic types, this class can resolve type parameters. * For example, to figure out what type {@code keySet()} returns on a {@code - * Map}, use this code:

           {@code
        - * 

        + * Map}, use this code:{@code + *

        * TypeLiteral> mapType * = new TypeLiteral>() {}; * TypeLiteral keySetType * = mapType.getReturnType(Map.class.getMethod("keySet")); - * System.out.println(keySetType); // prints "Set"}

        + * System.out.println(keySetType); // prints "Set"} * * @author crazybob@google.com (Bob Lee) * @author jessewilson@google.com (Jesse Wilson) @@ -66,8 +65,8 @@ public class TypeLiteral { /** * Constructs a new type literal. Derives represented class from type * parameter. - *

        - *

        Clients create an empty anonymous subclass. Doing so embeds the type + *

        + * Clients create an empty anonymous subclass. Doing so embeds the type * parameter in the anonymous class's type hierarchy so we can reconstitute it * at runtime despite erasure. */ diff --git a/core/src/main/java/org/elasticsearch/common/inject/WeakKeySet.java b/core/src/main/java/org/elasticsearch/common/inject/WeakKeySet.java index f13ff347275..6e49e01a415 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/WeakKeySet.java +++ b/core/src/main/java/org/elasticsearch/common/inject/WeakKeySet.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -28,8 +28,8 @@ final class WeakKeySet { /** * We store strings rather than keys so we don't hold strong references. - *

        - *

        One potential problem with this approach is that parent and child injectors cannot define + *

        + * One potential problem with this approach is that parent and child injectors cannot define * keys whose class names are equal but class loaders are different. This shouldn't be an issue * in practice. */ diff --git a/core/src/main/java/org/elasticsearch/common/inject/assistedinject/Assisted.java b/core/src/main/java/org/elasticsearch/common/inject/assistedinject/Assisted.java index 7dba708ef01..32b1d60bc14 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/assistedinject/Assisted.java +++ b/core/src/main/java/org/elasticsearch/common/inject/assistedinject/Assisted.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2007 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -40,4 +40,4 @@ public @interface Assisted { * parameter with the same value. Names are not necessary when the parameter types are distinct. */ String value() default ""; -} \ No newline at end of file +} diff --git a/core/src/main/java/org/elasticsearch/common/inject/assistedinject/AssistedConstructor.java b/core/src/main/java/org/elasticsearch/common/inject/assistedinject/AssistedConstructor.java index e3410bf97b3..edceb3f9063 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/assistedinject/AssistedConstructor.java +++ b/core/src/main/java/org/elasticsearch/common/inject/assistedinject/AssistedConstructor.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2007 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/assistedinject/AssistedInject.java b/core/src/main/java/org/elasticsearch/common/inject/assistedinject/AssistedInject.java index cbba8be2373..ce661d27cdf 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/assistedinject/AssistedInject.java +++ b/core/src/main/java/org/elasticsearch/common/inject/assistedinject/AssistedInject.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2007 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -26,8 +26,8 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME; *

        Constructors annotated with {@code @AssistedInject} indicate that they can be instantiated by * the {@link FactoryProvider}. Each constructor must exactly match one corresponding factory method * within the factory interface. - *

        - *

        Constructor parameters must be either supplied by the factory interface and marked with + *

        + * Constructor parameters must be either supplied by the factory interface and marked with * @Assisted, or they must be injectable. * * @author jmourits@google.com (Jerome Mourits) diff --git a/core/src/main/java/org/elasticsearch/common/inject/assistedinject/FactoryProvider.java b/core/src/main/java/org/elasticsearch/common/inject/assistedinject/FactoryProvider.java index d66037b24ad..78aeb56fdca 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/assistedinject/FactoryProvider.java +++ b/core/src/main/java/org/elasticsearch/common/inject/assistedinject/FactoryProvider.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2007 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -44,7 +44,6 @@ import java.util.Set; /** * Provides a factory that combines the caller's arguments with injector-supplied values to * construct objects. - *

        *

        Defining a factory

        * Create an interface whose methods return the constructed type, or any of its supertypes. The * method's parameters are the arguments required to build the constructed type. @@ -53,7 +52,6 @@ import java.util.Set; * }
        * You can name your factory methods whatever you like, such as create, createPayment * or newPayment. - *

        *

        Creating a type that accepts factory parameters

        * {@code constructedType} is a concrete class with an {@literal @}{@link Inject}-annotated * constructor. In addition to injector-supplied parameters, the constructor should have @@ -71,7 +69,6 @@ import java.util.Set; * } * }
      * Any parameter that permits a null value should also be annotated {@code @Nullable}. - *

      *

      Configuring factories

      * In your {@link org.elasticsearch.common.inject.Module module}, bind the factory interface to the returned * factory: @@ -79,24 +76,20 @@ import java.util.Set; * FactoryProvider.newFactory(PaymentFactory.class, RealPayment.class));
    * As a side-effect of this binding, Guice will inject the factory to initialize it for use. The * factory cannot be used until the injector has been initialized. - *

    *

    Using the factory

    * Inject your factory into your application classes. When you use the factory, your arguments * will be combined with values from the injector to construct an instance. *
    public class PaymentAction {
      *   {@literal @}Inject private PaymentFactory paymentFactory;
    - * 

    * public void doPayment(Money amount) { * Payment payment = paymentFactory.create(new Date(), amount); * payment.apply(); * } * }

    - *

    *

    Making parameter types distinct

    * The types of the factory method's parameters must be distinct. To use multiple parameters of * the same type, use a named {@literal @}{@link Assisted} annotation to disambiguate the * parameters. The names must be applied to the factory method's parameters: - *

    *

    public interface PaymentFactory {
      *   Payment create(
      *       {@literal @}Assisted("startDate") Date startDate,
    @@ -115,21 +108,17 @@ import java.util.Set;
      *     ...
      *   }
      * }
    - *

    *

    Values are created by Guice

    * Returned factories use child injectors to create values. The values are eligible for method * interception. In addition, {@literal @}{@literal Inject} members will be injected before they are * returned. - *

    *

    Backwards compatibility using {@literal @}AssistedInject

    * Instead of the {@literal @}Inject annotation, you may annotate the constructed classes with * {@literal @}{@link AssistedInject}. This triggers a limited backwards-compatibility mode. - *

    *

    Instead of matching factory method arguments to constructor parameters using their names, the * parameters are matched by their order. The first factory method argument is * used for the first {@literal @}Assisted constructor parameter, etc.. Annotation names have no * effect. - *

    *

    Returned values are not created by Guice. These types are not eligible for * method interception. They do receive post-construction member injection. * diff --git a/core/src/main/java/org/elasticsearch/common/inject/assistedinject/FactoryProvider2.java b/core/src/main/java/org/elasticsearch/common/inject/assistedinject/FactoryProvider2.java index bedd7969cc8..c52b2dda3f9 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/assistedinject/FactoryProvider2.java +++ b/core/src/main/java/org/elasticsearch/common/inject/assistedinject/FactoryProvider2.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/assistedinject/Parameter.java b/core/src/main/java/org/elasticsearch/common/inject/assistedinject/Parameter.java index 16e4deb65df..e067cc813bd 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/assistedinject/Parameter.java +++ b/core/src/main/java/org/elasticsearch/common/inject/assistedinject/Parameter.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2007 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -101,7 +101,7 @@ class Parameter { /** * Replace annotation instances with annotation types, this is only * appropriate for testing if a key is bound and not for injecting. - *

    + *

    * See Guice bug 125, * http://code.google.com/p/google-guice/issues/detail?id=125 */ diff --git a/core/src/main/java/org/elasticsearch/common/inject/assistedinject/ParameterListKey.java b/core/src/main/java/org/elasticsearch/common/inject/assistedinject/ParameterListKey.java index cfaa9800450..fea6a629387 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/assistedinject/ParameterListKey.java +++ b/core/src/main/java/org/elasticsearch/common/inject/assistedinject/ParameterListKey.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2007 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -63,4 +63,4 @@ class ParameterListKey { public String toString() { return paramList.toString(); } -} \ No newline at end of file +} diff --git a/core/src/main/java/org/elasticsearch/common/inject/binder/AnnotatedBindingBuilder.java b/core/src/main/java/org/elasticsearch/common/inject/binder/AnnotatedBindingBuilder.java index a093f7dee09..a6370a0d841 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/binder/AnnotatedBindingBuilder.java +++ b/core/src/main/java/org/elasticsearch/common/inject/binder/AnnotatedBindingBuilder.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2006 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/binder/AnnotatedConstantBindingBuilder.java b/core/src/main/java/org/elasticsearch/common/inject/binder/AnnotatedConstantBindingBuilder.java index bd924961734..2d0a52391cd 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/binder/AnnotatedConstantBindingBuilder.java +++ b/core/src/main/java/org/elasticsearch/common/inject/binder/AnnotatedConstantBindingBuilder.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2006 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/binder/AnnotatedElementBuilder.java b/core/src/main/java/org/elasticsearch/common/inject/binder/AnnotatedElementBuilder.java index d41f3086590..14c5292f52d 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/binder/AnnotatedElementBuilder.java +++ b/core/src/main/java/org/elasticsearch/common/inject/binder/AnnotatedElementBuilder.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/binder/LinkedBindingBuilder.java b/core/src/main/java/org/elasticsearch/common/inject/binder/LinkedBindingBuilder.java index 831935c37e7..42c92289838 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/binder/LinkedBindingBuilder.java +++ b/core/src/main/java/org/elasticsearch/common/inject/binder/LinkedBindingBuilder.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2006 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/binder/ScopedBindingBuilder.java b/core/src/main/java/org/elasticsearch/common/inject/binder/ScopedBindingBuilder.java index b25bed59de8..a73619fbb0c 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/binder/ScopedBindingBuilder.java +++ b/core/src/main/java/org/elasticsearch/common/inject/binder/ScopedBindingBuilder.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2006 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/internal/AbstractBindingBuilder.java b/core/src/main/java/org/elasticsearch/common/inject/internal/AbstractBindingBuilder.java index e6c3b1c9523..d037b1de37c 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/internal/AbstractBindingBuilder.java +++ b/core/src/main/java/org/elasticsearch/common/inject/internal/AbstractBindingBuilder.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/internal/Annotations.java b/core/src/main/java/org/elasticsearch/common/inject/internal/Annotations.java index 24b3b8055d0..6cf8821a087 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/internal/Annotations.java +++ b/core/src/main/java/org/elasticsearch/common/inject/internal/Annotations.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2006 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/internal/BindingBuilder.java b/core/src/main/java/org/elasticsearch/common/inject/internal/BindingBuilder.java index 45a125966d5..6b03be5796d 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/internal/BindingBuilder.java +++ b/core/src/main/java/org/elasticsearch/common/inject/internal/BindingBuilder.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/internal/BindingImpl.java b/core/src/main/java/org/elasticsearch/common/inject/internal/BindingImpl.java index 1c7552d8b66..291ecb207fe 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/internal/BindingImpl.java +++ b/core/src/main/java/org/elasticsearch/common/inject/internal/BindingImpl.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2006 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/internal/ConstantBindingBuilderImpl.java b/core/src/main/java/org/elasticsearch/common/inject/internal/ConstantBindingBuilderImpl.java index 5befe112d65..1cf37c11994 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/internal/ConstantBindingBuilderImpl.java +++ b/core/src/main/java/org/elasticsearch/common/inject/internal/ConstantBindingBuilderImpl.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/internal/ConstructionContext.java b/core/src/main/java/org/elasticsearch/common/inject/internal/ConstructionContext.java index 7934fb46dcd..34c9faf77e7 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/internal/ConstructionContext.java +++ b/core/src/main/java/org/elasticsearch/common/inject/internal/ConstructionContext.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2006 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/internal/ErrorHandler.java b/core/src/main/java/org/elasticsearch/common/inject/internal/ErrorHandler.java index 86f132134f3..63173bd318f 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/internal/ErrorHandler.java +++ b/core/src/main/java/org/elasticsearch/common/inject/internal/ErrorHandler.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2006 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/internal/Errors.java b/core/src/main/java/org/elasticsearch/common/inject/internal/Errors.java index a38b2c0b346..6c9d155d6b7 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/internal/Errors.java +++ b/core/src/main/java/org/elasticsearch/common/inject/internal/Errors.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2006 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -52,12 +52,12 @@ import java.util.Locale; /** * A collection of error messages. If this type is passed as a method parameter, the method is * considered to have executed successfully only if new errors were not added to this collection. - *

    - *

    Errors can be chained to provide additional context. To add context, call {@link #withSource} + *

    + * Errors can be chained to provide additional context. To add context, call {@link #withSource} * to create a new Errors instance that contains additional context. All messages added to the * returned instance will contain full context. - *

    - *

    To avoid messages with redundant context, {@link #withSource} should be added sparingly. A + *

    + * To avoid messages with redundant context, {@link #withSource} should be added sparingly. A * good rule of thumb is to assume a ethod's caller has already specified enough context to * identify that method. When calling a method that's defined in a different context, call that * method with an errors object that includes its context. diff --git a/core/src/main/java/org/elasticsearch/common/inject/internal/ErrorsException.java b/core/src/main/java/org/elasticsearch/common/inject/internal/ErrorsException.java index c570853ced7..570a787d360 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/internal/ErrorsException.java +++ b/core/src/main/java/org/elasticsearch/common/inject/internal/ErrorsException.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/internal/ExposedBindingImpl.java b/core/src/main/java/org/elasticsearch/common/inject/internal/ExposedBindingImpl.java index 64961cdc230..335b415fa63 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/internal/ExposedBindingImpl.java +++ b/core/src/main/java/org/elasticsearch/common/inject/internal/ExposedBindingImpl.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/internal/ExposureBuilder.java b/core/src/main/java/org/elasticsearch/common/inject/internal/ExposureBuilder.java index 6b5f5f95a97..36b148ebbe9 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/internal/ExposureBuilder.java +++ b/core/src/main/java/org/elasticsearch/common/inject/internal/ExposureBuilder.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2009 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/internal/FailableCache.java b/core/src/main/java/org/elasticsearch/common/inject/internal/FailableCache.java index 23c6b15e17b..c0dd95fdf8c 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/internal/FailableCache.java +++ b/core/src/main/java/org/elasticsearch/common/inject/internal/FailableCache.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/internal/InstanceBindingImpl.java b/core/src/main/java/org/elasticsearch/common/inject/internal/InstanceBindingImpl.java index 64bae0b022f..73c447ea1fb 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/internal/InstanceBindingImpl.java +++ b/core/src/main/java/org/elasticsearch/common/inject/internal/InstanceBindingImpl.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/internal/InternalContext.java b/core/src/main/java/org/elasticsearch/common/inject/internal/InternalContext.java index aed51b104d8..1184a97edc2 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/internal/InternalContext.java +++ b/core/src/main/java/org/elasticsearch/common/inject/internal/InternalContext.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2006 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/internal/InternalFactory.java b/core/src/main/java/org/elasticsearch/common/inject/internal/InternalFactory.java index c1b36d6a9d4..b2203ed3b64 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/internal/InternalFactory.java +++ b/core/src/main/java/org/elasticsearch/common/inject/internal/InternalFactory.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2006 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/internal/Join.java b/core/src/main/java/org/elasticsearch/common/inject/internal/Join.java index db0afe95d3a..1c8c835615b 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/internal/Join.java +++ b/core/src/main/java/org/elasticsearch/common/inject/internal/Join.java @@ -29,8 +29,8 @@ import java.util.Objects; * iterators, collections, arrays, and varargs, and can append to any * {@link Appendable} or just return a {@link String}. For example, * {@code join(":", "a", "b", "c")} returns {@code "a:b:c"}. - *

    - *

    All methods of this class throw {@link NullPointerException} when a value + *

    + * All methods of this class throw {@link NullPointerException} when a value * of {@code null} is supplied for any parameter. The elements within the * collection, iterator, array, or varargs parameter list may be null -- * these will be represented in the output by the string {@code "null"}. @@ -45,8 +45,8 @@ public final class Join { * Returns a string containing the {@code tokens}, converted to strings if * necessary, separated by {@code delimiter}. If {@code tokens} is empty, it * returns an empty string. - *

    - *

    Each token will be converted to a {@link CharSequence} using + *

    + * Each token will be converted to a {@link CharSequence} using * {@link String#valueOf(Object)}, if it isn't a {@link CharSequence} already. * Note that this implies that null tokens will be appended as the * four-character string {@code "null"}. @@ -64,8 +64,8 @@ public final class Join { * Returns a string containing the {@code tokens}, converted to strings if * necessary, separated by {@code delimiter}. If {@code tokens} is empty, it * returns an empty string. - *

    - *

    Each token will be converted to a {@link CharSequence} using + *

    + * Each token will be converted to a {@link CharSequence} using * {@link String#valueOf(Object)}, if it isn't a {@link CharSequence} already. * Note that this implies that null tokens will be appended as the * four-character string {@code "null"}. @@ -82,8 +82,8 @@ public final class Join { /** * Returns a string containing the {@code tokens}, converted to strings if * necessary, separated by {@code delimiter}. - *

    - *

    Each token will be converted to a {@link CharSequence} using + *

    + * Each token will be converted to a {@link CharSequence} using * {@link String#valueOf(Object)}, if it isn't a {@link CharSequence} already. * Note that this implies that null tokens will be appended as the * four-character string {@code "null"}. @@ -104,8 +104,8 @@ public final class Join { * Returns a string containing the {@code tokens}, converted to strings if * necessary, separated by {@code delimiter}. If {@code tokens} is empty, it * returns an empty string. - *

    - *

    Each token will be converted to a {@link CharSequence} using + *

    + * Each token will be converted to a {@link CharSequence} using * {@link String#valueOf(Object)}, if it isn't a {@link CharSequence} already. * Note that this implies that null tokens will be appended as the * four-character string {@code "null"}. @@ -125,8 +125,8 @@ public final class Join { * Returns a string containing the contents of {@code map}, with entries * separated by {@code entryDelimiter}, and keys and values separated with * {@code keyValueSeparator}. - *

    - *

    Each key and value will be converted to a {@link CharSequence} using + *

    + * Each key and value will be converted to a {@link CharSequence} using * {@link String#valueOf(Object)}, if it isn't a {@link CharSequence} already. * Note that this implies that null tokens will be appended as the * four-character string {@code "null"}. @@ -148,8 +148,8 @@ public final class Join { /** * Appends each of the {@code tokens} to {@code appendable}, separated by * {@code delimiter}. - *

    - *

    Each token will be converted to a {@link CharSequence} using + *

    + * Each token will be converted to a {@link CharSequence} using * {@link String#valueOf(Object)}, if it isn't a {@link CharSequence} already. * Note that this implies that null tokens will be appended as the * four-character string {@code "null"}. @@ -169,8 +169,8 @@ public final class Join { /** * Appends each of the {@code tokens} to {@code appendable}, separated by * {@code delimiter}. - *

    - *

    Each token will be converted to a {@link CharSequence} using + *

    + * Each token will be converted to a {@link CharSequence} using * {@link String#valueOf(Object)}, if it isn't a {@link CharSequence} already. * Note that this implies that null tokens will be appended as the * four-character string {@code "null"}. @@ -190,8 +190,8 @@ public final class Join { /** * Appends each of the {@code tokens} to {@code appendable}, separated by * {@code delimiter}. - *

    - *

    Each token will be converted to a {@link CharSequence} using + *

    + * Each token will be converted to a {@link CharSequence} using * {@link String#valueOf(Object)}, if it isn't a {@link CharSequence} already. * Note that this implies that null tokens will be appended as the * four-character string {@code "null"}. @@ -213,8 +213,8 @@ public final class Join { /** * Appends each of the {@code tokens} to {@code appendable}, separated by * {@code delimiter}. - *

    - *

    Each token will be converted to a {@link CharSequence} using + *

    + * Each token will be converted to a {@link CharSequence} using * {@link String#valueOf(Object)}, if it isn't a {@link CharSequence} already. * Note that this implies that null tokens will be appended as the * four-character string {@code "null"}. @@ -251,8 +251,8 @@ public final class Join { * Appends the contents of {@code map} to {@code appendable}, with entries * separated by {@code entryDelimiter}, and keys and values separated with * {@code keyValueSeparator}. - *

    - *

    Each key and value will be converted to a {@link CharSequence} using + *

    + * Each key and value will be converted to a {@link CharSequence} using * {@link String#valueOf(Object)}, if it isn't a {@link CharSequence} already. * Note that this implies that null tokens will be appended as the * four-character string {@code "null"}. @@ -316,4 +316,4 @@ public final class Join { private static final long serialVersionUID = 1L; } -} \ No newline at end of file +} diff --git a/core/src/main/java/org/elasticsearch/common/inject/internal/MoreTypes.java b/core/src/main/java/org/elasticsearch/common/inject/internal/MoreTypes.java index 2a6111674e7..737b8fa7d1c 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/internal/MoreTypes.java +++ b/core/src/main/java/org/elasticsearch/common/inject/internal/MoreTypes.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/internal/Nullability.java b/core/src/main/java/org/elasticsearch/common/inject/internal/Nullability.java index 621ff4d7562..aad0c3a5ef3 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/internal/Nullability.java +++ b/core/src/main/java/org/elasticsearch/common/inject/internal/Nullability.java @@ -4,11 +4,9 @@ import java.lang.annotation.Annotation; /** * Whether a member supports null values injected. - *

    *

    Support for {@code Nullable} annotations in Guice is loose. * Any annotation type whose simplename is "Nullable" is sufficient to indicate * support for null values injected. - *

    *

    This allows support for JSR-305's * * javax.annotation.meta.Nullable annotation and IntelliJ IDEA's diff --git a/core/src/main/java/org/elasticsearch/common/inject/internal/Nullable.java b/core/src/main/java/org/elasticsearch/common/inject/internal/Nullable.java index ec48aedb6eb..4dd499e4328 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/internal/Nullable.java +++ b/core/src/main/java/org/elasticsearch/common/inject/internal/Nullable.java @@ -22,8 +22,8 @@ import java.lang.annotation.*; * The presence of this annotation on a method parameter indicates that * {@code null} is an acceptable value for that parameter. It should not be * used for parameters of primitive types. - *

    - *

    This annotation may be used with the Google Web Toolkit (GWT). + *

    + * This annotation may be used with the Google Web Toolkit (GWT). * * @author Kevin Bourrillion */ diff --git a/core/src/main/java/org/elasticsearch/common/inject/internal/PrivateElementsImpl.java b/core/src/main/java/org/elasticsearch/common/inject/internal/PrivateElementsImpl.java index 6ab5454325a..685073b2c49 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/internal/PrivateElementsImpl.java +++ b/core/src/main/java/org/elasticsearch/common/inject/internal/PrivateElementsImpl.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/internal/ProviderMethod.java b/core/src/main/java/org/elasticsearch/common/inject/internal/ProviderMethod.java index 84fbae4bec2..a5d2f091d38 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/internal/ProviderMethod.java +++ b/core/src/main/java/org/elasticsearch/common/inject/internal/ProviderMethod.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/internal/ProviderMethodsModule.java b/core/src/main/java/org/elasticsearch/common/inject/internal/ProviderMethodsModule.java index aa556edb372..fdd9402d144 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/internal/ProviderMethodsModule.java +++ b/core/src/main/java/org/elasticsearch/common/inject/internal/ProviderMethodsModule.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/internal/Scoping.java b/core/src/main/java/org/elasticsearch/common/inject/internal/Scoping.java index b870f4273b4..f6e26595e58 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/internal/Scoping.java +++ b/core/src/main/java/org/elasticsearch/common/inject/internal/Scoping.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/internal/SourceProvider.java b/core/src/main/java/org/elasticsearch/common/inject/internal/SourceProvider.java index a149c5739a0..d498de90c0a 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/internal/SourceProvider.java +++ b/core/src/main/java/org/elasticsearch/common/inject/internal/SourceProvider.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2006 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/internal/StackTraceElements.java b/core/src/main/java/org/elasticsearch/common/inject/internal/StackTraceElements.java index 2b55ddd9a1e..5589c7b3082 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/internal/StackTraceElements.java +++ b/core/src/main/java/org/elasticsearch/common/inject/internal/StackTraceElements.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2006 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/internal/Stopwatch.java b/core/src/main/java/org/elasticsearch/common/inject/internal/Stopwatch.java index 849e8693537..a7e332174e5 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/internal/Stopwatch.java +++ b/core/src/main/java/org/elasticsearch/common/inject/internal/Stopwatch.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2006 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/internal/Strings.java b/core/src/main/java/org/elasticsearch/common/inject/internal/Strings.java index 7c2e703d7f4..40215810607 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/internal/Strings.java +++ b/core/src/main/java/org/elasticsearch/common/inject/internal/Strings.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2006 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -31,8 +31,8 @@ public class Strings { * The returned string will have the same value as the specified string if * its first character is non-alphabetic, if its first character is already * uppercase, or if the specified string is of length 0. - *

    - *

    For example: + *

    + * For example: *

          *    capitalize("foo bar").equals("Foo bar");
          *    capitalize("2b or not 2b").equals("2b or not 2b")
    diff --git a/core/src/main/java/org/elasticsearch/common/inject/internal/ToStringBuilder.java b/core/src/main/java/org/elasticsearch/common/inject/internal/ToStringBuilder.java
    index 1b36d63ed59..4e975280cb7 100644
    --- a/core/src/main/java/org/elasticsearch/common/inject/internal/ToStringBuilder.java
    +++ b/core/src/main/java/org/elasticsearch/common/inject/internal/ToStringBuilder.java
    @@ -1,4 +1,4 @@
    -/**
    +/*
      * Copyright (C) 2006 Google Inc.
      *
      * Licensed under the Apache License, Version 2.0 (the "License");
    diff --git a/core/src/main/java/org/elasticsearch/common/inject/internal/UniqueAnnotations.java b/core/src/main/java/org/elasticsearch/common/inject/internal/UniqueAnnotations.java
    index 15c77369112..4324eb4d002 100644
    --- a/core/src/main/java/org/elasticsearch/common/inject/internal/UniqueAnnotations.java
    +++ b/core/src/main/java/org/elasticsearch/common/inject/internal/UniqueAnnotations.java
    @@ -1,4 +1,4 @@
    -/**
    +/*
      * Copyright (C) 2008 Google Inc.
      *
      * Licensed under the Apache License, Version 2.0 (the "License");
    diff --git a/core/src/main/java/org/elasticsearch/common/inject/matcher/AbstractMatcher.java b/core/src/main/java/org/elasticsearch/common/inject/matcher/AbstractMatcher.java
    index 50007163639..a180ecacb84 100644
    --- a/core/src/main/java/org/elasticsearch/common/inject/matcher/AbstractMatcher.java
    +++ b/core/src/main/java/org/elasticsearch/common/inject/matcher/AbstractMatcher.java
    @@ -1,4 +1,4 @@
    -/**
    +/*
      * Copyright (C) 2006 Google Inc.
      *
      * Licensed under the Apache License, Version 2.0 (the "License");
    diff --git a/core/src/main/java/org/elasticsearch/common/inject/matcher/Matcher.java b/core/src/main/java/org/elasticsearch/common/inject/matcher/Matcher.java
    index e2bfa1b0609..a6da3118107 100644
    --- a/core/src/main/java/org/elasticsearch/common/inject/matcher/Matcher.java
    +++ b/core/src/main/java/org/elasticsearch/common/inject/matcher/Matcher.java
    @@ -1,4 +1,4 @@
    -/**
    +/*
      * Copyright (C) 2006 Google Inc.
      *
      * Licensed under the Apache License, Version 2.0 (the "License");
    diff --git a/core/src/main/java/org/elasticsearch/common/inject/matcher/Matchers.java b/core/src/main/java/org/elasticsearch/common/inject/matcher/Matchers.java
    index c29a48ddd91..96df76c0b93 100644
    --- a/core/src/main/java/org/elasticsearch/common/inject/matcher/Matchers.java
    +++ b/core/src/main/java/org/elasticsearch/common/inject/matcher/Matchers.java
    @@ -1,4 +1,4 @@
    -/**
    +/*
      * Copyright (C) 2006 Google Inc.
      *
      * Licensed under the Apache License, Version 2.0 (the "License");
    diff --git a/core/src/main/java/org/elasticsearch/common/inject/multibindings/Element.java b/core/src/main/java/org/elasticsearch/common/inject/multibindings/Element.java
    index 02323dc5681..68ffa4e8583 100644
    --- a/core/src/main/java/org/elasticsearch/common/inject/multibindings/Element.java
    +++ b/core/src/main/java/org/elasticsearch/common/inject/multibindings/Element.java
    @@ -1,4 +1,4 @@
    -/**
    +/*
      * Copyright (C) 2008 Google Inc.
      *
      * Licensed under the Apache License, Version 2.0 (the "License");
    diff --git a/core/src/main/java/org/elasticsearch/common/inject/multibindings/MapBinder.java b/core/src/main/java/org/elasticsearch/common/inject/multibindings/MapBinder.java
    index 01bd59f7d93..81f66561b81 100644
    --- a/core/src/main/java/org/elasticsearch/common/inject/multibindings/MapBinder.java
    +++ b/core/src/main/java/org/elasticsearch/common/inject/multibindings/MapBinder.java
    @@ -1,4 +1,4 @@
    -/**
    +/*
      * Copyright (C) 2008 Google Inc.
      *
      * Licensed under the Apache License, Version 2.0 (the "License");
    @@ -48,43 +48,43 @@ import static org.elasticsearch.common.inject.util.Types.newParameterizedTypeWit
      *     mapbinder.addBinding("skittles").to(Skittles.class);
      *   }
      * }
    - *

    - *

    With this binding, a {@link Map}{@code } can now be + *

    + * With this binding, a {@link Map}{@code } can now be * injected: *

    
      * class SnackMachine {
      *   {@literal @}Inject
      *   public SnackMachine(Map<String, Snack> snacks) { ... }
      * }
    - *

    - *

    In addition to binding {@code Map}, a mapbinder will also bind + *

    + * In addition to binding {@code Map}, a mapbinder will also bind * {@code Map>} for lazy value provision: *

    
      * class SnackMachine {
      *   {@literal @}Inject
      *   public SnackMachine(Map<String, Provider<Snack>> snackProviders) { ... }
      * }
    - *

    - *

    Creating mapbindings from different modules is supported. For example, it + *

    + * Creating mapbindings from different modules is supported. For example, it * is okay to have both {@code CandyModule} and {@code ChipsModule} both * create their own {@code MapBinder}, and to each contribute * bindings to the snacks map. When that map is injected, it will contain * entries from both modules. - *

    - *

    Values are resolved at map injection time. If a value is bound to a + *

    + * Values are resolved at map injection time. If a value is bound to a * provider, that provider's get method will be called each time the map is * injected (unless the binding is also scoped, or a map of providers is injected). - *

    - *

    Annotations are used to create different maps of the same key/value + *

    + * Annotations are used to create different maps of the same key/value * type. Each distinct annotation gets its own independent map. - *

    - *

    Keys must be distinct. If the same key is bound more than + *

    + * Keys must be distinct. If the same key is bound more than * once, map injection will fail. - *

    - *

    Keys must be non-null. {@code addBinding(null)} will + *

    + * Keys must be non-null. {@code addBinding(null)} will * throw an unchecked exception. - *

    - *

    Values must be non-null to use map injection. If any + *

    + * Values must be non-null to use map injection. If any * value is null, map injection will fail (although injecting a map of providers * will not). * @@ -195,38 +195,38 @@ public abstract class MapBinder { * Returns a binding builder used to add a new entry in the map. Each * key must be distinct (and non-null). Bound providers will be evaluated each * time the map is injected. - *

    - *

    It is an error to call this method without also calling one of the + *

    + * It is an error to call this method without also calling one of the * {@code to} methods on the returned binding builder. - *

    - *

    Scoping elements independently is supported. Use the {@code in} method + *

    + * Scoping elements independently is supported. Use the {@code in} method * to specify a binding scope. */ public abstract LinkedBindingBuilder addBinding(K key); /** * The actual mapbinder plays several roles: - *

    - *

    As a MapBinder, it acts as a factory for LinkedBindingBuilders for + *

    + * As a MapBinder, it acts as a factory for LinkedBindingBuilders for * each of the map's values. It delegates to a {@link Multibinder} of * entries (keys to value providers). - *

    - *

    As a Module, it installs the binding to the map itself, as well as to + *

    + * As a Module, it installs the binding to the map itself, as well as to * a corresponding map whose values are providers. It uses the entry set * multibinder to construct the map and the provider map. - *

    - *

    As a module, this implements equals() and hashcode() in order to trick + *

    + * As a module, this implements equals() and hashcode() in order to trick * Guice into executing its configure() method only once. That makes it so * that multiple mapbinders can be created for the same target map, but * only one is bound. Since the list of bindings is retrieved from the * injector itself (and not the mapbinder), each mapbinder has access to * all contributions from all equivalent mapbinders. - *

    - *

    Rather than binding a single Map.Entry<K, V>, the map binder + *

    + * Rather than binding a single Map.Entry<K, V>, the map binder * binds keys and values independently. This allows the values to be properly * scoped. - *

    - *

    We use a subclass to hide 'implements Module' from the public API. + *

    + * We use a subclass to hide 'implements Module' from the public API. */ public static final class RealMapBinder extends MapBinder implements Module { private final TypeLiteral valueType; diff --git a/core/src/main/java/org/elasticsearch/common/inject/multibindings/Multibinder.java b/core/src/main/java/org/elasticsearch/common/inject/multibindings/Multibinder.java index 87ee3c3c991..9455dc57ba5 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/multibindings/Multibinder.java +++ b/core/src/main/java/org/elasticsearch/common/inject/multibindings/Multibinder.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -56,32 +56,32 @@ import java.util.Set; * multibinder.addBinding().to(Skittles.class); * } * }

    - *

    - *

    With this binding, a {@link Set}{@code } can now be injected: + *

    + * With this binding, a {@link Set}{@code } can now be injected: *

    
      * class SnackMachine {
      *   {@literal @}Inject
      *   public SnackMachine(Set<Snack> snacks) { ... }
      * }
    - *

    - *

    Create multibindings from different modules is supported. For example, it + *

    + * Create multibindings from different modules is supported. For example, it * is okay to have both {@code CandyModule} and {@code ChipsModule} to both * create their own {@code Multibinder}, and to each contribute bindings * to the set of snacks. When that set is injected, it will contain elements * from both modules. - *

    - *

    Elements are resolved at set injection time. If an element is bound to a + *

    + * Elements are resolved at set injection time. If an element is bound to a * provider, that provider's get method will be called each time the set is * injected (unless the binding is also scoped). - *

    - *

    Annotations are be used to create different sets of the same element + *

    + * Annotations are be used to create different sets of the same element * type. Each distinct annotation gets its own independent collection of * elements. - *

    - *

    Elements must be distinct. If multiple bound elements + *

    + * Elements must be distinct. If multiple bound elements * have the same value, set injection will fail. - *

    - *

    Elements must be non-null. If any set element is null, + *

    + * Elements must be non-null. If any set element is null, * set injection will fail. * * @author jessewilson@google.com (Jesse Wilson) @@ -164,33 +164,33 @@ public abstract class Multibinder { * Returns a binding builder used to add a new element in the set. Each * bound element must have a distinct value. Bound providers will be * evaluated each time the set is injected. - *

    - *

    It is an error to call this method without also calling one of the + *

    + * It is an error to call this method without also calling one of the * {@code to} methods on the returned binding builder. - *

    - *

    Scoping elements independently is supported. Use the {@code in} method + *

    + * Scoping elements independently is supported. Use the {@code in} method * to specify a binding scope. */ public abstract LinkedBindingBuilder addBinding(); /** * The actual multibinder plays several roles: - *

    - *

    As a Multibinder, it acts as a factory for LinkedBindingBuilders for + *

    + * As a Multibinder, it acts as a factory for LinkedBindingBuilders for * each of the set's elements. Each binding is given an annotation that * identifies it as a part of this set. - *

    - *

    As a Module, it installs the binding to the set itself. As a module, + *

    + * As a Module, it installs the binding to the set itself. As a module, * this implements equals() and hashcode() in order to trick Guice into * executing its configure() method only once. That makes it so that * multiple multibinders can be created for the same target collection, but * only one is bound. Since the list of bindings is retrieved from the * injector itself (and not the multibinder), each multibinder has access to * all contributions from all multibinders. - *

    - *

    As a Provider, this constructs the set instances. - *

    - *

    We use a subclass to hide 'implements Module, Provider' from the public + *

    + * As a Provider, this constructs the set instances. + *

    + * We use a subclass to hide 'implements Module, Provider' from the public * API. */ public static final class RealMultibinder extends Multibinder diff --git a/core/src/main/java/org/elasticsearch/common/inject/multibindings/RealElement.java b/core/src/main/java/org/elasticsearch/common/inject/multibindings/RealElement.java index cc123de8cab..acc859162bb 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/multibindings/RealElement.java +++ b/core/src/main/java/org/elasticsearch/common/inject/multibindings/RealElement.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/name/Named.java b/core/src/main/java/org/elasticsearch/common/inject/name/Named.java index 0d914be6f51..54ec471e494 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/name/Named.java +++ b/core/src/main/java/org/elasticsearch/common/inject/name/Named.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2006 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/name/NamedImpl.java b/core/src/main/java/org/elasticsearch/common/inject/name/NamedImpl.java index 8cf7af12f03..7c43e7c5a73 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/name/NamedImpl.java +++ b/core/src/main/java/org/elasticsearch/common/inject/name/NamedImpl.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2006 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/name/Names.java b/core/src/main/java/org/elasticsearch/common/inject/name/Names.java index 7f3636f6b78..c3da515350a 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/name/Names.java +++ b/core/src/main/java/org/elasticsearch/common/inject/name/Names.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2006 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/package-info.java b/core/src/main/java/org/elasticsearch/common/inject/package-info.java index 44ff5b2f300..2fa93ef48eb 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/package-info.java +++ b/core/src/main/java/org/elasticsearch/common/inject/package-info.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2006 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/spi/BindingScopingVisitor.java b/core/src/main/java/org/elasticsearch/common/inject/spi/BindingScopingVisitor.java index fb2f4ff1761..6025466b9e9 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/spi/BindingScopingVisitor.java +++ b/core/src/main/java/org/elasticsearch/common/inject/spi/BindingScopingVisitor.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/spi/BindingTargetVisitor.java b/core/src/main/java/org/elasticsearch/common/inject/spi/BindingTargetVisitor.java index b13611588a9..56ca0c57fa5 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/spi/BindingTargetVisitor.java +++ b/core/src/main/java/org/elasticsearch/common/inject/spi/BindingTargetVisitor.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/spi/ConstructorBinding.java b/core/src/main/java/org/elasticsearch/common/inject/spi/ConstructorBinding.java index df464fa00fe..85951dacdaa 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/spi/ConstructorBinding.java +++ b/core/src/main/java/org/elasticsearch/common/inject/spi/ConstructorBinding.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/spi/ConvertedConstantBinding.java b/core/src/main/java/org/elasticsearch/common/inject/spi/ConvertedConstantBinding.java index ebabfa318fb..3c4ec4d9ed5 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/spi/ConvertedConstantBinding.java +++ b/core/src/main/java/org/elasticsearch/common/inject/spi/ConvertedConstantBinding.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/spi/DefaultBindingScopingVisitor.java b/core/src/main/java/org/elasticsearch/common/inject/spi/DefaultBindingScopingVisitor.java index 106f9e722bc..deced4e1412 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/spi/DefaultBindingScopingVisitor.java +++ b/core/src/main/java/org/elasticsearch/common/inject/spi/DefaultBindingScopingVisitor.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/spi/DefaultBindingTargetVisitor.java b/core/src/main/java/org/elasticsearch/common/inject/spi/DefaultBindingTargetVisitor.java index 508c2899139..75a3b615a10 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/spi/DefaultBindingTargetVisitor.java +++ b/core/src/main/java/org/elasticsearch/common/inject/spi/DefaultBindingTargetVisitor.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/spi/DefaultElementVisitor.java b/core/src/main/java/org/elasticsearch/common/inject/spi/DefaultElementVisitor.java index 7ee9e0f4628..d86f0bacdbd 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/spi/DefaultElementVisitor.java +++ b/core/src/main/java/org/elasticsearch/common/inject/spi/DefaultElementVisitor.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/spi/Dependency.java b/core/src/main/java/org/elasticsearch/common/inject/spi/Dependency.java index 919e8d331bb..2bac853d2d9 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/spi/Dependency.java +++ b/core/src/main/java/org/elasticsearch/common/inject/spi/Dependency.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -26,8 +26,8 @@ import java.util.Set; /** * A variable that can be resolved by an injector. - *

    - *

    Use {@link #get} to build a freestanding dependency, or {@link InjectionPoint} to build one + *

    + * Use {@link #get} to build a freestanding dependency, or {@link InjectionPoint} to build one * that's attached to a constructor, method or field. * * @author crazybob@google.com (Bob Lee) diff --git a/core/src/main/java/org/elasticsearch/common/inject/spi/Element.java b/core/src/main/java/org/elasticsearch/common/inject/spi/Element.java index a222c37bba5..f9128d98f56 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/spi/Element.java +++ b/core/src/main/java/org/elasticsearch/common/inject/spi/Element.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -20,13 +20,13 @@ import org.elasticsearch.common.inject.Binder; /** * A core component of a module or injector. - *

    - *

    The elements of a module can be inspected, validated and rewritten. Use {@link + *

    + * The elements of a module can be inspected, validated and rewritten. Use {@link * Elements#getElements(org.elasticsearch.common.inject.Module[]) Elements.getElements()} to read the elements * from a module, and {@link Elements#getModule(Iterable) Elements.getModule()} to rewrite them. * This can be used for static analysis and generation of Guice modules. - *

    - *

    The elements of an injector can be inspected and exercised. Use {@link + *

    + * The elements of an injector can be inspected and exercised. Use {@link * org.elasticsearch.common.inject.Injector#getBindings Injector.getBindings()} to reflect on Guice injectors. * * @author jessewilson@google.com (Jesse Wilson) @@ -38,8 +38,8 @@ public interface Element { /** * Returns an arbitrary object containing information about the "place" where this element was * configured. Used by Guice in the production of descriptive error messages. - *

    - *

    Tools might specially handle types they know about; {@code StackTraceElement} is a good + *

    + * Tools might specially handle types they know about; {@code StackTraceElement} is a good * example. Tools should simply call {@code toString()} on the source object if the type is * unfamiliar. */ diff --git a/core/src/main/java/org/elasticsearch/common/inject/spi/ElementVisitor.java b/core/src/main/java/org/elasticsearch/common/inject/spi/ElementVisitor.java index 1cf17af035f..67114560043 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/spi/ElementVisitor.java +++ b/core/src/main/java/org/elasticsearch/common/inject/spi/ElementVisitor.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/spi/Elements.java b/core/src/main/java/org/elasticsearch/common/inject/spi/Elements.java index afc85458df0..38456a4d04b 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/spi/Elements.java +++ b/core/src/main/java/org/elasticsearch/common/inject/spi/Elements.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/spi/ExposedBinding.java b/core/src/main/java/org/elasticsearch/common/inject/spi/ExposedBinding.java index 33dc6c9d035..d5490c81382 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/spi/ExposedBinding.java +++ b/core/src/main/java/org/elasticsearch/common/inject/spi/ExposedBinding.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -37,4 +37,4 @@ public interface ExposedBinding extends Binding, HasDependencies { */ @Override void applyTo(Binder binder); -} \ No newline at end of file +} diff --git a/core/src/main/java/org/elasticsearch/common/inject/spi/HasDependencies.java b/core/src/main/java/org/elasticsearch/common/inject/spi/HasDependencies.java index 3ff1ffd438c..29367acdebb 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/spi/HasDependencies.java +++ b/core/src/main/java/org/elasticsearch/common/inject/spi/HasDependencies.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/spi/InjectionPoint.java b/core/src/main/java/org/elasticsearch/common/inject/spi/InjectionPoint.java index 72fde2c11d1..2aa07b4f009 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/spi/InjectionPoint.java +++ b/core/src/main/java/org/elasticsearch/common/inject/spi/InjectionPoint.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/spi/InjectionRequest.java b/core/src/main/java/org/elasticsearch/common/inject/spi/InjectionRequest.java index f52e6c387e1..00c6be4b98e 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/spi/InjectionRequest.java +++ b/core/src/main/java/org/elasticsearch/common/inject/spi/InjectionRequest.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/spi/InstanceBinding.java b/core/src/main/java/org/elasticsearch/common/inject/spi/InstanceBinding.java index 13712fe56f2..bd0bf66c653 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/spi/InstanceBinding.java +++ b/core/src/main/java/org/elasticsearch/common/inject/spi/InstanceBinding.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/spi/LinkedKeyBinding.java b/core/src/main/java/org/elasticsearch/common/inject/spi/LinkedKeyBinding.java index 31b1b74d1a0..82c36c7c2e2 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/spi/LinkedKeyBinding.java +++ b/core/src/main/java/org/elasticsearch/common/inject/spi/LinkedKeyBinding.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/spi/MembersInjectorLookup.java b/core/src/main/java/org/elasticsearch/common/inject/spi/MembersInjectorLookup.java index 9bde6247359..d12c6bdd497 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/spi/MembersInjectorLookup.java +++ b/core/src/main/java/org/elasticsearch/common/inject/spi/MembersInjectorLookup.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2009 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/spi/Message.java b/core/src/main/java/org/elasticsearch/common/inject/spi/Message.java index 37aa3b9d0db..e5488d07417 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/spi/Message.java +++ b/core/src/main/java/org/elasticsearch/common/inject/spi/Message.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2006 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/spi/PrivateElements.java b/core/src/main/java/org/elasticsearch/common/inject/spi/PrivateElements.java index 64ead9c0b02..6da4f29aa27 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/spi/PrivateElements.java +++ b/core/src/main/java/org/elasticsearch/common/inject/spi/PrivateElements.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -50,8 +50,8 @@ public interface PrivateElements extends Element { /** * Returns an arbitrary object containing information about the "place" where this key was * exposed. Used by Guice in the production of descriptive error messages. - *

    - *

    Tools might specially handle types they know about; {@code StackTraceElement} is a good + *

    + * Tools might specially handle types they know about; {@code StackTraceElement} is a good * example. Tools should simply call {@code toString()} on the source object if the type is * unfamiliar. * diff --git a/core/src/main/java/org/elasticsearch/common/inject/spi/ProviderBinding.java b/core/src/main/java/org/elasticsearch/common/inject/spi/ProviderBinding.java index b6f67b764f2..04fb78d0288 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/spi/ProviderBinding.java +++ b/core/src/main/java/org/elasticsearch/common/inject/spi/ProviderBinding.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/spi/ProviderInstanceBinding.java b/core/src/main/java/org/elasticsearch/common/inject/spi/ProviderInstanceBinding.java index 246bc8a91a2..9277d9f7ef0 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/spi/ProviderInstanceBinding.java +++ b/core/src/main/java/org/elasticsearch/common/inject/spi/ProviderInstanceBinding.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/spi/ProviderKeyBinding.java b/core/src/main/java/org/elasticsearch/common/inject/spi/ProviderKeyBinding.java index 4d934f82161..15aa751f4a6 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/spi/ProviderKeyBinding.java +++ b/core/src/main/java/org/elasticsearch/common/inject/spi/ProviderKeyBinding.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/spi/ProviderLookup.java b/core/src/main/java/org/elasticsearch/common/inject/spi/ProviderLookup.java index 464b8501af9..9b925cd0466 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/spi/ProviderLookup.java +++ b/core/src/main/java/org/elasticsearch/common/inject/spi/ProviderLookup.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/spi/ProviderWithDependencies.java b/core/src/main/java/org/elasticsearch/common/inject/spi/ProviderWithDependencies.java index 2c214377733..81cd2cd638e 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/spi/ProviderWithDependencies.java +++ b/core/src/main/java/org/elasticsearch/common/inject/spi/ProviderWithDependencies.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/spi/ScopeBinding.java b/core/src/main/java/org/elasticsearch/common/inject/spi/ScopeBinding.java index 9db84af19a9..a1c52c5f8c8 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/spi/ScopeBinding.java +++ b/core/src/main/java/org/elasticsearch/common/inject/spi/ScopeBinding.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/spi/StaticInjectionRequest.java b/core/src/main/java/org/elasticsearch/common/inject/spi/StaticInjectionRequest.java index b7a052561df..cc0fc09c0fc 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/spi/StaticInjectionRequest.java +++ b/core/src/main/java/org/elasticsearch/common/inject/spi/StaticInjectionRequest.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/spi/TypeConverterBinding.java b/core/src/main/java/org/elasticsearch/common/inject/spi/TypeConverterBinding.java index 84215c7e5df..bff5bc1906c 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/spi/TypeConverterBinding.java +++ b/core/src/main/java/org/elasticsearch/common/inject/spi/TypeConverterBinding.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/spi/TypeEncounter.java b/core/src/main/java/org/elasticsearch/common/inject/spi/TypeEncounter.java index b8487a1e4b0..49e84c81ca6 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/spi/TypeEncounter.java +++ b/core/src/main/java/org/elasticsearch/common/inject/spi/TypeEncounter.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2009 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/spi/TypeListener.java b/core/src/main/java/org/elasticsearch/common/inject/spi/TypeListener.java index f066683fec5..134faa2661a 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/spi/TypeListener.java +++ b/core/src/main/java/org/elasticsearch/common/inject/spi/TypeListener.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2009 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -22,9 +22,9 @@ import org.elasticsearch.common.inject.TypeLiteral; * Listens for Guice to encounter injectable types. If a given type has its constructor injected in * one situation but only its methods and fields injected in another, Guice will notify this * listener once. - *

    - *

    Useful for extra type checking, {@linkplain TypeEncounter#register(InjectionListener) - * registering injection listeners}, and {@linkplain TypeEncounter#bindInterceptor( + *

    + * Useful for extra type checking, {@linkplain TypeEncounter#register(InjectionListener) + * registering injection listeners}, and {@code TypeEncounter#bindInterceptor( *org.elasticsearch.common.inject.matcher.Matcher, org.aopalliance.intercept.MethodInterceptor[]) * binding method interceptors}. * diff --git a/core/src/main/java/org/elasticsearch/common/inject/spi/TypeListenerBinding.java b/core/src/main/java/org/elasticsearch/common/inject/spi/TypeListenerBinding.java index 88feaa873e8..c52c239f165 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/spi/TypeListenerBinding.java +++ b/core/src/main/java/org/elasticsearch/common/inject/spi/TypeListenerBinding.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2009 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -23,9 +23,8 @@ import org.elasticsearch.common.inject.matcher.Matcher; /** * Binds types (picked using a Matcher) to an type listener. Registrations are created explicitly in * a module using {@link org.elasticsearch.common.inject.Binder#bindListener(Matcher, TypeListener)} statements: - *

    *

    - *     register(only(new TypeLiteral<PaymentService<CreditCard>>() {}), listener);
    + * register(only(new TypeLiteral<PaymentService<CreditCard>>() {}), listener);
    * * @author jessewilson@google.com (Jesse Wilson) * @since 2.0 diff --git a/core/src/main/java/org/elasticsearch/common/inject/spi/UntargettedBinding.java b/core/src/main/java/org/elasticsearch/common/inject/spi/UntargettedBinding.java index ba2dc9ad42f..824469627df 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/spi/UntargettedBinding.java +++ b/core/src/main/java/org/elasticsearch/common/inject/spi/UntargettedBinding.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/inject/util/Modules.java b/core/src/main/java/org/elasticsearch/common/inject/util/Modules.java index 6e0fdca22f2..f29e5aadae7 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/util/Modules.java +++ b/core/src/main/java/org/elasticsearch/common/inject/util/Modules.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -64,8 +64,8 @@ public final class Modules { * Module functionalTestModule * = Modules.override(new ProductionModule()).with(new TestModule()); *
    - *

    - *

    Prefer to write smaller modules that can be reused and tested without overrides. + *

    + * Prefer to write smaller modules that can be reused and tested without overrides. * * @param modules the modules whose bindings are open to be overridden */ @@ -81,8 +81,8 @@ public final class Modules { * Module functionalTestModule * = Modules.override(getProductionModules()).with(getTestModules()); *

    - *

    - *

    Prefer to write smaller modules that can be reused and tested without overrides. + *

    + * Prefer to write smaller modules that can be reused and tested without overrides. * * @param modules the modules whose bindings are open to be overridden */ diff --git a/core/src/main/java/org/elasticsearch/common/inject/util/Types.java b/core/src/main/java/org/elasticsearch/common/inject/util/Types.java index ffd8aa69f4f..43bb97c1499 100644 --- a/core/src/main/java/org/elasticsearch/common/inject/util/Types.java +++ b/core/src/main/java/org/elasticsearch/common/inject/util/Types.java @@ -1,4 +1,4 @@ -/** +/* * Copyright (C) 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/src/main/java/org/elasticsearch/common/io/Channels.java b/core/src/main/java/org/elasticsearch/common/io/Channels.java index 79e89fcce50..2fa7ca1cdec 100644 --- a/core/src/main/java/org/elasticsearch/common/io/Channels.java +++ b/core/src/main/java/org/elasticsearch/common/io/Channels.java @@ -167,7 +167,6 @@ public final class Channels { * @param sourceIndex index in source to start copying from * @param length how many bytes to copy * @param channel target GatheringByteChannel - * @throws IOException */ public static void writeToChannel(ChannelBuffer source, int sourceIndex, int length, GatheringByteChannel channel) throws IOException { while (length > 0) { @@ -184,7 +183,6 @@ public final class Channels { * * @param source byte array to copy from * @param channel target WritableByteChannel - * @throws IOException */ public static void writeToChannel(byte[] source, WritableByteChannel channel) throws IOException { writeToChannel(source, 0, source.length, channel); @@ -198,7 +196,6 @@ public final class Channels { * @param offset start copying from this offset * @param length how many bytes to copy * @param channel target WritableByteChannel - * @throws IOException */ public static void writeToChannel(byte[] source, int offset, int length, WritableByteChannel channel) throws IOException { int toWrite = Math.min(length, WRITE_CHUNK_SIZE); @@ -219,7 +216,6 @@ public final class Channels { * * @param byteBuffer source buffer * @param channel channel to write to - * @throws IOException */ public static void writeToChannel(ByteBuffer byteBuffer, WritableByteChannel channel) throws IOException { if (byteBuffer.isDirect() || (byteBuffer.remaining() <= WRITE_CHUNK_SIZE)) { diff --git a/core/src/main/java/org/elasticsearch/common/io/FastCharArrayReader.java b/core/src/main/java/org/elasticsearch/common/io/FastCharArrayReader.java index f202f384032..53b932afd54 100644 --- a/core/src/main/java/org/elasticsearch/common/io/FastCharArrayReader.java +++ b/core/src/main/java/org/elasticsearch/common/io/FastCharArrayReader.java @@ -61,8 +61,8 @@ public class FastCharArrayReader extends Reader { /** * Creates a CharArrayReader from the specified array of chars. - *

    - *

    The resulting reader will start reading at the given + *

    + * The resulting reader will start reading at the given * offset. The total number of char values that can be * read from this reader will be either length or * buf.length-offset, whichever is smaller. @@ -143,8 +143,8 @@ public class FastCharArrayReader extends Reader { /** * Skips characters. Returns the number of characters that were skipped. - *

    - *

    The n parameter may be negative, even though the + *

    + * The n parameter may be negative, even though the * skip method of the {@link Reader} superclass throws * an exception in this case. If n is negative, then * this method does nothing and returns 0. diff --git a/core/src/main/java/org/elasticsearch/common/io/FastCharArrayWriter.java b/core/src/main/java/org/elasticsearch/common/io/FastCharArrayWriter.java index 8594b2c1533..87313eae7f9 100644 --- a/core/src/main/java/org/elasticsearch/common/io/FastCharArrayWriter.java +++ b/core/src/main/java/org/elasticsearch/common/io/FastCharArrayWriter.java @@ -124,10 +124,9 @@ public class FastCharArrayWriter extends Writer { /** * Appends the specified character sequence to this writer. - *

    - *

    An invocation of this method of the form out.append(csq) + *

    + * An invocation of this method of the form out.append(csq) * behaves in exactly the same way as the invocation - *

    *

          *     out.write(csq.toString()) 
    * @@ -152,11 +151,10 @@ public class FastCharArrayWriter extends Writer { /** * Appends a subsequence of the specified character sequence to this writer. - *

    - *

    An invocation of this method of the form out.append(csq, start, + *

    + * An invocation of this method of the form out.append(csq, start, * end) when csq is not null, behaves in * exactly the same way as the invocation - *

    *

          *     out.write(csq.subSequence(start, end).toString()) 
    * @@ -182,10 +180,9 @@ public class FastCharArrayWriter extends Writer { /** * Appends the specified character to this writer. - *

    - *

    An invocation of this method of the form out.append(c) + *

    + * An invocation of this method of the form out.append(c) * behaves in exactly the same way as the invocation - *

    *

          *     out.write(c) 
    * diff --git a/core/src/main/java/org/elasticsearch/common/io/FastStringReader.java b/core/src/main/java/org/elasticsearch/common/io/FastStringReader.java index 13bea142fec..25019149501 100644 --- a/core/src/main/java/org/elasticsearch/common/io/FastStringReader.java +++ b/core/src/main/java/org/elasticsearch/common/io/FastStringReader.java @@ -24,7 +24,7 @@ import java.io.Reader; /** * A character stream whose source is a string that is not thread safe - *

    + *

    * (shay.banon * ) */ @@ -110,15 +110,15 @@ public class FastStringReader extends CharSequenceReader { /** * Skips the specified number of characters in the stream. Returns * the number of characters that were skipped. - *

    - *

    The ns parameter may be negative, even though the + *

    + * The ns parameter may be negative, even though the * skip method of the {@link Reader} superclass throws * an exception in this case. Negative values of ns cause the * stream to skip backwards. Negative return values indicate a skip * backwards. It is not possible to skip backwards past the beginning of * the string. - *

    - *

    If the entire string has been read or skipped, then this method has + *

    + * If the entire string has been read or skipped, then this method has * no effect and always returns 0. * * @throws IOException If an I/O error occurs @@ -164,7 +164,7 @@ public class FastStringReader extends CharSequenceReader { * the stream's input comes from a string, there * is no actual limit, so this argument must not * be negative, but is otherwise ignored. - * @throws IllegalArgumentException If readAheadLimit is < 0 + * @throws IllegalArgumentException If readAheadLimit is < 0 * @throws IOException If an I/O error occurs */ @Override diff --git a/core/src/main/java/org/elasticsearch/common/io/FileSystemUtils.java b/core/src/main/java/org/elasticsearch/common/io/FileSystemUtils.java index bf7eb5ee28d..cb5ca5fec64 100644 --- a/core/src/main/java/org/elasticsearch/common/io/FileSystemUtils.java +++ b/core/src/main/java/org/elasticsearch/common/io/FileSystemUtils.java @@ -100,7 +100,7 @@ public final class FileSystemUtils { } /** - * Appends the path to the given base and strips N elements off the path if strip is > 0. + * Appends the path to the given base and strips N elements off the path if strip is > 0. */ public static Path append(Path base, Path path, int strip) { for (Path subPath : path) { diff --git a/core/src/main/java/org/elasticsearch/common/io/Streams.java b/core/src/main/java/org/elasticsearch/common/io/Streams.java index caa7053e862..8adf0919e50 100644 --- a/core/src/main/java/org/elasticsearch/common/io/Streams.java +++ b/core/src/main/java/org/elasticsearch/common/io/Streams.java @@ -38,8 +38,8 @@ import java.util.Objects; * Simple utility methods for file and stream copying. * All copy methods use a block size of 4096 bytes, * and close all affected streams when done. - *

    - *

    Mainly for use within the framework, + *

    + * Mainly for use within the framework, * but also useful for application code. */ public abstract class Streams { diff --git a/core/src/main/java/org/elasticsearch/common/io/stream/BytesStreamOutput.java b/core/src/main/java/org/elasticsearch/common/io/stream/BytesStreamOutput.java index 2107a9958da..155a8ca02f7 100644 --- a/core/src/main/java/org/elasticsearch/common/io/stream/BytesStreamOutput.java +++ b/core/src/main/java/org/elasticsearch/common/io/stream/BytesStreamOutput.java @@ -28,8 +28,8 @@ import org.elasticsearch.common.util.ByteArray; import java.io.IOException; /** - * A @link {@link StreamOutput} that uses{@link BigArrays} to acquire pages of - * bytes, which avoids frequent reallocation & copying of the internal data. + * A @link {@link StreamOutput} that uses {@link BigArrays} to acquire pages of + * bytes, which avoids frequent reallocation & copying of the internal data. */ public class BytesStreamOutput extends StreamOutput implements BytesStream { diff --git a/core/src/main/java/org/elasticsearch/common/io/stream/ReleasableBytesStreamOutput.java b/core/src/main/java/org/elasticsearch/common/io/stream/ReleasableBytesStreamOutput.java index cf451c2e25d..4e5380e66d5 100644 --- a/core/src/main/java/org/elasticsearch/common/io/stream/ReleasableBytesStreamOutput.java +++ b/core/src/main/java/org/elasticsearch/common/io/stream/ReleasableBytesStreamOutput.java @@ -26,7 +26,7 @@ import org.elasticsearch.common.util.BigArrays; /** * An bytes stream output that allows providing a {@link BigArrays} instance * expecting it to require releasing its content ({@link #bytes()}) once done. - *

    + *

    * Please note, its is the responsibility of the caller to make sure the bytes * reference do not "escape" and are released only once. */ diff --git a/core/src/main/java/org/elasticsearch/common/logging/log4j/ConsoleAppender.java b/core/src/main/java/org/elasticsearch/common/logging/log4j/ConsoleAppender.java index 940749bfa8b..30c3aa91f5d 100644 --- a/core/src/main/java/org/elasticsearch/common/logging/log4j/ConsoleAppender.java +++ b/core/src/main/java/org/elasticsearch/common/logging/log4j/ConsoleAppender.java @@ -32,7 +32,6 @@ import java.io.OutputStream; * ConsoleAppender appends log events to System.out or * System.err using a layout specified by the user. The * default target is System.out. - *

    *

    Elasticsearch: Adapter from log4j to allow to disable console logging...

    * * @author Ceki Gülcü @@ -99,7 +98,7 @@ public class ConsoleAppender extends WriterAppender { /** * Returns the current value of the Target property. The * default value of the option is "System.out". - *

    + *

    * See also {@link #setTarget}. */ public String getTarget() { diff --git a/core/src/main/java/org/elasticsearch/common/lucene/Lucene.java b/core/src/main/java/org/elasticsearch/common/lucene/Lucene.java index db2bb12cb8c..060482e2e8a 100644 --- a/core/src/main/java/org/elasticsearch/common/lucene/Lucene.java +++ b/core/src/main/java/org/elasticsearch/common/lucene/Lucene.java @@ -265,7 +265,7 @@ public class Lucene { } /** - * Performs an exists (count > 0) query on the searcher for query + * Performs an exists (count > 0) query on the searcher for query * with filter using the given collector * * The collector can be instantiated using Lucene.createExistsCollector() @@ -279,7 +279,7 @@ public class Lucene { /** - * Performs an exists (count > 0) query on the searcher for query + * Performs an exists (count > 0) query on the searcher for query * using the given collector * * The collector can be instantiated using Lucene.createExistsCollector() @@ -318,7 +318,7 @@ public class Lucene { } /** - * Performs an exists (count > 0) query on the searcher from the searchContext for query + * Performs an exists (count > 0) query on the searcher from the searchContext for query * using the given collector * * The collector can be instantiated using Lucene.createExistsCollector() diff --git a/core/src/main/java/org/elasticsearch/common/lucene/search/XMoreLikeThis.java b/core/src/main/java/org/elasticsearch/common/lucene/search/XMoreLikeThis.java index 4275647df0a..85e1899582c 100644 --- a/core/src/main/java/org/elasticsearch/common/lucene/search/XMoreLikeThis.java +++ b/core/src/main/java/org/elasticsearch/common/lucene/search/XMoreLikeThis.java @@ -17,7 +17,7 @@ * under the License. */ -/** +/* * Copyright 2004-2005 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -56,12 +56,11 @@ import java.util.*; /** * Generate "more like this" similarity queries. * Based on this mail: - *

    + * 
      * Lucene does let you access the document frequency of terms, with IndexReader.docFreq().
      * Term frequencies can be computed by re-tokenizing the text, which, for a single document,
      * is usually fast enough.  But looking up the docFreq() of every term in the document is
      * probably too slow.
    - * 

    * You can use some heuristics to prune the set of terms, to avoid calling docFreq() too much, * or at all. Since you're trying to maximize a tf*idf score, you're probably most interested * in terms with a high tf. Choosing a tf threshold even as low as two or three will radically @@ -70,44 +69,36 @@ import java.util.*; * number of characters, not selecting anything less than, e.g., six or seven characters. * With these sorts of heuristics you can usually find small set of, e.g., ten or fewer terms * that do a pretty good job of characterizing a document. - *

    * It all depends on what you're trying to do. If you're trying to eek out that last percent * of precision and recall regardless of computational difficulty so that you can win a TREC * competition, then the techniques I mention above are useless. But if you're trying to * provide a "more like this" button on a search results page that does a decent job and has * good performance, such techniques might be useful. - *

    * An efficient, effective "more-like-this" query generator would be a great contribution, if * anyone's interested. I'd imagine that it would take a Reader or a String (the document's * text), analyzer Analyzer, and return a set of representative terms using heuristics like those * above. The frequency and length thresholds could be parameters, etc. - *

    * Doug - *

    - *

    - *

    - *

    + *

    *

    Initial Usage

    - *

    + *

    * This class has lots of options to try to make it efficient and flexible. * The simplest possible usage is as follows. The bold * fragment is specific to this class. - *

    *

    - * 

    * IndexReader ir = ... * IndexSearcher is = ... - *

    + * MoreLikeThis mlt = new MoreLikeThis(ir); * Reader target = ... // orig source of doc you want to find similarities to * Query query = mlt.like( target); - *

    + * Hits hits = is.search(query); * // now the usual iteration thru 'hits' - the only thing to watch for is to make sure * //you ignore the doc if it matches your 'target' document, as it should be similar to itself - *

    + *

    - *

    + *

    * Thus you: *

      *
    1. do your normal, Lucene setup for searching, @@ -116,13 +107,11 @@ import java.util.*; *
    2. then call one of the like() calls to generate a similarity query *
    3. call the searcher to find the similar docs *
    - *

    *

    More Advanced Usage

    - *

    + *

    * You may want to use {@link #setFieldNames setFieldNames(...)} so you can examine * multiple fields (e.g. body and title) for similarity. - *

    - *

    + *

    * Depending on the size of your index and the size and makeup of your documents you * may want to call the other set methods to control how the similarity queries are * generated: @@ -137,7 +126,6 @@ import java.util.*; *

  • {@link #setMaxNumTokensParsed setMaxNumTokensParsed(...)} *
  • {@link #setStopWords setStopWord(...)} * - *

    *


    *
      * Changes: Mark Harwood 29/02/04
    @@ -702,7 +690,7 @@ public final class XMoreLikeThis {
         }
     
         /**
    -     * Create a PriorityQueue from a word->tf map.
    +     * Create a PriorityQueue from a word->tf map.
          *
          * @param words a map of words keyed on the word(String) with Int objects as the values.
          */
    @@ -711,7 +699,7 @@ public final class XMoreLikeThis {
         }
     
         /**
    -     * Create a PriorityQueue from a word->tf map.
    +     * Create a PriorityQueue from a word->tf map.
          *
          * @param words a map of words keyed on the word(String) with Int objects as the values.
          * @param fieldNames an array of field names to override defaults.
    diff --git a/core/src/main/java/org/elasticsearch/common/lucene/search/function/RandomScoreFunction.java b/core/src/main/java/org/elasticsearch/common/lucene/search/function/RandomScoreFunction.java
    index a95f24eee91..bc1962ad0b1 100644
    --- a/core/src/main/java/org/elasticsearch/common/lucene/search/function/RandomScoreFunction.java
    +++ b/core/src/main/java/org/elasticsearch/common/lucene/search/function/RandomScoreFunction.java
    @@ -26,7 +26,7 @@ import org.elasticsearch.index.fielddata.IndexFieldData;
     import org.elasticsearch.index.fielddata.SortedBinaryDocValues;
     
     /**
    - * Pseudo randomly generate a score for each {@link #score}.
    + * Pseudo randomly generate a score for each {@link LeafScoreFunction#score}.
      */
     public class RandomScoreFunction extends ScoreFunction {
     
    diff --git a/core/src/main/java/org/elasticsearch/common/metrics/EWMA.java b/core/src/main/java/org/elasticsearch/common/metrics/EWMA.java
    index a4d06af2ff3..b0cfd1bebc6 100644
    --- a/core/src/main/java/org/elasticsearch/common/metrics/EWMA.java
    +++ b/core/src/main/java/org/elasticsearch/common/metrics/EWMA.java
    @@ -28,7 +28,7 @@ import java.util.concurrent.TimeUnit;
      *
      * @see UNIX Load Average Part 1: How It Works
      * @see UNIX Load Average Part 2: Not Your Average Average
    - *      

    + *

    * Taken from codahale metric module, changed to use LongAdder */ public class EWMA { diff --git a/core/src/main/java/org/elasticsearch/common/metrics/MeterMetric.java b/core/src/main/java/org/elasticsearch/common/metrics/MeterMetric.java index 531e0e9bae4..4bd995c4294 100644 --- a/core/src/main/java/org/elasticsearch/common/metrics/MeterMetric.java +++ b/core/src/main/java/org/elasticsearch/common/metrics/MeterMetric.java @@ -31,7 +31,7 @@ import java.util.concurrent.TimeUnit; * fifteen-minute exponentially-weighted moving average throughputs. * * @see EMA - *

    + *

    * taken from codahale metric module, replaced with LongAdder */ public class MeterMetric implements Metric { diff --git a/core/src/main/java/org/elasticsearch/common/netty/NettyUtils.java b/core/src/main/java/org/elasticsearch/common/netty/NettyUtils.java index b33ed2b7b37..164ed57e268 100644 --- a/core/src/main/java/org/elasticsearch/common/netty/NettyUtils.java +++ b/core/src/main/java/org/elasticsearch/common/netty/NettyUtils.java @@ -32,43 +32,43 @@ public class NettyUtils { /** * Here we go.... - *

    + *

    * When using the socket or file channel API to write or read using heap ByteBuffer, the sun.nio * package will convert it to a direct buffer before doing the actual operation. The direct buffer is * cached on an array of buffers under the nio.ch.Util$BufferCache on a thread local. - *

    + *

    * In netty specifically, if we send a single ChannelBuffer that is bigger than * SocketSendBufferPool#DEFAULT_PREALLOCATION_SIZE (64kb), it will just convert the ChannelBuffer * to a ByteBuffer and send it. The problem is, that then same size DirectByteBuffer will be * allocated (or reused) and kept around on a thread local in the sun.nio BufferCache. If very * large buffer is sent, imagine a 10mb one, then a 10mb direct buffer will be allocated as an * entry within the thread local buffers. - *

    + *

    * In ES, we try and page the buffers allocated, all serialized data uses {@link org.elasticsearch.common.bytes.PagedBytesReference} * typically generated from {@link org.elasticsearch.common.io.stream.BytesStreamOutput}. When sending it over * to netty, it creates a {@link org.jboss.netty.buffer.CompositeChannelBuffer} that wraps the relevant pages. - *

    + *

    * The idea with the usage of composite channel buffer is that a single large buffer will not be sent over * to the sun.nio layer. But, this will only happen if the composite channel buffer is created with a gathering * flag set to true. In such a case, the GatheringSendBuffer is used in netty, resulting in calling the sun.nio * layer with a ByteBuffer array. - *

    + *

    * This, potentially would have been as disastrous if the sun.nio layer would have tried to still copy over * all of it to a direct buffer. But, the write(ByteBuffer[]) API (see sun.nio.ch.IOUtil), goes one buffer * at a time, and gets a temporary direct buffer from the BufferCache, up to a limit of IOUtil#IOV_MAX (which * is 1024 on most OSes). This means that there will be a max of 1024 direct buffer per thread. - *

    + *

    * This is still less than optimal to be honest, since it means that if not all data was written successfully * (1024 paged buffers), then the rest of the data will need to be copied over again to the direct buffer * and re-transmitted, but its much better than trying to send the full large buffer over and over again. - *

    + *

    * In ES, we use by default, in our paged data structures, a page of 16kb, so this is not so terrible. - *

    + *

    * Note, on the read size of netty, it uses a single direct buffer that is defined in both the transport * and http configuration (based on the direct memory available), and the upstream handlers (SizeHeaderFrameDecoder, * or more specifically the FrameDecoder base class) makes sure to use a cumulation buffer and not copy it * over all the time. - *

    + *

    * TODO: potentially, a more complete solution would be to write a netty channel handler that is the last * in the pipeline, and if the buffer is composite, verifies that its a gathering one with reasonable * sized pages, and if its a single one, makes sure that it gets sliced and wrapped in a composite diff --git a/core/src/main/java/org/elasticsearch/common/property/PropertyPlaceholder.java b/core/src/main/java/org/elasticsearch/common/property/PropertyPlaceholder.java index 11f7d8b67ce..a210f3ae6d5 100644 --- a/core/src/main/java/org/elasticsearch/common/property/PropertyPlaceholder.java +++ b/core/src/main/java/org/elasticsearch/common/property/PropertyPlaceholder.java @@ -30,8 +30,8 @@ import java.util.Set; * Utility class for working with Strings that have placeholder values in them. A placeholder takes the form * ${name}. Using PropertyPlaceholder these placeholders can be substituted for * user-supplied values. - *

    - *

    Values for substitution can be supplied using a {@link Properties} instance or using a + *

    + * Values for substitution can be supplied using a {@link Properties} instance or using a * {@link PlaceholderResolver}. */ public class PropertyPlaceholder { diff --git a/core/src/main/java/org/elasticsearch/common/settings/Settings.java b/core/src/main/java/org/elasticsearch/common/settings/Settings.java index 2c2440c254a..e36843038da 100644 --- a/core/src/main/java/org/elasticsearch/common/settings/Settings.java +++ b/core/src/main/java/org/elasticsearch/common/settings/Settings.java @@ -511,13 +511,12 @@ public final class Settings implements ToXContent { /** * The values associated with a setting prefix as an array. The settings array is in the format of: * settingPrefix.[index]. - *

    - *

    It will also automatically load a comma separated list under the settingPrefix and merge with + *

    + * It will also automatically load a comma separated list under the settingPrefix and merge with * the numbered format. * * @param settingPrefix The setting prefix to load the array by * @return The setting array values - * @throws org.elasticsearch.common.settings.SettingsException */ public String[] getAsArray(String settingPrefix) throws SettingsException { return getAsArray(settingPrefix, Strings.EMPTY_ARRAY, true); @@ -526,13 +525,12 @@ public final class Settings implements ToXContent { /** * The values associated with a setting prefix as an array. The settings array is in the format of: * settingPrefix.[index]. - *

    - *

    If commaDelimited is true, it will automatically load a comma separated list under the settingPrefix and merge with + *

    + * If commaDelimited is true, it will automatically load a comma separated list under the settingPrefix and merge with * the numbered format. * * @param settingPrefix The setting prefix to load the array by * @return The setting array values - * @throws org.elasticsearch.common.settings.SettingsException */ public String[] getAsArray(String settingPrefix, String[] defaultArray) throws SettingsException { return getAsArray(settingPrefix, defaultArray, true); @@ -541,15 +539,14 @@ public final class Settings implements ToXContent { /** * The values associated with a setting prefix as an array. The settings array is in the format of: * settingPrefix.[index]. - *

    - *

    It will also automatically load a comma separated list under the settingPrefix and merge with + *

    + * It will also automatically load a comma separated list under the settingPrefix and merge with * the numbered format. * * @param settingPrefix The setting prefix to load the array by * @param defaultArray The default array to use if no value is specified * @param commaDelimited Whether to try to parse a string as a comma-delimited value * @return The setting array values - * @throws org.elasticsearch.common.settings.SettingsException */ public String[] getAsArray(String settingPrefix, String[] defaultArray, Boolean commaDelimited) throws SettingsException { List result = new ArrayList<>(); @@ -1122,8 +1119,8 @@ public final class Settings implements ToXContent { /** * Runs across all the settings set on this builder and replaces ${...} elements in the * each setting value according to the following logic: - *

    - *

    First, tries to resolve it against a System property ({@link System#getProperty(String)}), next, + *

    + * First, tries to resolve it against a System property ({@link System#getProperty(String)}), next, * tries and resolve it against an environment variable ({@link System#getenv(String)}), and last, tries * and replace it with another setting already set on this builder. */ diff --git a/core/src/main/java/org/elasticsearch/common/settings/SettingsFilter.java b/core/src/main/java/org/elasticsearch/common/settings/SettingsFilter.java index d2bde251330..421e0081998 100644 --- a/core/src/main/java/org/elasticsearch/common/settings/SettingsFilter.java +++ b/core/src/main/java/org/elasticsearch/common/settings/SettingsFilter.java @@ -50,8 +50,6 @@ public class SettingsFilter extends AbstractComponent { /** * Adds a new simple pattern to the list of filters - * - * @param pattern */ public void addFilter(String pattern) { patterns.add(pattern); @@ -59,8 +57,6 @@ public class SettingsFilter extends AbstractComponent { /** * Removes a simple pattern from the list of filters - * - * @param pattern */ public void removeFilter(String pattern) { patterns.remove(pattern); diff --git a/core/src/main/java/org/elasticsearch/common/transport/TransportAddressSerializers.java b/core/src/main/java/org/elasticsearch/common/transport/TransportAddressSerializers.java index 9bfbcaaf509..d8e121bec9e 100644 --- a/core/src/main/java/org/elasticsearch/common/transport/TransportAddressSerializers.java +++ b/core/src/main/java/org/elasticsearch/common/transport/TransportAddressSerializers.java @@ -33,8 +33,8 @@ import static org.elasticsearch.common.collect.MapBuilder.newMapBuilder; /** * A global registry of all different types of {@link org.elasticsearch.common.transport.TransportAddress} allowing * to perform serialization of them. - *

    - *

    By default, adds {@link org.elasticsearch.common.transport.InetSocketTransportAddress}. + *

    + * By default, adds {@link org.elasticsearch.common.transport.InetSocketTransportAddress}. * * */ diff --git a/core/src/main/java/org/elasticsearch/common/unit/DistanceUnit.java b/core/src/main/java/org/elasticsearch/common/unit/DistanceUnit.java index cb89ca83d51..9abce6989fd 100644 --- a/core/src/main/java/org/elasticsearch/common/unit/DistanceUnit.java +++ b/core/src/main/java/org/elasticsearch/common/unit/DistanceUnit.java @@ -214,7 +214,6 @@ public enum DistanceUnit { * * @param out {@link StreamOutput} to write to * @param unit {@link DistanceUnit} to write - * @throws IOException */ public static void writeDistanceUnit(StreamOutput out, DistanceUnit unit) throws IOException { out.writeByte((byte) unit.ordinal()); diff --git a/core/src/main/java/org/elasticsearch/common/util/BigArrays.java b/core/src/main/java/org/elasticsearch/common/util/BigArrays.java index 0f0bced9cf2..faa377baccd 100644 --- a/core/src/main/java/org/elasticsearch/common/util/BigArrays.java +++ b/core/src/main/java/org/elasticsearch/common/util/BigArrays.java @@ -494,7 +494,7 @@ public class BigArrays { return resize(array, newSize); } - /** @see Arrays.hashCode(byte[]) */ + /** @see Arrays#hashCode(byte[]) */ public int hashCode(ByteArray array) { if (array == null) { return 0; @@ -508,7 +508,7 @@ public class BigArrays { return hash; } - /** @see Arrays.equals(byte[], byte[]) */ + /** @see Arrays#equals(byte[], byte[]) */ public boolean equals(ByteArray array, ByteArray other) { if (array == other) { return true; diff --git a/core/src/main/java/org/elasticsearch/common/util/BloomFilter.java b/core/src/main/java/org/elasticsearch/common/util/BloomFilter.java index 360bd39e800..b19d727f022 100644 --- a/core/src/main/java/org/elasticsearch/common/util/BloomFilter.java +++ b/core/src/main/java/org/elasticsearch/common/util/BloomFilter.java @@ -285,7 +285,7 @@ public class BloomFilter { /** * Computes the optimal k (number of hashes per element inserted in Bloom filter), given the * expected insertions and total number of bits in the Bloom filter. - *

    + *

    * See http://en.wikipedia.org/wiki/File:Bloom_filter_fp_probability.svg for the formula. * * @param n expected insertions (must be positive) @@ -298,11 +298,11 @@ public class BloomFilter { /** * Computes m (total bits of Bloom filter) which is expected to achieve, for the specified * expected insertions, the required false positive probability. - *

    + *

    * See http://en.wikipedia.org/wiki/Bloom_filter#Probability_of_false_positives for the formula. * * @param n expected insertions (must be positive) - * @param p false positive rate (must be 0 < p < 1) + * @param p false positive rate (must be 0 < p < 1) */ static long optimalNumOfBits(long n, double p) { if (p == 0) { diff --git a/core/src/main/java/org/elasticsearch/common/util/BytesRefHash.java b/core/src/main/java/org/elasticsearch/common/util/BytesRefHash.java index 3e5dac597ca..5a2e21e5e11 100644 --- a/core/src/main/java/org/elasticsearch/common/util/BytesRefHash.java +++ b/core/src/main/java/org/elasticsearch/common/util/BytesRefHash.java @@ -61,8 +61,8 @@ public final class BytesRefHash extends AbstractHash { } /** - * Return the key at 0 <e; index <e; capacity(). The result is undefined if the slot is unused. - *

    Beware that the content of the {@link BytesRef} may become invalid as soon as {@link #close()} is called

    + * Return the key at 0 <= index <= capacity(). The result is undefined if the slot is unused. + *

    Beware that the content of the {@link BytesRef} may become invalid as soon as {@link #close()} is called

    */ public BytesRef get(long id, BytesRef dest) { final long startOffset = startOffsets.get(id); @@ -135,7 +135,7 @@ public final class BytesRefHash extends AbstractHash { } /** - * Try to add key. Return its newly allocated id if it wasn't in the hash table yet, or -1-id + * Try to add key. Return its newly allocated id if it wasn't in the hash table yet, or -1-id * if it was already present in the hash table. */ public long add(BytesRef key, int code) { diff --git a/core/src/main/java/org/elasticsearch/common/util/CancellableThreads.java b/core/src/main/java/org/elasticsearch/common/util/CancellableThreads.java index 67b844bf7a1..781218c6610 100644 --- a/core/src/main/java/org/elasticsearch/common/util/CancellableThreads.java +++ b/core/src/main/java/org/elasticsearch/common/util/CancellableThreads.java @@ -53,7 +53,7 @@ public class CancellableThreads { * the default implementation always throws an {@link ExecutionCancelledException}, suppressing * any other exception that occurred before cancellation * - * @param reason reason for failure supplied by the caller of {@link @cancel} + * @param reason reason for failure supplied by the caller of {@link #cancel} * @param suppressedException any error that was encountered during the execution before the operation was cancelled. */ protected void onCancel(String reason, @Nullable Throwable suppressedException) { diff --git a/core/src/main/java/org/elasticsearch/common/util/ExtensionPoint.java b/core/src/main/java/org/elasticsearch/common/util/ExtensionPoint.java index a5878e1c421..056142a48c7 100644 --- a/core/src/main/java/org/elasticsearch/common/util/ExtensionPoint.java +++ b/core/src/main/java/org/elasticsearch/common/util/ExtensionPoint.java @@ -218,7 +218,7 @@ public abstract class ExtensionPoint { } /** - * Registers a mapping from {@param key} to {@param value} + * Registers a mapping from {@code key} to {@code value} * * @throws IllegalArgumentException iff the key is already registered */ diff --git a/core/src/main/java/org/elasticsearch/common/util/LongHash.java b/core/src/main/java/org/elasticsearch/common/util/LongHash.java index ef82566303a..9f19e6cf8ed 100644 --- a/core/src/main/java/org/elasticsearch/common/util/LongHash.java +++ b/core/src/main/java/org/elasticsearch/common/util/LongHash.java @@ -45,7 +45,7 @@ public final class LongHash extends AbstractHash { } /** - * Return the key at 0 <e; index <e; capacity(). The result is undefined if the slot is unused. + * Return the key at 0 <= index <= capacity(). The result is undefined if the slot is unused. */ public long get(long id) { return keys.get(id); @@ -98,7 +98,7 @@ public final class LongHash extends AbstractHash { } /** - * Try to add key. Return its newly allocated id if it wasn't in the hash table yet, or -1-id + * Try to add key. Return its newly allocated id if it wasn't in the hash table yet, or -1-id * if it was already present in the hash table. */ public long add(long key) { diff --git a/core/src/main/java/org/elasticsearch/common/util/URIPattern.java b/core/src/main/java/org/elasticsearch/common/util/URIPattern.java index 0b9bb222521..13337ff0848 100644 --- a/core/src/main/java/org/elasticsearch/common/util/URIPattern.java +++ b/core/src/main/java/org/elasticsearch/common/util/URIPattern.java @@ -37,7 +37,6 @@ public class URIPattern { /** * Constructs uri pattern - * @param pattern */ public URIPattern(String pattern) { try { diff --git a/core/src/main/java/org/elasticsearch/common/util/concurrent/BaseFuture.java b/core/src/main/java/org/elasticsearch/common/util/concurrent/BaseFuture.java index ae806713bfd..cd5789f5d79 100644 --- a/core/src/main/java/org/elasticsearch/common/util/concurrent/BaseFuture.java +++ b/core/src/main/java/org/elasticsearch/common/util/concurrent/BaseFuture.java @@ -33,22 +33,22 @@ import java.util.concurrent.locks.AbstractQueuedSynchronizer; * {@code Runnable}. (If you want a {@code Runnable} implementation of {@code * ListenableFuture}, create a {@link com.google.common.util.concurrent.ListenableFutureTask}, or submit your * tasks to a {@link com.google.common.util.concurrent.ListeningExecutorService}.) - *

    - *

    This class implements all methods in {@code ListenableFuture}. + *

    + * This class implements all methods in {@code ListenableFuture}. * Subclasses should provide a way to set the result of the computation through * the protected methods {@link #set(Object)} and * {@link #setException(Throwable)}. Subclasses may also override {@link * #interruptTask()}, which will be invoked automatically if a call to {@link * #cancel(boolean) cancel(true)} succeeds in canceling the future. - *

    - *

    {@code AbstractFuture} uses an {@link AbstractQueuedSynchronizer} to deal + *

    + * {@code AbstractFuture} uses an {@link AbstractQueuedSynchronizer} to deal * with concurrency issues and guarantee thread safety. - *

    - *

    The state changing methods all return a boolean indicating success or + *

    + * The state changing methods all return a boolean indicating success or * failure in changing the future's state. Valid states are running, * completed, failed, or cancelled. - *

    - *

    This class uses an {@link com.google.common.util.concurrent.ExecutionList} to guarantee that all registered + *

    + * This class uses an {@link com.google.common.util.concurrent.ExecutionList} to guarantee that all registered * listeners will be executed, either when the future finishes or, for listeners * that are added after the future completes, immediately. * {@code Runnable}-{@code Executor} pairs are stored in the execution list but @@ -77,8 +77,8 @@ public abstract class BaseFuture implements Future { /** * {@inheritDoc} - *

    - *

    The default {@link BaseFuture} implementation throws {@code + *

    + * The default {@link BaseFuture} implementation throws {@code * InterruptedException} if the current thread is interrupted before or during * the call, even if the value is already available. * @@ -100,8 +100,8 @@ public abstract class BaseFuture implements Future { /** * {@inheritDoc} - *

    - *

    The default {@link BaseFuture} implementation throws {@code + *

    + * The default {@link BaseFuture} implementation throws {@code * InterruptedException} if the current thread is interrupted before or during * the call, even if the value is already available. * @@ -141,8 +141,8 @@ public abstract class BaseFuture implements Future { * Subclasses can override this method to implement interruption of the * future's computation. The method is invoked automatically by a successful * call to {@link #cancel(boolean) cancel(true)}. - *

    - *

    The default implementation does nothing. + *

    + * The default implementation does nothing. * * @since 10.0 */ @@ -203,13 +203,13 @@ public abstract class BaseFuture implements Future { * in a thread-safe manner. The current state of the future is held in the * Sync state, and the lock is released whenever the state changes to either * {@link #COMPLETED} or {@link #CANCELLED}. - *

    - *

    To avoid races between threads doing release and acquire, we transition + *

    + * To avoid races between threads doing release and acquire, we transition * to the final state in two steps. One thread will successfully CAS from * RUNNING to COMPLETING, that thread will then set the result of the * computation, and only then transition to COMPLETED or CANCELLED. - *

    - *

    We don't use the integer argument passed between acquire methods so we + *

    + * We don't use the integer argument passed between acquire methods so we * pass around a -1 everywhere. */ static final class Sync extends AbstractQueuedSynchronizer { diff --git a/core/src/main/java/org/elasticsearch/common/util/concurrent/PrioritizedEsThreadPoolExecutor.java b/core/src/main/java/org/elasticsearch/common/util/concurrent/PrioritizedEsThreadPoolExecutor.java index aad6cee12fe..d0d2906deed 100644 --- a/core/src/main/java/org/elasticsearch/common/util/concurrent/PrioritizedEsThreadPoolExecutor.java +++ b/core/src/main/java/org/elasticsearch/common/util/concurrent/PrioritizedEsThreadPoolExecutor.java @@ -38,7 +38,7 @@ import java.util.concurrent.atomic.AtomicLong; * A prioritizing executor which uses a priority queue as a work queue. The jobs that will be submitted will be treated * as {@link PrioritizedRunnable} and/or {@link PrioritizedCallable}, those tasks that are not instances of these two will * be wrapped and assign a default {@link Priority#NORMAL} priority. - *

    + *

    * Note, if two tasks have the same priority, the first to arrive will be executed first (FIFO style). */ public class PrioritizedEsThreadPoolExecutor extends EsThreadPoolExecutor { diff --git a/core/src/main/java/org/elasticsearch/common/util/concurrent/ThreadBarrier.java b/core/src/main/java/org/elasticsearch/common/util/concurrent/ThreadBarrier.java index 1892aa76964..a3d10ff825f 100644 --- a/core/src/main/java/org/elasticsearch/common/util/concurrent/ThreadBarrier.java +++ b/core/src/main/java/org/elasticsearch/common/util/concurrent/ThreadBarrier.java @@ -32,12 +32,12 @@ import java.util.concurrent.TimeoutException; * ThreadBarrier adds a cause to * {@link BrokenBarrierException} thrown by a {@link #reset()} operation defined * by {@link CyclicBarrier}. - *

    - *

    + *

    * Sample usage:
    - *

  • Barrier as a synchronization and Exception handling aid
  • - *
  • Barrier as a trigger for elapsed notification events
  • - *

    + *

      + *
    • Barrier as a synchronization and Exception handling aid
    • + *
    • Barrier as a trigger for elapsed notification events
    • + *
    *
      *    class MyTestClass implements RemoteEventListener
      *    {
    @@ -86,7 +86,7 @@ import java.util.concurrent.TimeoutException;
      *
      *               // too many notifications?
      *               Assert.assertFalse("Exceeded notification count",
    - *                                          actualNotificationCount > EXPECTED_COUNT);
    + *                                          actualNotificationCount > EXPECTED_COUNT);
      *            }
      *          catch(Throwable t) {
      *              log("Worker thread caught exception", t);
    @@ -211,7 +211,7 @@ public class ThreadBarrier extends CyclicBarrier {
     
         /**
          * breaks this barrier if it has been reset or broken for any other reason.
    -     * 

    + *

    * Note: This call is not atomic in respect to await/reset calls. A * breakIfBroken() may be context switched to invoke a reset() prior to * await(). This resets the barrier to its initial state - parties not @@ -244,7 +244,7 @@ public class ThreadBarrier extends CyclicBarrier { * Measurement. * * @see ThreadBarrier#ThreadBarrier(int, Runnable) - *

    + *

    * Usage example:
    *

    
          *                                                                                             BarrierTimer timer = new BarrierTimer();
    diff --git a/core/src/main/java/org/elasticsearch/common/xcontent/XContentParser.java b/core/src/main/java/org/elasticsearch/common/xcontent/XContentParser.java
    index a6b4f460f47..9c95413d5bc 100644
    --- a/core/src/main/java/org/elasticsearch/common/xcontent/XContentParser.java
    +++ b/core/src/main/java/org/elasticsearch/common/xcontent/XContentParser.java
    @@ -217,28 +217,28 @@ public interface XContentParser extends Releasable {
         /**
          * Reads a plain binary value that was written via one of the following methods:
          *
    -     * 
  • - *
      {@link XContentBuilder#field(String, org.apache.lucene.util.BytesRef)}
    - *
      {@link XContentBuilder#field(String, org.elasticsearch.common.bytes.BytesReference)}
    - *
      {@link XContentBuilder#field(String, byte[], int, int)}}
    - *
      {@link XContentBuilder#field(String, byte[])}}
    - *
  • + *
      + *
    • {@link XContentBuilder#field(String, org.apache.lucene.util.BytesRef)}
    • + *
    • {@link XContentBuilder#field(String, org.elasticsearch.common.bytes.BytesReference)}
    • + *
    • {@link XContentBuilder#field(String, byte[], int, int)}}
    • + *
    • {@link XContentBuilder#field(String, byte[])}}
    • + *
    * * as well as via their XContentBuilderString variants of the separated value methods. * Note: Do not use this method to read values written with: - *
  • - *
      {@link XContentBuilder#utf8Field(XContentBuilderString, org.apache.lucene.util.BytesRef)}
    - *
      {@link XContentBuilder#utf8Field(String, org.apache.lucene.util.BytesRef)}
    - *
  • + *
      + *
    • {@link XContentBuilder#utf8Field(XContentBuilderString, org.apache.lucene.util.BytesRef)}
    • + *
    • {@link XContentBuilder#utf8Field(String, org.apache.lucene.util.BytesRef)}
    • + *
    * * these methods write UTF-8 encoded strings and must be read through: - *
  • - *
      {@link XContentParser#utf8Bytes()}
    - *
      {@link XContentParser#utf8BytesOrNull()}}
    - *
      {@link XContentParser#text()} ()}
    - *
      {@link XContentParser#textOrNull()} ()}
    - *
      {@link XContentParser#textCharacters()} ()}}
    - *
  • + *
      + *
    • {@link XContentParser#utf8Bytes()}
    • + *
    • {@link XContentParser#utf8BytesOrNull()}}
    • + *
    • {@link XContentParser#text()} ()}
    • + *
    • {@link XContentParser#textOrNull()} ()}
    • + *
    • {@link XContentParser#textCharacters()} ()}}
    • + *
    * */ byte[] binaryValue() throws IOException; diff --git a/core/src/main/java/org/elasticsearch/common/xcontent/support/filtering/FilterContext.java b/core/src/main/java/org/elasticsearch/common/xcontent/support/filtering/FilterContext.java index 215af370b31..66f20cce435 100644 --- a/core/src/main/java/org/elasticsearch/common/xcontent/support/filtering/FilterContext.java +++ b/core/src/main/java/org/elasticsearch/common/xcontent/support/filtering/FilterContext.java @@ -198,9 +198,6 @@ public class FilterContext { /** * Ensure that the full path to the current field is write by the JsonGenerator - * - * @param generator - * @throws IOException */ public void writePath(JsonGenerator generator) throws IOException { if (parent != null) { diff --git a/core/src/main/java/org/elasticsearch/discovery/BlockingClusterStatePublishResponseHandler.java b/core/src/main/java/org/elasticsearch/discovery/BlockingClusterStatePublishResponseHandler.java index 40aca3fe351..3fe99face52 100644 --- a/core/src/main/java/org/elasticsearch/discovery/BlockingClusterStatePublishResponseHandler.java +++ b/core/src/main/java/org/elasticsearch/discovery/BlockingClusterStatePublishResponseHandler.java @@ -71,7 +71,6 @@ public class BlockingClusterStatePublishResponseHandler { * Allows to wait for all non master nodes to reply to the publish event up to a timeout * @param timeout the timeout * @return true if the timeout expired or not, false otherwise - * @throws InterruptedException */ public boolean awaitAllNodes(TimeValue timeout) throws InterruptedException { boolean success = latch.await(timeout.millis(), TimeUnit.MILLISECONDS); diff --git a/core/src/main/java/org/elasticsearch/discovery/DiscoveryService.java b/core/src/main/java/org/elasticsearch/discovery/DiscoveryService.java index c86033b85da..9a8b19e371f 100644 --- a/core/src/main/java/org/elasticsearch/discovery/DiscoveryService.java +++ b/core/src/main/java/org/elasticsearch/discovery/DiscoveryService.java @@ -127,7 +127,7 @@ public class DiscoveryService extends AbstractLifecycleComponent + *

    * The {@link org.elasticsearch.discovery.Discovery.AckListener} allows to acknowledge the publish * event based on the response gotten from all nodes */ diff --git a/core/src/main/java/org/elasticsearch/discovery/InitialStateDiscoveryListener.java b/core/src/main/java/org/elasticsearch/discovery/InitialStateDiscoveryListener.java index 84884882944..1ec55c874b4 100644 --- a/core/src/main/java/org/elasticsearch/discovery/InitialStateDiscoveryListener.java +++ b/core/src/main/java/org/elasticsearch/discovery/InitialStateDiscoveryListener.java @@ -22,8 +22,8 @@ package org.elasticsearch.discovery; /** * A listener that should be called by the {@link org.elasticsearch.discovery.Discovery} component * when the first valid initial cluster state has been submitted and processed by the cluster service. - *

    - *

    Note, this listener should be registered with the discovery service before it has started. + *

    + * Note, this listener should be registered with the discovery service before it has started. * * */ diff --git a/core/src/main/java/org/elasticsearch/discovery/zen/NodeJoinController.java b/core/src/main/java/org/elasticsearch/discovery/zen/NodeJoinController.java index 8fc623a3a2e..6aa6ac5e5f2 100644 --- a/core/src/main/java/org/elasticsearch/discovery/zen/NodeJoinController.java +++ b/core/src/main/java/org/elasticsearch/discovery/zen/NodeJoinController.java @@ -68,9 +68,9 @@ public class NodeJoinController extends AbstractComponent { /** * waits for enough incoming joins from master eligible nodes to complete the master election - *

    + *

    * You must start accumulating joins before calling this method. See {@link #startAccumulatingJoins()} - *

    + *

    * The method will return once the local node has been elected as master or some failure/timeout has happened. * The exact outcome is communicated via the callback parameter, which is guaranteed to be called. * @@ -175,7 +175,7 @@ public class NodeJoinController extends AbstractComponent { /** * processes or queues an incoming join request. - *

    + *

    * Note: doesn't do any validation. This should have been done before. */ public void handleJoinRequest(final DiscoveryNode node, final MembershipAction.JoinCallback callback) { @@ -436,4 +436,4 @@ public class NodeJoinController extends AbstractComponent { } } } -} \ No newline at end of file +} diff --git a/core/src/main/java/org/elasticsearch/discovery/zen/elect/ElectMasterService.java b/core/src/main/java/org/elasticsearch/discovery/zen/elect/ElectMasterService.java index 80b3ec0f4e6..9164a85388a 100644 --- a/core/src/main/java/org/elasticsearch/discovery/zen/elect/ElectMasterService.java +++ b/core/src/main/java/org/elasticsearch/discovery/zen/elect/ElectMasterService.java @@ -98,8 +98,6 @@ public class ElectMasterService extends AbstractComponent { /** * Returns the given nodes sorted by likelyhood of being elected as master, most likely first. * Non-master nodes are not removed but are rather put in the end - * @param nodes - * @return */ public List sortByMasterLikelihood(Iterable nodes) { ArrayList sortedNodes = CollectionUtils.iterableAsArrayList(nodes); diff --git a/core/src/main/java/org/elasticsearch/discovery/zen/fd/FaultDetection.java b/core/src/main/java/org/elasticsearch/discovery/zen/fd/FaultDetection.java index d3e644f2166..436ef6bc2b5 100644 --- a/core/src/main/java/org/elasticsearch/discovery/zen/fd/FaultDetection.java +++ b/core/src/main/java/org/elasticsearch/discovery/zen/fd/FaultDetection.java @@ -30,7 +30,7 @@ import org.elasticsearch.transport.TransportService; import static org.elasticsearch.common.unit.TimeValue.timeValueSeconds; /** - * A base class for {@link org.elasticsearch.discovery.zen.fd.MasterFaultDetection} & {@link org.elasticsearch.discovery.zen.fd.NodesFaultDetection}, + * A base class for {@link org.elasticsearch.discovery.zen.fd.MasterFaultDetection} & {@link org.elasticsearch.discovery.zen.fd.NodesFaultDetection}, * making sure both use the same setting. */ public abstract class FaultDetection extends AbstractComponent { diff --git a/core/src/main/java/org/elasticsearch/discovery/zen/publish/PendingClusterStatesQueue.java b/core/src/main/java/org/elasticsearch/discovery/zen/publish/PendingClusterStatesQueue.java index fc894f3d07e..e3550e657fc 100644 --- a/core/src/main/java/org/elasticsearch/discovery/zen/publish/PendingClusterStatesQueue.java +++ b/core/src/main/java/org/elasticsearch/discovery/zen/publish/PendingClusterStatesQueue.java @@ -31,10 +31,10 @@ import java.util.Objects; * A queue that holds all "in-flight" incoming cluster states from the master. Once a master commits a cluster * state, it is made available via {@link #getNextClusterStateToProcess()}. The class also takes care of batching * cluster states for processing and failures. - *

    + *

    * The queue is bound by {@link #maxQueueSize}. When the queue is at capacity and a new cluster state is inserted * the oldest cluster state will be dropped. This is safe because: - * 1) Under normal operations, master will publish & commit a cluster state before processing another change (i.e., the queue length is 1) + * 1) Under normal operations, master will publish & commit a cluster state before processing another change (i.e., the queue length is 1) * 2) If the master fails to commit a change, it will step down, causing a master election, which will flush the queue. * 3) In general it's safe to process the incoming cluster state as a replacement to the cluster state that's dropped. * a) If the dropped cluster is from the same master as the incoming one is, it is likely to be superseded by the incoming state (or another state in the queue). @@ -42,7 +42,7 @@ import java.util.Objects; * b) If the dropping cluster state is not from the same master, it means that: * i) we are no longer following the master of the dropped cluster state but follow the incoming one * ii) we are no longer following any master, in which case it doesn't matter which cluster state will be processed first. - *

    + *

    * The class is fully thread safe and can be used concurrently. */ public class PendingClusterStatesQueue { @@ -130,7 +130,7 @@ public class PendingClusterStatesQueue { /** * indicates that a cluster state was successfully processed. Any committed state that is {@link ClusterState#supersedes(ClusterState)}-ed * by the processed state will be marked as processed as well. - *

    + *

    * NOTE: successfully processing a state indicates we are following the master it came from. Any committed state from another master will * be failed by this method */ @@ -204,7 +204,7 @@ public class PendingClusterStatesQueue { /** * Gets the next committed state to process. - *

    + *

    * The method tries to batch operation by getting the cluster state the highest possible committed states * which succeeds the first committed state in queue (i.e., it comes from the same master). */ diff --git a/core/src/main/java/org/elasticsearch/discovery/zen/publish/PublishClusterStateAction.java b/core/src/main/java/org/elasticsearch/discovery/zen/publish/PublishClusterStateAction.java index 9d31b2d1b40..a8c29523011 100644 --- a/core/src/main/java/org/elasticsearch/discovery/zen/publish/PublishClusterStateAction.java +++ b/core/src/main/java/org/elasticsearch/discovery/zen/publish/PublishClusterStateAction.java @@ -96,8 +96,8 @@ public class PublishClusterStateAction extends AbstractComponent { /** * publishes a cluster change event to other nodes. if at least minMasterNodes acknowledge the change it is committed and will * be processed by the master and the other nodes. - *

    - * The method is guaranteed to throw a {@link Discovery.FailedToCommitClusterStateException} if the change is not committed and should be rejected. + *

    + * The method is guaranteed to throw a {@link org.elasticsearch.discovery.Discovery.FailedToCommitClusterStateException} if the change is not committed and should be rejected. * Any other exception signals the something wrong happened but the change is committed. */ public void publish(final ClusterChangedEvent clusterChangedEvent, final int minMasterNodes, final Discovery.AckListener ackListener) throws Discovery.FailedToCommitClusterStateException { @@ -606,4 +606,4 @@ public class PublishClusterStateAction extends AbstractComponent { publishingTimedOut.set(isTimedOut); } } -} \ No newline at end of file +} diff --git a/core/src/main/java/org/elasticsearch/env/NodeEnvironment.java b/core/src/main/java/org/elasticsearch/env/NodeEnvironment.java index 7fe71d8535c..41f209b8ea2 100644 --- a/core/src/main/java/org/elasticsearch/env/NodeEnvironment.java +++ b/core/src/main/java/org/elasticsearch/env/NodeEnvironment.java @@ -377,7 +377,7 @@ public class NodeEnvironment extends AbstractComponent implements Closeable { * @param index the index to delete * @param lockTimeoutMS how long to wait for acquiring the indices shard locks * @param indexSettings settings for the index being deleted - * @throws Exception if any of the shards data directories can't be locked or deleted + * @throws IOException if any of the shards data directories can't be locked or deleted */ public void deleteIndexDirectorySafe(Index index, long lockTimeoutMS, @IndexSettings Settings indexSettings) throws IOException { // This is to ensure someone doesn't use Settings.EMPTY diff --git a/core/src/main/java/org/elasticsearch/gateway/AsyncShardFetch.java b/core/src/main/java/org/elasticsearch/gateway/AsyncShardFetch.java index d937fa614e0..20a3dd6da61 100644 --- a/core/src/main/java/org/elasticsearch/gateway/AsyncShardFetch.java +++ b/core/src/main/java/org/elasticsearch/gateway/AsyncShardFetch.java @@ -43,7 +43,7 @@ import java.util.*; /** * Allows to asynchronously fetch shard related data from other nodes for allocation, without blocking * the cluster update thread. - *

    + *

    * The async fetch logic maintains a map of which nodes are being fetched from in an async manner, * and once the results are back, it makes sure to schedule a reroute to make sure those results will * be taken into account. @@ -93,7 +93,7 @@ public abstract class AsyncShardFetch implements Rel /** * Fetches the data for the relevant shard. If there any ongoing async fetches going on, or new ones have * been initiated by this call, the result will have no data. - *

    + *

    * The ignoreNodes are nodes that are supposed to be ignored for this round, since fetching is async, we need * to keep them around and make sure we add them back when all the responses are fetched and returned. */ diff --git a/core/src/main/java/org/elasticsearch/index/aliases/IndexAliasesService.java b/core/src/main/java/org/elasticsearch/index/aliases/IndexAliasesService.java index fc93153b502..2b519c2b843 100644 --- a/core/src/main/java/org/elasticsearch/index/aliases/IndexAliasesService.java +++ b/core/src/main/java/org/elasticsearch/index/aliases/IndexAliasesService.java @@ -56,8 +56,8 @@ public class IndexAliasesService extends AbstractIndexComponent { /** * Returns the filter associated with listed filtering aliases. - *

    - *

    The list of filtering aliases should be obtained by calling MetaData.filteringAliases. + *

    + * The list of filtering aliases should be obtained by calling MetaData.filteringAliases. * Returns null if no filtering is required.

    */ public Query aliasFilter(String... aliasNames) { diff --git a/core/src/main/java/org/elasticsearch/index/analysis/AnalysisSettingsRequired.java b/core/src/main/java/org/elasticsearch/index/analysis/AnalysisSettingsRequired.java index 155b78a11d1..847752c5140 100644 --- a/core/src/main/java/org/elasticsearch/index/analysis/AnalysisSettingsRequired.java +++ b/core/src/main/java/org/elasticsearch/index/analysis/AnalysisSettingsRequired.java @@ -22,11 +22,11 @@ import java.lang.annotation.*; /** * A marker annotation on {@link CharFilterFactory}, {@link AnalyzerProvider}, {@link TokenFilterFactory}, - * or {@link @TokenizerFactory} which will cause the provider/factory to only be created when explicit settings + * or {@link TokenizerFactory} which will cause the provider/factory to only be created when explicit settings * are provided. */ @Target({ElementType.TYPE}) @Retention(RetentionPolicy.RUNTIME) @Documented public @interface AnalysisSettingsRequired { -} \ No newline at end of file +} diff --git a/core/src/main/java/org/elasticsearch/index/analysis/CJKBigramFilterFactory.java b/core/src/main/java/org/elasticsearch/index/analysis/CJKBigramFilterFactory.java index 4b3a1e3bcb3..7221c4b12e4 100644 --- a/core/src/main/java/org/elasticsearch/index/analysis/CJKBigramFilterFactory.java +++ b/core/src/main/java/org/elasticsearch/index/analysis/CJKBigramFilterFactory.java @@ -34,15 +34,15 @@ import java.util.Set; /** * Factory that creates a {@link CJKBigramFilter} to form bigrams of CJK terms * that are generated from StandardTokenizer or ICUTokenizer. - *

    + *

    * CJK types are set by these tokenizers, but you can also use flags to * explicitly control which of the CJK scripts are turned into bigrams. - *

    + *

    * By default, when a CJK character has no adjacent characters to form a bigram, * it is output in unigram form. If you want to always output both unigrams and * bigrams, set the outputUnigrams flag. This can be used for a * combined unigram+bigram approach. - *

    + *

    * In all cases, all non-CJK input is passed thru unmodified. */ public final class CJKBigramFilterFactory extends AbstractTokenFilterFactory { diff --git a/core/src/main/java/org/elasticsearch/index/analysis/KeepTypesFilterFactory.java b/core/src/main/java/org/elasticsearch/index/analysis/KeepTypesFilterFactory.java index 6b8e81f4953..9f17dadfeb8 100644 --- a/core/src/main/java/org/elasticsearch/index/analysis/KeepTypesFilterFactory.java +++ b/core/src/main/java/org/elasticsearch/index/analysis/KeepTypesFilterFactory.java @@ -33,12 +33,11 @@ import java.util.HashSet; import java.util.Set; /** - * A {@link TokenFilterFactory} for {@link TypeFilter}. This filter only + * A {@link TokenFilterFactory} for {@link TypeTokenFilter}. This filter only * keep tokens that are contained in the set configured via * {@value #KEEP_TYPES_KEY} setting. - *

    + *

    * Configuration options: - *

    *

      *
    • {@value #KEEP_TYPES_KEY} the array of words / tokens to keep.
    • *
    diff --git a/core/src/main/java/org/elasticsearch/index/analysis/KeepWordFilterFactory.java b/core/src/main/java/org/elasticsearch/index/analysis/KeepWordFilterFactory.java index a92ade2467b..2c082288edc 100644 --- a/core/src/main/java/org/elasticsearch/index/analysis/KeepWordFilterFactory.java +++ b/core/src/main/java/org/elasticsearch/index/analysis/KeepWordFilterFactory.java @@ -36,20 +36,16 @@ import org.elasticsearch.index.settings.IndexSettings; * keep tokens that are contained in the term set configured via * {@value #KEEP_WORDS_KEY} setting. This filter acts like an inverse stop * filter. - *

    + *

    * Configuration options: - *

    *

      *
    • {@value #KEEP_WORDS_KEY} the array of words / tokens to keep.
    • - *

      *

    • {@value #KEEP_WORDS_PATH_KEY} an reference to a file containing the words * / tokens to keep. Note: this is an alternative to {@value #KEEP_WORDS_KEY} if * both are set an exception will be thrown.
    • - *

      *

    • {@value #ENABLE_POS_INC_KEY} true iff the filter should * maintain position increments for dropped tokens. The default is * true.
    • - *

      *

    • {@value #KEEP_WORDS_CASE_KEY} to use case sensitive keep words. The * default is false which corresponds to case-sensitive.
    • *
    diff --git a/core/src/main/java/org/elasticsearch/index/analysis/SnowballAnalyzer.java b/core/src/main/java/org/elasticsearch/index/analysis/SnowballAnalyzer.java index 76bf8d42652..4ce0bee7a2c 100644 --- a/core/src/main/java/org/elasticsearch/index/analysis/SnowballAnalyzer.java +++ b/core/src/main/java/org/elasticsearch/index/analysis/SnowballAnalyzer.java @@ -28,6 +28,7 @@ import org.apache.lucene.analysis.core.LowerCaseFilter; import org.apache.lucene.analysis.core.StopFilter; import org.apache.lucene.analysis.snowball.SnowballFilter; import org.apache.lucene.analysis.standard.StandardTokenizer; +import org.apache.lucene.analysis.standard.StandardFilter; import org.apache.lucene.analysis.standard.std40.StandardTokenizer40; import org.apache.lucene.analysis.util.CharArraySet; import org.apache.lucene.util.Version; @@ -83,4 +84,4 @@ public final class SnowballAnalyzer extends Analyzer { result = new SnowballFilter(result, name); return new TokenStreamComponents(tokenizer, result); } -} \ No newline at end of file +} diff --git a/core/src/main/java/org/elasticsearch/index/analysis/SnowballAnalyzerProvider.java b/core/src/main/java/org/elasticsearch/index/analysis/SnowballAnalyzerProvider.java index 1d1a9ebb70e..39cf56b406c 100644 --- a/core/src/main/java/org/elasticsearch/index/analysis/SnowballAnalyzerProvider.java +++ b/core/src/main/java/org/elasticsearch/index/analysis/SnowballAnalyzerProvider.java @@ -39,7 +39,7 @@ import org.elasticsearch.index.settings.IndexSettings; * Stemmer, use them directly with the SnowballFilter and a CustomAnalyzer. * Configuration of language is done with the "language" attribute or the analyzer. * Also supports additional stopwords via "stopwords" attribute - *

    + *

    * The SnowballAnalyzer comes with a StandardFilter, LowerCaseFilter, StopFilter * and the SnowballFilter. * @@ -73,4 +73,4 @@ public class SnowballAnalyzerProvider extends AbstractIndexAnalyzerProvider + *

    * Use this cache with care, only components that require that a filter is to be materialized as a {@link BitDocIdSet} * and require that it should always be around should use this cache, otherwise the * {@link org.elasticsearch.index.cache.query.QueryCache} should be used instead. diff --git a/core/src/main/java/org/elasticsearch/index/cache/query/QueryCacheStats.java b/core/src/main/java/org/elasticsearch/index/cache/query/QueryCacheStats.java index aaf2730a31b..947968deab0 100644 --- a/core/src/main/java/org/elasticsearch/index/cache/query/QueryCacheStats.java +++ b/core/src/main/java/org/elasticsearch/index/cache/query/QueryCacheStats.java @@ -27,6 +27,8 @@ import org.elasticsearch.common.xcontent.ToXContent; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentBuilderString; +import org.apache.lucene.search.DocIdSet; + import java.io.IOException; /** diff --git a/core/src/main/java/org/elasticsearch/index/codec/CodecService.java b/core/src/main/java/org/elasticsearch/index/codec/CodecService.java index aa29f79ba77..77d8319b552 100644 --- a/core/src/main/java/org/elasticsearch/index/codec/CodecService.java +++ b/core/src/main/java/org/elasticsearch/index/codec/CodecService.java @@ -34,12 +34,10 @@ import org.elasticsearch.index.settings.IndexSettings; /** * Since Lucene 4.0 low level index segments are read and written through a - * codec layer that allows to use use-case specific file formats & + * codec layer that allows to use use-case specific file formats & * data-structures per field. Elasticsearch exposes the full * {@link Codec} capabilities through this {@link CodecService}. * - * @see PostingsFormatService - * @see DocValuesFormatService */ public class CodecService extends AbstractIndexComponent { diff --git a/core/src/main/java/org/elasticsearch/index/codec/postingsformat/BloomFilterPostingsFormat.java b/core/src/main/java/org/elasticsearch/index/codec/postingsformat/BloomFilterPostingsFormat.java index 9b29c9cc815..71a52a7fbd1 100644 --- a/core/src/main/java/org/elasticsearch/index/codec/postingsformat/BloomFilterPostingsFormat.java +++ b/core/src/main/java/org/elasticsearch/index/codec/postingsformat/BloomFilterPostingsFormat.java @@ -39,8 +39,7 @@ import java.util.Map.Entry; *

    *

    * This is a special bloom filter version, based on {@link org.elasticsearch.common.util.BloomFilter} and inspired - * by Lucene {@link org.apache.lucene.codecs.bloom.BloomFilteringPostingsFormat}. - *

    + * by Lucene {@code org.apache.lucene.codecs.bloom.BloomFilteringPostingsFormat}. * @deprecated only for reading old segments */ @Deprecated @@ -67,7 +66,7 @@ public class BloomFilterPostingsFormat extends PostingsFormat { * * @param delegatePostingsFormat The PostingsFormat that records all the non-bloom filter data i.e. * postings info. - * @param bloomFilterFactory The {@link BloomFilter.Factory} responsible for sizing BloomFilters + * @param bloomFilterFactory The {@link org.elasticsearch.common.util.BloomFilter.Factory} responsible for sizing BloomFilters * appropriately */ public BloomFilterPostingsFormat(PostingsFormat delegatePostingsFormat, diff --git a/core/src/main/java/org/elasticsearch/index/engine/Engine.java b/core/src/main/java/org/elasticsearch/index/engine/Engine.java index 92434d340ca..0c66b5148c4 100644 --- a/core/src/main/java/org/elasticsearch/index/engine/Engine.java +++ b/core/src/main/java/org/elasticsearch/index/engine/Engine.java @@ -1131,7 +1131,6 @@ public abstract class Engine implements Closeable { /** * Returns true the internal writer has any uncommitted changes. Otherwise false - * @return */ public abstract boolean hasUncommittedChanges(); diff --git a/core/src/main/java/org/elasticsearch/index/engine/EngineClosedException.java b/core/src/main/java/org/elasticsearch/index/engine/EngineClosedException.java index ef55708622d..062e79eac1b 100644 --- a/core/src/main/java/org/elasticsearch/index/engine/EngineClosedException.java +++ b/core/src/main/java/org/elasticsearch/index/engine/EngineClosedException.java @@ -27,8 +27,8 @@ import java.io.IOException; /** * An engine is already closed. - *

    - *

    Note, the relationship between shard and engine indicates that engine closed is shard closed, and + *

    + * Note, the relationship between shard and engine indicates that engine closed is shard closed, and * we might get something slipping through the the shard and into the engine while the shard is closing. * * diff --git a/core/src/main/java/org/elasticsearch/index/fielddata/FieldData.java b/core/src/main/java/org/elasticsearch/index/fielddata/FieldData.java index 0e286217ab8..97750cf0695 100644 --- a/core/src/main/java/org/elasticsearch/index/fielddata/FieldData.java +++ b/core/src/main/java/org/elasticsearch/index/fielddata/FieldData.java @@ -218,9 +218,9 @@ public enum FieldData { /** * Returns a single-valued view of the {@link SortedNumericDoubleValues}, - * if it was previously wrapped with {@link #singleton(NumericDocValues, Bits)}, + * if it was previously wrapped with {@link DocValues#singleton(NumericDocValues, Bits)}, * or null. - * @see #unwrapSingletonBits(SortedNumericDocValues) + * @see DocValues#unwrapSingletonBits(SortedNumericDocValues) */ public static NumericDoubleValues unwrapSingleton(SortedNumericDoubleValues values) { if (values instanceof SingletonSortedNumericDoubleValues) { diff --git a/core/src/main/java/org/elasticsearch/index/fielddata/MultiGeoPointValues.java b/core/src/main/java/org/elasticsearch/index/fielddata/MultiGeoPointValues.java index 1d79077abc6..6fa9c799dd7 100644 --- a/core/src/main/java/org/elasticsearch/index/fielddata/MultiGeoPointValues.java +++ b/core/src/main/java/org/elasticsearch/index/fielddata/MultiGeoPointValues.java @@ -27,7 +27,7 @@ import org.elasticsearch.common.geo.GeoPoint; * GeoPointValues values = ..; * values.setDocId(docId); * final int numValues = values.count(); - * for (int i = 0; i < numValues; i++) { + * for (int i = 0; i < numValues; i++) { * GeoPoint value = values.valueAt(i); * // process value * } diff --git a/core/src/main/java/org/elasticsearch/index/fielddata/ordinals/OrdinalsBuilder.java b/core/src/main/java/org/elasticsearch/index/fielddata/ordinals/OrdinalsBuilder.java index fa7eef6e6b2..3b66adfee9a 100644 --- a/core/src/main/java/org/elasticsearch/index/fielddata/ordinals/OrdinalsBuilder.java +++ b/core/src/main/java/org/elasticsearch/index/fielddata/ordinals/OrdinalsBuilder.java @@ -34,7 +34,7 @@ import java.io.IOException; import java.util.Arrays; /** - * Simple class to build document ID <-> ordinal mapping. Note: Ordinals are + * Simple class to build document ID <-> ordinal mapping. Note: Ordinals are * 1 based monotonically increasing positive integers. 0 * donates the missing value in this context. */ @@ -75,7 +75,7 @@ public final class OrdinalsBuilder implements Closeable { * with document 2: it has 2 more ordinals on level 1: 3 and 4 and its next level index is 1 meaning that there are remaining * ordinals on the next level. On level 2 at index 1, we can read [5 0 0 0] meaning that 5 is an ordinal as well, but the * fact that it is followed by zeros means that there are no more ordinals. In the end, document 2 has 2, 3, 4 and 5 as ordinals. - *

    + *

    * In addition to these structures, there is another array which stores the current position (level + slice + offset in the slice) * in order to be able to append data in constant time. */ @@ -300,7 +300,7 @@ public final class OrdinalsBuilder implements Closeable { } /** - * Return a {@link PackedInts.Reader} instance mapping every doc ID to its first ordinal + 1 if it exists and 0 otherwise. + * Return a {@link org.apache.lucene.util.packed.PackedInts.Reader} instance mapping every doc ID to its first ordinal + 1 if it exists and 0 otherwise. */ public PackedInts.Reader getFirstOrdinals() { return ordinals.firstOrdinals; @@ -419,7 +419,7 @@ public final class OrdinalsBuilder implements Closeable { /** * A {@link TermsEnum} that iterates only full precision prefix coded 64 bit values. * - * @see #buildFromTerms(TermsEnum, Bits) + * @see #buildFromTerms(TermsEnum) */ public static TermsEnum wrapNumeric64Bit(TermsEnum termsEnum) { return new FilteredTermsEnum(termsEnum, false) { @@ -434,7 +434,7 @@ public final class OrdinalsBuilder implements Closeable { /** * A {@link TermsEnum} that iterates only full precision prefix coded 32 bit values. * - * @see #buildFromTerms(TermsEnum, Bits) + * @see #buildFromTerms(TermsEnum) */ public static TermsEnum wrapNumeric32Bit(TermsEnum termsEnum) { return new FilteredTermsEnum(termsEnum, false) { diff --git a/core/src/main/java/org/elasticsearch/index/fielddata/plain/AbstractIndexFieldData.java b/core/src/main/java/org/elasticsearch/index/fielddata/plain/AbstractIndexFieldData.java index 1601edc7add..4cd172fd22c 100644 --- a/core/src/main/java/org/elasticsearch/index/fielddata/plain/AbstractIndexFieldData.java +++ b/core/src/main/java/org/elasticsearch/index/fielddata/plain/AbstractIndexFieldData.java @@ -99,7 +99,7 @@ public abstract class AbstractIndexFieldData extends * the memory overhead for loading the data. Each field data * implementation should implement its own {@code PerValueEstimator} if it * intends to take advantage of the MemoryCircuitBreaker. - *

    + *

    * Note that the .beforeLoad(...) and .afterLoad(...) methods must be * manually called. */ @@ -118,7 +118,6 @@ public abstract class AbstractIndexFieldData extends * * @param terms terms to be estimated * @return A TermsEnum for the given terms - * @throws IOException */ public TermsEnum beforeLoad(Terms terms) throws IOException; diff --git a/core/src/main/java/org/elasticsearch/index/fielddata/plain/PackedArrayIndexFieldData.java b/core/src/main/java/org/elasticsearch/index/fielddata/plain/PackedArrayIndexFieldData.java index 1b54e386c0c..5f95d99f85d 100644 --- a/core/src/main/java/org/elasticsearch/index/fielddata/plain/PackedArrayIndexFieldData.java +++ b/core/src/main/java/org/elasticsearch/index/fielddata/plain/PackedArrayIndexFieldData.java @@ -418,7 +418,6 @@ public class PackedArrayIndexFieldData extends AbstractIndexFieldData> 31) & 0x7fffffff - * {code} + * {@code bits ^ (bits >> 31) & 0x7fffffff} *

    * Although the API is multi-valued, most codecs in Lucene specialize * for the case where documents have at most one value. In this case @@ -223,9 +221,7 @@ public class SortedNumericDVIndexFieldData extends DocValuesIndexFieldData imple * Order of values within a document is consistent with * {@link Double#compareTo(Double)}, hence the following reversible * transformation is applied at both index and search: - * {code} - * bits ^ (bits >> 63) & 0x7fffffffffffffffL - * {code} + * {@code bits ^ (bits >> 63) & 0x7fffffffffffffffL} *

    * Although the API is multi-valued, most codecs in Lucene specialize * for the case where documents have at most one value. In this case diff --git a/core/src/main/java/org/elasticsearch/index/fieldvisitor/FieldsVisitor.java b/core/src/main/java/org/elasticsearch/index/fieldvisitor/FieldsVisitor.java index 5048baec124..31b0a080224 100644 --- a/core/src/main/java/org/elasticsearch/index/fieldvisitor/FieldsVisitor.java +++ b/core/src/main/java/org/elasticsearch/index/fieldvisitor/FieldsVisitor.java @@ -46,8 +46,10 @@ import java.util.List; import java.util.Map; import java.util.Set; +import org.apache.lucene.index.StoredFieldVisitor; + /** - * Base {@link StoredFieldsVisitor} that retrieves all non-redundant metadata. + * Base {@link StoredFieldVisitor} that retrieves all non-redundant metadata. */ public class FieldsVisitor extends StoredFieldVisitor { diff --git a/core/src/main/java/org/elasticsearch/index/get/ShardGetService.java b/core/src/main/java/org/elasticsearch/index/get/ShardGetService.java index 212362c394c..1cf68ad383e 100644 --- a/core/src/main/java/org/elasticsearch/index/get/ShardGetService.java +++ b/core/src/main/java/org/elasticsearch/index/get/ShardGetService.java @@ -102,10 +102,10 @@ public final class ShardGetService extends AbstractIndexShardComponent { } /** - * Returns {@link GetResult} based on the specified {@link Engine.GetResult} argument. + * Returns {@link GetResult} based on the specified {@link org.elasticsearch.index.engine.Engine.GetResult} argument. * This method basically loads specified fields for the associated document in the engineGetResult. * This method load the fields from the Lucene index and not from transaction log and therefore isn't realtime. - *

    + *

    * Note: Call must release engine searcher associated with engineGetResult! */ public GetResult get(Engine.GetResult engineGetResult, String id, String type, String[] fields, FetchSourceContext fetchSourceContext, boolean ignoreErrorsOnGeneratedFields) { diff --git a/core/src/main/java/org/elasticsearch/index/indexing/IndexingOperationListener.java b/core/src/main/java/org/elasticsearch/index/indexing/IndexingOperationListener.java index bb4c109e6af..858453fcba4 100644 --- a/core/src/main/java/org/elasticsearch/index/indexing/IndexingOperationListener.java +++ b/core/src/main/java/org/elasticsearch/index/indexing/IndexingOperationListener.java @@ -35,7 +35,7 @@ public abstract class IndexingOperationListener { /** * Called after the indexing occurs, under a locking scheme to maintain * concurrent updates to the same doc. - *

    + *

    * Note, long operations should not occur under this callback. */ public void postCreateUnderLock(Engine.Create create) { @@ -66,7 +66,7 @@ public abstract class IndexingOperationListener { /** * Called after the indexing occurs, under a locking scheme to maintain * concurrent updates to the same doc. - *

    + *

    * Note, long operations should not occur under this callback. */ public void postIndexUnderLock(Engine.Index index) { @@ -97,7 +97,7 @@ public abstract class IndexingOperationListener { /** * Called after the delete occurs, under a locking scheme to maintain * concurrent updates to the same doc. - *

    + *

    * Note, long operations should not occur under this callback. */ public void postDeleteUnderLock(Engine.Delete delete) { diff --git a/core/src/main/java/org/elasticsearch/index/indexing/IndexingStats.java b/core/src/main/java/org/elasticsearch/index/indexing/IndexingStats.java index 5bda1de73bf..af4add91329 100644 --- a/core/src/main/java/org/elasticsearch/index/indexing/IndexingStats.java +++ b/core/src/main/java/org/elasticsearch/index/indexing/IndexingStats.java @@ -113,7 +113,6 @@ public class IndexingStats implements Streamable, ToXContent { /** * Returns if the index is under merge throttling control - * @return */ public boolean isThrottled() { return isThrottled; @@ -121,7 +120,6 @@ public class IndexingStats implements Streamable, ToXContent { /** * Gets the amount of time in milliseconds that the index has been under merge throttling control - * @return */ public long getThrottleTimeInMillis() { return throttleTimeInMillis; @@ -129,7 +127,6 @@ public class IndexingStats implements Streamable, ToXContent { /** * Gets the amount of time in a TimeValue that the index has been under merge throttling control - * @return */ public TimeValue getThrottleTime() { return new TimeValue(throttleTimeInMillis); diff --git a/core/src/main/java/org/elasticsearch/index/mapper/geo/GeoPointFieldMapper.java b/core/src/main/java/org/elasticsearch/index/mapper/geo/GeoPointFieldMapper.java index 863d71f30bd..222d2623c5e 100644 --- a/core/src/main/java/org/elasticsearch/index/mapper/geo/GeoPointFieldMapper.java +++ b/core/src/main/java/org/elasticsearch/index/mapper/geo/GeoPointFieldMapper.java @@ -69,7 +69,7 @@ import static org.elasticsearch.index.mapper.core.TypeParsers.parsePathType; /** * Parsing: We handle: - *

    + *

    * - "field" : "geo_hash" * - "field" : "lat,lon" * - "field" : { diff --git a/core/src/main/java/org/elasticsearch/index/mapper/geo/GeoShapeFieldMapper.java b/core/src/main/java/org/elasticsearch/index/mapper/geo/GeoShapeFieldMapper.java index 417950808ad..770df633b9d 100644 --- a/core/src/main/java/org/elasticsearch/index/mapper/geo/GeoShapeFieldMapper.java +++ b/core/src/main/java/org/elasticsearch/index/mapper/geo/GeoShapeFieldMapper.java @@ -61,13 +61,13 @@ import static org.elasticsearch.index.mapper.MapperBuilders.geoShapeField; /** * FieldMapper for indexing {@link com.spatial4j.core.shape.Shape}s. - *

    + *

    * Currently Shapes can only be indexed and can only be queried using * {@link org.elasticsearch.index.query.GeoShapeQueryParser}, consequently * a lot of behavior in this Mapper is disabled. - *

    + *

    * Format supported: - *

    + *

    * "field" : { * "type" : "polygon", * "coordinates" : [ diff --git a/core/src/main/java/org/elasticsearch/index/percolator/PercolatorQueriesRegistry.java b/core/src/main/java/org/elasticsearch/index/percolator/PercolatorQueriesRegistry.java index 9283a9b033b..9740054c183 100644 --- a/core/src/main/java/org/elasticsearch/index/percolator/PercolatorQueriesRegistry.java +++ b/core/src/main/java/org/elasticsearch/index/percolator/PercolatorQueriesRegistry.java @@ -60,7 +60,7 @@ import java.util.concurrent.atomic.AtomicBoolean; /** * Each shard will have a percolator registry even if there isn't a {@link PercolatorService#TYPE_NAME} document type in the index. * For shards with indices that have no {@link PercolatorService#TYPE_NAME} document type, this will hold no percolate queries. - *

    + *

    * Once a document type has been created, the real-time percolator will start to listen to write events and update the * this registry with queries in real time. */ diff --git a/core/src/main/java/org/elasticsearch/index/query/BoolQueryBuilder.java b/core/src/main/java/org/elasticsearch/index/query/BoolQueryBuilder.java index c3776673101..d3fa9299450 100644 --- a/core/src/main/java/org/elasticsearch/index/query/BoolQueryBuilder.java +++ b/core/src/main/java/org/elasticsearch/index/query/BoolQueryBuilder.java @@ -108,12 +108,12 @@ public class BoolQueryBuilder extends QueryBuilder implements BoostableQueryBuil /** * Specifies a minimum number of the optional (should) boolean clauses which must be satisfied. - *

    - *

    By default no optional clauses are necessary for a match + *

    + * By default no optional clauses are necessary for a match * (unless there are no required clauses). If this method is used, * then the specified number of clauses is required. - *

    - *

    Use of this method is totally independent of specifying that + *

    + * Use of this method is totally independent of specifying that * any specific clauses are required (or prohibited). This number will * only be compared against the number of matching optional clauses. * diff --git a/core/src/main/java/org/elasticsearch/index/query/BoostingQueryBuilder.java b/core/src/main/java/org/elasticsearch/index/query/BoostingQueryBuilder.java index 9d67469deb0..1e2f9c4d000 100644 --- a/core/src/main/java/org/elasticsearch/index/query/BoostingQueryBuilder.java +++ b/core/src/main/java/org/elasticsearch/index/query/BoostingQueryBuilder.java @@ -27,7 +27,7 @@ import java.io.IOException; * The BoostingQuery class can be used to effectively demote results that match a given query. * Unlike the "NOT" clause, this still selects documents that contain undesirable terms, * but reduces their overall score: - *

    + *

    * Query balancedQuery = new BoostingQuery(positiveQuery, negativeQuery, 0.01f); * In this scenario the positiveQuery contains the mandatory, desirable criteria which is used to * select all matching documents, and the negativeQuery contains the undesirable elements which diff --git a/core/src/main/java/org/elasticsearch/index/query/CommonTermsQueryBuilder.java b/core/src/main/java/org/elasticsearch/index/query/CommonTermsQueryBuilder.java index ae9c10d2957..32b74d0c09f 100644 --- a/core/src/main/java/org/elasticsearch/index/query/CommonTermsQueryBuilder.java +++ b/core/src/main/java/org/elasticsearch/index/query/CommonTermsQueryBuilder.java @@ -29,7 +29,7 @@ import java.io.IOException; /** * CommonTermsQuery query is a query that executes high-frequency terms in a * optional sub-query to prevent slow queries due to "common" terms like - * stopwords. This query basically builds 2 queries off the {@link #add(Term) + * stopwords. This query basically builds 2 queries off the {@code #add(Term) * added} terms where low-frequency terms are added to a required boolean clause * and high-frequency terms are added to an optional boolean clause. The * optional clause is only executed if the required "low-frequency' clause @@ -40,7 +40,6 @@ import java.io.IOException; * significantly contribute to the document score unless at least one of the * low-frequency terms are matched such that this query can improve query * execution times significantly if applicable. - *

    */ public class CommonTermsQueryBuilder extends QueryBuilder implements BoostableQueryBuilder { @@ -123,7 +122,7 @@ public class CommonTermsQueryBuilder extends QueryBuilder implements BoostableQu /** * Sets the cutoff document frequency for high / low frequent terms. A value - * in [0..1] (or absolute number >=1) representing the maximum threshold of + * in [0..1] (or absolute number >=1) representing the maximum threshold of * a terms document frequency to be considered a low frequency term. * Defaults to * {@value CommonTermsQueryParser#DEFAULT_MAX_TERM_DOC_FREQ} diff --git a/core/src/main/java/org/elasticsearch/index/query/GeoPolygonQueryBuilder.java b/core/src/main/java/org/elasticsearch/index/query/GeoPolygonQueryBuilder.java index da1dac2c11b..2d486e05a12 100644 --- a/core/src/main/java/org/elasticsearch/index/query/GeoPolygonQueryBuilder.java +++ b/core/src/main/java/org/elasticsearch/index/query/GeoPolygonQueryBuilder.java @@ -49,7 +49,6 @@ public class GeoPolygonQueryBuilder extends QueryBuilder { * * @param lat The latitude * @param lon The longitude - * @return */ public GeoPolygonQueryBuilder addPoint(double lat, double lon) { return addPoint(new GeoPoint(lat, lon)); diff --git a/core/src/main/java/org/elasticsearch/index/query/GeohashCellQuery.java b/core/src/main/java/org/elasticsearch/index/query/GeohashCellQuery.java index 6067bc675bb..84d38578127 100644 --- a/core/src/main/java/org/elasticsearch/index/query/GeohashCellQuery.java +++ b/core/src/main/java/org/elasticsearch/index/query/GeohashCellQuery.java @@ -44,7 +44,7 @@ import java.util.List; * Geohash prefix is defined by the filter and all geohashes that are matching this * prefix will be returned. The neighbors flag allows to filter * geohashes that surround the given geohash. In general the neighborhood of a - * geohash is defined by its eight adjacent cells.
    + * geohash is defined by its eight adjacent cells.
    * The structure of the {@link GeohashCellQuery} is defined as: *

      * "geohash_bbox" {
    diff --git a/core/src/main/java/org/elasticsearch/index/query/MatchQueryBuilder.java b/core/src/main/java/org/elasticsearch/index/query/MatchQueryBuilder.java
    index 6f73f08dc02..c7c530b1d5d 100644
    --- a/core/src/main/java/org/elasticsearch/index/query/MatchQueryBuilder.java
    +++ b/core/src/main/java/org/elasticsearch/index/query/MatchQueryBuilder.java
    @@ -163,7 +163,7 @@ public class MatchQueryBuilder extends QueryBuilder implements BoostableQueryBui
         }
     
         /**
    -     * Set a cutoff value in [0..1] (or absolute number >=1) representing the
    +     * Set a cutoff value in [0..1] (or absolute number >=1) representing the
          * maximum threshold of a terms document frequency to be considered a low
          * frequency term.
          */
    @@ -266,4 +266,4 @@ public class MatchQueryBuilder extends QueryBuilder implements BoostableQueryBui
             builder.endObject();
             builder.endObject();
         }
    -}
    \ No newline at end of file
    +}
    diff --git a/core/src/main/java/org/elasticsearch/index/query/MoreLikeThisQueryBuilder.java b/core/src/main/java/org/elasticsearch/index/query/MoreLikeThisQueryBuilder.java
    index 4994070fd74..5c7e24b53c4 100644
    --- a/core/src/main/java/org/elasticsearch/index/query/MoreLikeThisQueryBuilder.java
    +++ b/core/src/main/java/org/elasticsearch/index/query/MoreLikeThisQueryBuilder.java
    @@ -512,8 +512,8 @@ public class MoreLikeThisQueryBuilder extends QueryBuilder implements BoostableQ
     
         /**
          * Set the set of stopwords.
    -     * 

    - *

    Any word in this set is considered "uninteresting" and ignored. Even if your Analyzer allows stopwords, you + *

    + * Any word in this set is considered "uninteresting" and ignored. Even if your Analyzer allows stopwords, you * might want to tell the MoreLikeThis code to ignore them, as for the purposes of document similarity it seems * reasonable to assume that "a stop word is never interesting". */ diff --git a/core/src/main/java/org/elasticsearch/index/query/MultiMatchQueryBuilder.java b/core/src/main/java/org/elasticsearch/index/query/MultiMatchQueryBuilder.java index b0949159b27..d42f0c786c1 100644 --- a/core/src/main/java/org/elasticsearch/index/query/MultiMatchQueryBuilder.java +++ b/core/src/main/java/org/elasticsearch/index/query/MultiMatchQueryBuilder.java @@ -302,7 +302,7 @@ public class MultiMatchQueryBuilder extends QueryBuilder implements BoostableQue /** - * Set a cutoff value in [0..1] (or absolute number >=1) representing the + * Set a cutoff value in [0..1] (or absolute number >=1) representing the * maximum threshold of a terms document frequency to be considered a low * frequency term. */ diff --git a/core/src/main/java/org/elasticsearch/index/query/QueryBuilders.java b/core/src/main/java/org/elasticsearch/index/query/QueryBuilders.java index aa2dd1d2426..f042056b273 100644 --- a/core/src/main/java/org/elasticsearch/index/query/QueryBuilders.java +++ b/core/src/main/java/org/elasticsearch/index/query/QueryBuilders.java @@ -340,7 +340,6 @@ public abstract class QueryBuilders { * * @param multiTermQueryBuilder The {@link MultiTermQueryBuilder} that * backs the created builder. - * @return */ public static SpanMultiTermQueryBuilder spanMultiTermQueryBuilder(MultiTermQueryBuilder multiTermQueryBuilder) { diff --git a/core/src/main/java/org/elasticsearch/index/query/QueryParser.java b/core/src/main/java/org/elasticsearch/index/query/QueryParser.java index d561a0a42b1..9553d93bce2 100644 --- a/core/src/main/java/org/elasticsearch/index/query/QueryParser.java +++ b/core/src/main/java/org/elasticsearch/index/query/QueryParser.java @@ -38,7 +38,7 @@ public interface QueryParser { /** * Parses the into a query from the current parser location. Will be at "START_OBJECT" location, * and should end when the token is at the matching "END_OBJECT". - *

    + *

    * Returns null if this query should be ignored in the context of the DSL. */ @Nullable diff --git a/core/src/main/java/org/elasticsearch/index/query/QueryStringQueryBuilder.java b/core/src/main/java/org/elasticsearch/index/query/QueryStringQueryBuilder.java index c7a297e319b..78bfac73f9f 100644 --- a/core/src/main/java/org/elasticsearch/index/query/QueryStringQueryBuilder.java +++ b/core/src/main/java/org/elasticsearch/index/query/QueryStringQueryBuilder.java @@ -34,7 +34,6 @@ import java.util.Locale; * will use the {@link #defaultField(String)} set. The second, when one or more fields are added * (using {@link #field(String)}), will run the parsed query against the provided fields, and combine * them either using DisMax or a plain boolean query (see {@link #useDisMax(boolean)}). - *

    */ public class QueryStringQueryBuilder extends QueryBuilder implements BoostableQueryBuilder { @@ -157,12 +156,12 @@ public class QueryStringQueryBuilder extends QueryBuilder implements BoostableQu /** * Sets the boolean operator of the query parser used to parse the query string. - *

    - *

    In default mode ({@link Operator#OR}) terms without any modifiers + *

    + * In default mode ({@link Operator#OR}) terms without any modifiers * are considered optional: for example capital of Hungary is equal to * capital OR of OR Hungary. - *

    - *

    In {@link Operator#AND} mode terms are considered to be in conjunction: the + *

    + * In {@link Operator#AND} mode terms are considered to be in conjunction: the * above mentioned query is parsed as capital AND of AND Hungary */ public QueryStringQueryBuilder defaultOperator(Operator defaultOperator) { @@ -194,7 +193,7 @@ public class QueryStringQueryBuilder extends QueryBuilder implements BoostableQu * when the analyzer returns more than one term from whitespace * delimited text. * NOTE: this behavior may not be suitable for all languages. - *

    + *

    * Set to false if phrase queries should only be generated when * surrounded by double quotes. */ @@ -231,8 +230,8 @@ public class QueryStringQueryBuilder extends QueryBuilder implements BoostableQu /** * Set to true to enable position increments in result query. Defaults to * true. - *

    - *

    When set, result phrase and multi-phrase queries will be aware of position increments. + *

    + * When set, result phrase and multi-phrase queries will be aware of position increments. * Useful when e.g. a StopFilter increases the position increment of the token that follows an omitted token. */ public QueryStringQueryBuilder enablePositionIncrements(boolean enablePositionIncrements) { diff --git a/core/src/main/java/org/elasticsearch/index/query/RegexpFlag.java b/core/src/main/java/org/elasticsearch/index/query/RegexpFlag.java index 0af6b86db30..45f58c47da6 100644 --- a/core/src/main/java/org/elasticsearch/index/query/RegexpFlag.java +++ b/core/src/main/java/org/elasticsearch/index/query/RegexpFlag.java @@ -89,9 +89,9 @@ public enum RegexpFlag { /** * Resolves the combined OR'ed value for the given list of regular expression flags. The given flags must follow the * following syntax: - *

    + *

    * flag_name(|flag_name)* - *

    + *

    * Where flag_name is one of the following: *

      *
    • INTERSECTION
    • @@ -102,10 +102,10 @@ public enum RegexpFlag { *
    • NONE
    • *
    • ALL
    • *
    - *

    + *

    * Example: INTERSECTION|COMPLEMENT|EMPTY * - * @param flags A string representing a list of regualr expression flags + * @param flags A string representing a list of regular expression flags * @return The combined OR'ed value for all the flags */ static int resolveValue(String flags) { diff --git a/core/src/main/java/org/elasticsearch/index/query/SimpleQueryStringParser.java b/core/src/main/java/org/elasticsearch/index/query/SimpleQueryStringParser.java index a81ffbf348f..4207f93fa7d 100644 --- a/core/src/main/java/org/elasticsearch/index/query/SimpleQueryStringParser.java +++ b/core/src/main/java/org/elasticsearch/index/query/SimpleQueryStringParser.java @@ -42,7 +42,6 @@ import java.util.Map; * SimpleQueryStringParser is a query parser that acts similar to a query_string * query, but won't throw exceptions for any weird string syntax. It supports * the following: - *

    *

      *
    • '{@code +}' specifies {@code AND} operation: token1+token2 *
    • '{@code |}' specifies {@code OR} operation: token1|token2 @@ -53,14 +52,14 @@ import java.util.Map; *
    • '{@code ~}N' at the end of terms specifies fuzzy query: term~1 *
    • '{@code ~}N' at the end of phrases specifies near/slop query: "term1 term2"~5 *
    - *

    + *

    * See: {@link SimpleQueryParser} for more information. - *

    + *

    * This query supports these options: - *

    + *

    * Required: * {@code query} - query text to be converted into other queries - *

    + *

    * Optional: * {@code analyzer} - anaylzer to be used for analyzing tokens to determine * which kind of query they should be converted into, defaults to "standard" diff --git a/core/src/main/java/org/elasticsearch/index/query/WrapperQueryBuilder.java b/core/src/main/java/org/elasticsearch/index/query/WrapperQueryBuilder.java index a6e8e23e00c..e7de5fd0480 100644 --- a/core/src/main/java/org/elasticsearch/index/query/WrapperQueryBuilder.java +++ b/core/src/main/java/org/elasticsearch/index/query/WrapperQueryBuilder.java @@ -29,14 +29,14 @@ import java.io.IOException; * A Query builder which allows building a query given JSON string or binary data provided as input. This is useful when you want * to use the Java Builder API but still have JSON query strings at hand that you want to combine with other * query builders. - *

    + *

    * Example usage in a boolean query : *

    - * {@code
    + * 
      *      BoolQueryBuilder bool = new BoolQueryBuilder();
      *      bool.must(new WrapperQueryBuilder("{\"term\": {\"field\":\"value\"}}");
      *      bool.must(new TermQueryBuilder("field2","value2");
    - * }
    + * 
      * 
    */ public class WrapperQueryBuilder extends QueryBuilder { diff --git a/core/src/main/java/org/elasticsearch/index/query/functionscore/DecayFunctionParser.java b/core/src/main/java/org/elasticsearch/index/query/functionscore/DecayFunctionParser.java index bfe988a268c..6e74959ab3f 100644 --- a/core/src/main/java/org/elasticsearch/index/query/functionscore/DecayFunctionParser.java +++ b/core/src/main/java/org/elasticsearch/index/query/functionscore/DecayFunctionParser.java @@ -60,14 +60,14 @@ import java.util.Locale; * This parser parses this kind of input * *
    - * {@code}
    + * 
      * {
      *      "fieldname1" : {
      *          "origin" = "someValue",
      *          "scale" = "someValue"
      *      }
      *
    - * }
    + * 
      * 
    * * "origin" here refers to the reference point and "scale" to the level of @@ -106,7 +106,7 @@ public abstract class DecayFunctionParser implements ScoreFunctionParser { * Parses bodies of the kind * *
    -     * {@code}
    +     * 
          * {
          *      "fieldname1" : {
          *          "origin" = "someValue",
    @@ -114,6 +114,7 @@ public abstract class DecayFunctionParser implements ScoreFunctionParser {
          *      }
          *
          * }
    +     * 
          * 
    * * */ diff --git a/core/src/main/java/org/elasticsearch/index/query/functionscore/random/RandomScoreFunctionBuilder.java b/core/src/main/java/org/elasticsearch/index/query/functionscore/random/RandomScoreFunctionBuilder.java index ea2293c55aa..22285f8cc67 100644 --- a/core/src/main/java/org/elasticsearch/index/query/functionscore/random/RandomScoreFunctionBuilder.java +++ b/core/src/main/java/org/elasticsearch/index/query/functionscore/random/RandomScoreFunctionBuilder.java @@ -51,7 +51,7 @@ public class RandomScoreFunctionBuilder extends ScoreFunctionBuilder { /** * seed variant taking a long value. - * @see {@link #seed(int)} + * @see #seed(int) */ public RandomScoreFunctionBuilder seed(long seed) { this.seed = seed; @@ -60,7 +60,7 @@ public class RandomScoreFunctionBuilder extends ScoreFunctionBuilder { /** * seed variant taking a String value. - * @see {@link #seed(int)} + * @see #seed(int) */ public RandomScoreFunctionBuilder seed(String seed) { this.seed = seed; @@ -78,4 +78,4 @@ public class RandomScoreFunctionBuilder extends ScoreFunctionBuilder { builder.endObject(); } -} \ No newline at end of file +} diff --git a/core/src/main/java/org/elasticsearch/index/shard/MergePolicyConfig.java b/core/src/main/java/org/elasticsearch/index/shard/MergePolicyConfig.java index 3895bbed2c4..c664d3a3794 100644 --- a/core/src/main/java/org/elasticsearch/index/shard/MergePolicyConfig.java +++ b/core/src/main/java/org/elasticsearch/index/shard/MergePolicyConfig.java @@ -79,7 +79,7 @@ import org.elasticsearch.index.settings.IndexSettingsService; * * Sets the allowed number of segments per tier. Smaller values mean more * merging but fewer segments. Default is 10. Note, this value needs to be - * >= than the max_merge_at_once otherwise you'll force too many merges to + * >= than the max_merge_at_once otherwise you'll force too many merges to * occur. * *
  • index.merge.policy.reclaim_deletes_weight: diff --git a/core/src/main/java/org/elasticsearch/index/similarity/BM25SimilarityProvider.java b/core/src/main/java/org/elasticsearch/index/similarity/BM25SimilarityProvider.java index ca249855164..1983c4e8ecf 100644 --- a/core/src/main/java/org/elasticsearch/index/similarity/BM25SimilarityProvider.java +++ b/core/src/main/java/org/elasticsearch/index/similarity/BM25SimilarityProvider.java @@ -27,7 +27,7 @@ import org.elasticsearch.common.settings.Settings; /** * {@link SimilarityProvider} for the {@link BM25Similarity}. - *

    + *

    * Configuration options available: *

      *
    • k1
    • diff --git a/core/src/main/java/org/elasticsearch/index/similarity/DFRSimilarityProvider.java b/core/src/main/java/org/elasticsearch/index/similarity/DFRSimilarityProvider.java index 6d30e81c091..b5a5cdcfeff 100644 --- a/core/src/main/java/org/elasticsearch/index/similarity/DFRSimilarityProvider.java +++ b/core/src/main/java/org/elasticsearch/index/similarity/DFRSimilarityProvider.java @@ -28,7 +28,7 @@ import org.elasticsearch.common.settings.Settings; /** * {@link SimilarityProvider} for {@link DFRSimilarity}. - *

      + *

      * Configuration options available: *

        *
      • basic_model
      • diff --git a/core/src/main/java/org/elasticsearch/index/similarity/DefaultSimilarityProvider.java b/core/src/main/java/org/elasticsearch/index/similarity/DefaultSimilarityProvider.java index a6e04434b3b..0f9feba952b 100644 --- a/core/src/main/java/org/elasticsearch/index/similarity/DefaultSimilarityProvider.java +++ b/core/src/main/java/org/elasticsearch/index/similarity/DefaultSimilarityProvider.java @@ -26,7 +26,7 @@ import org.elasticsearch.common.settings.Settings; /** * {@link SimilarityProvider} for {@link DefaultSimilarity}. - *

        + *

        * Configuration options available: *

          *
        • discount_overlaps
        • diff --git a/core/src/main/java/org/elasticsearch/index/similarity/IBSimilarityProvider.java b/core/src/main/java/org/elasticsearch/index/similarity/IBSimilarityProvider.java index 4741247080c..161ca9c10ea 100644 --- a/core/src/main/java/org/elasticsearch/index/similarity/IBSimilarityProvider.java +++ b/core/src/main/java/org/elasticsearch/index/similarity/IBSimilarityProvider.java @@ -28,7 +28,7 @@ import org.elasticsearch.common.settings.Settings; /** * {@link SimilarityProvider} for {@link IBSimilarity}. - *

          + *

          * Configuration options available: *

            *
          • distribution
          • diff --git a/core/src/main/java/org/elasticsearch/index/similarity/LMDirichletSimilarityProvider.java b/core/src/main/java/org/elasticsearch/index/similarity/LMDirichletSimilarityProvider.java index 797ce6417e8..efea285639b 100644 --- a/core/src/main/java/org/elasticsearch/index/similarity/LMDirichletSimilarityProvider.java +++ b/core/src/main/java/org/elasticsearch/index/similarity/LMDirichletSimilarityProvider.java @@ -27,7 +27,7 @@ import org.elasticsearch.common.settings.Settings; /** * {@link SimilarityProvider} for {@link LMDirichletSimilarity}. - *

            + *

            * Configuration options available: *

              *
            • mu
            • diff --git a/core/src/main/java/org/elasticsearch/index/similarity/LMJelinekMercerSimilarityProvider.java b/core/src/main/java/org/elasticsearch/index/similarity/LMJelinekMercerSimilarityProvider.java index 9be02366b63..5d30b300d5c 100644 --- a/core/src/main/java/org/elasticsearch/index/similarity/LMJelinekMercerSimilarityProvider.java +++ b/core/src/main/java/org/elasticsearch/index/similarity/LMJelinekMercerSimilarityProvider.java @@ -27,7 +27,7 @@ import org.elasticsearch.common.settings.Settings; /** * {@link SimilarityProvider} for {@link LMJelinekMercerSimilarity}. - *

              + *

              * Configuration options available: *

                *
              • lambda
              • diff --git a/core/src/main/java/org/elasticsearch/index/similarity/SimilarityLookupService.java b/core/src/main/java/org/elasticsearch/index/similarity/SimilarityLookupService.java index 49e3df989f4..8b8b68812cb 100644 --- a/core/src/main/java/org/elasticsearch/index/similarity/SimilarityLookupService.java +++ b/core/src/main/java/org/elasticsearch/index/similarity/SimilarityLookupService.java @@ -31,7 +31,7 @@ import java.util.Map; /** * Service for looking up configured {@link SimilarityProvider} implementations by name. - *

                + *

                * The service instantiates the Providers through their Factories using configuration * values found with the {@link SimilarityModule#SIMILARITY_SETTINGS_PREFIX} prefix. */ diff --git a/core/src/main/java/org/elasticsearch/index/snapshots/IndexShardRepository.java b/core/src/main/java/org/elasticsearch/index/snapshots/IndexShardRepository.java index 7c778846926..8ce487fe144 100644 --- a/core/src/main/java/org/elasticsearch/index/snapshots/IndexShardRepository.java +++ b/core/src/main/java/org/elasticsearch/index/snapshots/IndexShardRepository.java @@ -27,7 +27,7 @@ import org.elasticsearch.indices.recovery.RecoveryState; /** * Shard-level snapshot repository - *

                + *

                * IndexShardRepository is used on data node to create snapshots of individual shards. See {@link org.elasticsearch.repositories.Repository} * for more information. */ @@ -35,10 +35,10 @@ public interface IndexShardRepository { /** * Creates a snapshot of the shard based on the index commit point. - *

                + *

                * The index commit point can be obtained by using {@link org.elasticsearch.index.engine.Engine#snapshotIndex} method. * IndexShardRepository implementations shouldn't release the snapshot index commit point. It is done by the method caller. - *

                + *

                * As snapshot process progresses, implementation of this method should update {@link IndexShardSnapshotStatus} object and check * {@link IndexShardSnapshotStatus#aborted()} to see if the snapshot process should be aborted. * @@ -51,7 +51,7 @@ public interface IndexShardRepository { /** * Restores snapshot of the shard. - *

                + *

                * The index can be renamed on restore, hence different {@code shardId} and {@code snapshotShardId} are supplied. * * @param snapshotId snapshot id diff --git a/core/src/main/java/org/elasticsearch/index/snapshots/blobstore/BlobStoreIndexShardRepository.java b/core/src/main/java/org/elasticsearch/index/snapshots/blobstore/BlobStoreIndexShardRepository.java index 947a36a6c1c..912be76fb81 100644 --- a/core/src/main/java/org/elasticsearch/index/snapshots/blobstore/BlobStoreIndexShardRepository.java +++ b/core/src/main/java/org/elasticsearch/index/snapshots/blobstore/BlobStoreIndexShardRepository.java @@ -623,12 +623,11 @@ public class BlobStoreIndexShardRepository extends AbstractComponent implements /** * Snapshot individual file - *

                + *

                * This is asynchronous method. Upon completion of the operation latch is getting counted down and any failures are * added to the {@code failures} list * * @param fileInfo file to be snapshotted - * @throws IOException */ private void snapshotFile(final BlobStoreIndexShardSnapshot.FileInfo fileInfo) throws IOException { final String file = fileInfo.physicalName(); diff --git a/core/src/main/java/org/elasticsearch/index/snapshots/blobstore/BlobStoreIndexShardSnapshot.java b/core/src/main/java/org/elasticsearch/index/snapshots/blobstore/BlobStoreIndexShardSnapshot.java index 808f13ba23d..56d98820634 100644 --- a/core/src/main/java/org/elasticsearch/index/snapshots/blobstore/BlobStoreIndexShardSnapshot.java +++ b/core/src/main/java/org/elasticsearch/index/snapshots/blobstore/BlobStoreIndexShardSnapshot.java @@ -228,7 +228,6 @@ public class BlobStoreIndexShardSnapshot implements ToXContent, FromXContentBuil * @param file file info * @param builder XContent builder * @param params parameters - * @throws IOException */ public static void toXContent(FileInfo file, XContentBuilder builder, ToXContent.Params params) throws IOException { builder.startObject(); @@ -257,7 +256,6 @@ public class BlobStoreIndexShardSnapshot implements ToXContent, FromXContentBuil * * @param parser parser * @return file info - * @throws IOException */ public static FileInfo fromXContent(XContentParser parser) throws IOException { XContentParser.Token token = parser.currentToken(); @@ -446,7 +444,6 @@ public class BlobStoreIndexShardSnapshot implements ToXContent, FromXContentBuil * * @param builder XContent builder * @param params parameters - * @throws IOException */ @Override public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException { @@ -469,7 +466,6 @@ public class BlobStoreIndexShardSnapshot implements ToXContent, FromXContentBuil * * @param parser parser * @return shard snapshot metadata - * @throws IOException */ public BlobStoreIndexShardSnapshot fromXContent(XContentParser parser, ParseFieldMatcher parseFieldMatcher) throws IOException { diff --git a/core/src/main/java/org/elasticsearch/index/snapshots/blobstore/BlobStoreIndexShardSnapshots.java b/core/src/main/java/org/elasticsearch/index/snapshots/blobstore/BlobStoreIndexShardSnapshots.java index 268e681e930..bf8c1a83c92 100644 --- a/core/src/main/java/org/elasticsearch/index/snapshots/blobstore/BlobStoreIndexShardSnapshots.java +++ b/core/src/main/java/org/elasticsearch/index/snapshots/blobstore/BlobStoreIndexShardSnapshots.java @@ -40,7 +40,7 @@ import java.util.Map; /** * Contains information about all snapshot for the given shard in repository - *

                + *

                * This class is used to find files that were already snapshoted and clear out files that no longer referenced by any * snapshots */ @@ -160,7 +160,7 @@ public class BlobStoreIndexShardSnapshots implements Iterable, To /** * Writes index file for the shard in the following format. *

                -     * {@code
                +     * 
                      * {
                      *     "files": [{
                      *         "name": "__3",
                @@ -206,6 +206,7 @@ public class BlobStoreIndexShardSnapshots implements Iterable, To
                      *     }
                      * }
                      * }
                +     * 
                      * 
                */ @Override diff --git a/core/src/main/java/org/elasticsearch/index/store/Store.java b/core/src/main/java/org/elasticsearch/index/store/Store.java index 2b5051b4123..09f8ec23adc 100644 --- a/core/src/main/java/org/elasticsearch/index/store/Store.java +++ b/core/src/main/java/org/elasticsearch/index/store/Store.java @@ -70,7 +70,7 @@ import java.util.zip.Checksum; * This class also provides access to metadata information like checksums for committed files. A committed * file is a file that belongs to a segment written by a Lucene commit. Files that have not been committed * ie. created during a merge or a shard refresh / NRT reopen are not considered in the MetadataSnapshot. - *

                + *

                * Note: If you use a store it's reference count should be increased before using it by calling #incRef and a * corresponding #decRef must be called in a try/finally block to release the store again ie.: *

                @@ -299,7 +299,7 @@ public class Store extends AbstractIndexShardComponent implements Closeable, Ref
                      * corresponding {@link #decRef}, in a finally clause; otherwise the store may never be closed.  Note that
                      * {@link #close} simply calls decRef(), which means that the Store will not really be closed until {@link
                      * #decRef} has been called for all outstanding references.
                -     * 

                + *

                * Note: Close can safely be called multiple times. * * @throws AlreadyClosedException iff the reference counter can not be incremented. @@ -318,7 +318,7 @@ public class Store extends AbstractIndexShardComponent implements Closeable, Ref * corresponding {@link #decRef}, in a finally clause; otherwise the store may never be closed. Note that * {@link #close} simply calls decRef(), which means that the Store will not really be closed until {@link * #decRef} has been called for all outstanding references. - *

                + *

                * Note: Close can safely be called multiple times. * * @see #decRef() @@ -413,7 +413,7 @@ public class Store extends AbstractIndexShardComponent implements Closeable, Ref * The returned IndexOutput might validate the files checksum if the file has been written with a newer lucene version * and the metadata holds the necessary information to detect that it was been written by Lucene 4.8 or newer. If it has only * a legacy checksum, returned IndexOutput will not verify the checksum. - *

                + *

                * Note: Checksums are calculated nevertheless since lucene does it by default sicne version 4.8.0. This method only adds the * verification against the checksum in the given metadata and does not add any significant overhead. */ @@ -723,7 +723,7 @@ public class Store extends AbstractIndexShardComponent implements Closeable, Ref * Only files that are part of the last commit are considered in this datastrucutre. * For backwards compatibility the snapshot might include legacy checksums that * are derived from a dedicated checksum file written by older elasticsearch version pre 1.3 - *

                + *

                * Note: This class will ignore the segments.gen file since it's optional and might * change concurrently for safety reasons. * @@ -867,13 +867,12 @@ public class Store extends AbstractIndexShardComponent implements Closeable, Ref /** * Reads legacy checksum files found in the directory. - *

                + *

                * Files are expected to start with _checksums- prefix * followed by long file version. Only file with the highest version is read, all other files are ignored. * * @param directory the directory to read checksums from * @return a map of file checksums and the checksum file version - * @throws IOException */ static Tuple, Long> readLegacyChecksums(Directory directory) throws IOException { synchronized (directory) { @@ -902,7 +901,6 @@ public class Store extends AbstractIndexShardComponent implements Closeable, Ref * * @param directory the directory to clean * @param newVersion the latest checksum file version - * @throws IOException */ static void cleanLegacyChecksums(Directory directory, long newVersion) throws IOException { synchronized (directory) { @@ -949,7 +947,7 @@ public class Store extends AbstractIndexShardComponent implements Closeable, Ref } /** - * Computes a strong hash value for small files. Note that this method should only be used for files < 1MB + * Computes a strong hash value for small files. Note that this method should only be used for files < 1MB */ public static BytesRef hashFile(Directory directory, String file) throws IOException { final BytesRefBuilder fileHash = new BytesRefBuilder(); @@ -961,7 +959,7 @@ public class Store extends AbstractIndexShardComponent implements Closeable, Ref /** - * Computes a strong hash value for small files. Note that this method should only be used for files < 1MB + * Computes a strong hash value for small files. Note that this method should only be used for files < 1MB */ public static void hashFile(BytesRefBuilder fileHash, InputStream in, long size) throws IOException { final int len = (int) Math.min(1024 * 1024, size); // for safety we limit this to 1MB @@ -1006,10 +1004,10 @@ public class Store extends AbstractIndexShardComponent implements Closeable, Ref *

              • all files in this segment have the same length
              • *
              • the segments .si files hashes are byte-identical Note: This is a using a perfect hash function, The metadata transfers the .si file content as it's hash
              • *
              - *

              + *

              * The .si file contains a lot of diagnostics including a timestamp etc. in the future there might be * unique segment identifiers in there hardening this method further. - *

              + *

              * The per-commit files handles very similar. A commit is composed of the segments_N files as well as generational files like * deletes (_x_y.del) or field-info (_x_y.fnm) files. On a per-commit level files for a commit are treated * as identical iff: @@ -1018,7 +1016,7 @@ public class Store extends AbstractIndexShardComponent implements Closeable, Ref *

            • all files belonging to this commit have the same length
            • *
            • the segments file segments_N files hashes are byte-identical Note: This is a using a perfect hash function, The metadata transfers the segments_N file content as it's hash
            • *
            - *

            + *

            * NOTE: this diff will not contain the segments.gen file. This file is omitted on recovery. */ public RecoveryDiff recoveryDiff(MetadataSnapshot recoveryTargetSnapshot) { @@ -1314,7 +1312,7 @@ public class Store extends AbstractIndexShardComponent implements Closeable, Ref /** * Index input that calculates checksum as data is read from the input. - *

            + *

            * This class supports random access (it is possible to seek backward and forward) in order to accommodate retry * mechanism that is used in some repository plugins (S3 for example). However, the checksum is only calculated on * the first read. All consecutive reads of the same data are not used to calculate the checksum. diff --git a/core/src/main/java/org/elasticsearch/index/store/StoreFileMetaData.java b/core/src/main/java/org/elasticsearch/index/store/StoreFileMetaData.java index 9aaea73efb5..31ad068a581 100644 --- a/core/src/main/java/org/elasticsearch/index/store/StoreFileMetaData.java +++ b/core/src/main/java/org/elasticsearch/index/store/StoreFileMetaData.java @@ -87,7 +87,6 @@ public class StoreFileMetaData implements Streamable { * Returns a string representation of the files checksum. Since Lucene 4.8 this is a CRC32 checksum written * by lucene. Previously we use Adler32 on top of Lucene as the checksum algorithm, if {@link #hasLegacyChecksum()} returns * true this is a Adler32 checksum. - * @return */ @Nullable public String checksum() { diff --git a/core/src/main/java/org/elasticsearch/index/translog/LegacyTranslogReader.java b/core/src/main/java/org/elasticsearch/index/translog/LegacyTranslogReader.java index 7a131f9d0d8..d1cd3b1efdb 100644 --- a/core/src/main/java/org/elasticsearch/index/translog/LegacyTranslogReader.java +++ b/core/src/main/java/org/elasticsearch/index/translog/LegacyTranslogReader.java @@ -32,9 +32,6 @@ public final class LegacyTranslogReader extends LegacyTranslogReaderBase { /** * Create a snapshot of translog file channel. The length parameter should be consistent with totalOperations and point * at the end of the last operation in this snapshot. - * - * @param generation - * @param channelReference */ LegacyTranslogReader(long generation, ChannelReference channelReference, long fileLength) { super(generation, channelReference, 0, fileLength); diff --git a/core/src/main/java/org/elasticsearch/index/translog/Translog.java b/core/src/main/java/org/elasticsearch/index/translog/Translog.java index 9b1913e5854..5084895151b 100644 --- a/core/src/main/java/org/elasticsearch/index/translog/Translog.java +++ b/core/src/main/java/org/elasticsearch/index/translog/Translog.java @@ -1764,8 +1764,6 @@ public class Translog extends AbstractIndexShardComponent implements IndexShardC /** * Returns true iff the given generation is the current gbeneration of this translog - * @param generation - * @return */ public boolean isCurrent(TranslogGeneration generation) { try (ReleasableLock lock = writeLock.acquire()) { diff --git a/core/src/main/java/org/elasticsearch/index/translog/TranslogReader.java b/core/src/main/java/org/elasticsearch/index/translog/TranslogReader.java index c7feb8d19c3..590bc319057 100644 --- a/core/src/main/java/org/elasticsearch/index/translog/TranslogReader.java +++ b/core/src/main/java/org/elasticsearch/index/translog/TranslogReader.java @@ -170,9 +170,6 @@ public abstract class TranslogReader implements Closeable, Comparable - * - * @throws IOException */ public static ImmutableTranslogReader open(ChannelReference channelReference, Checkpoint checkpoint, String translogUUID) throws IOException { final FileChannel channel = channelReference.getChannel(); diff --git a/core/src/main/java/org/elasticsearch/indices/analysis/HunspellService.java b/core/src/main/java/org/elasticsearch/indices/analysis/HunspellService.java index b44a050d2b3..1a48c5c3ca5 100644 --- a/core/src/main/java/org/elasticsearch/indices/analysis/HunspellService.java +++ b/core/src/main/java/org/elasticsearch/indices/analysis/HunspellService.java @@ -41,23 +41,23 @@ import java.util.function.Function; * the {@code /hunspell} directory, where each locale has its dedicated sub-directory which holds the dictionary * files. For example, the dictionary files for {@code en_US} locale must be placed under {@code /hunspell/en_US} * directory. - *

            + *

            * The following settings can be set for each dictionary: *

              *
            • {@code ignore_case} - If true, dictionary matching will be case insensitive (defaults to {@code false})
            • *
            • {@code strict_affix_parsing} - Determines whether errors while reading a affix rules file will cause exception or simple be ignored (defaults to {@code true})
            • *
            - *

            + *

            * These settings can either be configured as node level configuration, such as: - *

            + *

            *

            
              *     indices.analysis.hunspell.dictionary.en_US.ignore_case: true
              *     indices.analysis.hunspell.dictionary.en_US.strict_affix_parsing: false
              * 
            - *

            + *

            * or, as dedicated configuration per dictionary, placed in a {@code settings.yml} file under the dictionary directory. For * example, the following can be the content of the {@code /hunspell/en_US/settings.yml} file: - *

            + *

            *

            
              *     ignore_case: true
              *     strict_affix_parsing: false
            diff --git a/core/src/main/java/org/elasticsearch/indices/breaker/CircuitBreakerService.java b/core/src/main/java/org/elasticsearch/indices/breaker/CircuitBreakerService.java
            index b08efaf3e55..d8bf8f10695 100644
            --- a/core/src/main/java/org/elasticsearch/indices/breaker/CircuitBreakerService.java
            +++ b/core/src/main/java/org/elasticsearch/indices/breaker/CircuitBreakerService.java
            @@ -35,8 +35,6 @@ public abstract class CircuitBreakerService extends AbstractLifecycleComponent
            - * Currently, the cache is only enabled for {@link SearchType#COUNT}, and can only be opted in on an index
            + * 

            + * Currently, the cache is only enabled for count requests, and can only be opted in on an index * level setting that can be dynamically changed and defaults to false. - *

            + *

            * There are still several TODOs left in this class, some easily addressable, some more complex, but the support * is functional. */ diff --git a/core/src/main/java/org/elasticsearch/indices/fielddata/cache/IndicesFieldDataCacheListener.java b/core/src/main/java/org/elasticsearch/indices/fielddata/cache/IndicesFieldDataCacheListener.java index 75cfeb9572d..cfc6357548a 100644 --- a/core/src/main/java/org/elasticsearch/indices/fielddata/cache/IndicesFieldDataCacheListener.java +++ b/core/src/main/java/org/elasticsearch/indices/fielddata/cache/IndicesFieldDataCacheListener.java @@ -31,7 +31,7 @@ import org.elasticsearch.index.shard.ShardId; import org.elasticsearch.indices.breaker.CircuitBreakerService; /** - * A {@link IndexFieldDataCache.Listener} implementation that updates indices (node) level statistics / service about + * A {@link org.elasticsearch.index.fielddata.IndexFieldDataCache.Listener} implementation that updates indices (node) level statistics / service about * field data entries being loaded and unloaded. * * Currently it only decrements the memory used in the {@link CircuitBreakerService}. diff --git a/core/src/main/java/org/elasticsearch/indices/recovery/RecoveriesCollection.java b/core/src/main/java/org/elasticsearch/indices/recovery/RecoveriesCollection.java index 37c7982247f..4cd9d7d6dea 100644 --- a/core/src/main/java/org/elasticsearch/indices/recovery/RecoveriesCollection.java +++ b/core/src/main/java/org/elasticsearch/indices/recovery/RecoveriesCollection.java @@ -73,7 +73,7 @@ public class RecoveriesCollection { * gets the {@link RecoveryStatus } for a given id. The RecoveryStatus returned has it's ref count already incremented * to make sure it's safe to use. However, you must call {@link RecoveryStatus#decRef()} when you are done with it, typically * by using this method in a try-with-resources clause. - *

            + *

            * Returns null if recovery is not found */ public StatusRef getStatus(long id) { diff --git a/core/src/main/java/org/elasticsearch/indices/recovery/RecoverySourceHandler.java b/core/src/main/java/org/elasticsearch/indices/recovery/RecoverySourceHandler.java index b987b4a64a6..102fa98cedd 100644 --- a/core/src/main/java/org/elasticsearch/indices/recovery/RecoverySourceHandler.java +++ b/core/src/main/java/org/elasticsearch/indices/recovery/RecoverySourceHandler.java @@ -154,7 +154,7 @@ public class RecoverySourceHandler { * Perform phase1 of the recovery operations. Once this {@link SnapshotIndexCommit} * snapshot has been performed no commit operations (files being fsync'd) * are effectively allowed on this index until all recovery phases are done - *

            + *

            * Phase1 examines the segment files on the target node and copies over the * segments that are missing. Only segments that have the same size and * checksum can be reused @@ -482,7 +482,7 @@ public class RecoverySourceHandler { /** * Perform phase2 of the recovery process - *

            + *

            * Phase2 takes a snapshot of the current translog *without* acquiring the * write lock (however, the translog snapshot is a point-in-time view of * the translog). It then sends each translog operation to the target node @@ -550,7 +550,7 @@ public class RecoverySourceHandler { /** * Send the given snapshot's operations to this handler's target node. - *

            + *

            * Operations are bulked into a single request depending on an operation * count limit or size-in-bytes limit * diff --git a/core/src/main/java/org/elasticsearch/indices/recovery/RecoveryState.java b/core/src/main/java/org/elasticsearch/indices/recovery/RecoveryState.java index cc58305a49d..022c326bf93 100644 --- a/core/src/main/java/org/elasticsearch/indices/recovery/RecoveryState.java +++ b/core/src/main/java/org/elasticsearch/indices/recovery/RecoveryState.java @@ -528,7 +528,7 @@ public class RecoveryState implements ToXContent, Streamable { /** * returns the total number of translog operations needed to be recovered at this moment. * Note that this can change as the number of operations grows during recovery. - *

            + *

            * A value of -1 ({@link RecoveryState.Translog#UNKNOWN} is return if this is unknown (typically a gateway recovery) */ public synchronized int totalOperations() { @@ -543,7 +543,7 @@ public class RecoveryState implements ToXContent, Streamable { /** * returns the total number of translog operations to recovered, on the start of the recovery. Unlike {@link #totalOperations} * this does change during recovery. - *

            + *

            * A value of -1 ({@link RecoveryState.Translog#UNKNOWN} is return if this is unknown (typically a gateway recovery) */ public synchronized int totalOperationsOnStart() { diff --git a/core/src/main/java/org/elasticsearch/indices/recovery/RecoveryStatus.java b/core/src/main/java/org/elasticsearch/indices/recovery/RecoveryStatus.java index cef24543917..6e9505f0777 100644 --- a/core/src/main/java/org/elasticsearch/indices/recovery/RecoveryStatus.java +++ b/core/src/main/java/org/elasticsearch/indices/recovery/RecoveryStatus.java @@ -148,7 +148,7 @@ public class RecoveryStatus extends AbstractRefCounted { * cancel the recovery. calling this method will clean temporary files and release the store * unless this object is in use (in which case it will be cleaned once all ongoing users call * {@link #decRef()} - *

            + *

            * if {@link #CancellableThreads()} was used, the threads will be interrupted. */ public void cancel(String reason) { @@ -219,7 +219,7 @@ public class RecoveryStatus extends AbstractRefCounted { /** * Creates an {@link org.apache.lucene.store.IndexOutput} for the given file name. Note that the * IndexOutput actually point at a temporary file. - *

            + *

            * Note: You can use {@link #getOpenIndexOutput(String)} with the same filename to retrieve the same IndexOutput * at a later stage */ diff --git a/core/src/main/java/org/elasticsearch/indices/recovery/RecoveryTarget.java b/core/src/main/java/org/elasticsearch/indices/recovery/RecoveryTarget.java index 86d7157e706..10b1b870a19 100644 --- a/core/src/main/java/org/elasticsearch/indices/recovery/RecoveryTarget.java +++ b/core/src/main/java/org/elasticsearch/indices/recovery/RecoveryTarget.java @@ -63,8 +63,8 @@ import static org.elasticsearch.common.unit.TimeValue.timeValueMillis; /** * The recovery target handles recoveries of peer shards of the shard+node to recover to. - *

            - *

            Note, it can be safely assumed that there will only be a single recovery per shard (index+id) and + *

            + * Note, it can be safely assumed that there will only be a single recovery per shard (index+id) and * not several of them (since we don't allocate several shard replicas to the same node). */ public class RecoveryTarget extends AbstractComponent { diff --git a/core/src/main/java/org/elasticsearch/indices/recovery/StartRecoveryRequest.java b/core/src/main/java/org/elasticsearch/indices/recovery/StartRecoveryRequest.java index 31280dc2214..3a62f4f6352 100644 --- a/core/src/main/java/org/elasticsearch/indices/recovery/StartRecoveryRequest.java +++ b/core/src/main/java/org/elasticsearch/indices/recovery/StartRecoveryRequest.java @@ -53,11 +53,8 @@ public class StartRecoveryRequest extends TransportRequest { /** * Start recovery request. * - * @param shardId * @param sourceNode The node to recover from * @param targetNode The node to recover to - * @param markAsRelocated - * @param metadataSnapshot */ public StartRecoveryRequest(ShardId shardId, DiscoveryNode sourceNode, DiscoveryNode targetNode, boolean markAsRelocated, Store.MetadataSnapshot metadataSnapshot, RecoveryState.Type recoveryType, long recoveryId) { this.recoveryId = recoveryId; diff --git a/core/src/main/java/org/elasticsearch/monitor/process/ProcessStats.java b/core/src/main/java/org/elasticsearch/monitor/process/ProcessStats.java index 44ef7c7a816..de447c98748 100644 --- a/core/src/main/java/org/elasticsearch/monitor/process/ProcessStats.java +++ b/core/src/main/java/org/elasticsearch/monitor/process/ProcessStats.java @@ -197,7 +197,7 @@ public class ProcessStats implements Streamable, ToXContent { /** * Get the Process cpu usage. *

            - *

            Supported Platforms: All. + * Supported Platforms: All. */ public short getPercent() { return percent; diff --git a/core/src/main/java/org/elasticsearch/node/Node.java b/core/src/main/java/org/elasticsearch/node/Node.java index a6fa59e9bc3..6d5ebc045fe 100644 --- a/core/src/main/java/org/elasticsearch/node/Node.java +++ b/core/src/main/java/org/elasticsearch/node/Node.java @@ -105,7 +105,6 @@ import static org.elasticsearch.common.settings.Settings.settingsBuilder; /** * A node represent a node within a cluster (cluster.name). The {@link #client()} can be used * in order to use a {@link Client} to perform actions/operations against the cluster. - *

            *

            In order to create a node, the {@link NodeBuilder} can be used. When done with it, make sure to * call {@link #close()} on it. */ diff --git a/core/src/main/java/org/elasticsearch/node/NodeBuilder.java b/core/src/main/java/org/elasticsearch/node/NodeBuilder.java index 257d3807749..377c409ccb1 100644 --- a/core/src/main/java/org/elasticsearch/node/NodeBuilder.java +++ b/core/src/main/java/org/elasticsearch/node/NodeBuilder.java @@ -23,32 +23,30 @@ import org.elasticsearch.common.settings.Settings; /** * A node builder is used to construct a {@link Node} instance. - *

            - *

            Settings will be loaded relative to the ES home (with or without config/ prefix) and if not found, - * within the classpath (with or without config/ prefix). The settings file loaded can either be named + *

            + * Settings will be loaded relative to the ES home (with or without config/ prefix) and if not found, + * within the classpath (with or without config/ prefix). The settings file loaded can either be named * elasticsearch.yml or elasticsearch.json). - *

            - *

            Explicit settings can be passed by using the {@link #settings(org.elasticsearch.common.settings.Settings)} method. - *

            - *

            In any case, settings will be resolved from system properties as well that are either prefixed with es. + *

            + * Explicit settings can be passed by using the {@link #settings(org.elasticsearch.common.settings.Settings)} method. + *

            + * In any case, settings will be resolved from system properties as well that are either prefixed with es. * or elasticsearch.. - *

            - *

            An example for creating a simple node with optional settings loaded from the classpath: - *

            + *

            + * An example for creating a simple node with optional settings loaded from the classpath: *

              * Node node = NodeBuilder.nodeBuilder().node();
              * 
            - *

            - *

            An example for creating a node with explicit settings (in this case, a node in the cluster that does not hold + *

            + * An example for creating a node with explicit settings (in this case, a node in the cluster that does not hold * data): - *

            *

              * Node node = NodeBuilder.nodeBuilder()
              *                      .settings(Settings.settingsBuilder().put("node.data", false)
              *                      .node();
              * 
            - *

            - *

            When done with the node, make sure you call {@link Node#close()} on it. + *

            + * When done with the node, make sure you call {@link Node#close()} on it. * * */ diff --git a/core/src/main/java/org/elasticsearch/plugins/Plugin.java b/core/src/main/java/org/elasticsearch/plugins/Plugin.java index 986d397f6b6..72077954ea8 100644 --- a/core/src/main/java/org/elasticsearch/plugins/Plugin.java +++ b/core/src/main/java/org/elasticsearch/plugins/Plugin.java @@ -29,7 +29,7 @@ import java.util.Collections; /** * An extension point allowing to plug in custom functionality. - *

            + *

            * A plugin can be register custom extensions to builtin behavior by implementing onModule(AnyModule), * and registering the extension with the given module. */ diff --git a/core/src/main/java/org/elasticsearch/repositories/RepositoriesService.java b/core/src/main/java/org/elasticsearch/repositories/RepositoriesService.java index b11f91fa7f0..9cea2e90ee1 100644 --- a/core/src/main/java/org/elasticsearch/repositories/RepositoriesService.java +++ b/core/src/main/java/org/elasticsearch/repositories/RepositoriesService.java @@ -76,7 +76,7 @@ public class RepositoriesService extends AbstractComponent implements ClusterSta /** * Registers new repository in the cluster - *

            + *

            * This method can be only called on the master node. It tries to create a new repository on the master * and if it was successful it adds new repository to cluster metadata. * @@ -151,7 +151,7 @@ public class RepositoriesService extends AbstractComponent implements ClusterSta } /** * Unregisters repository in the cluster - *

            + *

            * This method can be only called on the master node. It removes repository information from cluster metadata. * * @param request unregister repository request @@ -311,7 +311,7 @@ public class RepositoriesService extends AbstractComponent implements ClusterSta /** * Returns registered repository - *

            + *

            * This method is called only on the master node * * @param repository repository name @@ -328,7 +328,7 @@ public class RepositoriesService extends AbstractComponent implements ClusterSta /** * Returns registered index shard repository - *

            + *

            * This method is called only on data nodes * * @param repository repository name @@ -345,7 +345,7 @@ public class RepositoriesService extends AbstractComponent implements ClusterSta /** * Creates a new repository and adds it to the list of registered repositories. - *

            + *

            * If a repository with the same name but different types or settings already exists, it will be closed and * replaced with the new repository. If a repository with the same name exists but it has the same type and settings * the new repository is ignored. diff --git a/core/src/main/java/org/elasticsearch/repositories/Repository.java b/core/src/main/java/org/elasticsearch/repositories/Repository.java index adde0ed1c89..a766c3a4ff2 100644 --- a/core/src/main/java/org/elasticsearch/repositories/Repository.java +++ b/core/src/main/java/org/elasticsearch/repositories/Repository.java @@ -29,11 +29,11 @@ import java.util.List; /** * Snapshot repository interface. - *

            + *

            * Responsible for index and cluster level operations. It's called only on master. * Shard-level operations are performed using {@link org.elasticsearch.index.snapshots.IndexShardRepository} * interface on data nodes. - *

            + *

            * Typical snapshot usage pattern: *

              *
            • Master calls {@link #initializeSnapshot(org.elasticsearch.cluster.metadata.SnapshotId, List, org.elasticsearch.cluster.metadata.MetaData)} @@ -55,7 +55,7 @@ public interface Repository extends LifecycleComponent { /** * Returns global metadata associate with the snapshot. - *

              + *

              * The returned meta data contains global metadata as well as metadata for all indices listed in the indices parameter. * * @param snapshot snapshot @@ -82,7 +82,7 @@ public interface Repository extends LifecycleComponent { /** * Finalizes snapshotting process - *

              + *

              * This method is called on master after all shards are snapshotted. * * @param snapshotId snapshot id @@ -113,7 +113,7 @@ public interface Repository extends LifecycleComponent { /** * Verifies repository on the master node and returns the verification token. - *

              + *

              * If the verification token is not null, it's passed to all data nodes for verification. If it's null - no * additional verification is required * @@ -123,7 +123,7 @@ public interface Repository extends LifecycleComponent { /** * Called at the end of repository verification process. - *

              + *

              * This method should perform all necessary cleanup of the temporary files created in the repository * * @param verificationToken verification request generated by {@link #startVerification} command diff --git a/core/src/main/java/org/elasticsearch/repositories/blobstore/BlobStoreFormat.java b/core/src/main/java/org/elasticsearch/repositories/blobstore/BlobStoreFormat.java index eadba12f9f3..2061c235e63 100644 --- a/core/src/main/java/org/elasticsearch/repositories/blobstore/BlobStoreFormat.java +++ b/core/src/main/java/org/elasticsearch/repositories/blobstore/BlobStoreFormat.java @@ -71,7 +71,6 @@ public abstract class BlobStoreFormat { * @param blobContainer blob container * @param blobName blob name * @return parsed blob object - * @throws IOException */ public abstract T readBlob(BlobContainer blobContainer, String blobName) throws IOException; @@ -81,7 +80,6 @@ public abstract class BlobStoreFormat { * @param blobContainer blob container * @param name name to be translated into * @return parsed blob object - * @throws IOException */ public T read(BlobContainer blobContainer, String name) throws IOException { String blobName = blobName(name); diff --git a/core/src/main/java/org/elasticsearch/repositories/blobstore/BlobStoreRepository.java b/core/src/main/java/org/elasticsearch/repositories/blobstore/BlobStoreRepository.java index 456457861df..8c5088e757b 100644 --- a/core/src/main/java/org/elasticsearch/repositories/blobstore/BlobStoreRepository.java +++ b/core/src/main/java/org/elasticsearch/repositories/blobstore/BlobStoreRepository.java @@ -75,11 +75,10 @@ import java.util.Map; /** * BlobStore - based implementation of Snapshot Repository - *

              + *

              * This repository works with any {@link BlobStore} implementation. The blobStore should be initialized in the derived * class before {@link #doStart()} is called. - *

              - *

              + *

              * BlobStoreRepository maintains the following structure in the blob store *

                * {@code
              @@ -229,7 +228,7 @@ public abstract class BlobStoreRepository extends AbstractLifecycleComponent
              +     * 

              * This method is first called in the {@link #doStart()} method. * * @return blob store @@ -252,7 +251,7 @@ public abstract class BlobStoreRepository extends AbstractLifecycleComponent + *

              * This method should return null if no chunking is needed. * * @return chunk size @@ -533,7 +532,6 @@ public abstract class BlobStoreRepository extends AbstractLifecycleComponent + *

              * This file can be used by read-only repositories that are unable to list files in the repository * * @param snapshots list of snapshot ids @@ -583,7 +581,7 @@ public abstract class BlobStoreRepository extends AbstractLifecycleComponent + *

              * This file can be used by read-only repositories that are unable to list files in the repository * * @return list of snapshots in the repository diff --git a/core/src/main/java/org/elasticsearch/repositories/blobstore/ChecksumBlobStoreFormat.java b/core/src/main/java/org/elasticsearch/repositories/blobstore/ChecksumBlobStoreFormat.java index 9109dcd84bc..b15da26e3f6 100644 --- a/core/src/main/java/org/elasticsearch/repositories/blobstore/ChecksumBlobStoreFormat.java +++ b/core/src/main/java/org/elasticsearch/repositories/blobstore/ChecksumBlobStoreFormat.java @@ -88,8 +88,6 @@ public class ChecksumBlobStoreFormat extends BlobStoreForm * * @param blobContainer blob container * @param blobName blob name - * @return - * @throws IOException */ public T readBlob(BlobContainer blobContainer, String blobName) throws IOException { try (InputStream inputStream = blobContainer.readBlob(blobName)) { @@ -113,7 +111,7 @@ public class ChecksumBlobStoreFormat extends BlobStoreForm /** * Writes blob in atomic manner with resolving the blob name using {@link #blobName} and {@link #tempBlobName} methods. - *

              + *

              * The blob will be compressed and checksum will be written if required. * * Atomic move might be very inefficient on some repositories. It also cannot override existing files. @@ -121,7 +119,6 @@ public class ChecksumBlobStoreFormat extends BlobStoreForm * @param obj object to be serialized * @param blobContainer blob container * @param name blob name - * @throws IOException */ public void writeAtomic(T obj, BlobContainer blobContainer, String name) throws IOException { String blobName = blobName(name); @@ -138,13 +135,12 @@ public class ChecksumBlobStoreFormat extends BlobStoreForm /** * Writes blob with resolving the blob name using {@link #blobName} method. - *

              + *

              * The blob will be compressed and checksum will be written if required. * * @param obj object to be serialized * @param blobContainer blob container * @param name blob name - * @throws IOException */ public void write(T obj, BlobContainer blobContainer, String name) throws IOException { String blobName = blobName(name); @@ -153,13 +149,12 @@ public class ChecksumBlobStoreFormat extends BlobStoreForm /** * Writes blob in atomic manner without resolving the blobName using using {@link #blobName} method. - *

              + *

              * The blob will be compressed and checksum will be written if required. * * @param obj object to be serialized * @param blobContainer blob container * @param blobName blob name - * @throws IOException */ protected void writeBlob(T obj, BlobContainer blobContainer, String blobName) throws IOException { BytesReference bytes = write(obj); diff --git a/core/src/main/java/org/elasticsearch/repositories/blobstore/LegacyBlobStoreFormat.java b/core/src/main/java/org/elasticsearch/repositories/blobstore/LegacyBlobStoreFormat.java index a0c956dea45..206371261e7 100644 --- a/core/src/main/java/org/elasticsearch/repositories/blobstore/LegacyBlobStoreFormat.java +++ b/core/src/main/java/org/elasticsearch/repositories/blobstore/LegacyBlobStoreFormat.java @@ -49,7 +49,6 @@ public class LegacyBlobStoreFormat extends BlobStoreFormat * @param blobContainer blob container * @param blobName blob name * @return parsed blob object - * @throws IOException */ public T readBlob(BlobContainer blobContainer, String blobName) throws IOException { try (InputStream inputStream = blobContainer.readBlob(blobName)) { diff --git a/core/src/main/java/org/elasticsearch/repositories/fs/FsRepository.java b/core/src/main/java/org/elasticsearch/repositories/fs/FsRepository.java index 0071cc95000..478158282d6 100644 --- a/core/src/main/java/org/elasticsearch/repositories/fs/FsRepository.java +++ b/core/src/main/java/org/elasticsearch/repositories/fs/FsRepository.java @@ -37,14 +37,14 @@ import java.nio.file.Paths; /** * Shared file system implementation of the BlobStoreRepository - *

              + *

              * Shared file system repository supports the following settings *

              *
              {@code location}
              Path to the root of repository. This is mandatory parameter.
              *
              {@code concurrent_streams}
              Number of concurrent read/write stream (per repository on each node). Defaults to 5.
              *
              {@code chunk_size}
              Large file can be divided into chunks. This parameter specifies the chunk size. Defaults to not chucked.
              *
              {@code compress}
              If set to true metadata files will be stored compressed. Defaults to false.
              - * + *
              */ public class FsRepository extends BlobStoreRepository { @@ -64,7 +64,6 @@ public class FsRepository extends BlobStoreRepository { * @param name repository name * @param repositorySettings repository settings * @param indexShardRepository index shard repository - * @throws IOException */ @Inject public FsRepository(RepositoryName name, RepositorySettings repositorySettings, IndexShardRepository indexShardRepository, Environment environment) throws IOException { diff --git a/core/src/main/java/org/elasticsearch/repositories/uri/URLRepository.java b/core/src/main/java/org/elasticsearch/repositories/uri/URLRepository.java index 922c4878466..4d361683e5c 100644 --- a/core/src/main/java/org/elasticsearch/repositories/uri/URLRepository.java +++ b/core/src/main/java/org/elasticsearch/repositories/uri/URLRepository.java @@ -40,12 +40,12 @@ import java.util.List; /** * Read-only URL-based implementation of the BlobStoreRepository - *

              + *

              * This repository supports the following settings *

              *
              {@code url}
              URL to the root of repository. This is mandatory parameter.
              *
              {@code concurrent_streams}
              Number of concurrent read/write stream (per repository on each node). Defaults to 5.
              - * + *
              */ public class URLRepository extends BlobStoreRepository { @@ -75,7 +75,6 @@ public class URLRepository extends BlobStoreRepository { * @param name repository name * @param repositorySettings repository settings * @param indexShardRepository shard repository - * @throws IOException */ @Inject public URLRepository(RepositoryName name, RepositorySettings repositorySettings, IndexShardRepository indexShardRepository, Environment environment) throws IOException { diff --git a/core/src/main/java/org/elasticsearch/rest/BaseRestHandler.java b/core/src/main/java/org/elasticsearch/rest/BaseRestHandler.java index 927c41c1532..1ae1e575692 100644 --- a/core/src/main/java/org/elasticsearch/rest/BaseRestHandler.java +++ b/core/src/main/java/org/elasticsearch/rest/BaseRestHandler.java @@ -30,8 +30,8 @@ import java.util.Set; /** * Base handler for REST requests. - *

              - * This handler makes sure that the headers & context of the handled {@link RestRequest requests} are copied over to + *

              + * This handler makes sure that the headers & context of the handled {@link RestRequest requests} are copied over to * the transport requests executed by the associated client. While the context is fully copied over, not all the headers * are copied, but a selected few. It is possible to control what headers are copied over by registering them using * {@link org.elasticsearch.rest.RestController#registerRelevantHeaders(String...)} @@ -83,4 +83,4 @@ public abstract class BaseRestHandler extends AbstractComponent implements RestH super.doExecute(action, request, listener); } } -} \ No newline at end of file +} diff --git a/core/src/main/java/org/elasticsearch/rest/RestController.java b/core/src/main/java/org/elasticsearch/rest/RestController.java index 3e3360337de..cc6c09a20ad 100644 --- a/core/src/main/java/org/elasticsearch/rest/RestController.java +++ b/core/src/main/java/org/elasticsearch/rest/RestController.java @@ -179,8 +179,6 @@ public class RestController extends AbstractLifecycleComponent { /** * Checks the request parameters against enabled settings for error trace support - * @param request - * @param channel * @return true if the request does not have any parameters that conflict with system settings */ boolean checkRequestParameters(final RestRequest request, final RestChannel channel) { diff --git a/core/src/main/java/org/elasticsearch/rest/RestStatus.java b/core/src/main/java/org/elasticsearch/rest/RestStatus.java index ee0e7ef57a1..d78b9c50e0c 100644 --- a/core/src/main/java/org/elasticsearch/rest/RestStatus.java +++ b/core/src/main/java/org/elasticsearch/rest/RestStatus.java @@ -59,8 +59,8 @@ public enum RestStatus { * entity format is specified by the media type given in the Content-Type header field. The origin server MUST * create the resource before returning the 201 status code. If the action cannot be carried out immediately, the * server SHOULD respond with 202 (Accepted) response instead. - *

              - *

              A 201 response MAY contain an ETag response header field indicating the current value of the entity tag + *

              + * A 201 response MAY contain an ETag response header field indicating the current value of the entity tag * for the requested variant just created, see section 14.19. */ CREATED(201), @@ -68,8 +68,8 @@ public enum RestStatus { * The request has been accepted for processing, but the processing has not been completed. The request might * or might not eventually be acted upon, as it might be disallowed when processing actually takes place. There * is no facility for re-sending a status code from an asynchronous operation such as this. - *

              - *

              The 202 response is intentionally non-committal. Its purpose is to allow a server to accept a request for + *

              + * The 202 response is intentionally non-committal. Its purpose is to allow a server to accept a request for * some other process (perhaps a batch-oriented process that is only run once per day) without requiring that * the user agent's connection to the server persist until the process is completed. The entity returned with * this response SHOULD include an indication of the request's current status and either a pointer to a status @@ -88,13 +88,13 @@ public enum RestStatus { * The server has fulfilled the request but does not need to return an entity-body, and might want to return * updated meta information. The response MAY include new or updated meta information in the form of * entity-headers, which if present SHOULD be associated with the requested variant. - *

              - *

              If the client is a user agent, it SHOULD NOT change its document view from that which caused the request + *

              + * If the client is a user agent, it SHOULD NOT change its document view from that which caused the request * to be sent. This response is primarily intended to allow input for actions to take place without causing a * change to the user agent's active document view, although any new or updated meta information SHOULD be * applied to the document currently in the user agent's active view. - *

              - *

              The 204 response MUST NOT include a message-body, and thus is always terminated by the first empty + *

              + * The 204 response MUST NOT include a message-body, and thus is always terminated by the first empty * line after the header fields. */ NO_CONTENT(204), @@ -109,8 +109,8 @@ public enum RestStatus { * The server has fulfilled the partial GET request for the resource. The request MUST have included a Range * header field (section 14.35) indicating the desired range, and MAY have included an If-Range header * field (section 14.27) to make the request conditional. - *

              - *

              The response MUST include the following header fields: + *

              + * The response MUST include the following header fields: *

                *
              • Either a Content-Range header field (section 14.16) indicating the range included with this response, * or a multipart/byteranges Content-Type including Content-Range fields for each part. If a Content-Length @@ -121,34 +121,34 @@ public enum RestStatus { *
              • Expires, Cache-Control, and/or Vary, if the field-value might differ from that sent in any previous * response for the same variant
              • *
              - *

              - *

              If the 206 response is the result of an If-Range request that used a strong cache validator + *

              + * If the 206 response is the result of an If-Range request that used a strong cache validator * (see section 13.3.3), the response SHOULD NOT include other entity-headers. If the response is the result * of an If-Range request that used a weak validator, the response MUST NOT include other entity-headers; * this prevents inconsistencies between cached entity-bodies and updated headers. Otherwise, the response MUST * include all of the entity-headers that would have been returned with a 200 (OK) response to the same request. - *

              - *

              A cache MUST NOT combine a 206 response with other previously cached content if the ETag or Last-Modified + *

              + * A cache MUST NOT combine a 206 response with other previously cached content if the ETag or Last-Modified * headers do not match exactly, see 13.5.4. - *

              - *

              A cache that does not support the Range and Content-Range headers MUST NOT cache 206 (Partial) responses. + *

              + * A cache that does not support the Range and Content-Range headers MUST NOT cache 206 (Partial) responses. */ PARTIAL_CONTENT(206), /** * The 207 (Multi-Status) status code provides status for multiple independent operations (see Section 13 for * more information). - *

              - *

              A Multi-Status response conveys information about multiple resources in situations where multiple status + *

              + * A Multi-Status response conveys information about multiple resources in situations where multiple status * codes might be appropriate. The default Multi-Status response body is a text/xml or application/xml HTTP * entity with a 'multistatus' root element. Further elements contain 200, 300, 400, and 500 series status codes * generated during the method invocation. 100 series status codes SHOULD NOT be recorded in a 'response' * XML element. - *

              - *

              Although '207' is used as the overall response status code, the recipient needs to consult the contents + *

              + * Although '207' is used as the overall response status code, the recipient needs to consult the contents * of the multistatus response body for further information about the success or failure of the method execution. * The response MAY be used in success, partial success and also in failure situations. - *

              - *

              The 'multistatus' root element holds zero or more 'response' elements in any order, each with + *

              + * The 'multistatus' root element holds zero or more 'response' elements in any order, each with * information about an individual resource. Each 'response' element MUST have an 'href' element * to identify the resource. */ @@ -157,14 +157,14 @@ public enum RestStatus { * The requested resource corresponds to any one of a set of representations, each with its own specific * location, and agent-driven negotiation information (section 12) is being provided so that the user (or user * agent) can select a preferred representation and redirect its request to that location. - *

              - *

              Unless it was a HEAD request, the response SHOULD include an entity containing a list of resource + *

              + * Unless it was a HEAD request, the response SHOULD include an entity containing a list of resource * characteristics and location(s) from which the user or user agent can choose the one most appropriate. * The entity format is specified by the media type given in the Content-Type header field. Depending upon the * format and the capabilities of the user agent, selection of the most appropriate choice MAY be performed * automatically. However, this specification does not define any standard for such automatic selection. - *

              - *

              If the server has a preferred choice of representation, it SHOULD include the specific URI for that + *

              + * If the server has a preferred choice of representation, it SHOULD include the specific URI for that * representation in the Location field; user agents MAY use the Location field value for automatic redirection. * This response is cacheable unless indicated otherwise. */ @@ -174,11 +174,11 @@ public enum RestStatus { * SHOULD use one of the returned URIs. Clients with link editing capabilities ought to automatically re-link * references to the Request-URI to one or more of the new references returned by the server, where possible. * This response is cacheable unless indicated otherwise. - *

              - *

              The new permanent URI SHOULD be given by the Location field in the response. Unless the request method + *

              + * The new permanent URI SHOULD be given by the Location field in the response. Unless the request method * was HEAD, the entity of the response SHOULD contain a short hypertext note with a hyperlink to the new URI(s). - *

              - *

              If the 301 status code is received in response to a request other than GET or HEAD, the user agent + *

              + * If the 301 status code is received in response to a request other than GET or HEAD, the user agent * MUST NOT automatically redirect the request unless it can be confirmed by the user, since this might change * the conditions under which the request was issued. */ @@ -187,11 +187,11 @@ public enum RestStatus { * The requested resource resides temporarily under a different URI. Since the redirection might be altered on * occasion, the client SHOULD continue to use the Request-URI for future requests. This response is only * cacheable if indicated by a Cache-Control or Expires header field. - *

              - *

              The temporary URI SHOULD be given by the Location field in the response. Unless the request method was + *

              + * The temporary URI SHOULD be given by the Location field in the response. Unless the request method was * HEAD, the entity of the response SHOULD contain a short hypertext note with a hyperlink to the new URI(s). - *

              - *

              If the 302 status code is received in response to a request other than GET or HEAD, the user agent + *

              + * If the 302 status code is received in response to a request other than GET or HEAD, the user agent * MUST NOT automatically redirect the request unless it can be confirmed by the user, since this might change * the conditions under which the request was issued. */ @@ -202,8 +202,8 @@ public enum RestStatus { * user agent to a selected resource. The new URI is not a substitute reference for the originally requested * resource. The 303 response MUST NOT be cached, but the response to the second (redirected) request might be * cacheable. - *

              - *

              The different URI SHOULD be given by the Location field in the response. Unless the request method was + *

              + * The different URI SHOULD be given by the Location field in the response. Unless the request method was * HEAD, the entity of the response SHOULD contain a short hypertext note with a hyperlink to the new URI(s). */ SEE_OTHER(303), @@ -211,8 +211,8 @@ public enum RestStatus { * If the client has performed a conditional GET request and access is allowed, but the document has not been * modified, the server SHOULD respond with this status code. The 304 response MUST NOT contain a message-body, * and thus is always terminated by the first empty line after the header fields. - *

              - *

              The response MUST include the following header fields: + *

              + * The response MUST include the following header fields: *

                *
              • Date, unless its omission is required by section 14.18.1 * If a clockless origin server obeys these rules, and proxies and clients add their own Date to any @@ -223,15 +223,15 @@ public enum RestStatus { *
              • Expires, Cache-Control, and/or Vary, if the field-value might differ from that sent in any previous * response for the same variant
              • *
              - *

              - *

              If the conditional GET used a strong cache validator (see section 13.3.3), the response SHOULD NOT include + *

              + * If the conditional GET used a strong cache validator (see section 13.3.3), the response SHOULD NOT include * other entity-headers. Otherwise (i.e., the conditional GET used a weak validator), the response MUST NOT * include other entity-headers; this prevents inconsistencies between cached entity-bodies and updated headers. - *

              - *

              If a 304 response indicates an entity not currently cached, then the cache MUST disregard the response + *

              + * If a 304 response indicates an entity not currently cached, then the cache MUST disregard the response * and repeat the request without the conditional. - *

              - *

              If a cache uses a received 304 response to update a cache entry, the cache MUST update the entry to + *

              + * If a cache uses a received 304 response to update a cache entry, the cache MUST update the entry to * reflect any new field values given in the response. */ NOT_MODIFIED(304), @@ -245,13 +245,13 @@ public enum RestStatus { * The requested resource resides temporarily under a different URI. Since the redirection MAY be altered on * occasion, the client SHOULD continue to use the Request-URI for future requests. This response is only * cacheable if indicated by a Cache-Control or Expires header field. - *

              - *

              The temporary URI SHOULD be given by the Location field in the response. Unless the request method was + *

              + * The temporary URI SHOULD be given by the Location field in the response. Unless the request method was * HEAD, the entity of the response SHOULD contain a short hypertext note with a hyperlink to the new URI(s) , * since many pre-HTTP/1.1 user agents do not understand the 307 status. Therefore, the note SHOULD contain * the information necessary for a user to repeat the original request on the new URI. - *

              - *

              If the 307 status code is received in response to a request other than GET or HEAD, the user agent MUST NOT + *

              + * If the 307 status code is received in response to a request other than GET or HEAD, the user agent MUST NOT * automatically redirect the request unless it can be confirmed by the user, since this might change the * conditions under which the request was issued. */ @@ -300,18 +300,18 @@ public enum RestStatus { /** * The resource identified by the request is only capable of generating response entities which have content * characteristics not acceptable according to the accept headers sent in the request. - *

              - *

              Unless it was a HEAD request, the response SHOULD include an entity containing a list of available entity + *

              + * Unless it was a HEAD request, the response SHOULD include an entity containing a list of available entity * characteristics and location(s) from which the user or user agent can choose the one most appropriate. * The entity format is specified by the media type given in the Content-Type header field. Depending upon the * format and the capabilities of the user agent, selection of the most appropriate choice MAY be performed * automatically. However, this specification does not define any standard for such automatic selection. - *

              - *

              Note: HTTP/1.1 servers are allowed to return responses which are not acceptable according to the accept + *

              + * Note: HTTP/1.1 servers are allowed to return responses which are not acceptable according to the accept * headers sent in the request. In some cases, this may even be preferable to sending a 406 response. User * agents are encouraged to inspect the headers of an incoming response to determine if it is acceptable. - *

              - *

              If the response could be unacceptable, a user agent SHOULD temporarily stop receipt of more data and query + *

              + * If the response could be unacceptable, a user agent SHOULD temporarily stop receipt of more data and query * the user for a decision on further actions. */ NOT_ACCEPTABLE(406), @@ -334,8 +334,8 @@ public enum RestStatus { * resubmit the request. The response body SHOULD include enough information for the user to recognize the * source of the conflict. Ideally, the response entity would include enough information for the user or user * agent to fix the problem; however, that might not be possible and is not required. - *

              - *

              Conflicts are most likely to occur in response to a PUT request. For example, if versioning were being + *

              + * Conflicts are most likely to occur in response to a PUT request. For example, if versioning were being * used and the entity being PUT included changes to a resource which conflict with those made by an earlier * (third-party) request, the server might use the 409 response to indicate that it can't complete the request. * In this case, the response entity would likely contain a list of the differences between the two versions in @@ -348,8 +348,8 @@ public enum RestStatus { * the Request-URI after user approval. If the server does not know, or has no facility to determine, whether or * not the condition is permanent, the status code 404 (Not Found) SHOULD be used instead. This response is * cacheable unless indicated otherwise. - *

              - *

              The 410 response is primarily intended to assist the task of web maintenance by notifying the recipient + *

              + * The 410 response is primarily intended to assist the task of web maintenance by notifying the recipient * that the resource is intentionally unavailable and that the server owners desire that remote links to that * resource be removed. Such an event is common for limited-time, promotional services and for resources belonging * to individuals no longer working at the server's site. It is not necessary to mark all permanently unavailable @@ -372,8 +372,8 @@ public enum RestStatus { /** * The server is refusing to process a request because the request entity is larger than the server is willing * or able to process. The server MAY close the connection to prevent the client from continuing the request. - *

              - *

              If the condition is temporary, the server SHOULD include a Retry-After header field to indicate that it + *

              + * If the condition is temporary, the server SHOULD include a Retry-After header field to indicate that it * is temporary and after what time the client MAY try again. */ REQUEST_ENTITY_TOO_LARGE(413), @@ -397,8 +397,8 @@ public enum RestStatus { * selected resource, and the request did not include an If-Range request-header field. (For byte-ranges, this * means that the first-byte-pos of all of the byte-range-spec values were greater than the current length of * the selected resource.) - *

              - *

              When this status code is returned for a byte-range request, the response SHOULD include a Content-Range + *

              + * When this status code is returned for a byte-range request, the response SHOULD include a Content-Range * entity-header field specifying the current length of the selected resource (see section 14.16). This * response MUST NOT use the multipart/byteranges content-type. */ diff --git a/core/src/main/java/org/elasticsearch/rest/action/cat/RestNodesAction.java b/core/src/main/java/org/elasticsearch/rest/action/cat/RestNodesAction.java index f29b3521caa..8ccf2017a81 100644 --- a/core/src/main/java/org/elasticsearch/rest/action/cat/RestNodesAction.java +++ b/core/src/main/java/org/elasticsearch/rest/action/cat/RestNodesAction.java @@ -362,7 +362,7 @@ public class RestNodesAction extends AbstractCatAction { * Calculate the percentage of {@code used} from the {@code max} number. * @param used The currently used number. * @param max The maximum number. - * @return 0 if {@code max} is <= 0. Otherwise 100 * {@code used} / {@code max}. + * @return 0 if {@code max} is <= 0. Otherwise 100 * {@code used} / {@code max}. */ private short calculatePercentage(long used, long max) { return max <= 0 ? 0 : (short)((100d * used) / max); diff --git a/core/src/main/java/org/elasticsearch/rest/support/RestUtils.java b/core/src/main/java/org/elasticsearch/rest/support/RestUtils.java index 6bb9d9080b4..2d8237e4edb 100644 --- a/core/src/main/java/org/elasticsearch/rest/support/RestUtils.java +++ b/core/src/main/java/org/elasticsearch/rest/support/RestUtils.java @@ -104,7 +104,7 @@ public class RestUtils { /** * Decodes a bit of an URL encoded by a browser. - *

              + *

              * This is equivalent to calling {@link #decodeComponent(String, Charset)} * with the UTF-8 charset (recommended to comply with RFC 3986, Section 2). * @@ -120,13 +120,13 @@ public class RestUtils { /** * Decodes a bit of an URL encoded by a browser. - *

              + *

              * The string is expected to be encoded as per RFC 3986, Section 2. * This is the encoding used by JavaScript functions {@code encodeURI} * and {@code encodeURIComponent}, but not {@code escape}. For example * in this encoding, é (in Unicode {@code U+00E9} or in UTF-8 * {@code 0xC3 0xA9}) is encoded as {@code %C3%A9} or {@code %c3%a9}. - *

              + *

              * This is essentially equivalent to calling * {@link java.net.URLDecoder URLDecoder}.{@link * java.net.URLDecoder#decode(String, String)} diff --git a/core/src/main/java/org/elasticsearch/script/AbstractSearchScript.java b/core/src/main/java/org/elasticsearch/script/AbstractSearchScript.java index 7da1a31070d..658131202a0 100644 --- a/core/src/main/java/org/elasticsearch/script/AbstractSearchScript.java +++ b/core/src/main/java/org/elasticsearch/script/AbstractSearchScript.java @@ -28,12 +28,12 @@ import java.util.Map; /** * A base class for any script type that is used during the search process (custom score, aggs, and so on). - *

              - *

              If the script returns a specific numeric type, consider overriding the type specific base classes + *

              + * If the script returns a specific numeric type, consider overriding the type specific base classes * such as {@link AbstractDoubleSearchScript}, {@link AbstractFloatSearchScript} and {@link AbstractLongSearchScript} * for better performance. - *

              - *

              The use is required to implement the {@link #run()} method. + *

              + * The use is required to implement the {@link #run()} method. */ public abstract class AbstractSearchScript extends AbstractExecutableScript implements LeafSearchScript { @@ -130,4 +130,4 @@ public abstract class AbstractSearchScript extends AbstractExecutableScript impl public double runAsDouble() { return ((Number) run()).doubleValue(); } -} \ No newline at end of file +} diff --git a/core/src/main/java/org/elasticsearch/search/aggregations/AggregationBuilders.java b/core/src/main/java/org/elasticsearch/search/aggregations/AggregationBuilders.java index 1cc0f71bf22..13a162df7fc 100644 --- a/core/src/main/java/org/elasticsearch/search/aggregations/AggregationBuilders.java +++ b/core/src/main/java/org/elasticsearch/search/aggregations/AggregationBuilders.java @@ -218,7 +218,7 @@ public class AggregationBuilders { } /** - * Create a new {@link DateHistogram} aggregation with the given name. + * Create a new {@link DateHistogramBuilder} aggregation with the given name. */ public static DateHistogramBuilder dateHistogram(String name) { return new DateHistogramBuilder(name); @@ -232,14 +232,14 @@ public class AggregationBuilders { } /** - * Create a new {@link DateRange} aggregation with the given name. + * Create a new {@link DateRangeBuilder} aggregation with the given name. */ public static DateRangeBuilder dateRange(String name) { return new DateRangeBuilder(name); } /** - * Create a new {@link IPv4Range} aggregation with the given name. + * Create a new {@link IPv4RangeBuilder} aggregation with the given name. */ public static IPv4RangeBuilder ipRange(String name) { return new IPv4RangeBuilder(name); diff --git a/core/src/main/java/org/elasticsearch/search/aggregations/Aggregator.java b/core/src/main/java/org/elasticsearch/search/aggregations/Aggregator.java index 33244f36f0c..8ee4d1f73b0 100644 --- a/core/src/main/java/org/elasticsearch/search/aggregations/Aggregator.java +++ b/core/src/main/java/org/elasticsearch/search/aggregations/Aggregator.java @@ -40,7 +40,7 @@ public abstract class Aggregator extends BucketCollector implements Releasable { /** * Parses the aggregation request and creates the appropriate aggregator factory for it. * - * @see {@link AggregatorFactory} + * @see AggregatorFactory */ public interface Parser { diff --git a/core/src/main/java/org/elasticsearch/search/aggregations/bucket/BestDocsDeferringCollector.java b/core/src/main/java/org/elasticsearch/search/aggregations/bucket/BestDocsDeferringCollector.java index 68ef8aa7c0b..22ff6df81f0 100644 --- a/core/src/main/java/org/elasticsearch/search/aggregations/bucket/BestDocsDeferringCollector.java +++ b/core/src/main/java/org/elasticsearch/search/aggregations/bucket/BestDocsDeferringCollector.java @@ -63,7 +63,6 @@ public class BestDocsDeferringCollector extends DeferringBucketCollector impleme * * @param shardSize * The number of top-scoring docs to collect for each bucket - * @param bigArrays */ public BestDocsDeferringCollector(int shardSize, BigArrays bigArrays) { this.shardSize = shardSize; diff --git a/core/src/main/java/org/elasticsearch/search/aggregations/bucket/BucketsAggregator.java b/core/src/main/java/org/elasticsearch/search/aggregations/bucket/BucketsAggregator.java index e0b27bb2918..a7f01e4414c 100644 --- a/core/src/main/java/org/elasticsearch/search/aggregations/bucket/BucketsAggregator.java +++ b/core/src/main/java/org/elasticsearch/search/aggregations/bucket/BucketsAggregator.java @@ -73,7 +73,7 @@ public abstract class BucketsAggregator extends AggregatorBase { } /** - * Same as {@link #collectBucket(int, long)}, but doesn't check if the docCounts needs to be re-sized. + * Same as {@link #collectBucket(LeafBucketCollector, int, long)}, but doesn't check if the docCounts needs to be re-sized. */ public final void collectExistingBucket(LeafBucketCollector subCollector, int doc, long bucketOrd) throws IOException { docCounts.increment(bucketOrd, 1); diff --git a/core/src/main/java/org/elasticsearch/search/aggregations/bucket/filters/FiltersAggregationBuilder.java b/core/src/main/java/org/elasticsearch/search/aggregations/bucket/filters/FiltersAggregationBuilder.java index c66e3f90cad..6f61a891648 100644 --- a/core/src/main/java/org/elasticsearch/search/aggregations/bucket/filters/FiltersAggregationBuilder.java +++ b/core/src/main/java/org/elasticsearch/search/aggregations/bucket/filters/FiltersAggregationBuilder.java @@ -50,7 +50,7 @@ public class FiltersAggregationBuilder extends AggregationBuilder { diff --git a/core/src/main/java/org/elasticsearch/search/aggregations/bucket/range/RangeBuilder.java b/core/src/main/java/org/elasticsearch/search/aggregations/bucket/range/RangeBuilder.java index bcd31758fbe..acb55f68ea5 100644 --- a/core/src/main/java/org/elasticsearch/search/aggregations/bucket/range/RangeBuilder.java +++ b/core/src/main/java/org/elasticsearch/search/aggregations/bucket/range/RangeBuilder.java @@ -23,7 +23,7 @@ import org.elasticsearch.common.xcontent.XContentBuilder; import java.io.IOException; /** - * Builder for the {@link Range} aggregation. + * Builder for the {@link org.elasticsearch.search.aggregations.bucket.range.AbstractRangeBuilder.Range} aggregation. */ public class RangeBuilder extends AbstractRangeBuilder { diff --git a/core/src/main/java/org/elasticsearch/search/aggregations/bucket/range/date/DateRangeBuilder.java b/core/src/main/java/org/elasticsearch/search/aggregations/bucket/range/date/DateRangeBuilder.java index aad1f211850..35c8a3011d1 100644 --- a/core/src/main/java/org/elasticsearch/search/aggregations/bucket/range/date/DateRangeBuilder.java +++ b/core/src/main/java/org/elasticsearch/search/aggregations/bucket/range/date/DateRangeBuilder.java @@ -24,7 +24,7 @@ import org.elasticsearch.search.aggregations.bucket.range.AbstractRangeBuilder; import java.io.IOException; /** - * Builder for the {@link DateRange} aggregation. + * Builder for the {@code DateRange} aggregation. */ public class DateRangeBuilder extends AbstractRangeBuilder { @@ -50,7 +50,7 @@ public class DateRangeBuilder extends AbstractRangeBuilder { } /** - * Same as {@link #addRange(String, double, double)} but the key will be + * Same as {@link #addRange(String, Object, Object)} but the key will be * automatically generated based on from and to. */ public DateRangeBuilder addRange(Object from, Object to) { @@ -69,7 +69,7 @@ public class DateRangeBuilder extends AbstractRangeBuilder { } /** - * Same as {@link #addUnboundedTo(String, double)} but the key will be + * Same as {@link #addUnboundedTo(String, Object)} but the key will be * computed automatically. */ public DateRangeBuilder addUnboundedTo(Object to) { @@ -88,7 +88,7 @@ public class DateRangeBuilder extends AbstractRangeBuilder { } /** - * Same as {@link #addUnboundedFrom(String, double)} but the key will be + * Same as {@link #addUnboundedFrom(String, Object)} but the key will be * computed automatically. */ public DateRangeBuilder addUnboundedFrom(Object from) { diff --git a/core/src/main/java/org/elasticsearch/search/aggregations/bucket/range/ipv4/IPv4RangeBuilder.java b/core/src/main/java/org/elasticsearch/search/aggregations/bucket/range/ipv4/IPv4RangeBuilder.java index 6d17bee5764..218f0dcbc90 100644 --- a/core/src/main/java/org/elasticsearch/search/aggregations/bucket/range/ipv4/IPv4RangeBuilder.java +++ b/core/src/main/java/org/elasticsearch/search/aggregations/bucket/range/ipv4/IPv4RangeBuilder.java @@ -25,7 +25,7 @@ import org.elasticsearch.search.builder.SearchSourceBuilderException; import java.util.regex.Pattern; /** - * Builder for the {@link IPv4Range} aggregation. + * Builder for the {@code IPv4Range} aggregation. */ public class IPv4RangeBuilder extends AbstractRangeBuilder { @@ -110,7 +110,7 @@ public class IPv4RangeBuilder extends AbstractRangeBuilder { } /** - * Computes the min & max ip addresses (represented as long values - same way as stored in index) represented by the given CIDR mask + * Computes the min & max ip addresses (represented as long values - same way as stored in index) represented by the given CIDR mask * expression. The returned array has the length of 2, where the first entry represents the {@code min} address and the second the {@code max}. * A {@code -1} value for either the {@code min} or the {@code max}, represents an unbounded end. In other words: * @@ -123,9 +123,6 @@ public class IPv4RangeBuilder extends AbstractRangeBuilder { *

              * {@code max == -1 == "255.255.255.255" } *

              - * - * @param cidr - * @return */ static long[] cidrMaskToMinMax(String cidr) { String[] parts = MASK_PATTERN.split(cidr); diff --git a/core/src/main/java/org/elasticsearch/search/aggregations/bucket/significant/SignificantTermsBuilder.java b/core/src/main/java/org/elasticsearch/search/aggregations/bucket/significant/SignificantTermsBuilder.java index 046b1c55a4c..b67ce2a1f9e 100644 --- a/core/src/main/java/org/elasticsearch/search/aggregations/bucket/significant/SignificantTermsBuilder.java +++ b/core/src/main/java/org/elasticsearch/search/aggregations/bucket/significant/SignificantTermsBuilder.java @@ -31,7 +31,7 @@ import java.io.IOException; /** * Creates an aggregation that finds interesting or unusual occurrences of terms in a result set. - *

              + *

              * This feature is marked as experimental, and may be subject to change in the future. If you * use this feature, please let us know your experience with it! */ diff --git a/core/src/main/java/org/elasticsearch/search/aggregations/bucket/terms/TermsBuilder.java b/core/src/main/java/org/elasticsearch/search/aggregations/bucket/terms/TermsBuilder.java index 1125abdc826..9bc1f7a9a6f 100644 --- a/core/src/main/java/org/elasticsearch/search/aggregations/bucket/terms/TermsBuilder.java +++ b/core/src/main/java/org/elasticsearch/search/aggregations/bucket/terms/TermsBuilder.java @@ -88,7 +88,7 @@ public class TermsBuilder extends ValuesSourceAggregationBuilder { * Define a regular expression that will determine what terms should be aggregated. The regular expression is based * on the {@link RegExp} class. * - * @see {@link RegExp#RegExp(String)} + * @see RegExp#RegExp(String) */ public TermsBuilder include(String regex) { if (includeTerms != null) { @@ -152,7 +152,7 @@ public class TermsBuilder extends ValuesSourceAggregationBuilder { * Define a regular expression that will filter out terms that should be excluded from the aggregation. The regular * expression is based on the {@link RegExp} class. * - * @see {@link RegExp#RegExp(String)} + * @see RegExp#RegExp(String) */ public TermsBuilder exclude(String regex) { if (excludeTerms != null) { diff --git a/core/src/main/java/org/elasticsearch/search/aggregations/bucket/terms/support/IncludeExclude.java b/core/src/main/java/org/elasticsearch/search/aggregations/bucket/terms/support/IncludeExclude.java index 1eff5885b1c..98abe2b464a 100644 --- a/core/src/main/java/org/elasticsearch/search/aggregations/bucket/terms/support/IncludeExclude.java +++ b/core/src/main/java/org/elasticsearch/search/aggregations/bucket/terms/support/IncludeExclude.java @@ -94,7 +94,7 @@ public class IncludeExclude { } /** - * Returns whether the given value is accepted based on the {@code include} & {@code exclude} patterns. + * Returns whether the given value is accepted based on the {@code include} & {@code exclude} patterns. */ @Override public boolean accept(BytesRef value) { @@ -114,7 +114,7 @@ public class IncludeExclude { /** * Returns whether the given value is accepted based on the - * {@code include} & {@code exclude} sets. + * {@code include} & {@code exclude} sets. */ @Override public boolean accept(BytesRef value) { diff --git a/core/src/main/java/org/elasticsearch/search/aggregations/pipeline/BucketHelpers.java b/core/src/main/java/org/elasticsearch/search/aggregations/pipeline/BucketHelpers.java index 10d095603e2..881a8e4169b 100644 --- a/core/src/main/java/org/elasticsearch/search/aggregations/pipeline/BucketHelpers.java +++ b/core/src/main/java/org/elasticsearch/search/aggregations/pipeline/BucketHelpers.java @@ -102,9 +102,7 @@ public class BucketHelpers { /** * Deserialize the GapPolicy from the input stream * - * @param in * @return GapPolicy Enum - * @throws IOException */ public static GapPolicy readFrom(StreamInput in) throws IOException { byte id = in.readByte(); diff --git a/core/src/main/java/org/elasticsearch/search/aggregations/pipeline/PipelineAggregator.java b/core/src/main/java/org/elasticsearch/search/aggregations/pipeline/PipelineAggregator.java index bd6ad020c6a..b2ee037e1e1 100644 --- a/core/src/main/java/org/elasticsearch/search/aggregations/pipeline/PipelineAggregator.java +++ b/core/src/main/java/org/elasticsearch/search/aggregations/pipeline/PipelineAggregator.java @@ -39,7 +39,7 @@ public abstract class PipelineAggregator implements Streamable { * Parses the pipeline aggregation request and creates the appropriate * pipeline aggregator factory for it. * - * @see {@link PipelineAggregatorFactory} + * @see PipelineAggregatorFactory */ public static interface Parser { diff --git a/core/src/main/java/org/elasticsearch/search/aggregations/pipeline/PipelineAggregatorFactory.java b/core/src/main/java/org/elasticsearch/search/aggregations/pipeline/PipelineAggregatorFactory.java index 26b38ee67de..6fc0185101d 100644 --- a/core/src/main/java/org/elasticsearch/search/aggregations/pipeline/PipelineAggregatorFactory.java +++ b/core/src/main/java/org/elasticsearch/search/aggregations/pipeline/PipelineAggregatorFactory.java @@ -56,10 +56,6 @@ public abstract class PipelineAggregatorFactory { /** * Validates the state of this factory (makes sure the factory is properly * configured) - * - * @param pipelineAggregatorFactories - * @param factories - * @param parent */ public final void validate(AggregatorFactory parent, AggregatorFactory[] factories, List pipelineAggregatorFactories) { @@ -71,17 +67,6 @@ public abstract class PipelineAggregatorFactory { /** * Creates the pipeline aggregator * - * @param context - * The aggregation context - * @param parent - * The parent aggregator (if this is a top level factory, the - * parent will be {@code null}) - * @param collectsFromSingleBucket - * If true then the created aggregator will only be collected - * with 0 as a bucket ordinal. Some factories can take - * advantage of this in order to return more optimized - * implementations. - * * @return The created aggregator */ public final PipelineAggregator create() throws IOException { diff --git a/core/src/main/java/org/elasticsearch/search/aggregations/pipeline/bucketmetrics/BucketMetricsPipelineAggregator.java b/core/src/main/java/org/elasticsearch/search/aggregations/pipeline/bucketmetrics/BucketMetricsPipelineAggregator.java index 93ccf2dee82..89955ef0278 100644 --- a/core/src/main/java/org/elasticsearch/search/aggregations/pipeline/bucketmetrics/BucketMetricsPipelineAggregator.java +++ b/core/src/main/java/org/elasticsearch/search/aggregations/pipeline/bucketmetrics/BucketMetricsPipelineAggregator.java @@ -96,7 +96,6 @@ public abstract class BucketMetricsPipelineAggregator extends SiblingPipelineAgg * the pipeline aggregators to add to the resulting aggregation * @param metadata * the metadata to add to the resulting aggregation - * @return */ protected abstract InternalAggregation buildAggregation(List pipelineAggregators, Map metadata); diff --git a/core/src/main/java/org/elasticsearch/search/aggregations/pipeline/movavg/MovAvgBuilder.java b/core/src/main/java/org/elasticsearch/search/aggregations/pipeline/movavg/MovAvgBuilder.java index b3aca612fc0..b2dc718d47a 100644 --- a/core/src/main/java/org/elasticsearch/search/aggregations/pipeline/movavg/MovAvgBuilder.java +++ b/core/src/main/java/org/elasticsearch/search/aggregations/pipeline/movavg/MovAvgBuilder.java @@ -112,9 +112,6 @@ public class MovAvgBuilder extends PipelineAggregatorBuilder { /** * The hash of settings that should be provided to the model when it is * instantiated - * - * @param settings - * @return */ public MovAvgBuilder settings(Map settings) { this.settings = settings; diff --git a/core/src/main/java/org/elasticsearch/search/aggregations/pipeline/movavg/models/HoltWintersModel.java b/core/src/main/java/org/elasticsearch/search/aggregations/pipeline/movavg/models/HoltWintersModel.java index 8be63e165b8..176d4b06f3b 100644 --- a/core/src/main/java/org/elasticsearch/search/aggregations/pipeline/movavg/models/HoltWintersModel.java +++ b/core/src/main/java/org/elasticsearch/search/aggregations/pipeline/movavg/models/HoltWintersModel.java @@ -134,7 +134,6 @@ public class HoltWintersModel extends MovAvgModel { * * @param in the input stream * @return SeasonalityType Enum - * @throws IOException */ public static SeasonalityType readFrom(StreamInput in) throws IOException { byte id = in.readByte(); diff --git a/core/src/main/java/org/elasticsearch/search/aggregations/pipeline/movavg/models/MovAvgModel.java b/core/src/main/java/org/elasticsearch/search/aggregations/pipeline/movavg/models/MovAvgModel.java index 3de4fceab4a..f1755132072 100644 --- a/core/src/main/java/org/elasticsearch/search/aggregations/pipeline/movavg/models/MovAvgModel.java +++ b/core/src/main/java/org/elasticsearch/search/aggregations/pipeline/movavg/models/MovAvgModel.java @@ -34,8 +34,6 @@ public abstract class MovAvgModel { /** * Should this model be fit to the data via a cost minimizing algorithm by default? - * - * @return */ public boolean minimizeByDefault() { return false; @@ -44,16 +42,12 @@ public abstract class MovAvgModel { /** * Returns if the model can be cost minimized. Not all models have parameters * which can be tuned / optimized. - * - * @return */ public abstract boolean canBeMinimized(); /** * Generates a "neighboring" model, where one of the tunable parameters has been * randomly mutated within the allowed range. Used for minimization - * - * @return */ public abstract MovAvgModel neighboringModel(); @@ -111,7 +105,6 @@ public abstract class MovAvgModel { /** * Returns an empty set of predictions, filled with NaNs * @param numPredictions Number of empty predictions to generate - * @return */ protected double[] emptyPredictions(int numPredictions) { double[] predictions = new double[numPredictions]; @@ -123,14 +116,11 @@ public abstract class MovAvgModel { * Write the model to the output stream * * @param out Output stream - * @throws IOException */ public abstract void writeTo(StreamOutput out) throws IOException; /** * Clone the model, returning an exact copy - * - * @return */ public abstract MovAvgModel clone(); @@ -165,9 +155,6 @@ public abstract class MovAvgModel { * @param settings Map of settings provided to this model * @param name Name of parameter we are attempting to extract * @param defaultValue Default value to be used if value does not exist in map - * - * @throws ParseException - * * @return Double value extracted from settings map */ protected double parseDoubleParam(@Nullable Map settings, String name, double defaultValue) throws ParseException { @@ -199,9 +186,6 @@ public abstract class MovAvgModel { * @param settings Map of settings provided to this model * @param name Name of parameter we are attempting to extract * @param defaultValue Default value to be used if value does not exist in map - * - * @throws ParseException - * * @return Integer value extracted from settings map */ protected int parseIntegerParam(@Nullable Map settings, String name, int defaultValue) throws ParseException { @@ -227,9 +211,6 @@ public abstract class MovAvgModel { * @param settings Map of settings provided to this model * @param name Name of parameter we are attempting to extract * @param defaultValue Default value to be used if value does not exist in map - * - * @throws SearchParseException - * * @return Boolean value extracted from settings map */ protected boolean parseBoolParam(@Nullable Map settings, String name, boolean defaultValue) throws ParseException { diff --git a/core/src/main/java/org/elasticsearch/search/aggregations/support/AggregationPath.java b/core/src/main/java/org/elasticsearch/search/aggregations/support/AggregationPath.java index 85af60a148c..84fd26a74f3 100644 --- a/core/src/main/java/org/elasticsearch/search/aggregations/support/AggregationPath.java +++ b/core/src/main/java/org/elasticsearch/search/aggregations/support/AggregationPath.java @@ -33,18 +33,16 @@ import java.util.ArrayList; import java.util.List; /** - * A path that can be used to sort/order buckets (in some multi-bucket aggregations, eg terms & histogram) based on + * A path that can be used to sort/order buckets (in some multi-bucket aggregations, eg terms & histogram) based on * sub-aggregations. The path may point to either a single-bucket aggregation or a metrics aggregation. If the path * points to a single-bucket aggregation, the sort will be applied based on the {@code doc_count} of the bucket. If this * path points to a metrics aggregation, if it's a single-value metrics (eg. avg, max, min, etc..) the sort will be * applied on that single value. If it points to a multi-value metrics, the path should point out what metric should be * the sort-by value. - *

              + *

              * The path has the following form: - *

              *

              {@code ['>'*]['.']}
              - *

              - *

              + *

              * Examples: * *

                diff --git a/core/src/main/java/org/elasticsearch/search/aggregations/support/values/ScriptDoubleValues.java b/core/src/main/java/org/elasticsearch/search/aggregations/support/values/ScriptDoubleValues.java index 337b2982a17..ee9e1272e83 100644 --- a/core/src/main/java/org/elasticsearch/search/aggregations/support/values/ScriptDoubleValues.java +++ b/core/src/main/java/org/elasticsearch/search/aggregations/support/values/ScriptDoubleValues.java @@ -29,7 +29,7 @@ import java.util.Collection; import java.util.Iterator; /** - * {@link DoubleValues} implementation which is based on a script + * {@link SortingNumericDoubleValues} implementation which is based on a script */ public class ScriptDoubleValues extends SortingNumericDoubleValues implements ScorerAware { diff --git a/core/src/main/java/org/elasticsearch/search/fetch/fielddata/FieldDataFieldsParseElement.java b/core/src/main/java/org/elasticsearch/search/fetch/fielddata/FieldDataFieldsParseElement.java index cd5cb7d323d..3d1a2498f2f 100644 --- a/core/src/main/java/org/elasticsearch/search/fetch/fielddata/FieldDataFieldsParseElement.java +++ b/core/src/main/java/org/elasticsearch/search/fetch/fielddata/FieldDataFieldsParseElement.java @@ -28,7 +28,6 @@ import org.elasticsearch.search.internal.SearchContext; /** * Parses field name values from the {@code fielddata_fields} parameter in a * search request. - *

                *

                  * {
                  *   "query": {...},
                diff --git a/core/src/main/java/org/elasticsearch/search/highlight/HighlightBuilder.java b/core/src/main/java/org/elasticsearch/search/highlight/HighlightBuilder.java
                index c082859a0ed..695598e4fec 100644
                --- a/core/src/main/java/org/elasticsearch/search/highlight/HighlightBuilder.java
                +++ b/core/src/main/java/org/elasticsearch/search/highlight/HighlightBuilder.java
                @@ -603,7 +603,7 @@ public class HighlightBuilder implements ToXContent {
                 
                         /**
                          * Allows to set custom options for custom highlighters.
                -         * This overrides global settings set by {@link HighlightBuilder#options(Map)}.
                +         * This overrides global settings set by {@link HighlightBuilder#options(Map)}.
                          */
                         public Field options(Map options) {
                             this.options = options;
                diff --git a/core/src/main/java/org/elasticsearch/search/internal/ShardSearchLocalRequest.java b/core/src/main/java/org/elasticsearch/search/internal/ShardSearchLocalRequest.java
                index a0392509d2a..ca8c074627b 100644
                --- a/core/src/main/java/org/elasticsearch/search/internal/ShardSearchLocalRequest.java
                +++ b/core/src/main/java/org/elasticsearch/search/internal/ShardSearchLocalRequest.java
                @@ -41,7 +41,6 @@ import static org.elasticsearch.search.Scroll.readScroll;
                  * Used by warmers and by api that need to create a search context within their execution.
                  *
                  * Source structure:
                - * 

                *

                  * {
                  *  from : 0, size : 20, (optional, can be set on the request)
                diff --git a/core/src/main/java/org/elasticsearch/search/lookup/IndexLookup.java b/core/src/main/java/org/elasticsearch/search/lookup/IndexLookup.java
                index 3d2f011776c..0150ef7e0b0 100644
                --- a/core/src/main/java/org/elasticsearch/search/lookup/IndexLookup.java
                +++ b/core/src/main/java/org/elasticsearch/search/lookup/IndexLookup.java
                @@ -25,32 +25,32 @@ import org.apache.lucene.index.LeafReaderContext;
                 public class IndexLookup {
                 
                     /**
                -     * Flag to pass to {@link IndexField#get(String, flags)} if you require
                +     * Flag to pass to {@link IndexField#get(Object, int)} if you require
                      * offsets in the returned {@link IndexFieldTerm}.
                      */
                     public static final int FLAG_OFFSETS = 2;
                 
                     /**
                -     * Flag to pass to {@link IndexField#get(String, flags)} if you require
                +     * Flag to pass to {@link IndexField#get(Object, int)} if you require
                      * payloads in the returned {@link IndexFieldTerm}.
                      */
                     public static final int FLAG_PAYLOADS = 4;
                 
                     /**
                -     * Flag to pass to {@link IndexField#get(String, flags)} if you require
                +     * Flag to pass to {@link IndexField#get(Object, int)} if you require
                      * frequencies in the returned {@link IndexFieldTerm}. Frequencies might be
                      * returned anyway for some lucene codecs even if this flag is no set.
                      */
                     public static final int FLAG_FREQUENCIES = 8;
                 
                     /**
                -     * Flag to pass to {@link IndexField#get(String, flags)} if you require
                +     * Flag to pass to {@link IndexField#get(Object, int)} if you require
                      * positions in the returned {@link IndexFieldTerm}.
                      */
                     public static final int FLAG_POSITIONS = 16;
                 
                     /**
                -     * Flag to pass to {@link IndexField#get(String, flags)} if you require
                +     * Flag to pass to {@link IndexField#get(Object, int)} if you require
                      * positions in the returned {@link IndexFieldTerm}.
                      */
                     public static final int FLAG_CACHE = 32;
                diff --git a/core/src/main/java/org/elasticsearch/search/rescore/QueryRescorer.java b/core/src/main/java/org/elasticsearch/search/rescore/QueryRescorer.java
                index f83a6030e7a..fce6ad6a078 100644
                --- a/core/src/main/java/org/elasticsearch/search/rescore/QueryRescorer.java
                +++ b/core/src/main/java/org/elasticsearch/search/rescore/QueryRescorer.java
                @@ -227,7 +227,7 @@ public final class QueryRescorer implements Rescorer {
                         }
                     };
                 
                -    /** Returns a new {@link TopDocs} with the topN from the incoming one, or the same TopDocs if the number of hits is already <=
                +    /** Returns a new {@link TopDocs} with the topN from the incoming one, or the same TopDocs if the number of hits is already <=
                      *  topN. */
                     private TopDocs topN(TopDocs in, int topN) {
                         if (in.totalHits < topN) {
                diff --git a/core/src/main/java/org/elasticsearch/search/sort/FieldSortBuilder.java b/core/src/main/java/org/elasticsearch/search/sort/FieldSortBuilder.java
                index 1a95c96d54a..c415fd5a70b 100644
                --- a/core/src/main/java/org/elasticsearch/search/sort/FieldSortBuilder.java
                +++ b/core/src/main/java/org/elasticsearch/search/sort/FieldSortBuilder.java
                @@ -102,7 +102,7 @@ public class FieldSortBuilder extends SortBuilder {
                     /**
                      * Defines what values to pick in the case a document contains multiple values for the targeted sort field.
                      * Possible values: min, max, sum and avg
                -     * 

                + *

                * The last two values are only applicable for number based fields. */ public FieldSortBuilder sortMode(String sortMode) { diff --git a/core/src/main/java/org/elasticsearch/search/suggest/SuggestBuilder.java b/core/src/main/java/org/elasticsearch/search/suggest/SuggestBuilder.java index 57d18c3cddb..ea45c1033e9 100644 --- a/core/src/main/java/org/elasticsearch/search/suggest/SuggestBuilder.java +++ b/core/src/main/java/org/elasticsearch/search/suggest/SuggestBuilder.java @@ -31,7 +31,7 @@ import java.util.List; /** * Defines how to perform suggesting. This builders allows a number of global options to be specified and * an arbitrary number of {@link org.elasticsearch.search.suggest.term.TermSuggestionBuilder} instances. - *

                + *

                * Suggesting works by suggesting terms that appear in the suggest text that are similar compared to the terms in * provided text. These spelling suggestions are based on several options described in this class. */ @@ -53,7 +53,7 @@ public class SuggestBuilder extends ToXContentToBytes { /** * Sets the text to provide suggestions for. The suggest text is a required option that needs * to be set either via this setter or via the {@link org.elasticsearch.search.suggest.SuggestBuilder.SuggestionBuilder#setText(String)} method. - *

                + *

                * The suggest text gets analyzed by the suggest analyzer or the suggest field search analyzer. * For each analyzed token, suggested terms are suggested if possible. */ @@ -268,7 +268,7 @@ public class SuggestBuilder extends ToXContentToBytes { * individual shard. During the reduce phase the only the top N suggestions * are returned based on the size option. Defaults to the * size option. - *

                + *

                * Setting this to a value higher than the `size` can be useful in order to * get a more accurate document frequency for suggested terms. Due to the * fact that terms are partitioned amongst shards, the shard level document diff --git a/core/src/main/java/org/elasticsearch/search/suggest/context/CategoryContextMapping.java b/core/src/main/java/org/elasticsearch/search/suggest/context/CategoryContextMapping.java index ce807d824bc..118d95e22d9 100644 --- a/core/src/main/java/org/elasticsearch/search/suggest/context/CategoryContextMapping.java +++ b/core/src/main/java/org/elasticsearch/search/suggest/context/CategoryContextMapping.java @@ -110,7 +110,7 @@ public class CategoryContextMapping extends ContextMapping { /** * Load the specification of a {@link CategoryContextMapping} * - * @param field + * @param name * name of the field to use. If null default field * will be used * @return new {@link CategoryContextMapping} diff --git a/core/src/main/java/org/elasticsearch/search/suggest/context/ContextBuilder.java b/core/src/main/java/org/elasticsearch/search/suggest/context/ContextBuilder.java index 58fb91b7b54..8b554d957d4 100644 --- a/core/src/main/java/org/elasticsearch/search/suggest/context/ContextBuilder.java +++ b/core/src/main/java/org/elasticsearch/search/suggest/context/ContextBuilder.java @@ -57,14 +57,14 @@ public abstract class ContextBuilder { } /** - * Create a new {@link CategoryMapping} + * Create a new {@link CategoryContextMapping.Builder} */ public static CategoryContextMapping.Builder category(String name) { return new CategoryContextMapping.Builder(name, null); } /** - * Create a new {@link CategoryMapping} with default category + * Create a new {@link CategoryContextMapping.Builder} with default category * * @param defaultCategory category to use, if it is not provided */ diff --git a/core/src/main/java/org/elasticsearch/search/suggest/context/ContextMapping.java b/core/src/main/java/org/elasticsearch/search/suggest/context/ContextMapping.java index 65232cad395..bbdb614c943 100644 --- a/core/src/main/java/org/elasticsearch/search/suggest/context/ContextMapping.java +++ b/core/src/main/java/org/elasticsearch/search/suggest/context/ContextMapping.java @@ -107,9 +107,6 @@ public abstract class ContextMapping implements ToXContent { * @param parseContext context of parsing phase * @param parser {@link XContentParser} used to read and setup the configuration * @return A {@link ContextConfig} related to this mapping - * - * @throws IOException - * @throws ElasticsearchParseException */ public abstract ContextConfig parseContext(ParseContext parseContext, XContentParser parser) throws IOException, ElasticsearchParseException; @@ -122,9 +119,6 @@ public abstract class ContextMapping implements ToXContent { * @param parser {@link XContentParser} providing the data of the query * * @return {@link ContextQuery} according to this mapping - * - * @throws IOException - * @throws ElasticsearchParseException */ public abstract ContextQuery parseQuery(String name, XContentParser parser) throws IOException, ElasticsearchParseException; @@ -136,8 +130,6 @@ public abstract class ContextMapping implements ToXContent { * @param params parameters passed to the builder * * @return the builder used - * - * @throws IOException */ protected abstract XContentBuilder toInnerXContent(XContentBuilder builder, Params params) throws IOException; diff --git a/core/src/main/java/org/elasticsearch/search/suggest/phrase/PhraseSuggestionBuilder.java b/core/src/main/java/org/elasticsearch/search/suggest/phrase/PhraseSuggestionBuilder.java index d5e942b52e1..1055fbe83fc 100644 --- a/core/src/main/java/org/elasticsearch/search/suggest/phrase/PhraseSuggestionBuilder.java +++ b/core/src/main/java/org/elasticsearch/search/suggest/phrase/PhraseSuggestionBuilder.java @@ -148,7 +148,7 @@ public final class PhraseSuggestionBuilder extends SuggestionBuilder + *

                * Default is 0.5 */ public DirectCandidateGenerator accuracy(float accuracy) { @@ -491,7 +486,7 @@ public final class PhraseSuggestionBuilder extends SuggestionBuilderfrequency - Sort should first be based on document * frequency, then scotr and then the term itself. * - *

                + *

                * What the score is depends on the suggester being used. */ public DirectCandidateGenerator sort(String sort) { @@ -548,7 +543,7 @@ public final class PhraseSuggestionBuilder extends SuggestionBuilder0.01. - *

                + *

                * This can be used to exclude high frequency terms from being * suggested. High frequency terms are usually spelled correctly on top * of this this also improves the suggest performance. diff --git a/core/src/main/java/org/elasticsearch/search/suggest/term/TermSuggestionBuilder.java b/core/src/main/java/org/elasticsearch/search/suggest/term/TermSuggestionBuilder.java index 0fd5ae1289f..03eb388f003 100644 --- a/core/src/main/java/org/elasticsearch/search/suggest/term/TermSuggestionBuilder.java +++ b/core/src/main/java/org/elasticsearch/search/suggest/term/TermSuggestionBuilder.java @@ -71,7 +71,7 @@ public class TermSuggestionBuilder extends SuggestionBuilder + *

                * Default is 0.5 */ public TermSuggestionBuilder setAccuracy(float accuracy) { @@ -88,7 +88,7 @@ public class TermSuggestionBuilder extends SuggestionBuilderfrequency - Sort should first be based on document * frequency, then scotr and then the term itself. * - *

                + *

                * What the score is depends on the suggester being used. */ public TermSuggestionBuilder sort(String sort) { @@ -145,7 +145,7 @@ public class TermSuggestionBuilder extends SuggestionBuilder0.01. - *

                + *

                * This can be used to exclude high frequency terms from being suggested. * High frequency terms are usually spelled correctly on top of this this * also improves the suggest performance. diff --git a/core/src/main/java/org/elasticsearch/snapshots/RestoreInfo.java b/core/src/main/java/org/elasticsearch/snapshots/RestoreInfo.java index cc9eeb04130..866cd38d9d5 100644 --- a/core/src/main/java/org/elasticsearch/snapshots/RestoreInfo.java +++ b/core/src/main/java/org/elasticsearch/snapshots/RestoreInfo.java @@ -33,7 +33,7 @@ import java.util.List; /** * Information about successfully completed restore operation. - *

                + *

                * Returned as part of {@link org.elasticsearch.action.admin.cluster.snapshots.restore.RestoreSnapshotResponse} */ public class RestoreInfo implements ToXContent, Streamable { @@ -176,7 +176,6 @@ public class RestoreInfo implements ToXContent, Streamable { * * @param in stream input * @return restore info - * @throws IOException */ public static RestoreInfo readRestoreInfo(StreamInput in) throws IOException { RestoreInfo snapshotInfo = new RestoreInfo(); @@ -189,7 +188,6 @@ public class RestoreInfo implements ToXContent, Streamable { * * @param in stream input * @return restore info - * @throws IOException */ public static RestoreInfo readOptionalRestoreInfo(StreamInput in) throws IOException { return in.readOptionalStreamable(new RestoreInfo()); diff --git a/core/src/main/java/org/elasticsearch/snapshots/RestoreService.java b/core/src/main/java/org/elasticsearch/snapshots/RestoreService.java index 39c3c5b9a71..56921007282 100644 --- a/core/src/main/java/org/elasticsearch/snapshots/RestoreService.java +++ b/core/src/main/java/org/elasticsearch/snapshots/RestoreService.java @@ -104,22 +104,22 @@ import static org.elasticsearch.cluster.metadata.MetaDataIndexStateService.INDEX /** * Service responsible for restoring snapshots - *

                + *

                * Restore operation is performed in several stages. - *

                - * First {@link #restoreSnapshot(RestoreRequest, org.elasticsearch.action.ActionListener))} + *

                + * First {@link #restoreSnapshot(RestoreRequest, org.elasticsearch.action.ActionListener)} * method reads information about snapshot and metadata from repository. In update cluster state task it checks restore * preconditions, restores global state if needed, creates {@link RestoreInProgress} record with list of shards that needs - * to be restored and adds this shard to the routing table using {@link RoutingTable.Builder#addAsRestore(IndexMetaData, RestoreSource)} + * to be restored and adds this shard to the routing table using {@link org.elasticsearch.cluster.routing.RoutingTable.Builder#addAsRestore(IndexMetaData, RestoreSource)} * method. - *

                + *

                * Individual shards are getting restored as part of normal recovery process in * {@link StoreRecoveryService#recover(IndexShard, boolean, StoreRecoveryService.RecoveryListener)} * method, which detects that shard should be restored from snapshot rather than recovered from gateway by looking * at the {@link org.elasticsearch.cluster.routing.ShardRouting#restoreSource()} property. If this property is not null * {@code recover} method uses {@link StoreRecoveryService#restore} * method to start shard restore process. - *

                + *

                * At the end of the successful restore process {@code IndexShardSnapshotAndRestoreService} calls {@link #indexShardRestoreCompleted(SnapshotId, ShardId)}, * which updates {@link RestoreInProgress} in cluster state or removes it when all shards are completed. In case of * restore failure a normal recovery fail-over process kicks in. @@ -782,7 +782,7 @@ public class RestoreService extends AbstractComponent implements ClusterStateLis /** * Adds restore completion listener - *

                + *

                * This listener is called for each snapshot that finishes restore operation in the cluster. It's responsibility of * the listener to decide if it's called for the appropriate snapshot or not. * @@ -794,7 +794,7 @@ public class RestoreService extends AbstractComponent implements ClusterStateLis /** * Removes restore completion listener - *

                + *

                * This listener is called for each snapshot that finishes restore operation in the cluster. * * @param listener restore completion listener diff --git a/core/src/main/java/org/elasticsearch/snapshots/Snapshot.java b/core/src/main/java/org/elasticsearch/snapshots/Snapshot.java index 75abc40af61..d7e0a064048 100644 --- a/core/src/main/java/org/elasticsearch/snapshots/Snapshot.java +++ b/core/src/main/java/org/elasticsearch/snapshots/Snapshot.java @@ -164,7 +164,7 @@ public class Snapshot implements Comparable, ToXContent, FromXContentB /** * Returns time when snapshot ended - *

                + *

                * Can be 0L if snapshot is still running * * @return snapshot end time diff --git a/core/src/main/java/org/elasticsearch/snapshots/SnapshotInfo.java b/core/src/main/java/org/elasticsearch/snapshots/SnapshotInfo.java index e7b6ce13f12..57b974ce7ae 100644 --- a/core/src/main/java/org/elasticsearch/snapshots/SnapshotInfo.java +++ b/core/src/main/java/org/elasticsearch/snapshots/SnapshotInfo.java @@ -131,7 +131,7 @@ public class SnapshotInfo implements ToXContent, Streamable { /** * Returns time when snapshot ended - *

                + *

                * Can be 0L if snapshot is still running * * @return snapshot end time @@ -310,7 +310,6 @@ public class SnapshotInfo implements ToXContent, Streamable { * * @param in stream input * @return deserialized snapshot info - * @throws IOException */ public static SnapshotInfo readSnapshotInfo(StreamInput in) throws IOException { SnapshotInfo snapshotInfo = new SnapshotInfo(); @@ -323,7 +322,6 @@ public class SnapshotInfo implements ToXContent, Streamable { * * @param in stream input * @return deserialized snapshot info or null - * @throws IOException */ public static SnapshotInfo readOptionalSnapshotInfo(StreamInput in) throws IOException { return in.readOptionalStreamable(new SnapshotInfo()); diff --git a/core/src/main/java/org/elasticsearch/snapshots/SnapshotShardFailure.java b/core/src/main/java/org/elasticsearch/snapshots/SnapshotShardFailure.java index 216052ee57d..60bd25542c8 100644 --- a/core/src/main/java/org/elasticsearch/snapshots/SnapshotShardFailure.java +++ b/core/src/main/java/org/elasticsearch/snapshots/SnapshotShardFailure.java @@ -128,7 +128,6 @@ public class SnapshotShardFailure implements ShardOperationFailedException { * * @param in stream input * @return shard failure information - * @throws IOException */ public static SnapshotShardFailure readSnapshotShardFailure(StreamInput in) throws IOException { SnapshotShardFailure exp = new SnapshotShardFailure(); @@ -165,7 +164,6 @@ public class SnapshotShardFailure implements ShardOperationFailedException { * @param snapshotShardFailure snapshot failure information * @param builder XContent builder * @param params additional parameters - * @throws IOException */ public static void toXContent(SnapshotShardFailure snapshotShardFailure, XContentBuilder builder, ToXContent.Params params) throws IOException { builder.startObject(); @@ -178,7 +176,6 @@ public class SnapshotShardFailure implements ShardOperationFailedException { * * @param parser JSON parser * @return snapshot failure information - * @throws IOException */ public static SnapshotShardFailure fromXContent(XContentParser parser) throws IOException { SnapshotShardFailure snapshotShardFailure = new SnapshotShardFailure(); diff --git a/core/src/main/java/org/elasticsearch/snapshots/SnapshotShardsService.java b/core/src/main/java/org/elasticsearch/snapshots/SnapshotShardsService.java index 301ceededc5..58a98c30d7a 100644 --- a/core/src/main/java/org/elasticsearch/snapshots/SnapshotShardsService.java +++ b/core/src/main/java/org/elasticsearch/snapshots/SnapshotShardsService.java @@ -358,7 +358,6 @@ public class SnapshotShardsService extends AbstractLifecycleComponent + *

                * A typical snapshot creating process looks like this: *

                  *
                • On the master node the {@link #createSnapshot(SnapshotRequest, CreateSnapshotListener)} is called and makes sure that no snapshots is currently running @@ -172,7 +172,7 @@ public class SnapshotsService extends AbstractLifecycleComponent + *

                  * This method is used by clients to start snapshot. It makes sure that there is no snapshots are currently running and * creates a snapshot record in cluster state metadata. * @@ -236,7 +236,6 @@ public class SnapshotsService extends AbstractLifecycleComponent + *

                  * Creates snapshot in repository and updates snapshot metadata record with list of shards that needs to be processed. * * @param clusterState cluster state @@ -752,7 +751,7 @@ public class SnapshotsService extends AbstractLifecycleComponent + *

                  * This is non-blocking method that runs on a thread from SNAPSHOT thread pool * * @param entry snapshot @@ -764,7 +763,7 @@ public class SnapshotsService extends AbstractLifecycleComponent + *

                  * This is non-blocking method that runs on a thread from SNAPSHOT thread pool * * @param entry snapshot @@ -853,7 +852,7 @@ public class SnapshotsService extends AbstractLifecycleComponent + *

                  * If the snapshot is still running cancels the snapshot first and then deletes it from the repository. * * @param snapshotId snapshot id diff --git a/core/src/main/java/org/elasticsearch/transport/TransportServiceAdapter.java b/core/src/main/java/org/elasticsearch/transport/TransportServiceAdapter.java index e396b0381c2..382a4192d1c 100644 --- a/core/src/main/java/org/elasticsearch/transport/TransportServiceAdapter.java +++ b/core/src/main/java/org/elasticsearch/transport/TransportServiceAdapter.java @@ -33,21 +33,21 @@ public interface TransportServiceAdapter { /** called by the {@link Transport} implementation once a request has been sent */ void onRequestSent(DiscoveryNode node, long requestId, String action, TransportRequest request, TransportRequestOptions options); - /** called by the {@link Transport) implementation once a response was sent to calling node */ + /** called by the {@link Transport} implementation once a response was sent to calling node */ void onResponseSent(long requestId, String action, TransportResponse response, TransportResponseOptions options); - /** called by the {@link Transport) implementation after an exception was sent as a response to an incoming request */ + /** called by the {@link Transport} implementation after an exception was sent as a response to an incoming request */ void onResponseSent(long requestId, String action, Throwable t); /** - * called by the {@link Transport) implementation when a response or an exception has been recieved for a previously + * called by the {@link Transport} implementation when a response or an exception has been received for a previously * sent request (before any processing or deserialization was done). Returns the appropriate response handler or null if not * found. */ TransportResponseHandler onResponseReceived(long requestId); /** - * called by the {@link Transport) implementation when an incoming request arrives but before + * called by the {@link Transport} implementation when an incoming request arrives but before * any parsing of it has happened (with the exception of the requestId and action) */ void onRequestReceived(long requestId, String action); diff --git a/core/src/main/java/org/elasticsearch/tribe/TribeService.java b/core/src/main/java/org/elasticsearch/tribe/TribeService.java index 0dbe2078515..35617ddfa7c 100644 --- a/core/src/main/java/org/elasticsearch/tribe/TribeService.java +++ b/core/src/main/java/org/elasticsearch/tribe/TribeService.java @@ -60,15 +60,15 @@ import java.util.concurrent.CopyOnWriteArrayList; /** * The tribe service holds a list of node clients connected to a list of tribe members, and uses their * cluster state events to update this local node cluster state with the merged view of it. - *

                  + *

                  * The {@link #processSettings(org.elasticsearch.common.settings.Settings)} method should be called before * starting the node, so it will make sure to configure this current node properly with the relevant tribe node * settings. - *

                  + *

                  * The tribe node settings make sure the discovery used is "local", but with no master elected. This means no * write level master node operations will work ({@link org.elasticsearch.discovery.MasterNotDiscoveredException} * will be thrown), and state level metadata operations with automatically use the local flag. - *

                  + *

                  * The state merged from different clusters include the list of nodes, metadata, and routing table. Each node merged * will have in its tribe which tribe member it came from. Each index merged will have in its settings which tribe * member it came from. In case an index has already been merged from one cluster, and the same name index is discovered diff --git a/core/src/main/java/org/elasticsearch/watcher/AbstractResourceWatcher.java b/core/src/main/java/org/elasticsearch/watcher/AbstractResourceWatcher.java index 24ab69a2384..5e367610dfe 100644 --- a/core/src/main/java/org/elasticsearch/watcher/AbstractResourceWatcher.java +++ b/core/src/main/java/org/elasticsearch/watcher/AbstractResourceWatcher.java @@ -72,7 +72,7 @@ public abstract class AbstractResourceWatcher implements ResourceWatch /** * Will be called periodically - *

                  + *

                  * Implementing watcher should check resource and notify all {@link #listeners()}. */ protected abstract void doCheckAndNotify() throws IOException; diff --git a/core/src/main/java/org/elasticsearch/watcher/ResourceWatcher.java b/core/src/main/java/org/elasticsearch/watcher/ResourceWatcher.java index 0d4bef17b1b..4356c87f0fc 100644 --- a/core/src/main/java/org/elasticsearch/watcher/ResourceWatcher.java +++ b/core/src/main/java/org/elasticsearch/watcher/ResourceWatcher.java @@ -22,7 +22,7 @@ import java.io.IOException; /** * Abstract resource watcher interface. - *

                  + *

                  * Different resource watchers can be registered with {@link ResourceWatcherService} to be called * periodically in order to check for changes in different external resources. */ diff --git a/core/src/main/java/org/joda/time/base/BaseDateTime.java b/core/src/main/java/org/joda/time/base/BaseDateTime.java index c2aa9ec8479..4cf6ff6b50e 100644 --- a/core/src/main/java/org/joda/time/base/BaseDateTime.java +++ b/core/src/main/java/org/joda/time/base/BaseDateTime.java @@ -29,11 +29,11 @@ import java.io.Serializable; /** * BaseDateTime is an abstract implementation of ReadableDateTime that stores * data in long and Chronology fields. - *

                  + *

                  * This class should generally not be used directly by API users. * The {@link ReadableDateTime} interface should be used when different * kinds of date/time objects are to be referenced. - *

                  + *

                  * BaseDateTime subclasses may be mutable and not thread-safe. * * @author Stephen Colebourne @@ -73,7 +73,7 @@ public abstract class BaseDateTime /** * Constructs an instance set to the current system millisecond time * using ISOChronology in the specified time zone. - *

                  + *

                  * If the specified time zone is null, the default zone is used. * * @param zone the time zone, null means default zone @@ -85,7 +85,7 @@ public abstract class BaseDateTime /** * Constructs an instance set to the current system millisecond time * using the specified chronology. - *

                  + *

                  * If the chronology is null, ISOChronology * in the default time zone is used. * @@ -110,7 +110,7 @@ public abstract class BaseDateTime /** * Constructs an instance set to the milliseconds from 1970-01-01T00:00:00Z * using ISOChronology in the specified time zone. - *

                  + *

                  * If the specified time zone is null, the default zone is used. * * @param instant the milliseconds from 1970-01-01T00:00:00Z @@ -123,7 +123,7 @@ public abstract class BaseDateTime /** * Constructs an instance set to the milliseconds from 1970-01-01T00:00:00Z * using the specified chronology. - *

                  + *

                  * If the chronology is null, ISOChronology * in the default time zone is used. * @@ -145,10 +145,10 @@ public abstract class BaseDateTime /** * Constructs an instance from an Object that represents a datetime, * forcing the time zone to that specified. - *

                  + *

                  * If the object contains no chronology, ISOChronology is used. * If the specified time zone is null, the default zone is used. - *

                  + *

                  * The recognised object types are defined in * {@link org.joda.time.convert.ConverterManager ConverterManager} and * include ReadableInstant, String, Calendar and Date. @@ -168,9 +168,9 @@ public abstract class BaseDateTime /** * Constructs an instance from an Object that represents a datetime, * using the specified chronology. - *

                  + *

                  * If the chronology is null, ISO in the default time zone is used. - *

                  + *

                  * The recognised object types are defined in * {@link org.joda.time.convert.ConverterManager ConverterManager} and * include ReadableInstant, String, Calendar and Date. @@ -215,7 +215,7 @@ public abstract class BaseDateTime /** * Constructs an instance from datetime field values * using ISOChronology in the specified time zone. - *

                  + *

                  * If the specified time zone is null, the default zone is used. * * @param year the year @@ -243,7 +243,7 @@ public abstract class BaseDateTime /** * Constructs an instance from datetime field values * using the specified chronology. - *

                  + *

                  * If the chronology is null, ISOChronology * in the default time zone is used. * @@ -277,7 +277,7 @@ public abstract class BaseDateTime /** * Checks the specified chronology before storing it, potentially altering it. * This method must not access any instance variables. - *

                  + *

                  * This implementation converts nulls to ISOChronology in the default zone. * * @param chronology the chronology to use, may be null @@ -290,7 +290,7 @@ public abstract class BaseDateTime /** * Checks the specified instant before storing it, potentially altering it. * This method must not access any instance variables. - *

                  + *

                  * This implementation simply returns the instant. * * @param instant the milliseconds from 1970-01-01T00:00:00Z to round @@ -328,7 +328,7 @@ public abstract class BaseDateTime /** * Sets the milliseconds of the datetime. - *

                  + *

                  * All changes to the millisecond field occurs via this method. * Override and block this method to make a subclass immutable. * @@ -340,7 +340,7 @@ public abstract class BaseDateTime /** * Sets the chronology of the datetime. - *

                  + *

                  * All changes to the chronology field occurs via this method. * Override and block this method to make a subclass immutable. * diff --git a/core/src/test/java/org/elasticsearch/bwcompat/BasicBackwardsCompatibilityIT.java b/core/src/test/java/org/elasticsearch/bwcompat/BasicBackwardsCompatibilityIT.java index 76a31bcf202..5d65bf4556a 100644 --- a/core/src/test/java/org/elasticsearch/bwcompat/BasicBackwardsCompatibilityIT.java +++ b/core/src/test/java/org/elasticsearch/bwcompat/BasicBackwardsCompatibilityIT.java @@ -77,7 +77,7 @@ import static org.hamcrest.Matchers.*; public class BasicBackwardsCompatibilityIT extends ESBackcompatTestCase { /** - * Basic test using Index & Realtime Get with external versioning. This test ensures routing works correctly across versions. + * Basic test using Index & Realtime Get with external versioning. This test ensures routing works correctly across versions. */ @Test public void testExternalVersion() throws Exception { @@ -101,7 +101,7 @@ public class BasicBackwardsCompatibilityIT extends ESBackcompatTestCase { } /** - * Basic test using Index & Realtime Get with internal versioning. This test ensures routing works correctly across versions. + * Basic test using Index & Realtime Get with internal versioning. This test ensures routing works correctly across versions. */ @Test public void testInternalVersion() throws Exception { diff --git a/core/src/test/java/org/elasticsearch/common/geo/GeoJSONShapeParserTests.java b/core/src/test/java/org/elasticsearch/common/geo/GeoJSONShapeParserTests.java index 53463e56056..94666d8c252 100644 --- a/core/src/test/java/org/elasticsearch/common/geo/GeoJSONShapeParserTests.java +++ b/core/src/test/java/org/elasticsearch/common/geo/GeoJSONShapeParserTests.java @@ -44,7 +44,7 @@ import static org.elasticsearch.common.geo.builders.ShapeBuilder.SPATIAL_CONTEXT /** - * Tests for {@link GeoJSONShapeParser} + * Tests for {@code GeoJSONShapeParser} */ public class GeoJSONShapeParserTests extends ESTestCase { diff --git a/core/src/test/java/org/elasticsearch/common/inject/ModuleTestCase.java b/core/src/test/java/org/elasticsearch/common/inject/ModuleTestCase.java index 3d4eaf92812..eeac5463dbb 100644 --- a/core/src/test/java/org/elasticsearch/common/inject/ModuleTestCase.java +++ b/core/src/test/java/org/elasticsearch/common/inject/ModuleTestCase.java @@ -80,7 +80,7 @@ public abstract class ModuleTestCase extends ESTestCase { } /** - * Configures the module and checks a Map of the "to" class + * Configures the module and checks a Map<String, Class> of the "to" class * is bound to "theClass". */ public void assertMapMultiBinding(Module module, Class to, Class theClass) { diff --git a/core/src/test/java/org/elasticsearch/common/rounding/RoundingTests.java b/core/src/test/java/org/elasticsearch/common/rounding/RoundingTests.java index b3a2cea2121..53998c5cadf 100644 --- a/core/src/test/java/org/elasticsearch/common/rounding/RoundingTests.java +++ b/core/src/test/java/org/elasticsearch/common/rounding/RoundingTests.java @@ -62,8 +62,8 @@ public class RoundingTests extends ESTestCase { /** * Simple test case to illustrate how Rounding.Offset works on readable input. - * offset shifts input value back before rounding (so here 6 - 7 -> -1) - * then shifts rounded Value back (here -10 -> -3) + * offset shifts input value back before rounding (so here 6 - 7 -> -1) + * then shifts rounded Value back (here -10 -> -3) */ @Test public void testOffsetRounding() { diff --git a/core/src/test/java/org/elasticsearch/common/rounding/TimeZoneRoundingTests.java b/core/src/test/java/org/elasticsearch/common/rounding/TimeZoneRoundingTests.java index 4e42c68aade..cc6f9cb1c11 100644 --- a/core/src/test/java/org/elasticsearch/common/rounding/TimeZoneRoundingTests.java +++ b/core/src/test/java/org/elasticsearch/common/rounding/TimeZoneRoundingTests.java @@ -72,7 +72,7 @@ public class TimeZoneRoundingTests extends ESTestCase { } /** - * test TimeIntervalTimeZoneRounding, (interval < 12h) with time zone shift + * test TimeIntervalTimeZoneRounding, (interval < 12h) with time zone shift */ @Test public void testTimeIntervalTimeZoneRounding() { @@ -88,7 +88,7 @@ public class TimeZoneRoundingTests extends ESTestCase { } /** - * test DayIntervalTimeZoneRounding, (interval >= 12h) with time zone shift + * test DayIntervalTimeZoneRounding, (interval >= 12h) with time zone shift */ @Test public void testDayIntervalTimeZoneRounding() { diff --git a/core/src/test/java/org/elasticsearch/discovery/DiscoveryWithServiceDisruptionsIT.java b/core/src/test/java/org/elasticsearch/discovery/DiscoveryWithServiceDisruptionsIT.java index e5de3be0788..633070c6645 100644 --- a/core/src/test/java/org/elasticsearch/discovery/DiscoveryWithServiceDisruptionsIT.java +++ b/core/src/test/java/org/elasticsearch/discovery/DiscoveryWithServiceDisruptionsIT.java @@ -179,8 +179,6 @@ public class DiscoveryWithServiceDisruptionsIT extends ESIntegTestCase { /** * Test that no split brain occurs under partial network partition. See https://github.com/elasticsearch/elasticsearch/issues/2488 - * - * @throws Exception */ @Test public void failWithMinimumMasterNodesConfigured() throws Exception { @@ -402,8 +400,8 @@ public class DiscoveryWithServiceDisruptionsIT extends ESIntegTestCase { /** * Test that we do not loose document whose indexing request was successful, under a randomly selected disruption scheme - * We also collect & report the type of indexing failures that occur. - *

                  + * We also collect & report the type of indexing failures that occur. + *

                  * This test is a superset of tests run in the Jepsen test suite, with the exception of versioned updates */ @Test @@ -693,8 +691,6 @@ public class DiscoveryWithServiceDisruptionsIT extends ESIntegTestCase { /** * Test that a document which is indexed on the majority side of a partition, is available from the minority side, * once the partition is healed - * - * @throws Exception */ @Test @TestLogging(value = "cluster.service:TRACE") diff --git a/core/src/test/java/org/elasticsearch/index/IndexWithShadowReplicasIT.java b/core/src/test/java/org/elasticsearch/index/IndexWithShadowReplicasIT.java index 159576d6c55..0cbcaf9c2d3 100644 --- a/core/src/test/java/org/elasticsearch/index/IndexWithShadowReplicasIT.java +++ b/core/src/test/java/org/elasticsearch/index/IndexWithShadowReplicasIT.java @@ -556,7 +556,6 @@ public class IndexWithShadowReplicasIT extends ESIntegTestCase { /** * Tests that shadow replicas can be "naturally" rebalanced and relocated * around the cluster. By "naturally" I mean without using the reroute API - * @throws Exception */ @Test public void testShadowReplicaNaturalRelocation() throws Exception { diff --git a/core/src/test/java/org/elasticsearch/index/mapper/geo/GeoShapeFieldMapperTests.java b/core/src/test/java/org/elasticsearch/index/mapper/geo/GeoShapeFieldMapperTests.java index 2fe59786393..26f7129e0a9 100644 --- a/core/src/test/java/org/elasticsearch/index/mapper/geo/GeoShapeFieldMapperTests.java +++ b/core/src/test/java/org/elasticsearch/index/mapper/geo/GeoShapeFieldMapperTests.java @@ -65,7 +65,6 @@ public class GeoShapeFieldMapperTests extends ESSingleNodeTestCase { /** * Test that orientation parameter correctly parses - * @throws IOException */ public void testOrientationParsing() throws IOException { String mapping = XContentFactory.jsonBuilder().startObject().startObject("type1") @@ -104,7 +103,6 @@ public class GeoShapeFieldMapperTests extends ESSingleNodeTestCase { /** * Test that orientation parameter correctly parses - * @throws IOException */ public void testCoerceParsing() throws IOException { String mapping = XContentFactory.jsonBuilder().startObject().startObject("type1") diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/DateHistogramIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/DateHistogramIT.java index d5834c92657..37fff46f5dd 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/DateHistogramIT.java +++ b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/DateHistogramIT.java @@ -645,7 +645,7 @@ public class DateHistogramIT extends ESIntegTestCase { /** * The script will change to document date values to the following: - *

                  + *

                  * doc 1: [ Feb 2, Mar 3] * doc 2: [ Mar 2, Apr 3] * doc 3: [ Mar 15, Apr 16] @@ -700,7 +700,7 @@ public class DateHistogramIT extends ESIntegTestCase { /** * The script will change to document date values to the following: - *

                  + *

                  * doc 1: [ Feb 2, Mar 3] * doc 2: [ Mar 2, Apr 3] * doc 3: [ Mar 15, Apr 16] diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/DateHistogramOffsetIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/DateHistogramOffsetIT.java index d0d91b8d66a..08e07677fa3 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/DateHistogramOffsetIT.java +++ b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/DateHistogramOffsetIT.java @@ -132,7 +132,6 @@ public class DateHistogramOffsetIT extends ESIntegTestCase { /** * Set offset so day buckets start at 6am. Index first 12 hours for two days, with one day gap. - * @throws Exception */ @Test public void singleValue_WithOffset_MinDocCount() throws Exception { diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/PipelineAggregationHelperTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/PipelineAggregationHelperTests.java index c26ac8db81b..e962e90830f 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/PipelineAggregationHelperTests.java +++ b/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/PipelineAggregationHelperTests.java @@ -44,7 +44,6 @@ public class PipelineAggregationHelperTests extends ESTestCase { * @param size Size of mock histogram to generate (in buckets) * @param gapProbability Probability of generating an empty bucket. 0.0-1.0 inclusive * @param runProbability Probability of extending a gap once one has been created. 0.0-1.0 inclusive - * @return */ public static ArrayList generateHistogram(int interval, int size, double gapProbability, double runProbability) { ArrayList values = new ArrayList<>(size); @@ -109,7 +108,6 @@ public class PipelineAggregationHelperTests extends ESTestCase { * * @param values Array of values to compute metric for * @param metric A metric builder which defines what kind of metric should be returned for the values - * @return */ public static double calculateMetric(double[] values, ValuesSourceMetricsAggregationBuilder metric) { diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/moving/avg/MovAvgIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/moving/avg/MovAvgIT.java index d139e38a787..fe942dc9a52 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/moving/avg/MovAvgIT.java +++ b/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/moving/avg/MovAvgIT.java @@ -235,7 +235,6 @@ public class MovAvgIT extends ESIntegTestCase { * Simple, unweighted moving average * * @param window Window of values to compute movavg for - * @return */ private double simple(Collection window) { double movAvg = 0; @@ -250,7 +249,6 @@ public class MovAvgIT extends ESIntegTestCase { * Linearly weighted moving avg * * @param window Window of values to compute movavg for - * @return */ private double linear(Collection window) { double avg = 0; @@ -269,7 +267,6 @@ public class MovAvgIT extends ESIntegTestCase { * Exponentionally weighted (EWMA, Single exponential) moving avg * * @param window Window of values to compute movavg for - * @return */ private double ewma(Collection window) { double avg = 0; @@ -289,7 +286,6 @@ public class MovAvgIT extends ESIntegTestCase { /** * Holt-Linear (Double exponential) moving avg * @param window Window of values to compute movavg for - * @return */ private double holt(Collection window) { double s = 0; @@ -323,7 +319,6 @@ public class MovAvgIT extends ESIntegTestCase { /** * Holt winters (triple exponential) moving avg * @param window Window of values to compute movavg for - * @return */ private double holtWinters(Collection window) { // Smoothed value @@ -1346,11 +1341,6 @@ public class MovAvgIT extends ESIntegTestCase { * Better floating point comparisons courtesy of https://github.com/brazzy/floating-point-gui.de * * Snippet adapted to use doubles instead of floats - * - * @param a - * @param b - * @param epsilon - * @return */ private static boolean nearlyEqual(double a, double b, double epsilon) { final double absA = Math.abs(a); diff --git a/core/src/test/java/org/elasticsearch/search/geo/GeoShapeIntegrationIT.java b/core/src/test/java/org/elasticsearch/search/geo/GeoShapeIntegrationIT.java index 5607266398b..feb3322d7ef 100644 --- a/core/src/test/java/org/elasticsearch/search/geo/GeoShapeIntegrationIT.java +++ b/core/src/test/java/org/elasticsearch/search/geo/GeoShapeIntegrationIT.java @@ -420,7 +420,6 @@ public class GeoShapeIntegrationIT extends ESIntegTestCase { /** * Test that orientation parameter correctly persists across cluster restart - * @throws IOException */ public void testOrientationPersistence() throws Exception { String idxName = "orientation"; diff --git a/core/src/test/java/org/elasticsearch/search/suggest/SuggestSearchIT.java b/core/src/test/java/org/elasticsearch/search/suggest/SuggestSearchIT.java index 1359f97ef86..e55a736a1de 100644 --- a/core/src/test/java/org/elasticsearch/search/suggest/SuggestSearchIT.java +++ b/core/src/test/java/org/elasticsearch/search/suggest/SuggestSearchIT.java @@ -869,7 +869,7 @@ public class SuggestSearchIT extends ESIntegTestCase { } /** - * Searching for a rare phrase shouldn't provide any suggestions if confidence > 1. This was possible before we rechecked the cutoff + * Searching for a rare phrase shouldn't provide any suggestions if confidence > 1. This was possible before we rechecked the cutoff * score during the reduce phase. Failures don't occur every time - maybe two out of five tries but we don't repeat it to save time. */ @Test @@ -937,7 +937,7 @@ public class SuggestSearchIT extends ESIntegTestCase { } /** - * If the suggester finds tons of options then picking the right one is slow without <<>>. + * If the suggester finds tons of options then picking the right one is slow without <<<INSERT SOLUTION HERE>>>. */ @Test @Nightly diff --git a/core/src/test/java/org/elasticsearch/test/ESIntegTestCase.java b/core/src/test/java/org/elasticsearch/test/ESIntegTestCase.java index 4d14f49cb73..40b902589c8 100644 --- a/core/src/test/java/org/elasticsearch/test/ESIntegTestCase.java +++ b/core/src/test/java/org/elasticsearch/test/ESIntegTestCase.java @@ -160,9 +160,9 @@ import static org.hamcrest.Matchers.*; *

                • {@link Scope#TEST} - uses a new cluster for each individual test method.
                • *
                • {@link Scope#SUITE} - uses a cluster shared across all test methods in the same suite
                • *
                - *

                + *

                * The most common test scope is {@link Scope#SUITE} which shares a cluster per test suite. - *

                + *

                * If the test methods need specific node settings or change persistent and/or transient cluster settings {@link Scope#TEST} * should be used. To configure a scope for the test cluster the {@link ClusterScope} annotation * should be used, here is an example: @@ -172,25 +172,23 @@ import static org.hamcrest.Matchers.*; * @Test public void testMethod() {} * } *

                - *

                + *

                * If no {@link ClusterScope} annotation is present on an integration test the default scope is {@link Scope#SUITE} - *

                + *

                * A test cluster creates a set of nodes in the background before the test starts. The number of nodes in the cluster is * determined at random and can change across tests. The {@link ClusterScope} allows configuring the initial number of nodes * that are created before the tests start. - *

                *

                  * @ClusterScope(scope=Scope.SUITE, numDataNodes=3)
                  * public class SomeIT extends ESIntegTestCase {
                  * @Test public void testMethod() {}
                  * }
                  * 
                - *

                + *

                * Note, the {@link ESIntegTestCase} uses randomized settings on a cluster and index level. For instance * each test might use different directory implementation for each test or will return a random client to one of the * nodes in the cluster for each call to {@link #client()}. Test failures might only be reproducible if the correct * system properties are passed to the test execution environment. - *

                *

                * This class supports the following system properties (passed with -Dkey=value to the application) *

                  @@ -199,7 +197,6 @@ import static org.hamcrest.Matchers.*; * useful to test the system without asserting modules that to make sure they don't hide any bugs in production. *
                • - a random seed used to initialize the index random context. *
                - *

                */ @LuceneTestCase.SuppressFileSystems("ExtrasFS") // doesn't work with potential multi data path from test cluster yet public abstract class ESIntegTestCase extends ESTestCase { @@ -211,7 +208,7 @@ public abstract class ESIntegTestCase extends ESTestCase { /** * Annotation for third-party integration tests. - *

                + *

                * These are tests the require a third-party service in order to run. They * may require the user to manually configure an external process (such as rabbitmq), * or may additionally require some external configuration (e.g. AWS credentials) @@ -964,7 +961,6 @@ public abstract class ESIntegTestCase extends ESTestCase { * * @param numDocs number of documents to wait for. * @return the actual number of docs seen. - * @throws InterruptedException */ public long waitForDocs(final long numDocs) throws InterruptedException { return waitForDocs(numDocs, null); @@ -977,7 +973,6 @@ public abstract class ESIntegTestCase extends ESTestCase { * @param indexer a {@link org.elasticsearch.test.BackgroundIndexer}. If supplied it will be first checked for documents indexed. * This saves on unneeded searches. * @return the actual number of docs seen. - * @throws InterruptedException */ public long waitForDocs(final long numDocs, final @Nullable BackgroundIndexer indexer) throws InterruptedException { // indexing threads can wait for up to ~1m before retrying when they first try to index into a shard which is not STARTED. @@ -993,7 +988,6 @@ public abstract class ESIntegTestCase extends ESTestCase { * @param indexer a {@link org.elasticsearch.test.BackgroundIndexer}. If supplied it will be first checked for documents indexed. * This saves on unneeded searches. * @return the actual number of docs seen. - * @throws InterruptedException */ public long waitForDocs(final long numDocs, int maxWaitTime, TimeUnit maxWaitTimeUnit, final @Nullable BackgroundIndexer indexer) throws InterruptedException { @@ -1219,11 +1213,10 @@ public abstract class ESIntegTestCase extends ESTestCase { /** * Syntactic sugar for: - *

                *

                      *   return client().prepareIndex(index, type, id).setSource(source).execute().actionGet();
                      * 
                - *

                + *

                * where source is a String. */ protected final IndexResponse index(String index, String type, String id, String source) { diff --git a/core/src/test/java/org/elasticsearch/test/ESTestCase.java b/core/src/test/java/org/elasticsearch/test/ESTestCase.java index dd60e960722..a1c511dc2a2 100644 --- a/core/src/test/java/org/elasticsearch/test/ESTestCase.java +++ b/core/src/test/java/org/elasticsearch/test/ESTestCase.java @@ -241,7 +241,7 @@ public abstract class ESTestCase extends LuceneTestCase { /** * Returns a "scaled" random number between min and max (inclusive). * - * @see RandomizedTest#scaledRandomIntBetween(int, int); + * @see RandomizedTest#scaledRandomIntBetween(int, int) */ public static int scaledRandomIntBetween(int min, int max) { return RandomizedTest.scaledRandomIntBetween(min, max); diff --git a/core/src/test/java/org/elasticsearch/test/rest/section/GreaterThanAssertion.java b/core/src/test/java/org/elasticsearch/test/rest/section/GreaterThanAssertion.java index a1360566852..ade7fbd59ca 100644 --- a/core/src/test/java/org/elasticsearch/test/rest/section/GreaterThanAssertion.java +++ b/core/src/test/java/org/elasticsearch/test/rest/section/GreaterThanAssertion.java @@ -28,7 +28,7 @@ import static org.junit.Assert.fail; /** * Represents a gt assert section: - *

                + *

                * - gt: { fields._ttl: 0} */ public class GreaterThanAssertion extends Assertion { diff --git a/core/src/test/java/org/elasticsearch/test/rest/section/LengthAssertion.java b/core/src/test/java/org/elasticsearch/test/rest/section/LengthAssertion.java index 4e81618c765..265487a0388 100644 --- a/core/src/test/java/org/elasticsearch/test/rest/section/LengthAssertion.java +++ b/core/src/test/java/org/elasticsearch/test/rest/section/LengthAssertion.java @@ -30,7 +30,7 @@ import static org.junit.Assert.assertThat; /** * Represents a length assert section: - *

                + *

                * - length: { hits.hits: 1 } */ public class LengthAssertion extends Assertion { diff --git a/plugins/analysis-icu/src/main/java/org/elasticsearch/index/analysis/ICUCollationKeyFilter.java b/plugins/analysis-icu/src/main/java/org/elasticsearch/index/analysis/ICUCollationKeyFilter.java index d55be9203e0..674ae8b8f12 100644 --- a/plugins/analysis-icu/src/main/java/org/elasticsearch/index/analysis/ICUCollationKeyFilter.java +++ b/plugins/analysis-icu/src/main/java/org/elasticsearch/index/analysis/ICUCollationKeyFilter.java @@ -23,6 +23,7 @@ import com.ibm.icu.text.RawCollationKey; import org.apache.lucene.analysis.TokenFilter; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.tokenattributes.CharTermAttribute; +import org.apache.lucene.collation.ICUCollationDocValuesField; import java.io.IOException; @@ -63,7 +64,7 @@ import java.io.IOException; * generation timing and key length comparisons between ICU4J and * java.text.Collator over several languages. *

                - * @deprecated Use {@link ICUCollationAttributeFactory} instead, which encodes + * @deprecated Use {@link ICUCollationDocValuesField} instead, which encodes * terms directly as bytes. This filter WAS removed in Lucene 5.0 */ @Deprecated diff --git a/plugins/analysis-icu/src/main/java/org/elasticsearch/index/analysis/IcuCollationTokenFilterFactory.java b/plugins/analysis-icu/src/main/java/org/elasticsearch/index/analysis/IcuCollationTokenFilterFactory.java index ec720f706bf..ca4be807278 100644 --- a/plugins/analysis-icu/src/main/java/org/elasticsearch/index/analysis/IcuCollationTokenFilterFactory.java +++ b/plugins/analysis-icu/src/main/java/org/elasticsearch/index/analysis/IcuCollationTokenFilterFactory.java @@ -37,11 +37,9 @@ import java.nio.file.Files; /** * An ICU based collation token filter. There are two ways to configure collation: - *

                *

                The first is simply specifying the locale (defaults to the default locale). The language * parameter is the lowercase two-letter ISO-639 code. An additional country and variant * can be provided. - *

                *

                The second option is to specify collation rules as defined in the * Collation customization chapter in icu docs. The rules parameter can either embed the rules definition * in the settings or refer to an external location (preferable located under the config location, relative to it). diff --git a/plugins/analysis-icu/src/main/java/org/elasticsearch/index/analysis/IcuNormalizerCharFilterFactory.java b/plugins/analysis-icu/src/main/java/org/elasticsearch/index/analysis/IcuNormalizerCharFilterFactory.java index 337461c5095..d8fec090a3f 100644 --- a/plugins/analysis-icu/src/main/java/org/elasticsearch/index/analysis/IcuNormalizerCharFilterFactory.java +++ b/plugins/analysis-icu/src/main/java/org/elasticsearch/index/analysis/IcuNormalizerCharFilterFactory.java @@ -33,7 +33,6 @@ import java.io.Reader; /** * Uses the {@link org.apache.lucene.analysis.icu.ICUNormalizer2CharFilter} to normalize character. - *

                *

                The name can be used to provide the type of normalization to perform.

                *

                The mode can be used to provide 'compose' or 'decompose'. Default is compose.

                */ diff --git a/plugins/analysis-icu/src/main/java/org/elasticsearch/index/analysis/IcuNormalizerTokenFilterFactory.java b/plugins/analysis-icu/src/main/java/org/elasticsearch/index/analysis/IcuNormalizerTokenFilterFactory.java index 7f25886fc1d..c27fc1d16a9 100644 --- a/plugins/analysis-icu/src/main/java/org/elasticsearch/index/analysis/IcuNormalizerTokenFilterFactory.java +++ b/plugins/analysis-icu/src/main/java/org/elasticsearch/index/analysis/IcuNormalizerTokenFilterFactory.java @@ -30,7 +30,6 @@ import org.elasticsearch.index.settings.IndexSettings; /** * Uses the {@link org.apache.lucene.analysis.icu.ICUNormalizer2Filter} to normalize tokens. - *

                *

                The name can be used to provide the type of normalization to perform. * * diff --git a/plugins/analysis-icu/src/main/java/org/elasticsearch/index/analysis/IndexableBinaryStringTools.java b/plugins/analysis-icu/src/main/java/org/elasticsearch/index/analysis/IndexableBinaryStringTools.java index b8ae222e39a..a114a34d7dd 100644 --- a/plugins/analysis-icu/src/main/java/org/elasticsearch/index/analysis/IndexableBinaryStringTools.java +++ b/plugins/analysis-icu/src/main/java/org/elasticsearch/index/analysis/IndexableBinaryStringTools.java @@ -22,20 +22,20 @@ import org.apache.lucene.analysis.tokenattributes.TermToBytesRefAttribute; // ja /** * Provides support for converting byte sequences to Strings and back again. * The resulting Strings preserve the original byte sequences' sort order. - *

                + *

                * The Strings are constructed using a Base 8000h encoding of the original * binary data - each char of an encoded String represents a 15-bit chunk * from the byte sequence. Base 8000h was chosen because it allows for all * lower 15 bits of char to be used without restriction; the surrogate range * [U+D8000-U+DFFF] does not represent valid chars, and would require * complicated handling to avoid them and allow use of char's high bit. - *

                + *

                * Although unset bits are used as padding in the final char, the original * byte sequence could contain trailing bytes with no set bits (null bytes): * padding is indistinguishable from valid information. To overcome this * problem, a char is appended, indicating the number of encoded bytes in the * final content char. - *

                + *

                * * @lucene.experimental * @deprecated Implement {@link TermToBytesRefAttribute} and store bytes directly diff --git a/plugins/analysis-phonetic/src/main/java/org/elasticsearch/index/analysis/phonetic/HaasePhonetik.java b/plugins/analysis-phonetic/src/main/java/org/elasticsearch/index/analysis/phonetic/HaasePhonetik.java index 880bc00cace..728a9354d97 100644 --- a/plugins/analysis-phonetic/src/main/java/org/elasticsearch/index/analysis/phonetic/HaasePhonetik.java +++ b/plugins/analysis-phonetic/src/main/java/org/elasticsearch/index/analysis/phonetic/HaasePhonetik.java @@ -42,28 +42,16 @@ public class HaasePhonetik extends KoelnerPhonetik { private final static String[] HAASE_VARIATIONS_REPLACEMENTS = {"AUN", "RW", "RSK", "AR", "OW", "CH", "LI", "O", "SCH", "O", "O", "I"}; - /** - * - * @return - */ @Override protected String[] getPatterns() { return HAASE_VARIATIONS_PATTERNS; } - /** - * - * @return - */ @Override protected String[] getReplacements() { return HAASE_VARIATIONS_REPLACEMENTS; } - /** - * - * @return - */ @Override protected char getCode() { return '9'; diff --git a/plugins/analysis-phonetic/src/main/java/org/elasticsearch/index/analysis/phonetic/KoelnerPhonetik.java b/plugins/analysis-phonetic/src/main/java/org/elasticsearch/index/analysis/phonetic/KoelnerPhonetik.java index a3190fa4686..e70722c9b48 100644 --- a/plugins/analysis-phonetic/src/main/java/org/elasticsearch/index/analysis/phonetic/KoelnerPhonetik.java +++ b/plugins/analysis-phonetic/src/main/java/org/elasticsearch/index/analysis/phonetic/KoelnerPhonetik.java @@ -60,10 +60,6 @@ public class KoelnerPhonetik implements StringEncoder { init(); } - /** - * - * @param useOnlyPrimaryCode - */ public KoelnerPhonetik(boolean useOnlyPrimaryCode) { this(); this.primary = useOnlyPrimaryCode; @@ -78,28 +74,14 @@ public class KoelnerPhonetik implements StringEncoder { return POSTEL_VARIATIONS_PATTERNS; } - /** - * - * @return - */ protected String[] getReplacements() { return POSTEL_VARIATIONS_REPLACEMENTS; } - /** - * - * @return - */ protected char getCode() { return '0'; } - /** - * - * @param o1 - * @param o2 - * @return - */ public double getRelativeValue(Object o1, Object o2) { String[] kopho1 = code(expandUmlauts(o1.toString().toUpperCase(Locale.GERMANY))); String[] kopho2 = code(expandUmlauts(o2.toString().toUpperCase(Locale.GERMANY))); @@ -290,20 +272,10 @@ public class KoelnerPhonetik implements StringEncoder { return s; } - /** - * - * @param str - * @return - */ private String expandUmlauts(String str) { return str.replaceAll("\u00C4", "AE").replaceAll("\u00D6", "OE").replaceAll("\u00DC", "UE"); } - /** - * - * @param str - * @return - */ private String removeSequences(String str) { if (str == null || str.length() == 0) { return ""; diff --git a/plugins/analysis-phonetic/src/main/java/org/elasticsearch/index/analysis/phonetic/Nysiis.java b/plugins/analysis-phonetic/src/main/java/org/elasticsearch/index/analysis/phonetic/Nysiis.java index 3b85ef43915..894d5d8bd3e 100644 --- a/plugins/analysis-phonetic/src/main/java/org/elasticsearch/index/analysis/phonetic/Nysiis.java +++ b/plugins/analysis-phonetic/src/main/java/org/elasticsearch/index/analysis/phonetic/Nysiis.java @@ -38,33 +38,33 @@ import java.util.regex.Pattern; *

                Algorithm description: *

                  * 1. Transcode first characters of name
                - *   1a. MAC ->   MCC
                - *   1b. KN  ->   NN
                - *   1c. K   ->   C
                - *   1d. PH  ->   FF
                - *   1e. PF  ->   FF
                - *   1f. SCH ->   SSS
                + *   1a. MAC ->   MCC
                + *   1b. KN  ->   NN
                + *   1c. K   ->   C
                + *   1d. PH  ->   FF
                + *   1e. PF  ->   FF
                + *   1f. SCH ->   SSS
                  * 2. Transcode last characters of name
                - *   2a. EE, IE          ->   Y
                - *   2b. DT,RT,RD,NT,ND  ->   D
                + *   2a. EE, IE          ->   Y
                + *   2b. DT,RT,RD,NT,ND  ->   D
                  * 3. First character of key = first character of name
                  * 4. Transcode remaining characters by following these rules, incrementing by one character each time
                - *   4a. EV  ->   AF  else A,E,I,O,U -> A
                - *   4b. Q   ->   G
                - *   4c. Z   ->   S
                - *   4d. M   ->   N
                - *   4e. KN  ->   N   else K -> C
                - *   4f. SCH ->   SSS
                - *   4g. PH  ->   FF
                - *   4h. H   ->   If previous or next is nonvowel, previous
                - *   4i. W   ->   If previous is vowel, previous
                + *   4a. EV  ->   AF  else A,E,I,O,U -> A
                + *   4b. Q   ->   G
                + *   4c. Z   ->   S
                + *   4d. M   ->   N
                + *   4e. KN  ->   N   else K -> C
                + *   4f. SCH ->   SSS
                + *   4g. PH  ->   FF
                + *   4h. H   ->   If previous or next is nonvowel, previous
                + *   4i. W   ->   If previous is vowel, previous
                  *   4j. Add current to key if current != last key character
                  * 5. If last character is S, remove it
                  * 6. If last characters are AY, replace with Y
                  * 7. If last character is A, remove it
                  * 8. Collapse all strings of repeated characters
                  * 9. Add original first character of name as first character of key
                - * 

                + *
                * * @see NYSIIS on Wikipedia * @see NYSIIS on dropby.com diff --git a/plugins/delete-by-query/src/main/java/org/elasticsearch/action/deletebyquery/DeleteByQueryRequest.java b/plugins/delete-by-query/src/main/java/org/elasticsearch/action/deletebyquery/DeleteByQueryRequest.java index c54cdc590a9..4c29e7c9ad8 100644 --- a/plugins/delete-by-query/src/main/java/org/elasticsearch/action/deletebyquery/DeleteByQueryRequest.java +++ b/plugins/delete-by-query/src/main/java/org/elasticsearch/action/deletebyquery/DeleteByQueryRequest.java @@ -49,22 +49,22 @@ import static org.elasticsearch.search.Scroll.readScroll; * and is not part of elasticsearch core. In contrast to the previous, in-core, implementation delete-by-query now * uses scan/scroll and the returned IDs do delete all documents matching the query. This can have performance * as well as visibility implications. Delete-by-query now has the following semantics: - *
              • - *
                  it's non-actomic, a delete-by-query may fail at any time while some documents matching the query have already been deleted
                - *
                  it's try-once, a delete-by-query may fail at any time and will not retry it's execution. All retry logic is left to the user
                - *
                  it's syntactic sugar, a delete-by-query is equivalent to a scan/scroll search and corresponding bulk-deletes by ID
                - *
                  it's executed on a point-in-time snapshot, a delete-by-query will only delete the documents that are visible at the point in time the delete-by-query was started, equivalent to the scan/scroll API
                - *
                  it's consistent, a delete-by-query will yield consistent results across all replicas of a shard
                - *
                  it's forward-compativle, a delete-by-query will only send IDs to the shards as deletes such that no queries are stored in the transaction logs that might not be supported in the future.
                - *
                  it's results won't be visible until the user refreshes the index.
                - *
              • + *
                  + *
                • it's non-actomic, a delete-by-query may fail at any time while some documents matching the query have already been deleted
                • + *
                • it's try-once, a delete-by-query may fail at any time and will not retry it's execution. All retry logic is left to the user
                • + *
                • it's syntactic sugar, a delete-by-query is equivalent to a scan/scroll search and corresponding bulk-deletes by ID
                • + *
                • it's executed on a point-in-time snapshot, a delete-by-query will only delete the documents that are visible at the point in time the delete-by-query was started, equivalent to the scan/scroll API
                • + *
                • it's consistent, a delete-by-query will yield consistent results across all replicas of a shard
                • + *
                • it's forward-compativle, a delete-by-query will only send IDs to the shards as deletes such that no queries are stored in the transaction logs that might not be supported in the future.
                • + *
                • it's results won't be visible until the user refreshes the index.
                • + *
                * * The main reason why delete-by-query is now extracted as a plugin are: - *
              • - *
                  forward-compatibility, the previous implementation was prone to store unsupported queries in the transaction logs which is equvalent to data-loss
                - *
                  consistency & correctness, the previous implementation was prone to produce different results on a shards replica which can essentially result in a corrupted index
                - *
                  resiliency, the previous implementation could cause OOM errors, merge-storms and dramatic slowdowns if used incorrectly
                - *
              • + *
                  + *
                • forward-compatibility, the previous implementation was prone to store unsupported queries in the transaction logs which is equvalent to data-loss
                • + *
                • consistency & correctness, the previous implementation was prone to produce different results on a shards replica which can essentially result in a corrupted index
                • + *
                • resiliency, the previous implementation could cause OOM errors, merge-storms and dramatic slowdowns if used incorrectly
                • + *
                * * While delete-by-query is a very useful feature, it's implementation is very tricky in system that is based on per-document modifications. The move towards * a plugin based solution was mainly done to minimize the risk of cluster failures or corrupted indices which where easily possible wiht the previous implementation. diff --git a/plugins/delete-by-query/src/main/java/org/elasticsearch/action/deletebyquery/DeleteByQueryRequestBuilder.java b/plugins/delete-by-query/src/main/java/org/elasticsearch/action/deletebyquery/DeleteByQueryRequestBuilder.java index 9cf910341d9..651dbbffe0c 100644 --- a/plugins/delete-by-query/src/main/java/org/elasticsearch/action/deletebyquery/DeleteByQueryRequestBuilder.java +++ b/plugins/delete-by-query/src/main/java/org/elasticsearch/action/deletebyquery/DeleteByQueryRequestBuilder.java @@ -50,7 +50,7 @@ public class DeleteByQueryRequestBuilder extends ActionRequestBuilder + *

                * For example indices that don't exist. */ public DeleteByQueryRequestBuilder setIndicesOptions(IndicesOptions options) { diff --git a/plugins/discovery-ec2/src/main/java/org/elasticsearch/cloud/aws/network/Ec2NameResolver.java b/plugins/discovery-ec2/src/main/java/org/elasticsearch/cloud/aws/network/Ec2NameResolver.java index 4acbca4a6d3..f04d3ecc937 100755 --- a/plugins/discovery-ec2/src/main/java/org/elasticsearch/cloud/aws/network/Ec2NameResolver.java +++ b/plugins/discovery-ec2/src/main/java/org/elasticsearch/cloud/aws/network/Ec2NameResolver.java @@ -37,7 +37,7 @@ import java.nio.charset.StandardCharsets; /** * Resolves certain ec2 related 'meta' hostnames into an actual hostname * obtained from ec2 meta-data. - *

                + *

                * Valid config values for {@link Ec2HostnameType}s are - *

                  *
                • _ec2_ - maps to privateIpv4
                • @@ -88,8 +88,7 @@ public class Ec2NameResolver extends AbstractComponent implements CustomNameReso /** * @param type the ec2 hostname type to discover. - * @return the appropriate host resolved from ec2 meta-data. - * @throws IOException if ec2 meta-data cannot be obtained. + * @return the appropriate host resolved from ec2 meta-data, or null if it cannot be obtained. * @see CustomNameResolver#resolveIfPossible(String) */ public InetAddress[] resolve(Ec2HostnameType type, boolean warnOnFailure) { diff --git a/plugins/discovery-multicast/src/main/java/org/elasticsearch/plugin/discovery/multicast/MulticastChannel.java b/plugins/discovery-multicast/src/main/java/org/elasticsearch/plugin/discovery/multicast/MulticastChannel.java index 3ec70a40ef4..ba620ddb3ca 100644 --- a/plugins/discovery-multicast/src/main/java/org/elasticsearch/plugin/discovery/multicast/MulticastChannel.java +++ b/plugins/discovery-multicast/src/main/java/org/elasticsearch/plugin/discovery/multicast/MulticastChannel.java @@ -163,7 +163,7 @@ public abstract class MulticastChannel implements Closeable { public static final String SHARED_CHANNEL_NAME = "#shared#"; /** - * A shared channel that keeps a static map of Config -> Shared channels, and closes shared + * A shared channel that keeps a static map of Config -> Shared channels, and closes shared * channel once their reference count has reached 0. It also handles de-registering relevant * listener from the shared list of listeners. */ diff --git a/plugins/lang-javascript/src/main/java/org/elasticsearch/script/javascript/support/NativeMap.java b/plugins/lang-javascript/src/main/java/org/elasticsearch/script/javascript/support/NativeMap.java index a43ecec0ec8..1dbf3454900 100644 --- a/plugins/lang-javascript/src/main/java/org/elasticsearch/script/javascript/support/NativeMap.java +++ b/plugins/lang-javascript/src/main/java/org/elasticsearch/script/javascript/support/NativeMap.java @@ -41,8 +41,6 @@ public class NativeMap implements Scriptable, Wrapper { /** * Construct * - * @param scope - * @param map * @return native map */ public static NativeMap wrap(Scriptable scope, Map map) { @@ -51,9 +49,6 @@ public class NativeMap implements Scriptable, Wrapper { /** * Construct - * - * @param scope - * @param map */ private NativeMap(Scriptable scope, Map map) { this.parentScope = scope; diff --git a/plugins/lang-javascript/src/main/java/org/elasticsearch/script/javascript/support/ScriptValueConverter.java b/plugins/lang-javascript/src/main/java/org/elasticsearch/script/javascript/support/ScriptValueConverter.java index 7f9c390b270..f3a39896641 100644 --- a/plugins/lang-javascript/src/main/java/org/elasticsearch/script/javascript/support/ScriptValueConverter.java +++ b/plugins/lang-javascript/src/main/java/org/elasticsearch/script/javascript/support/ScriptValueConverter.java @@ -41,7 +41,7 @@ public final class ScriptValueConverter { /** * Convert an object from a script wrapper value to a serializable value valid outside * of the Rhino script processor context. - *

                  + *

                  * This includes converting JavaScript Array objects to Lists of valid objects. * * @param value Value to convert from script wrapper object to external object value. diff --git a/plugins/lang-javascript/src/main/java/org/elasticsearch/script/javascript/support/ScriptableWrappedMap.java b/plugins/lang-javascript/src/main/java/org/elasticsearch/script/javascript/support/ScriptableWrappedMap.java index a7c2f4f5428..9ff1f61c8d5 100644 --- a/plugins/lang-javascript/src/main/java/org/elasticsearch/script/javascript/support/ScriptableWrappedMap.java +++ b/plugins/lang-javascript/src/main/java/org/elasticsearch/script/javascript/support/ScriptableWrappedMap.java @@ -32,7 +32,6 @@ import java.util.Set; * persisted directly to an underlying map supplied on construction. The class automatically * wraps/unwraps JS objects as they enter/leave the underlying map via the Scriptable interface * methods - objects are untouched if accessed via the usual Map interface methods. - *

                  *

                  Access should be by string key only - not integer index - unless you are sure the wrapped * map will maintain insertion order of the elements. * @@ -46,9 +45,6 @@ public class ScriptableWrappedMap implements ScriptableMap, Wrapper { /** * Construction - * - * @param scope - * @param map * @return scriptable wrapped map */ public static ScriptableWrappedMap wrap(Scriptable scope, Map map) { @@ -57,8 +53,6 @@ public class ScriptableWrappedMap implements ScriptableMap, Wrapper { /** * Construct - * - * @param map */ public ScriptableWrappedMap(Map map) { this.map = map; @@ -66,9 +60,6 @@ public class ScriptableWrappedMap implements ScriptableMap, Wrapper { /** * Construct - * - * @param scope - * @param map */ public ScriptableWrappedMap(Scriptable scope, Map map) { this.parentScope = scope; diff --git a/plugins/repository-azure/pom.xml b/plugins/repository-azure/pom.xml index 60c78779161..a6aff7f9cf7 100644 --- a/plugins/repository-azure/pom.xml +++ b/plugins/repository-azure/pom.xml @@ -30,6 +30,7 @@ governing permissions and limitations under the License. --> 1 repository_azure false + -Xlint:-deprecation,-serial diff --git a/plugins/repository-azure/src/main/java/org/elasticsearch/repositories/azure/AzureRepository.java b/plugins/repository-azure/src/main/java/org/elasticsearch/repositories/azure/AzureRepository.java index 5d9cbd92ac3..eb145d850bd 100644 --- a/plugins/repository-azure/src/main/java/org/elasticsearch/repositories/azure/AzureRepository.java +++ b/plugins/repository-azure/src/main/java/org/elasticsearch/repositories/azure/AzureRepository.java @@ -43,7 +43,7 @@ import java.util.List; /** * Azure file system implementation of the BlobStoreRepository - *

                  + *

                  * Azure file system repository supports the following settings: *

                  *
                  {@code container}
                  Azure container name. Defaults to elasticsearch-snapshots
                  diff --git a/plugins/repository-azure/src/test/java/org/elasticsearch/cloud/azure/AbstractAzureRepositoryServiceTestCase.java b/plugins/repository-azure/src/test/java/org/elasticsearch/cloud/azure/AbstractAzureRepositoryServiceTestCase.java index 705b52067cf..a1abded4546 100644 --- a/plugins/repository-azure/src/test/java/org/elasticsearch/cloud/azure/AbstractAzureRepositoryServiceTestCase.java +++ b/plugins/repository-azure/src/test/java/org/elasticsearch/cloud/azure/AbstractAzureRepositoryServiceTestCase.java @@ -47,7 +47,7 @@ public abstract class AbstractAzureRepositoryServiceTestCase extends AbstractAzu return "plugs in a mock storage service for testing"; } public void onModule(AzureRepositoryModule azureRepositoryModule) { - azureRepositoryModule.storageServiceImpl = AzureStorageServiceMock.class; + AzureRepositoryModule.storageServiceImpl = AzureStorageServiceMock.class; } } diff --git a/plugins/repository-s3/pom.xml b/plugins/repository-s3/pom.xml index 44d13076a20..cd68af71da0 100644 --- a/plugins/repository-s3/pom.xml +++ b/plugins/repository-s3/pom.xml @@ -19,7 +19,7 @@ 1 repository_s3 false - -Xlint:-rawtypes + -Xlint:-rawtypes,-deprecation diff --git a/plugins/repository-s3/src/main/java/org/elasticsearch/cloud/aws/InternalAwsS3Service.java b/plugins/repository-s3/src/main/java/org/elasticsearch/cloud/aws/InternalAwsS3Service.java index 474f6c8218d..81b7e315b69 100644 --- a/plugins/repository-s3/src/main/java/org/elasticsearch/cloud/aws/InternalAwsS3Service.java +++ b/plugins/repository-s3/src/main/java/org/elasticsearch/cloud/aws/InternalAwsS3Service.java @@ -43,7 +43,7 @@ import java.util.Map; public class InternalAwsS3Service extends AbstractLifecycleComponent implements AwsS3Service { /** - * (acceskey, endpoint) -> client + * (acceskey, endpoint) -> client */ private Map, AmazonS3Client> clients = new HashMap, AmazonS3Client>(); diff --git a/plugins/repository-s3/src/main/java/org/elasticsearch/cloud/aws/blobstore/DefaultS3OutputStream.java b/plugins/repository-s3/src/main/java/org/elasticsearch/cloud/aws/blobstore/DefaultS3OutputStream.java index 67e6889abb0..dc74315add4 100644 --- a/plugins/repository-s3/src/main/java/org/elasticsearch/cloud/aws/blobstore/DefaultS3OutputStream.java +++ b/plugins/repository-s3/src/main/java/org/elasticsearch/cloud/aws/blobstore/DefaultS3OutputStream.java @@ -38,17 +38,17 @@ import java.util.List; /** * DefaultS3OutputStream uploads data to the AWS S3 service using 2 modes: single and multi part. - *

                  + *

                  * When the length of the chunk is lower than buffer_size, the chunk is uploaded with a single request. * Otherwise multiple requests are made, each of buffer_size (except the last one which can be lower than buffer_size). - *

                  + *

                  * Quick facts about S3: - *

                  + *

                  * Maximum object size: 5 TB * Maximum number of parts per upload: 10,000 * Part numbers: 1 to 10,000 (inclusive) - * Part size: 5 MB to 5 GB, last part can be < 5 MB - *

                  + * Part size: 5 MB to 5 GB, last part can be < 5 MB + *

                  * See http://docs.aws.amazon.com/AmazonS3/latest/dev/qfacts.html * See http://docs.aws.amazon.com/AmazonS3/latest/dev/uploadobjusingmpu.html */ @@ -94,11 +94,6 @@ public class DefaultS3OutputStream extends S3OutputStream { /** * Upload data using a single request. - * - * @param bytes - * @param off - * @param len - * @throws IOException */ private void upload(byte[] bytes, int off, int len) throws IOException { try (ByteArrayInputStream is = new ByteArrayInputStream(bytes, off, len)) { diff --git a/plugins/repository-s3/src/main/java/org/elasticsearch/repositories/s3/S3Repository.java b/plugins/repository-s3/src/main/java/org/elasticsearch/repositories/s3/S3Repository.java index 4be35ba1098..8ee9d35b475 100644 --- a/plugins/repository-s3/src/main/java/org/elasticsearch/repositories/s3/S3Repository.java +++ b/plugins/repository-s3/src/main/java/org/elasticsearch/repositories/s3/S3Repository.java @@ -38,7 +38,7 @@ import java.util.Locale; /** * Shared file system implementation of the BlobStoreRepository - *

                  + *

                  * Shared file system repository supports the following settings *

                  *
                  {@code bucket}
                  S3 bucket
                  @@ -68,7 +68,6 @@ public class S3Repository extends BlobStoreRepository { * @param repositorySettings repository settings * @param indexShardRepository index shard repository * @param s3Service S3 service - * @throws IOException */ @Inject public S3Repository(RepositoryName name, RepositorySettings repositorySettings, IndexShardRepository indexShardRepository, AwsS3Service s3Service) throws IOException { diff --git a/pom.xml b/pom.xml index 9350eb0c7db..54014ee70c0 100644 --- a/pom.xml +++ b/pom.xml @@ -42,6 +42,7 @@ -Xlint:-path + -Xdoclint:-missing 5.4.0 @@ -613,7 +614,9 @@ -XDignore.symbol.file -Xlint:all ${xlint.options} - + -Xdoclint:all/private + ${doclint.options} + ${javac.werror} @@ -1144,6 +1147,23 @@ org.eclipse.jdt.ui.text.custom_code_templates=maven-antrun-plugin 1.8 + + + set-werror + validate + + run + + + + + + + + + true + + check-invalid-patterns validate