From 9062cfc94075dfd8cb55c09be502bfbac4556332 Mon Sep 17 00:00:00 2001 From: Julien Lancelot Date: Tue, 3 Mar 2015 10:53:00 +0100 Subject: [PATCH] Add javadoc --- .../src/test/java/org/sonar/server/es/EsTester.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/server/sonar-server/src/test/java/org/sonar/server/es/EsTester.java b/server/sonar-server/src/test/java/org/sonar/server/es/EsTester.java index 47a1954dac5..4395dff39fb 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/es/EsTester.java +++ b/server/sonar-server/src/test/java/org/sonar/server/es/EsTester.java @@ -206,11 +206,14 @@ public class EsTester extends ExternalResource { return result; } - public List getDocumentFields(String indexName, String typeName, final String fieldName) { + /** + * Get a list of a specific field from all indexed documents. + */ + public List getDocumentFields(String indexName, String typeName, final String fieldNameToReturn) { return newArrayList(Iterables.transform(getDocuments(indexName, typeName), new Function() { @Override public T apply(SearchHit input) { - return (T) input.sourceAsMap().get(fieldName); + return (T) input.sourceAsMap().get(fieldNameToReturn); } })); } -- 2.39.5