Not much you can do here, but equality isn't well defined for types. For example, `String.class == String.class`, but `String[].class` _isn't_ equal to the parameter of `Set<String[]>`. There are similar problems for primitives (`int.class != Integer.class`).