@Test public void testStatusAll() throws Exception { for (int i = 100; i < 600; i++) { EnglishReasonPhraseCatalog.INSTANCE.getReason(i, null); } }
@Override public String getReason(final int status, final Locale loc) { Args.checkRange(status, 100, 599, "Unknown category for status code"); final int category = status / 100; final int subcode = status - 100*category; String reason = null; if (REASON_PHRASES[category].length > subcode) { reason = REASON_PHRASES[category][subcode]; } return reason; }
EnglishReasonPhraseCatalog implements ReasonPhraseCatalog { @Override public String getReason(final int status, final Locale loc) { Args.checkRange(status, 100, 599, "Unknown category for status code"); final int category = status / 100; final int subcode = status - 100*category; String reason = null; if (REASON_PHRASES[category].length > subcode) { reason = REASON_PHRASES[category][subcode]; } return reason; } }
EnglishReasonPhraseCatalog implements ReasonPhraseCatalog { @Override public String getReason(final int status, final Locale loc) { Args.checkRange(status, 100, 599, "Unknown category for status code"); final int category = status / 100; final int subcode = status - 100*category; String reason = null; if (REASON_PHRASES[category].length > subcode) { reason = REASON_PHRASES[category][subcode]; } return reason; } protected  EnglishReasonPhraseCatalog(); }
EnglishReasonPhraseCatalog implements ReasonPhraseCatalog { @Override public String getReason(final int status, final Locale loc) { Args.checkRange(status, 100, 599, "Unknown category for status code"); final int category = status / 100; final int subcode = status - 100*category; String reason = null; if (REASON_PHRASES[category].length > subcode) { reason = REASON_PHRASES[category][subcode]; } return reason; } protected  EnglishReasonPhraseCatalog(); @Override String getReason(final int status, final Locale loc); }
EnglishReasonPhraseCatalog implements ReasonPhraseCatalog { @Override public String getReason(final int status, final Locale loc) { Args.checkRange(status, 100, 599, "Unknown category for status code"); final int category = status / 100; final int subcode = status - 100*category; String reason = null; if (REASON_PHRASES[category].length > subcode) { reason = REASON_PHRASES[category][subcode]; } return reason; } protected  EnglishReasonPhraseCatalog(); @Override String getReason(final int status, final Locale loc); final static EnglishReasonPhraseCatalog INSTANCE; }