Can you move the throw new IllegalStateException("Illegal attribute type id found") inside the default?

An empty default is imho confusing and in this case not needed.