test_class.file: webapp/impl/src/test/java/cloud/piranha/webapp/impl/DefaultHttpHeaderManagerTest.java
test_class.identifier: DefaultHttpHeaderManagerTest
test_case.body: @Test
      void testGetDateHeader() {
          DefaultHttpHeaderManager manager = new DefaultHttpHeaderManager();
          SimpleDateFormat format = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss zzz");
          manager.addHeader("NAME", format.format(new Date()));
          assertTrue(manager.getDateHeader("NAME") > 0);
      }
test_case.class_method_signature: DefaultHttpHeaderManagerTest.testGetDateHeader()
test_case.full_signature: @Test void testGetDateHeader()
test_case.identifier: testGetDateHeader
test_case.invocations: addHeader format assertTrue getDateHeader
test_case.modifiers: @Test
test_case.parameters: ()
test_case.return: void
test_case.signature: void testGetDateHeader()
focal_class.declarator: headers
focal_class.modifier: protected final
focal_class.original_string: protected final HashMap<String, DefaultHttpHeader> headers;
focal_class.type: HashMap<String, DefaultHttpHeader>
focal_class.var_name: headers
focal_class.declarator: locale
focal_class.modifier: private
focal_class.original_string: private Locale locale;
focal_class.type: Locale
focal_class.var_name: locale
focal_class.file: webapp/impl/src/main/java/cloud/piranha/webapp/impl/DefaultHttpHeaderManager.java
focal_class.identifier: DefaultHttpHeaderManager
focal_class.interfaces: implements HttpHeaderManager
focal_class.class_method_signature: DefaultHttpHeaderManager.DefaultHttpHeaderManager()
focal_class.full_signature: public  DefaultHttpHeaderManager()
focal_class.identifier: DefaultHttpHeaderManager
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  DefaultHttpHeaderManager()
focal_class.class_method_signature: DefaultHttpHeaderManager.addHeader(String name, String value)
focal_class.full_signature: @Override public void addHeader(String name, String value)
focal_class.identifier: addHeader
focal_class.modifiers: @Override public
focal_class.parameters: (String name, String value)
focal_class.return: void
focal_class.signature: void addHeader(String name, String value)
focal_class.class_method_signature: DefaultHttpHeaderManager.containsHeader(String name)
focal_class.full_signature: @Override public boolean containsHeader(String name)
focal_class.identifier: containsHeader
focal_class.modifiers: @Override public
focal_class.parameters: (String name)
focal_class.return: boolean
focal_class.signature: boolean containsHeader(String name)
focal_class.class_method_signature: DefaultHttpHeaderManager.getDateHeader(String name)
focal_class.full_signature: @Override public long getDateHeader(String name)
focal_class.identifier: getDateHeader
focal_class.modifiers: @Override public
focal_class.parameters: (String name)
focal_class.return: long
focal_class.signature: long getDateHeader(String name)
focal_class.class_method_signature: DefaultHttpHeaderManager.getHeader(String name)
focal_class.full_signature: @Override public String getHeader(String name)
focal_class.identifier: getHeader
focal_class.modifiers: @Override public
focal_class.parameters: (String name)
focal_class.return: String
focal_class.signature: String getHeader(String name)
focal_class.class_method_signature: DefaultHttpHeaderManager.getHeaderNames()
focal_class.full_signature: @Override public Enumeration<String> getHeaderNames()
focal_class.identifier: getHeaderNames
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Enumeration<String>
focal_class.signature: Enumeration<String> getHeaderNames()
focal_class.class_method_signature: DefaultHttpHeaderManager.getHeaders(String name)
focal_class.full_signature: @Override public Enumeration<String> getHeaders(String name)
focal_class.identifier: getHeaders
focal_class.modifiers: @Override public
focal_class.parameters: (String name)
focal_class.return: Enumeration<String>
focal_class.signature: Enumeration<String> getHeaders(String name)
focal_class.class_method_signature: DefaultHttpHeaderManager.getIntHeader(String name)
focal_class.full_signature: @Override public int getIntHeader(String name)
focal_class.identifier: getIntHeader
focal_class.modifiers: @Override public
focal_class.parameters: (String name)
focal_class.return: int
focal_class.signature: int getIntHeader(String name)
focal_class.class_method_signature: DefaultHttpHeaderManager.setHeader(String name, String value)
focal_class.full_signature: @Override public void setHeader(String name, String value)
focal_class.identifier: setHeader
focal_class.modifiers: @Override public
focal_class.parameters: (String name, String value)
focal_class.return: void
focal_class.signature: void setHeader(String name, String value)
focal_method.body: @Override
      public long getDateHeader(String name) throws IllegalArgumentException {
          long result = -1;
          if (headers.containsKey(name.toUpperCase(locale))) {
              DefaultHttpHeader header = headers.get(name.toUpperCase(locale));
              try {
                  String value = header.getValue();
                  SimpleDateFormat format = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss zzz");
                  result = format.parse(value).getTime();
              } catch (ParseException exception) {
                  throw new IllegalArgumentException(
                          "Cannot convert header to a date", exception);
              }
          }
          return result;
      }
focal_method.class_method_signature: DefaultHttpHeaderManager.getDateHeader(String name)
focal_method.full_signature: @Override public long getDateHeader(String name)
focal_method.identifier: getDateHeader
focal_method.invocations: containsKey toUpperCase get toUpperCase getValue getTime parse
focal_method.modifiers: @Override public
focal_method.parameters: (String name)
focal_method.return: long
focal_method.signature: long getDateHeader(String name)