Ate Douma pushed to branch feature/CMS-10069 at cms-community / hippo-cms-l10n-tooling
Commits: 994782fe by Ate Douma at 2016-06-01T14:07:46+02:00 CMS-10069: minor code readability improvement (logic already was fine) - - - - - 1 changed file: - maven-plugin/src/main/java/org/onehippo/cms/l10n/IncludeLocalesMojo.java Changes: ===================================== maven-plugin/src/main/java/org/onehippo/cms/l10n/IncludeLocalesMojo.java ===================================== --- a/maven-plugin/src/main/java/org/onehippo/cms/l10n/IncludeLocalesMojo.java +++ b/maven-plugin/src/main/java/org/onehippo/cms/l10n/IncludeLocalesMojo.java @@ -181,8 +181,8 @@ public class IncludeLocalesMojo extends AbstractMojo { throw new MojoExecutionException("Could not resolve artifact " + localeArtifact, resolutionResult.getExceptions().get(0)); } - Artifact result; - if (resolutionResult.getArtifacts().size() != 1 || !(result = resolutionResult.getArtifacts().iterator().next()).isResolved()) { + final Artifact result; + if (resolutionResult.getArtifacts().isEmpty() || !(result = resolutionResult.getArtifacts().iterator().next()).isResolved()) { final Artifact fallbackLocaleArtifact = findFallbackLocaleArtifact(localeArtifact); if (fallbackLocaleArtifact == null) { return null; View it on GitLab: https://code.onehippo.org/cms-community/hippo-cms-l10n-tooling/commit/994782fe9d7a083b7550721dfca966f21a49ba3a
_______________________________________________ Hippocms-svn mailing list Hippocms-svn@lists.onehippo.org https://lists.onehippo.org/mailman/listinfo/hippocms-svn