After JDK-8338544, the old descriptor string validation is removed. The new validation doesn't test against empty strings, so the call `ClassDesc.of("")` and `ClassDesc.ofInternalName("")` now erroneously returns instead of throwing an IllegalArgumentException.
The class name validation has significant overlap with package names: valid package names, except the empty string for the unnamed package, are always valid class names. Valid class names are always valid package names. We can unify their validation.