From 362cf29e411c5ff2e7e722242f47d59133e8df0c Mon Sep 17 00:00:00 2001 From: jvoisin Date: Sun, 6 Oct 2019 14:30:21 +0200 Subject: [PATCH] Fix some javadoc comments - Remove a dangling comment - Delete half-documented parameters - Fix some @see/@link --- .../airsonic/player/service/InternetRadioService.java | 2 -- .../airsonic/player/service/search/IndexManager.java | 10 ---------- .../org/airsonic/player/service/search/IndexType.java | 6 +----- .../airsonic/player/service/search/QueryFactory.java | 4 ---- .../player/service/search/SearchServiceImpl.java | 4 ---- .../service/search/AbstractAirsonicHomeTest.java | 2 +- .../player/service/search/AnalyzerFactoryTestCase.java | 2 +- 7 files changed, 3 insertions(+), 27 deletions(-) diff --git a/airsonic-main/src/main/java/org/airsonic/player/service/InternetRadioService.java b/airsonic-main/src/main/java/org/airsonic/player/service/InternetRadioService.java index 64071232..36a650c3 100644 --- a/airsonic-main/src/main/java/org/airsonic/player/service/InternetRadioService.java +++ b/airsonic-main/src/main/java/org/airsonic/player/service/InternetRadioService.java @@ -129,7 +129,6 @@ public class InternetRadioService { * * @param radio an internet radio * @return a list of internet radio sources - * @throws Exception */ private List retrieveInternetRadioSources(InternetRadio radio) throws Exception { return retrieveInternetRadioSources( @@ -148,7 +147,6 @@ public class InternetRadioService { * @param maxByteSize maximum size of the response, in bytes, or 0 if unlimited * @param maxRedirects maximum number of redirects, or 0 if unlimited * @return a list of internet radio sources - * @throws Exception */ private List retrieveInternetRadioSources(InternetRadio radio, int maxCount, long maxByteSize, int maxRedirects) throws Exception { // Retrieve the remote playlist diff --git a/airsonic-main/src/main/java/org/airsonic/player/service/search/IndexManager.java b/airsonic-main/src/main/java/org/airsonic/player/service/search/IndexManager.java index 89048073..a28ea769 100644 --- a/airsonic-main/src/main/java/org/airsonic/player/service/search/IndexManager.java +++ b/airsonic-main/src/main/java/org/airsonic/player/service/search/IndexManager.java @@ -163,12 +163,6 @@ public class IndexManager { } } - /** - * - * @param indexType - * @return - * @throws IOException - */ private IndexWriter createIndexWriter(IndexType indexType) throws IOException { File indexDirectory = getIndexDirectory.apply(indexType); IndexWriterConfig config = new IndexWriterConfig(analyzerFactory.getAnalyzer()); @@ -234,7 +228,6 @@ public class IndexManager { /** * Close Writer of specified index and refresh SearcherManager. - * @param type */ private void stopIndexing(IndexType type) { @@ -268,9 +261,6 @@ public class IndexManager { * Return the IndexSearcher of the specified index. * At initial startup, it may return null * if the user performs any search before performing a scan. - * - * @param indexType - * @return */ public @Nullable IndexSearcher getSearcher(IndexType indexType) { if (!searchers.containsKey(indexType)) { diff --git a/airsonic-main/src/main/java/org/airsonic/player/service/search/IndexType.java b/airsonic-main/src/main/java/org/airsonic/player/service/search/IndexType.java index 49673f02..2edcf28e 100644 --- a/airsonic-main/src/main/java/org/airsonic/player/service/search/IndexType.java +++ b/airsonic-main/src/main/java/org/airsonic/player/service/search/IndexType.java @@ -91,7 +91,6 @@ public enum IndexType { * * @param k Field name defined by FieldNames * @param v Boost value - * @return */ private static final SimpleEntry entry(String k, float v) { return new AbstractMap.SimpleEntry<>(k, v); @@ -101,9 +100,6 @@ public enum IndexType { * Defines the field that the input value is to search for * when searching IndexType. * If you specify multiple values, list the field names. - * - * @param names - * @return */ private static final String[] fieldNames(String... names) { return Arrays.stream(names).toArray(String[]::new); @@ -123,7 +119,7 @@ public enum IndexType { * * @return Map of fields and boost values * @since legacy - * @see BoostQuery + * @see org.apache.lucene.search.BoostQuery */ public Map getBoosts() { return boosts; diff --git a/airsonic-main/src/main/java/org/airsonic/player/service/search/QueryFactory.java b/airsonic-main/src/main/java/org/airsonic/player/service/search/QueryFactory.java index 4fb79d1e..caacb2ce 100644 --- a/airsonic-main/src/main/java/org/airsonic/player/service/search/QueryFactory.java +++ b/airsonic-main/src/main/java/org/airsonic/player/service/search/QueryFactory.java @@ -184,10 +184,6 @@ public class QueryFactory { /** * Query generation expression extracted from * {@link org.airsonic.player.service.SearchService#getRandomSongs(RandomSearchCriteria)}. - * - * @param criteria criteria - * @return Query - * @throws IOException */ public Query getRandomSongs(RandomSearchCriteria criteria) throws IOException { diff --git a/airsonic-main/src/main/java/org/airsonic/player/service/search/SearchServiceImpl.java b/airsonic-main/src/main/java/org/airsonic/player/service/search/SearchServiceImpl.java index 269bea03..70e8c1c6 100644 --- a/airsonic-main/src/main/java/org/airsonic/player/service/search/SearchServiceImpl.java +++ b/airsonic-main/src/main/java/org/airsonic/player/service/search/SearchServiceImpl.java @@ -95,11 +95,7 @@ public class SearchServiceImpl implements SearchService { * Common processing of random method. * * @param count Number of albums to return. - * @param searcher - * @param query * @param id2ListCallBack Callback to get D from id and store it in List - * @return result - * @throws IOException */ private final List createRandomDocsList( int count, IndexSearcher searcher, Query query, BiConsumer, Integer> id2ListCallBack) diff --git a/airsonic-main/src/test/java/org/airsonic/player/service/search/AbstractAirsonicHomeTest.java b/airsonic-main/src/test/java/org/airsonic/player/service/search/AbstractAirsonicHomeTest.java index b2094863..27aeb141 100644 --- a/airsonic-main/src/test/java/org/airsonic/player/service/search/AbstractAirsonicHomeTest.java +++ b/airsonic-main/src/test/java/org/airsonic/player/service/search/AbstractAirsonicHomeTest.java @@ -29,7 +29,7 @@ import org.springframework.test.context.junit4.rules.SpringMethodRule; "/applicationContext-testdb.xml"}) @DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_CLASS) @Component -/** +/* * Abstract class for scanning MusicFolder. */ public abstract class AbstractAirsonicHomeTest implements AirsonicHomeTest { diff --git a/airsonic-main/src/test/java/org/airsonic/player/service/search/AnalyzerFactoryTestCase.java b/airsonic-main/src/test/java/org/airsonic/player/service/search/AnalyzerFactoryTestCase.java index 18a35328..7cc4f98c 100644 --- a/airsonic-main/src/test/java/org/airsonic/player/service/search/AnalyzerFactoryTestCase.java +++ b/airsonic-main/src/test/java/org/airsonic/player/service/search/AnalyzerFactoryTestCase.java @@ -156,7 +156,7 @@ public class AnalyzerFactoryTestCase { /** * Detailed tests on Stopward. * - * @see org.apache.lucene.analysis.StopAnalyzer#ENGLISH_STOP_WORDS_SET + * @see org.apache.lucene.analysis.core.StopAnalyzer#ENGLISH_STOP_WORDS_SET */ @Test public void testStopward() {