From 879779a260cbabd7494efd21efdf289877e39420 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yoann=20Rodi=C3=A8re?= Date: Tue, 19 Feb 2019 11:36:07 +0100 Subject: [PATCH] HSEARCH-3494 Fix invalid javadoc that is no longer accepted in JDK12 --- .../query/engine/impl/QueryFilters.java | 2 +- .../search/query/engine/spi/HSQuery.java | 4 +- .../util/impl/ConcurrentReferenceHashMap.java | 98 +++++++++---------- .../hibernate/search/util/impl/Executors.java | 2 +- .../jsr352/massindexing/MassIndexingJob.java | 8 +- .../org/hibernate/search/MassIndexer.java | 30 +++--- .../spi/MassIndexerWithTenant.java | 2 +- .../hibernate/search/jpa/FullTextQuery.java | 2 +- 8 files changed, 74 insertions(+), 74 deletions(-) diff --git a/engine/src/main/java/org/hibernate/search/query/engine/impl/QueryFilters.java b/engine/src/main/java/org/hibernate/search/query/engine/impl/QueryFilters.java index 27dde1dd543..6081c5eb05e 100644 --- a/engine/src/main/java/org/hibernate/search/query/engine/impl/QueryFilters.java +++ b/engine/src/main/java/org/hibernate/search/query/engine/impl/QueryFilters.java @@ -61,7 +61,7 @@ public List getFilterQueries() { } /** - * @return true if this contains to filters to be applied. + * @return {@code true} if this contains to filters to be applied. */ public boolean isEmpty() { return filterQueries.isEmpty(); diff --git a/engine/src/main/java/org/hibernate/search/query/engine/spi/HSQuery.java b/engine/src/main/java/org/hibernate/search/query/engine/spi/HSQuery.java index 825288fbf8a..66b6e91a6b6 100644 --- a/engine/src/main/java/org/hibernate/search/query/engine/spi/HSQuery.java +++ b/engine/src/main/java/org/hibernate/search/query/engine/spi/HSQuery.java @@ -114,9 +114,9 @@ public interface HSQuery extends ProjectionConstants { /** * Set the first element to retrieve. If not set, elements will be - * retrieved beginning from element 0. + * retrieved beginning from element {@code 0}. * - * @param firstResult a element number, numbered from 0 + * @param firstResult a element number, numbered from {@code 0} * @return {@code this} to allow for method chaining */ HSQuery firstResult(int firstResult); diff --git a/engine/src/main/java/org/hibernate/search/util/impl/ConcurrentReferenceHashMap.java b/engine/src/main/java/org/hibernate/search/util/impl/ConcurrentReferenceHashMap.java index 690a0788be6..5d3ed2eb014 100644 --- a/engine/src/main/java/org/hibernate/search/util/impl/ConcurrentReferenceHashMap.java +++ b/engine/src/main/java/org/hibernate/search/util/impl/ConcurrentReferenceHashMap.java @@ -50,8 +50,8 @@ * discarded by the garbage collector. Once a key has been discarded by the * collector, the corresponding entry is no longer visible to this table; * however, the entry may occupy space until a future table operation decides to - * reclaim it. For this reason, summary functions such as size and - * isEmpty might return a value greater than the observed number of + * reclaim it. For this reason, summary functions such as {@code size} and + * {@code isEmpty} might return a value greater than the observed number of * entries. In order to support a high level of concurrency, stale entries are * only reclaimed during blocking (usually mutating) operations. * @@ -76,19 +76,19 @@ * Just like {@link java.util.concurrent.ConcurrentHashMap}, this class obeys * the same functional specification as {@link java.util.Hashtable}, and * includes versions of methods corresponding to each method of - * Hashtable. However, even though all operations are thread-safe, + * {@code Hashtable}. However, even though all operations are thread-safe, * retrieval operations do not entail locking, and there is * not any support for locking the entire table in a way that * prevents all access. This class is fully interoperable with - * Hashtable in programs that rely on its thread safety but not on + * {@code Hashtable} in programs that rely on its thread safety but not on * its synchronization details. * *

- * Retrieval operations (including get) generally do not block, so - * may overlap with update operations (including put and - * remove). Retrievals reflect the results of the most recently + * Retrieval operations (including {@code get}) generally do not block, so + * may overlap with update operations (including {@code put} and + * {@code remove}). Retrievals reflect the results of the most recently * completed update operations holding upon their onset. For - * aggregate operations such as putAll and clear, + * aggregate operations such as {@code putAll} and {@code clear}, * concurrent retrievals may reflect insertion or removal of only some entries. * Similarly, Iterators and Enumerations return elements reflecting the state of * the hash table at some point at or since the creation of the @@ -98,7 +98,7 @@ * *

* The allowed concurrency among update operations is guided by the optional - * concurrencyLevel constructor argument (default 16), + * {@code concurrencyLevel} constructor argument (default {@code 16}), * which is used as a hint for internal sizing. The table is internally * partitioned to try to permit the indicated number of concurrent updates * without contention. Because placement in hash tables is essentially random, @@ -119,7 +119,7 @@ * *

* Like {@link Hashtable} but unlike {@link HashMap}, this class does - * not allow null to be used as a key or value. + * not allow {@code null} to be used as a key or value. * *

* This class is a member of the @@ -520,8 +520,8 @@ static final class Segment extends ReentrantLock implements Serializable { /** * The table is rehashed when its size exceeds this threshold. - * (The value of this field is always (int)(capacity * - * loadFactor).) + * (The value of this field is always {@code (int)(capacity * + * loadFactor)}.) */ transient int threshold; @@ -1080,9 +1080,9 @@ public ConcurrentReferenceHashMap(Map m) { } /** - * Returns true if this map contains no key-value mappings. + * Returns {@code true} if this map contains no key-value mappings. * - * @return true if this map contains no key-value mappings + * @return {@code true} if this map contains no key-value mappings */ @Override public boolean isEmpty() { @@ -1122,8 +1122,8 @@ public boolean isEmpty() { /** * Returns the number of key-value mappings in this map. If the - * map contains more than Integer.MAX_VALUE elements, returns - * Integer.MAX_VALUE. + * map contains more than {@code Integer.MAX_VALUE} elements, returns + * {@code Integer.MAX_VALUE}. * * @return the number of key-value mappings in this map */ @@ -1201,9 +1201,9 @@ public V get(Object key) { * * @param key possible key * - * @return true if and only if the specified object + * @return {@code true} if and only if the specified object * is a key in this table, as determined by the - * equals method; false otherwise. + * {@code equals} method; {@code false} otherwise. * * @throws NullPointerException if the specified key is null */ @@ -1217,14 +1217,14 @@ public boolean containsKey(Object key) { } /** - * Returns true if this map maps one or more keys to the + * Returns {@code true} if this map maps one or more keys to the * specified value. Note: This method requires a full internal * traversal of the hash table, and so is much slower than - * method containsKey. + * method {@code containsKey}. * * @param value value whose presence in this map is to be tested * - * @return true if this map maps one or more keys to the + * @return {@code true} if this map maps one or more keys to the * specified value */ @Override @@ -1293,10 +1293,10 @@ public boolean containsValue(Object value) { * * @param value a value to search for * - * @return true if and only if some key maps to the - * value argument in this table as - * determined by the equals method; - * false otherwise + * @return {@code true} if and only if some key maps to the + * {@code value} argument in this table as + * determined by the {@code equals} method; + * {@code false} otherwise * * @throws NullPointerException if the specified value is null */ @@ -1308,14 +1308,14 @@ public boolean contains(Object value) { * Maps the specified key to the specified value in this table. * Neither the key nor the value can be null. * - *

The value can be retrieved by calling the get method + *

The value can be retrieved by calling the {@code get} method * with a key that is equal to the original key. * * @param key key with which the specified value is to be associated * @param value value to be associated with the specified key * - * @return the previous value associated with key, or - * null if there was no mapping for key + * @return the previous value associated with {@code key}, or + * {@code null} if there was no mapping for {@code key} * * @throws NullPointerException if the specified key or value is null */ @@ -1332,7 +1332,7 @@ public V put(K key, V value) { * {@inheritDoc} * * @return the previous value associated with the specified key, - * or null if there was no mapping for the key + * or {@code null} if there was no mapping for the key * * @throws NullPointerException if the specified key or value is null */ @@ -1365,8 +1365,8 @@ public void putAll(Map m) { * * @param key the key that needs to be removed * - * @return the previous value associated with key, or - * null if there was no mapping for key + * @return the previous value associated with {@code key}, or + * {@code null} if there was no mapping for {@code key} * * @throws NullPointerException if the specified key is null */ @@ -1411,7 +1411,7 @@ public boolean replace(K key, V oldValue, V newValue) { * {@inheritDoc} * * @return the previous value associated with the specified key, - * or null if there was no mapping for the key + * or {@code null} if there was no mapping for the key * * @throws NullPointerException if the specified key or value is null */ @@ -1457,12 +1457,12 @@ public void purgeStaleEntries() { * The set is backed by the map, so changes to the map are * reflected in the set, and vice-versa. The set supports element * removal, which removes the corresponding mapping from this map, - * via the Iterator.remove, Set.remove, - * removeAll, retainAll, and clear - * operations. It does not support the add or - * addAll operations. + * via the {@code Iterator.remove}, {@code Set.remove}, + * {@code removeAll}, {@code retainAll}, and {@code clear} + * operations. It does not support the {@code add} or + * {@code addAll} operations. * - *

The view's iterator is a "weakly consistent" iterator + *

The view's {@code iterator} is a "weakly consistent" iterator * that will never throw {@link ConcurrentModificationException}, * and guarantees to traverse elements as they existed upon * construction of the iterator, and may (but is not guaranteed to) @@ -1479,12 +1479,12 @@ public Set keySet() { * The collection is backed by the map, so changes to the map are * reflected in the collection, and vice-versa. The collection * supports element removal, which removes the corresponding - * mapping from this map, via the Iterator.remove, - * Collection.remove, removeAll, - * retainAll, and clear operations. It does not - * support the add or addAll operations. + * mapping from this map, via the {@code Iterator.remove}, + * {@code Collection.remove}, {@code removeAll}, + * {@code retainAll}, and {@code clear} operations. It does not + * support the {@code add} or {@code addAll} operations. * - *

The view's iterator is a "weakly consistent" iterator + *

The view's {@code iterator} is a "weakly consistent" iterator * that will never throw {@link ConcurrentModificationException}, * and guarantees to traverse elements as they existed upon * construction of the iterator, and may (but is not guaranteed to) @@ -1501,12 +1501,12 @@ public Collection values() { * The set is backed by the map, so changes to the map are * reflected in the set, and vice-versa. The set supports element * removal, which removes the corresponding mapping from the map, - * via the Iterator.remove, Set.remove, - * removeAll, retainAll, and clear - * operations. It does not support the add or - * addAll operations. + * via the {@code Iterator.remove}, {@code Set.remove}, + * {@code removeAll}, {@code retainAll}, and {@code clear} + * operations. It does not support the {@code add} or + * {@code addAll} operations. * - *

The view's iterator is a "weakly consistent" iterator + *

The view's {@code iterator} is a "weakly consistent" iterator * that will never throw {@link ConcurrentModificationException}, * and guarantees to traverse elements as they existed upon * construction of the iterator, and may (but is not guaranteed to) @@ -1855,7 +1855,7 @@ public void clear() { /* ---------------- Serialization Support -------------- */ /** - * Save the state of the ConcurrentReferenceHashMap instance to a + * Save the state of the {@code ConcurrentReferenceHashMap} instance to a * stream (i.e., serialize it). * * @param s the stream @@ -1894,7 +1894,7 @@ private void writeObject(java.io.ObjectOutputStream s) throws IOException { } /** - * Reconstitute the ConcurrentReferenceHashMap instance from a + * Reconstitute the {@code ConcurrentReferenceHashMap} instance from a * stream (i.e., deserialize it). * * @param s the stream diff --git a/engine/src/main/java/org/hibernate/search/util/impl/Executors.java b/engine/src/main/java/org/hibernate/search/util/impl/Executors.java index 5539482f885..ab478f75071 100644 --- a/engine/src/main/java/org/hibernate/search/util/impl/Executors.java +++ b/engine/src/main/java/org/hibernate/search/util/impl/Executors.java @@ -105,7 +105,7 @@ public static ThreadPoolExecutor newScalableThreadPool(int threadsMin, int threa public static class BlockPolicy implements RejectedExecutionHandler { /** - * Creates a BlockPolicy. + * Creates a {@code BlockPolicy}. */ public BlockPolicy() { } diff --git a/jsr352/core/src/main/java/org/hibernate/search/jsr352/massindexing/MassIndexingJob.java b/jsr352/core/src/main/java/org/hibernate/search/jsr352/massindexing/MassIndexingJob.java index 9158992eabf..2ab2fe1d2f8 100644 --- a/jsr352/core/src/main/java/org/hibernate/search/jsr352/massindexing/MassIndexingJob.java +++ b/jsr352/core/src/main/java/org/hibernate/search/jsr352/massindexing/MassIndexingJob.java @@ -127,10 +127,10 @@ private ParametersBuilder(Class entityType, Class... entityTypes) { * The string that allows to select how you want to reference the {@link EntityManagerFactory}. * Possible values are: *

* * @param namespace the name of namespace to use diff --git a/orm/src/main/java/org/hibernate/search/MassIndexer.java b/orm/src/main/java/org/hibernate/search/MassIndexer.java index 7fec3422742..85593fc9068 100644 --- a/orm/src/main/java/org/hibernate/search/MassIndexer.java +++ b/orm/src/main/java/org/hibernate/search/MassIndexer.java @@ -26,7 +26,7 @@ public interface MassIndexer { * Defaults to 1. * * @param threadsToIndexObjects number of entity types to be indexed in parallel - * @return this for method chaining + * @return {@code this} for method chaining */ MassIndexer typesToIndexInParallel(int threadsToIndexObjects); @@ -34,21 +34,21 @@ public interface MassIndexer { * Set the number of threads to be used to load * the root entities. * @param numberOfThreads the number of threads - * @return this for method chaining + * @return {@code this} for method chaining */ MassIndexer threadsToLoadObjects(int numberOfThreads); /** * Sets the batch size used to load the root entities. * @param batchSize the batch size - * @return this for method chaining + * @return {@code this} for method chaining */ MassIndexer batchSizeToLoadObjects(int batchSize); /** * Deprecated: value is ignored. * @param numberOfThreads the number of threads - * @return this for method chaining + * @return {@code this} for method chaining * @deprecated Being ignored: this method will be removed. */ @Deprecated @@ -58,31 +58,31 @@ public interface MassIndexer { * Override the default MassIndexerProgressMonitor. * * @param monitor this instance will receive updates about the massindexing progress. - * @return this for method chaining + * @return {@code this} for method chaining */ MassIndexer progressMonitor(MassIndexerProgressMonitor monitor); /** * Sets the cache interaction mode for the data loading tasks. - * Defaults to CacheMode.IGNORE. + * Defaults to {@code CacheMode.IGNORE}. * @param cacheMode the cache interaction mode - * @return this for method chaining + * @return {@code this} for method chaining */ MassIndexer cacheMode(CacheMode cacheMode); /** - * If index optimization has to be started at the end of the indexing process. Defaults to true. + * If index optimization has to be started at the end of the indexing process. Defaults to {@code true}. * @param optimize {@code true} to enable the index optimization at the end of the indexing process - * @return this for method chaining + * @return {@code this} for method chaining */ MassIndexer optimizeOnFinish(boolean optimize); /** * If index optimization should be run before starting, - * after the purgeAll. Has no effect if purgeAll is set to false. - * Defaults to true. + * after the purgeAll. Has no effect if {@code purgeAll} is set to false. + * Defaults to {@code true}. * @param optimize {@code true} to enable the index optimization after purge - * @return this for method chaining + * @return {@code this} for method chaining */ MassIndexer optimizeAfterPurge(boolean optimize); @@ -92,7 +92,7 @@ public interface MassIndexer { * entities in the index: otherwise search results may be duplicated. * Defaults to true. * @param purgeAll if {@code true} all entities will be removed from the index before starting the indexing - * @return this for method chaining + * @return {@code this} for method chaining */ MassIndexer purgeAllOnStart(boolean purgeAll); @@ -103,7 +103,7 @@ public interface MassIndexer { * As a results the index will not be consistent * with the database: use only for testing on an (undefined) subset of database data. * @param maximum the maximum number of objects to index - * @return this for method chaining + * @return {@code this} for method chaining */ MassIndexer limitIndexedObjectsTo(long maximum); @@ -128,7 +128,7 @@ public interface MassIndexer { * for example MySQL might benefit from using {@link Integer#MIN_VALUE} * otherwise it will attempt to preload everything in memory. * @param idFetchSize the fetch size to be used when loading primary keys - * @return this for method chaining + * @return {@code this} for method chaining */ MassIndexer idFetchSize(int idFetchSize); diff --git a/orm/src/main/java/org/hibernate/search/batchindexing/spi/MassIndexerWithTenant.java b/orm/src/main/java/org/hibernate/search/batchindexing/spi/MassIndexerWithTenant.java index 320c0fd20b0..634be8c2522 100644 --- a/orm/src/main/java/org/hibernate/search/batchindexing/spi/MassIndexerWithTenant.java +++ b/orm/src/main/java/org/hibernate/search/batchindexing/spi/MassIndexerWithTenant.java @@ -19,7 +19,7 @@ public interface MassIndexerWithTenant extends MassIndexer { * Set the tenant that is associated to this {@link MassIndexer}. * * @param tenantIdentifier the identifier of the tenant associated this {@link MassIndexer} - * @return this for method chaining + * @return {@code this} for method chaining */ MassIndexerWithTenant tenantIdentifier(String tenantIdentifier); } diff --git a/orm/src/main/java/org/hibernate/search/jpa/FullTextQuery.java b/orm/src/main/java/org/hibernate/search/jpa/FullTextQuery.java index 997d31c323a..45723dc8a44 100644 --- a/orm/src/main/java/org/hibernate/search/jpa/FullTextQuery.java +++ b/orm/src/main/java/org/hibernate/search/jpa/FullTextQuery.java @@ -46,7 +46,7 @@ public interface FullTextQuery extends Query, ProjectionConstants { /** * Allows to set a single Lucene filter. - * @deprecated: use the {@link org.hibernate.search.annotations.FullTextFilterDef} approach, + * @deprecated use the {@link org.hibernate.search.annotations.FullTextFilterDef} approach, * or use a {@link org.apache.lucene.search.BooleanQuery} and add a clause using * {@link org.apache.lucene.search.BooleanClause.Occur#FILTER}. *