Skip to content

Conversation

cmaglie
Copy link
Member

@cmaglie cmaglie commented Dec 21, 2015

The error triggered inside ContributioIndexer.mergeContributions() while trying to remove a platform:

if (platform != null) {
  targetPackage.getPlatforms().remove(platform);
}

the remove() method calls ContributedPlatform.equals() to find the element to remove but since the parentPackage fields are resolved after merging contributions, the equls() method will fail with
a NullPointerException.

The error triggered inside ContributioIndexer.mergeContributions()
while trying to remove a platform:

    if (platform != null) {
      targetPackage.getPlatforms().remove(platform);
    }

remove() method calls ContributedPlatform.equals() to find the
element to remove but since the parentPackage fields are resolved
*after* merging contributions, the equls() method will fail with
a NullPointerException.
@cmaglie cmaglie added Component: IDE The Arduino IDE Type: Bug Component: Board/Lib Manager Boards Manager or Library Manager labels Dec 21, 2015
@cmaglie cmaglie self-assigned this Dec 21, 2015
@cmaglie cmaglie added this to the Release 1.6.8 milestone Dec 21, 2015
@sandeepmistry
Copy link
Contributor

Looks good! It resolved an issue I was seeing this morning.

@cmaglie cmaglie merged commit 7c089c9 into arduino:master Dec 23, 2015
@cmaglie cmaglie deleted the fix-npe-platform-json branch December 23, 2015 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Board/Lib Manager Boards Manager or Library Manager Component: IDE The Arduino IDE Type: Bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants