I am trying to implement a method for putting a changelog into an RPM. From studying the
C source code of rpm, it is clear that this involves creating headers. At least one of these headers must be of Integer type. Given the current codebase, this is not possible. The only method for adding a header through the Builder is
`public void addHeaderEntry( final Tag tag, final String value)`
which means that all value, regardless of the type implied in the Tag parameter must be passed in as a String. The code invoked by this method in AbstractHeader.java
`public Entry< String[]> createEntry( Tag tag, CharSequence value) {`
creates an Entry of the proper type implied by the tag parameter, but makes no attempt to convert the value parameter to an object of that type, resulting in ClassCastException being thrown, making the above-mentioned effort to add changelogs impossible as the code is currently implemented.
I am trying to implement a method for putting a changelog into an RPM. From studying the C source code of rpm, it is clear that this involves creating headers. At least one of these headers must be of Integer type. Given the current codebase, this is not possible. The only method for adding a header through the Builder is
which means that all value, regardless of the type implied in the Tag parameter must be passed in as a String. The code invoked by this method in AbstractHeader.java
creates an Entry of the proper type implied by the tag parameter, but makes no attempt to convert the value parameter to an object of that type, resulting in ClassCastException being thrown, making the above-mentioned effort to add changelogs impossible as the code is currently implemented.