This page is meant as a template for writing a KIP. To create a KIP choose Tools->Copy on this page and modify with your content and replace the heading with the next KIP number and a description of your issue. Replace anything in italics with your own description.
Current state: Under Discussion
Discussion thread: here [Change the link from the KIP proposal email archive to your own email thread]
JIRA: here
Please keep the discussion on the mailing list rather than commenting on the wiki (wiki discussions get unwieldy fast).
Headers is a part of public APIs but the usage of Headers is a bit chaos to users.
We can't improve Headers right now by reason of deprecation cycles. This KIP plans to deprecate and offer default implementation (java.lang.UnsupportedOperationException) to all setters of Headers so we can cleanup all setters to make it be readonly in next major and users are able to remove all useless implementation from their Headers in this patch.
The following methods of Headers are deprecated.
@Deprecated default Headers add(Header header) throws IllegalStateException { throw new UnsupportedOperationException("this method is deprecated"); } @Deprecated default Headers add(String key, byte[] value) throws IllegalStateException { throw new UnsupportedOperationException("this method is deprecated"); } @Deprecated default Headers remove(String key) throws IllegalStateException { throw new UnsupportedOperationException("this method is deprecated"); } |
The following changes are added to Headers
C: No methods are removed so compatibility issue does not exist
D: There are three deprecated methods of Headers
MP: User-implemented Headers can remove the deprecated methods
n/a