Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ public void setReleaseList(List<Release> releaseList) {
* @return the current value of the {@link ChangesXML#releaseList} attribute
*/
public List<Release> getReleaseList() {
return releaseList == null ? Collections.<Release>emptyList() : releaseList;
return releaseList == null ? Collections.emptyList() : releaseList;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public class ChangesValidatorMojoTest extends AbstractMojoTestCase {
public void setUp() throws Exception {
super.setUp();
File pom = new File(getBasedir(), "/src/test/unit/plugin-config.xml");
mojo = (ChangesValidatorMojo) lookupMojo("changes-validate", pom);
mojo = lookupMojo("changes-validate", pom);
}

public void testValidationSuccess() throws Exception {
Expand All @@ -53,9 +53,9 @@ public void testValidationFailedWithMojoFailure() throws Exception {
setVariableValueToObject(mojo, "failOnError", Boolean.TRUE);
try {
mojo.execute();
fail(" a MojoExecutionException should occur here changes file is not valid and failOnError is true ");
fail(" A MojoExecutionException should occur here. Changes file is not valid and failOnError is true ");
} catch (MojoExecutionException e) {
// we except exception here
// expected
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public class AnnouncementMojoTest extends AbstractMojoTestCase {

public void testAnnounceGeneration() throws Exception {
File pom = new File(getBasedir(), "/src/test/unit/plugin-config.xml");
AnnouncementMojo mojo = (AnnouncementMojo) lookupMojo("announcement-generate", pom);
AnnouncementMojo mojo = lookupMojo("announcement-generate", pom);

setVariableValueToObject(mojo, "xmlPath", new File(getBasedir(), "/src/test/unit/announce-changes.xml"));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
import org.apache.maven.settings.Server;
import org.apache.maven.settings.Settings;
import org.apache.maven.settings.building.DefaultSettingsProblem;
import org.apache.maven.settings.building.SettingsProblem;
import org.apache.maven.settings.building.SettingsProblem.Severity;
import org.apache.maven.settings.crypto.DefaultSettingsDecryptionRequest;
import org.apache.maven.settings.crypto.SettingsDecrypter;
Expand Down Expand Up @@ -82,7 +81,7 @@ public void testConfigureAuthenticationWithProblems() throws Exception {
SettingsDecryptionResult result = mock(SettingsDecryptionResult.class);
Log log = mock(Log.class);
when(result.getProblems())
.thenReturn(Collections.<SettingsProblem>singletonList(
.thenReturn(Collections.singletonList(
new DefaultSettingsProblem("Ups " + server.getId(), Severity.ERROR, null, -1, -1, null)));
when(result.getServer()).thenReturn(server);
when(decrypter.decrypt(any(SettingsDecryptionRequest.class))).thenReturn(result);
Expand All @@ -107,7 +106,7 @@ public void testConfigureAuthenticationWithNoServer() throws Exception {
SettingsDecrypter decrypter = mock(SettingsDecrypter.class);
SettingsDecryptionResult result = mock(SettingsDecryptionResult.class);
Log log = mock(Log.class);
when(result.getProblems()).thenReturn(Collections.<SettingsProblem>emptyList());
when(result.getProblems()).thenReturn(Collections.emptyList());
when(result.getServer()).thenReturn(server);
when(decrypter.decrypt(new DefaultSettingsDecryptionRequest(server))).thenReturn(result);

Expand Down