private void addExtension(String extension, MimeType type) throws MimeTypeException {
        MimeType previous = extensions.get(extension);
        if (previous == null || registry.isSpecializationOf(previous.getType(), type.getType())) {
            extensions.put(extension, type);
            int length = extension.length();
            minExtensionLength = Math.min(minExtensionLength, length);
            maxExtensionLength = Math.max(maxExtensionLength, length);
        } else if (previous == type ||
                registry.isSpecializationOf(type.getType(), previous.getType())) {
            // do nothing
        } else {
            throw new MimeTypeException("Conflicting extension pattern: " + extension);
        }
    }
Index of generic glob patterns, sorted by length.
tika-core/src/main/java/org/apache/tika/mime/Patterns.java