google / data-transfer-project

The Data Transfer Project makes it easy for people to transfer their data between online service providers. We are establishing a common framework, including data models and protocols, to enable direct transfer of data both into and out of participating online service providers.

Home Page:http://datatransferproject.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MediaContainerResource uses wrong variable in null check

jzacsh opened this issue · comments

I have a commit to fix this - just wanted a bug to explain it. This came up with my tests in a draft branch started failing (but this bug itself is in master branch).

Here's the buggy line of code (its referencing photos in its ternary instead of videos):

here's the stacktrace of how this manifests in my branch's new unit test org.datatransferproject.transfer.microsoft.media.MicrosoftMediaImporterTest #testImportItemAllSuccess:

java.lang.NullPointerException
	at org.datatransferproject.types.common.models.media.MediaContainerResource.transmogrifyTitles(MediaContainerResource.java:90)
	at org.datatransferproject.types.common.models.media.MediaContainerResource.transmogrify(MediaContainerResource.java:70)
	at org.datatransferproject.transfer.microsoft.media.MicrosoftMediaImporter.importItem(MicrosoftMediaImporter.java:103)
	at org.datatransferproject.transfer.microsoft.media.MicrosoftMediaImporterTest.testImportItemAllSuccess(MicrosoftMediaImporterTest.java:229)