GZIPContentEncodingFilter: Object header values#16
GZIPContentEncodingFilter: Object header values#16mfulton26 wants to merge 1 commit intojavaee:masterfrom mfulton26:gzipContentEncodingFilter-ObjectHeaders
Conversation
|
Should this change have a unit test? |
|
Probably but there are no existing unit tests for the GZIPContentEncodingFilter but that doesn't mean I can't add some. I will investigate. |
|
looks like there is the same issue on line 95; there you'll need to convert Object to String |
|
No casting takes place on line 95. |
|
Oh, right--that's the request header, not the response header. |
|
@mgajdos Perhaps you can answer a question for me. What are my options if I want to add a test class for this container filter but want to use a mocking framework such as Mockito? Can I pull that in as a Maven test-scope dependency? |
|
Unit test amended (failed with ClassCastException without the change). I didn't end up needing to use a mocking framework so no additional test dependencies have been added which makes this simpler. |
Response.header(String, Object) supports non-String header values so GZIPContentEncodingFilter should too. Otherwise Response builders may get a ClassCastException when attempting to use non-String response header values.
|
@mgajdos, what does the OCA label mean? Is it good or bad? i.e. Is there anything blocking this being reviewed and potentially merged? Thanks. |
Response.header(String, Object) supports non-String header values so
GZIPContentEncodingFilter should too. Otherwise Response builders may
get a ClassCastException when attempting to use non-String response
header values.