Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
c861f24b
Commit
c861f24b
authored
Jun 11, 2014
by
Phillip Webb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Switch mergeDependencies to use a set.
parent
d36f9ce8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
AbstractDependencies.java
...framework/boot/dependency/tools/AbstractDependencies.java
+5
-5
No files found.
spring-boot-tools/spring-boot-dependency-tools/src/main/java/org/springframework/boot/dependency/tools/AbstractDependencies.java
View file @
c861f24b
...
@@ -19,14 +19,15 @@ package org.springframework.boot.dependency.tools;
...
@@ -19,14 +19,15 @@ package org.springframework.boot.dependency.tools;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Iterator
;
import
java.util.Iterator
;
import
java.util.LinkedHashMap
;
import
java.util.LinkedHashMap
;
import
java.util.Li
s
t
;
import
java.util.Li
nkedHashSe
t
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.Set
;
import
org.springframework.boot.dependency.tools.Dependency.Exclusion
;
import
org.springframework.boot.dependency.tools.Dependency.Exclusion
;
/**
/**
* Abstract base implementation for {@link Dependencies}.
* Abstract base implementation for {@link Dependencies}.
*
*
* @author Phillip Webb
* @author Phillip Webb
* @author Andy Wilkinson
* @author Andy Wilkinson
* @since 1.1.0
* @since 1.1.0
...
@@ -68,12 +69,11 @@ abstract class AbstractDependencies implements Dependencies {
...
@@ -68,12 +69,11 @@ abstract class AbstractDependencies implements Dependencies {
private
Dependency
mergeDependencies
(
Dependency
existingDependency
,
private
Dependency
mergeDependencies
(
Dependency
existingDependency
,
Dependency
newDependency
)
{
Dependency
newDependency
)
{
List
<
Exclusion
>
combinedExclusions
=
new
ArrayLis
t
<
Exclusion
>();
Set
<
Exclusion
>
combinedExclusions
=
new
LinkedHashSe
t
<
Exclusion
>();
combinedExclusions
.
addAll
(
existingDependency
.
getExclusions
());
combinedExclusions
.
addAll
(
existingDependency
.
getExclusions
());
combinedExclusions
.
addAll
(
newDependency
.
getExclusions
());
combinedExclusions
.
addAll
(
newDependency
.
getExclusions
());
return
new
Dependency
(
newDependency
.
getGroupId
(),
newDependency
.
getArtifactId
(),
return
new
Dependency
(
newDependency
.
getGroupId
(),
newDependency
.
getArtifactId
(),
newDependency
.
getVersion
(),
combinedExclusions
);
newDependency
.
getVersion
(),
new
ArrayList
<
Exclusion
>(
combinedExclusions
)
);
}
}
/**
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment