Michael Calmer wrote:
% Hi,
% 
% a user found an inconsistency in the ChannelSerializer.
% 
% Calling channel.software.associateRepo() return a channel struct
% which contains the key "yumrepo_last_sync". It is documented as 
% dateTime.iso8601 . But the result for a "never synced" channel is an empty 
% "string".
% 
% The reason can be found in  
% java/.../rhn/frontend/xmlrpc/serializer/ChannelSerializer.java Line 125
% 
% In case getLastSynced() returns null, an empty string is added via the helper 
% and not a Date object.
% 
% I see two possible fixes:
% 
% 1) return "new Date(0)" instead of an empty string (01/01/1970)
% 
% 2) break the API and declare "yumrepo_last_sync" as optional and do not return
%    this key in case the repo was not synced yet.
% 
% Which fix would you prefer? Are there other possible fixes?

Hi Michael,

the second option is the preferred one.

--
Michael Mráka
Satellite Engineering, Red Hat

_______________________________________________
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Reply via email to