Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-23475] Android: read-only properties with no setter are writable/delete-able

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2016-06-06T04:23:30.000+0000
Affected Version/sn/a
Fix Version/sRelease 6.0.0
ComponentsAndroid
Labelsn/a
ReporterChristopher Williams
AssigneeChristopher Williams
Created2016-06-03T18:41:15.000+0000
Updated2016-09-15T20:58:00.000+0000

Description

Properties like apiName on all proxies, or Ti.App.version are marked as read-only properties in our docs. That means the user should not be able to overwrite their values or delete them. However you currently can:
Ti.API.info('original version:' + Ti.App.version);
Ti.App.version = 'my own very special string';
Ti.API.info('modified version:' + Ti.App.version);
delete Ti.App.version;
Ti.API.info('deleted version:' + Ti.App.version);

Comments

  1. Lokesh Choudhary 2016-09-15

    Verified the fix. The read-only properties are no longer writable/deletable. Closing. Environment: Appc Studio : 4.8.0.201609061702 Ti SDK : 6.0.0.v20160913184210 Ti CLI : 5.0.9 Alloy : 1.9.1 MAC El Capitan : 10.11.6 Appc NPM : 4.2.8-6 Appc CLI : 6.0.0-38 Node: 4.4.4 Nexus 6 - Android 6.0.1

JSON Source