OI4 / oi4-oec-service

An OI4-compliant base service covering most of the "mandatory" functionality by the development guideline
MIT License
2 stars 0 forks source link

Allow changing of profile resources without side-effects #127

Closed chrfranz closed 1 year ago

chrfranz commented 1 year ago

Allow modification of the profile-list without changing the array that was used for initialization. This prevents side effects like shown below:

// OI4Resource constructor
this._profile = new Profile(Application.mandatory);

// some class updates the profile, e.g.
profile.push(Resource.EVENT); // this adds Resource.EVENT to the Application.mandatory list!!!