1.1 --- a/src/share/classes/com/sun/tools/javac/jvm/Pool.java Mon Feb 04 18:08:53 2013 -0500 1.2 +++ b/src/share/classes/com/sun/tools/javac/jvm/Pool.java Sun Feb 17 16:44:55 2013 -0500 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. 1.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 * 1.9 * This code is free software; you can redistribute it and/or modify it 1.10 @@ -140,23 +140,23 @@ 1.11 return n == null ? -1 : n.intValue(); 1.12 } 1.13 1.14 - static class Method extends DelegatedSymbol { 1.15 - MethodSymbol m; 1.16 + static class Method extends DelegatedSymbol<MethodSymbol> { 1.17 UniqueType uniqueType; 1.18 Method(MethodSymbol m, Types types) { 1.19 super(m); 1.20 - this.m = m; 1.21 this.uniqueType = new UniqueType(m.type, types); 1.22 } 1.23 - public boolean equals(Object other) { 1.24 - if (!(other instanceof Method)) return false; 1.25 - MethodSymbol o = ((Method)other).m; 1.26 + public boolean equals(Object any) { 1.27 + if (!(any instanceof Method)) return false; 1.28 + MethodSymbol o = ((Method)any).other; 1.29 + MethodSymbol m = this.other; 1.30 return 1.31 o.name == m.name && 1.32 o.owner == m.owner && 1.33 - ((Method)other).uniqueType.equals(uniqueType); 1.34 + ((Method)any).uniqueType.equals(uniqueType); 1.35 } 1.36 public int hashCode() { 1.37 + MethodSymbol m = this.other; 1.38 return 1.39 m.name.hashCode() * 33 + 1.40 m.owner.hashCode() * 9 + 1.41 @@ -173,21 +173,21 @@ 1.42 } 1.43 1.44 @Override 1.45 - public boolean equals(Object other) { 1.46 - if (!super.equals(other)) return false; 1.47 - if (!(other instanceof DynamicMethod)) return false; 1.48 - DynamicMethodSymbol dm1 = (DynamicMethodSymbol)m; 1.49 - DynamicMethodSymbol dm2 = (DynamicMethodSymbol)((DynamicMethod)other).m; 1.50 + public boolean equals(Object any) { 1.51 + if (!super.equals(any)) return false; 1.52 + if (!(any instanceof DynamicMethod)) return false; 1.53 + DynamicMethodSymbol dm1 = (DynamicMethodSymbol)other; 1.54 + DynamicMethodSymbol dm2 = (DynamicMethodSymbol)((DynamicMethod)any).other; 1.55 return dm1.bsm == dm2.bsm && 1.56 dm1.bsmKind == dm2.bsmKind && 1.57 Arrays.equals(uniqueStaticArgs, 1.58 - ((DynamicMethod)other).uniqueStaticArgs); 1.59 + ((DynamicMethod)any).uniqueStaticArgs); 1.60 } 1.61 1.62 @Override 1.63 public int hashCode() { 1.64 int hash = super.hashCode(); 1.65 - DynamicMethodSymbol dm = (DynamicMethodSymbol)m; 1.66 + DynamicMethodSymbol dm = (DynamicMethodSymbol)other; 1.67 hash += dm.bsmKind * 7 + 1.68 dm.bsm.hashCode() * 11; 1.69 for (int i = 0; i < dm.staticArgs.length; i++) { 1.70 @@ -209,23 +209,23 @@ 1.71 } 1.72 } 1.73 1.74 - static class Variable extends DelegatedSymbol { 1.75 - VarSymbol v; 1.76 + static class Variable extends DelegatedSymbol<VarSymbol> { 1.77 UniqueType uniqueType; 1.78 Variable(VarSymbol v, Types types) { 1.79 super(v); 1.80 - this.v = v; 1.81 this.uniqueType = new UniqueType(v.type, types); 1.82 } 1.83 - public boolean equals(Object other) { 1.84 - if (!(other instanceof Variable)) return false; 1.85 - VarSymbol o = ((Variable)other).v; 1.86 + public boolean equals(Object any) { 1.87 + if (!(any instanceof Variable)) return false; 1.88 + VarSymbol o = ((Variable)any).other; 1.89 + VarSymbol v = other; 1.90 return 1.91 o.name == v.name && 1.92 o.owner == v.owner && 1.93 - ((Variable)other).uniqueType.equals(uniqueType); 1.94 + ((Variable)any).uniqueType.equals(uniqueType); 1.95 } 1.96 public int hashCode() { 1.97 + VarSymbol v = other; 1.98 return 1.99 v.name.hashCode() * 33 + 1.100 v.owner.hashCode() * 9 +