Skip to content

Commit 36eac3d

Browse files
committed
Use diamonds
1 parent ed1ac0a commit 36eac3d

File tree

9 files changed

+18
-18
lines changed

9 files changed

+18
-18
lines changed

src/main/java/com/amashchenko/maven/plugin/gitflow/AbstractGitFlowMojo.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -330,8 +330,8 @@ protected void checkUncommittedChanges() throws MojoFailureException,
330330
protected void checkSnapshotDependencies() throws MojoFailureException {
331331
getLog().info("Checking for SNAPSHOT versions in dependencies.");
332332

333-
List<String> snapshots = new ArrayList<String>();
334-
List<String> builtArtifacts = new ArrayList<String>();
333+
List<String> snapshots = new ArrayList<>();
334+
List<String> builtArtifacts = new ArrayList<>();
335335

336336
List<MavenProject> projects = mavenSession.getProjects();
337337
for (MavenProject project : projects) {

src/main/java/com/amashchenko/maven/plugin/gitflow/GitFlowFeatureFinishMojo.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ public void execute() throws MojoExecutionException, MojoFailureException {
174174

175175
mvnSetVersions(featureVersion);
176176

177-
Map<String, String> properties = new HashMap<String, String>();
177+
Map<String, String> properties = new HashMap<>();
178178
properties.put("version", featureVersion);
179179
properties.put("featureName", featName);
180180
gitCommit(commitMessages.getFeatureFinishIncrementVersionMessage(), properties);
@@ -187,7 +187,7 @@ public void execute() throws MojoExecutionException, MojoFailureException {
187187
// mvn versions:set -DnewVersion=... -DgenerateBackupPoms=false
188188
mvnSetVersions(version);
189189

190-
Map<String, String> properties = new HashMap<String, String>();
190+
Map<String, String> properties = new HashMap<>();
191191
properties.put("version", version);
192192
properties.put("featureName", featName);
193193

@@ -204,7 +204,7 @@ public void execute() throws MojoExecutionException, MojoFailureException {
204204
gitCommit(StringUtils.isBlank(commitMessages.getFeatureSquashMessage()) ? featureBranchName
205205
: commitMessages.getFeatureSquashMessage());
206206
} else {
207-
Map<String, String> properties = new HashMap<String, String>();
207+
Map<String, String> properties = new HashMap<>();
208208
properties.put("version", version);
209209
properties.put("featureName", featName);
210210
// git merge --no-ff feature/...
@@ -226,7 +226,7 @@ public void execute() throws MojoExecutionException, MojoFailureException {
226226

227227
mvnSetVersions(keptFeatureVersion);
228228

229-
Map<String, String> properties = new HashMap<String, String>();
229+
Map<String, String> properties = new HashMap<>();
230230
properties.put("version", keptFeatureVersion);
231231
properties.put("featureName", featName);
232232

@@ -269,7 +269,7 @@ private String promptBranchName() throws MojoFailureException, CommandLineExcept
269269

270270
final String[] branches = featureBranches.split("\\r?\\n");
271271

272-
List<String> numberedList = new ArrayList<String>();
272+
List<String> numberedList = new ArrayList<>();
273273
String defaultChoice = null;
274274
StringBuilder str = new StringBuilder("Feature branches:").append(LS);
275275
for (int i = 0; i < branches.length; i++) {

src/main/java/com/amashchenko/maven/plugin/gitflow/GitFlowFeatureStartMojo.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ public void execute() throws MojoExecutionException, MojoFailureException {
136136
// -DgenerateBackupPoms=false
137137
mvnSetVersions(version);
138138

139-
Map<String, String> properties = new HashMap<String, String>();
139+
Map<String, String> properties = new HashMap<>();
140140
properties.put("version", version);
141141
properties.put("featureName", featureBranchName);
142142

src/main/java/com/amashchenko/maven/plugin/gitflow/GitFlowHotfixFinishMojo.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ public void execute() throws MojoExecutionException, MojoFailureException {
206206

207207
String currentHotfixVersion = getCurrentProjectVersion();
208208

209-
Map<String, String> messageProperties = new HashMap<String, String>();
209+
Map<String, String> messageProperties = new HashMap<>();
210210
messageProperties.put("version", currentHotfixVersion);
211211

212212
if (useSnapshotInHotfix && ArtifactUtils.isSnapshot(currentHotfixVersion)) {
@@ -239,7 +239,7 @@ public void execute() throws MojoExecutionException, MojoFailureException {
239239
.replace("-" + Artifact.SNAPSHOT_VERSION, "");
240240
}
241241

242-
Map<String, String> properties = new HashMap<String, String>();
242+
Map<String, String> properties = new HashMap<>();
243243
properties.put("version", tagVersion);
244244

245245
// git tag -a ...
@@ -326,7 +326,7 @@ public void execute() throws MojoExecutionException, MojoFailureException {
326326
// -DgenerateBackupPoms=false
327327
mvnSetVersions(nextSnapshotVersion);
328328

329-
Map<String, String> properties = new HashMap<String, String>();
329+
Map<String, String> properties = new HashMap<>();
330330
properties.put("version", nextSnapshotVersion);
331331

332332
// git commit -a -m updating for next development version
@@ -389,7 +389,7 @@ private String promptBranchName() throws MojoFailureException, CommandLineExcept
389389

390390
String[] branches = hotfixBranches.split("\\r?\\n");
391391

392-
List<String> numberedList = new ArrayList<String>();
392+
List<String> numberedList = new ArrayList<>();
393393
StringBuilder str = new StringBuilder("Hotfix branches:").append(LS);
394394
for (int i = 0; i < branches.length; i++) {
395395
str.append((i + 1) + ". " + branches[i] + LS);

src/main/java/com/amashchenko/maven/plugin/gitflow/GitFlowHotfixStartMojo.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ public void execute() throws MojoExecutionException, MojoFailureException {
113113
branches[supportBranches.length] = gitFlowConfig
114114
.getProductionBranch();
115115

116-
List<String> numberedList = new ArrayList<String>();
116+
List<String> numberedList = new ArrayList<>();
117117
StringBuilder str = new StringBuilder("Branches:")
118118
.append(LS);
119119
for (int i = 0; i < branches.length; i++) {
@@ -242,7 +242,7 @@ public void execute() throws MojoExecutionException, MojoFailureException {
242242
// mvn versions:set -DnewVersion=... -DgenerateBackupPoms=false
243243
mvnSetVersions(projectVersion);
244244

245-
Map<String, String> properties = new HashMap<String, String>();
245+
Map<String, String> properties = new HashMap<>();
246246
properties.put("version", projectVersion);
247247

248248
// git commit -a -m updating versions for hotfix

src/main/java/com/amashchenko/maven/plugin/gitflow/GitFlowReleaseFinishMojo.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ public void execute() throws MojoExecutionException, MojoFailureException {
247247

248248
String currentReleaseVersion = getCurrentProjectVersion();
249249

250-
Map<String, String> messageProperties = new HashMap<String, String>();
250+
Map<String, String> messageProperties = new HashMap<>();
251251
messageProperties.put("version", currentReleaseVersion);
252252

253253
if (useSnapshotInRelease && ArtifactUtils.isSnapshot(currentReleaseVersion)) {

src/main/java/com/amashchenko/maven/plugin/gitflow/GitFlowReleaseMojo.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ public void execute() throws MojoExecutionException, MojoFailureException {
255255
mvnRun(preReleaseGoals);
256256
}
257257

258-
Map<String, String> messageProperties = new HashMap<String, String>();
258+
Map<String, String> messageProperties = new HashMap<>();
259259
messageProperties.put("version", version);
260260

261261
// execute if version changed

src/main/java/com/amashchenko/maven/plugin/gitflow/GitFlowReleaseStartMojo.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ private void commitProjectVersion(String version, String commitMessage)
339339
// mvn versions:set -DnewVersion=... -DgenerateBackupPoms=false
340340
mvnSetVersions(version);
341341

342-
Map<String, String> properties = new HashMap<String, String>();
342+
Map<String, String> properties = new HashMap<>();
343343
properties.put("version", version);
344344

345345
// git commit -a -m commitMessage

src/main/java/com/amashchenko/maven/plugin/gitflow/GitFlowSupportStartMojo.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ public void execute() throws MojoExecutionException, MojoFailureException {
133133

134134
mvnSetVersions(version);
135135

136-
Map<String, String> properties = new HashMap<String, String>();
136+
Map<String, String> properties = new HashMap<>();
137137
properties.put("version", version);
138138

139139
gitCommit(commitMessages.getSupportStartMessage(), properties);

0 commit comments

Comments
 (0)