Skip to content

Commit 1f727d3

Browse files
committed
Better names for ContributedLibrary dependencies fields
1 parent 28ab910 commit 1f727d3

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

arduino-core/src/cc/arduino/contributions/libraries/ContributedLibrary.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public abstract class ContributedLibrary extends DownloadableContribution {
6464

6565
public abstract List<String> getTypes();
6666

67-
public abstract List<ContributedLibraryDependency> getRequires();
67+
public abstract List<ContributedLibraryDependency> getDependencies();
6868

6969
public abstract List<String> getProvidesIncludes();
7070

@@ -146,8 +146,8 @@ public String info() {
146146
}
147147
res += "\n";
148148
res += " requires :\n";
149-
if (getRequires() != null)
150-
for (ContributedLibraryDependency r : getRequires()) {
149+
if (getDependencies() != null)
150+
for (ContributedLibraryDependency r : getDependencies()) {
151151
res += " " + r;
152152
}
153153
res += "\n";

arduino-core/src/cc/arduino/contributions/libraries/ContributedLibraryDependency.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ public abstract class ContributedLibraryDependency {
3333

3434
public abstract String getName();
3535

36-
public abstract String getVersionRequired();
36+
public abstract String getVersion();
3737

3838
@Override
3939
public String toString() {
40-
return getName() + " " + getVersionRequired();
40+
return getName() + " " + getVersion();
4141
}
4242
}

arduino-core/src/cc/arduino/contributions/libraries/LibrariesIndex.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ public List<ContributedLibrary> resolveDependeciesOf(ContributedLibrary library)
112112

113113
public boolean resolveDependeciesOf(List<ContributedLibrary> solution,
114114
ContributedLibrary library) {
115-
List<ContributedLibraryDependency> requirements = library.getRequires();
115+
List<ContributedLibraryDependency> requirements = library.getDependencies();
116116
if (requirements == null) {
117117
// No deps for this library, great!
118118
return true;
@@ -160,7 +160,7 @@ public boolean resolveDependeciesOf(List<ContributedLibrary> solution,
160160

161161
private List<ContributedLibrary> findMatchingDependencies(ContributedLibraryDependency dep) {
162162
List<ContributedLibrary> available = find(dep.getName());
163-
if (dep.getVersionRequired() == null || dep.getVersionRequired().isEmpty())
163+
if (dep.getVersion() == null || dep.getVersion().isEmpty())
164164
return available;
165165

166166
// XXX: The following part is actually never reached. The use of version

arduino-core/src/cc/arduino/contributions/libraries/UnavailableContributedLibrary.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public class UnavailableContributedLibrary extends ContributedLibrary {
3838
private String version;
3939

4040
public UnavailableContributedLibrary(ContributedLibraryDependency dependency) {
41-
this(dependency.getName(), dependency.getVersionRequired());
41+
this(dependency.getName(), dependency.getVersion());
4242
}
4343

4444
public UnavailableContributedLibrary(String _name, String _version) {
@@ -101,7 +101,7 @@ public List<String> getTypes() {
101101
}
102102

103103
@Override
104-
public List<ContributedLibraryDependency> getRequires() {
104+
public List<ContributedLibraryDependency> getDependencies() {
105105
return new ArrayList<>();
106106
}
107107

0 commit comments

Comments
 (0)