title: Java : HttpHeaders -LinkedHashMap - ClassCastException Byte to String
body: <p>I have POJO which is received from redis streams. I want to retrieve the HttpHeaders from the pojo but getting below exception.</p>
  <pre><code>System.out.println(&quot;-- Request json headers Authorization : &quot; + eventReq.getHttpHeaders().getFirst(HttpHeaders.AUTHORIZATION));
  
  java.lang.ClassCastException: class java.lang.Byte cannot be cast to class java.lang.String (java.lang.Byte and java.lang.String are in module java.base of loader 'bootstrap')
      at org.springframework.http.HttpHeaders.getFirst(HttpHeaders.java:1629)
  </code></pre>
  <p>POJO:</p>
  <pre><code>public class EventReq implements Serializable{
      private static final long serialVersionUID = 1L;
      private String EventType;
      private HttpHeaders httpHeaders;
      private EventFlowReq eventFlowReq;
  }
  </code></pre>
  <p>When i am tried to debug the code, below the HttpHeaders,</p>
  <p><a href="https://i.stack.imgur.com/fK5oT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fK5oT.png" alt="enter image description here" /></a></p>
  <p>I tried with <code>new String(eventReq.getHttpHeaders().getFirst(HttpHeaders.AUTHORIZATION))</code> , but still getting same exception.</p>