joniles / mpxj

Primary repository for MPXJ library
http://www.mpxj.org/
GNU Lesser General Public License v2.1
248 stars 104 forks source link

Missing clean way of adding ActivityCodeValue to ActivityCode #732

Closed lnevaril closed 3 months ago

lnevaril commented 3 months ago

When migrating to the latest version 13.1.0, I noticed the changes in the assignment of ActivityCodeValue to ActivityCode. In older library versions the method addValue(Integer uniqueID, Integer sequenceNumber, String name, String description, Color color) was deprecated and it is now completely removed. Documentation for the deprecation was as follows @deprecated use ActivityCodeValue.Builder and pass result to addValue(ActivityCodeValue) method but in the end there is no method addValue(ActivityCodeValue) and one has to use activityCode.getValues().add(activityCodeValue) to add new ActivityCodeValue to ensure it will be included in the exported file. This is more like a suggestion to add new method addValue(ActivityCodeValue) as initially intended based on the deprecation comment to have a cleaner way for adding new ActivityCodeValues since one has to first verify that activityCode.getValues() is returning mutable collection.

joniles commented 3 months ago

Hello! Thanks for the feedback, I've added theaddValue` method as suggested, the change will be in the next release.