@Test public void testKeywordsExtractionWhenNull() { assertThat(underTest.extractKeywords(searchHit), is(empty())); }
public List<String> extractKeywords(final SearchHit searchHit) { String keywords = extractNpmAttribute(searchHit, P_KEYWORDS, String.class); if (keywords == null) { return emptyList(); } keywords = keywords.trim(); if (keywords.isEmpty()) { return emptyList(); } return asList(keywords.split("\\s")); }
NpmSearchHitExtractor extends ComponentSupport { public List<String> extractKeywords(final SearchHit searchHit) { String keywords = extractNpmAttribute(searchHit, P_KEYWORDS, String.class); if (keywords == null) { return emptyList(); } keywords = keywords.trim(); if (keywords.isEmpty()) { return emptyList(); } return asList(keywords.split("\\s")); } }
NpmSearchHitExtractor extends ComponentSupport { public List<String> extractKeywords(final SearchHit searchHit) { String keywords = extractNpmAttribute(searchHit, P_KEYWORDS, String.class); if (keywords == null) { return emptyList(); } keywords = keywords.trim(); if (keywords.isEmpty()) { return emptyList(); } return asList(keywords.split("\\s")); }  }
NpmSearchHitExtractor extends ComponentSupport { public List<String> extractKeywords(final SearchHit searchHit) { String keywords = extractNpmAttribute(searchHit, P_KEYWORDS, String.class); if (keywords == null) { return emptyList(); } keywords = keywords.trim(); if (keywords.isEmpty()) { return emptyList(); } return asList(keywords.split("\\s")); }  @Nullable String extractName(final SearchHit searchHit); @Nullable String extractVersion(final SearchHit searchHit); @Nullable String extractDescription(final SearchHit searchHit); @Nullable String extractAuthorName(final SearchHit searchHit); @Nullable String extractAuthorEmail(final SearchHit searchHit); List<String> extractKeywords(final SearchHit searchHit); @Nullable String extractHomepage(final SearchHit searchHit); @Nullable String extractRepositoryUrl(final SearchHit searchHit); @Nullable String extractBugsUrl(final SearchHit searchHit); @Nullable DateTime extractLastModified(final SearchHit searchHit); }
NpmSearchHitExtractor extends ComponentSupport { public List<String> extractKeywords(final SearchHit searchHit) { String keywords = extractNpmAttribute(searchHit, P_KEYWORDS, String.class); if (keywords == null) { return emptyList(); } keywords = keywords.trim(); if (keywords.isEmpty()) { return emptyList(); } return asList(keywords.split("\\s")); }  @Nullable String extractName(final SearchHit searchHit); @Nullable String extractVersion(final SearchHit searchHit); @Nullable String extractDescription(final SearchHit searchHit); @Nullable String extractAuthorName(final SearchHit searchHit); @Nullable String extractAuthorEmail(final SearchHit searchHit); List<String> extractKeywords(final SearchHit searchHit); @Nullable String extractHomepage(final SearchHit searchHit); @Nullable String extractRepositoryUrl(final SearchHit searchHit); @Nullable String extractBugsUrl(final SearchHit searchHit); @Nullable DateTime extractLastModified(final SearchHit searchHit);  }