Validates a table name. @throws IllegalArgumentException if the table name is too big or malformed. @throws NullPointerException if the table name is null.
(final byte[] table)
| 337 | * @throws NullPointerException if the table name is {@code null}. |
| 338 | */ |
| 339 | static void checkTable(final byte[] table) { |
| 340 | if (table.length > Byte.MAX_VALUE) { |
| 341 | throw new IllegalArgumentException("Table name too long: " |
| 342 | + table.length + " bytes long " + Bytes.pretty(table)); |
| 343 | } else if (table.length == 0) { |
| 344 | throw new IllegalArgumentException("empty table name"); |
| 345 | } |
| 346 | } |
| 347 | |
| 348 | /** |
| 349 | * Validates a row key. |