@Test void testByteHexDirNameException() { assertThatIllegalArgumentException() .isThrownBy(() -> TagUtil.byteHexDirName(0)); assertThatIllegalArgumentException() .isThrownBy(() -> TagUtil.byteHexDirName(-1)); }
static String byteHexDirName(int majorRevision) { if (majorRevision <= 0) { throw new IllegalArgumentException("invalid majorRevision " + majorRevision + " (expected: > 0)"); } final StringBuilder sb = new StringBuilder(16); final int shift = 8; do { sb.append(TABLE[majorRevision & 0xFF]); majorRevision >>>= shift; } while (majorRevision != 0); return sb.toString(); }
TagUtil { static String byteHexDirName(int majorRevision) { if (majorRevision <= 0) { throw new IllegalArgumentException("invalid majorRevision " + majorRevision + " (expected: > 0)"); } final StringBuilder sb = new StringBuilder(16); final int shift = 8; do { sb.append(TABLE[majorRevision & 0xFF]); majorRevision >>>= shift; } while (majorRevision != 0); return sb.toString(); } }
TagUtil { static String byteHexDirName(int majorRevision) { if (majorRevision <= 0) { throw new IllegalArgumentException("invalid majorRevision " + majorRevision + " (expected: > 0)"); } final StringBuilder sb = new StringBuilder(16); final int shift = 8; do { sb.append(TABLE[majorRevision & 0xFF]); majorRevision >>>= shift; } while (majorRevision != 0); return sb.toString(); } private  TagUtil(); }
TagUtil { static String byteHexDirName(int majorRevision) { if (majorRevision <= 0) { throw new IllegalArgumentException("invalid majorRevision " + majorRevision + " (expected: > 0)"); } final StringBuilder sb = new StringBuilder(16); final int shift = 8; do { sb.append(TABLE[majorRevision & 0xFF]); majorRevision >>>= shift; } while (majorRevision != 0); return sb.toString(); } private  TagUtil();  }
TagUtil { static String byteHexDirName(int majorRevision) { if (majorRevision <= 0) { throw new IllegalArgumentException("invalid majorRevision " + majorRevision + " (expected: > 0)"); } final StringBuilder sb = new StringBuilder(16); final int shift = 8; do { sb.append(TABLE[majorRevision & 0xFF]); majorRevision >>>= shift; } while (majorRevision != 0); return sb.toString(); } private  TagUtil();   }