You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently a deserialized list (empty or not) can be cast to any typed list due to only the typeID being set. It would probably be good to add lookup functionality to TagFactory. This way the respective class could be retrieved for the typeID.
Additionally it would allow setting the typeID based on the class when the list is constructed and not having to wait for the first element. At this point it might even be worth it removing the typeID field completely and only retrieving it from the TagFactory when needed, performing all type checks only with the type class.
The typeID has been removed and the ListTag's type is only defined by a type class now.
TagFactory now has additional lookup functionality to get type ids from classes, classes from type ids and factory functions to create new instances of Tags from type ids.
As the main issue is type safety, I think it will be best to combine #20 and #14 into one pr (#18 ).
Summary:
Tag
andListTag
ListTag
after a type has been specifiedListTag
s of typeEndTag
should not be allowedListTag#equals()
,ListTag#clone()
andListTag#compareTo()
correctlyThe text was updated successfully, but these errors were encountered: