Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-26218] Android: Resolve Veracode string equality warnings

GitHub Issuen/a
TypeImprovement
PriorityLow
StatusClosed
ResolutionFixed
Resolution Date2018-08-24T01:19:58.000+0000
Affected Version/sn/a
Fix Version/sRelease 7.5.0
ComponentsAndroid
Labelsandroid, scanner, string
ReporterJoshua Quick
AssigneeJoshua Quick
Created2018-07-19T21:21:58.000+0000
Updated2018-08-24T01:20:02.000+0000

Description

*Summary:* The Veracode scanner has sighted the following string equality/comparison issues in Titanium's Android Java code... ||Class||Line||Description|| |MediaModule.java|729|Member variable intentType should use equals() instead of ==| |TiBlob.java|263|Member variable mimeType should use equals() instead of ==.| |TiBlob.java|421|Member variable mimeType should use ! equals() instead of !=.| |TiCameraActivity.java|413|Member variable mediaType should use equals() instead of ==.| |TiCameraActivity.java|682|Member variable mediaType should use equals() instead of ==.| Note that there are no bugs in the above code. String reference equality happens to work for the way it's written, but we should change to use equals() to avoid potential bugs in the future.

Comments

  1. Joshua Quick 2018-07-25

    PR (master): https://github.com/appcelerator/titanium_mobile/pull/10208

JSON Source