Explorar el Código

Implement hashCode for MultiType.

To honour the Object.equals contract.
tags/rel_3_23_0_ga
nickl- hace 6 años
padre
commit
049879f903
Se han modificado 1 ficheros con 8 adiciones y 0 borrados
  1. 8
    0
      src/main/javassist/bytecode/analysis/MultiType.java

+ 8
- 0
src/main/javassist/bytecode/analysis/MultiType.java Ver fichero

@@ -281,6 +281,14 @@ public class MultiType extends Type {

return resolved;
}
@Override
public int hashCode() {
if (resolved != null)
return resolved.hashCode();
return interfaces.keySet().hashCode();
}

public boolean equals(Object o) {
if (! (o instanceof MultiType))

Cargando…
Cancelar
Guardar