Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 1b7574a

Browse files
author
Federico Fissore
committedMay 29, 2015
Boards Manager: contributions MAY miss tools, but we missed to consider this case. Fixes #3248
1 parent 3129017 commit 1b7574a

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed
 

‎arduino-core/src/cc/arduino/contributions/packages/ContributedPlatform.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,6 @@ public void setParentPackage(ContributedPackage parentPackage) {
9393

9494
@Override
9595
public String toString() {
96-
return getParsedVersion();
96+
return getName() + " " + getParsedVersion();
9797
}
9898
}

‎arduino-core/src/cc/arduino/contributions/packages/ContributedToolReference.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ public abstract class ContributedToolReference {
4040

4141
public ContributedTool resolve(Collection<ContributedPackage> packages) {
4242
for (ContributedPackage pack : packages) {
43+
assert pack.getTools() != null;
4344
for (ContributedTool tool : pack.getTools())
4445
if (tool.getName().equals(getName()) &&
4546
tool.getVersion().equals(getVersion()) &&
@@ -54,4 +55,4 @@ public String toString() {
5455
return "name=" + getName() + " version=" + getVersion() + " packager=" +
5556
getPackager();
5657
}
57-
}
58+
}

‎arduino-core/src/cc/arduino/contributions/packages/ContributionsIndexer.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,13 +91,20 @@ public void parseIndex() throws Exception {
9191
}
9292

9393
List<ContributedPackage> packages = index.getPackages();
94+
Collection<ContributedPackage> packagesWithTools = Collections2.filter(packages, new Predicate<ContributedPackage>() {
95+
@Override
96+
public boolean apply(ContributedPackage input) {
97+
return input.getTools() != null;
98+
}
99+
});
100+
94101
for (ContributedPackage pack : packages) {
95102
for (ContributedPlatform platform : pack.getPlatforms()) {
96103
// Set a reference to parent packages
97104
platform.setParentPackage(pack);
98105

99106
// Resolve tools dependencies (works also as a check for file integrity)
100-
platform.resolveToolsDependencies(packages);
107+
platform.resolveToolsDependencies(packagesWithTools);
101108
}
102109
}
103110

0 commit comments

Comments
 (0)
Please sign in to comment.