Mercurial > hg > graal-jvmci-8
comparison agent/src/share/classes/sun/jvm/hotspot/jdi/ReferenceTypeImpl.java @ 2471:37be97a58393
7010849: 5/5 Extraneous javac source/target options when building sa-jdi
Summary: Make code changes necessary to get rid of the '-source 1.4 -target 1.4' options.
Reviewed-by: dholmes, dcubed
author | andrew |
---|---|
date | Fri, 01 Apr 2011 15:15:37 -0700 |
parents | c18cbe5936b8 |
children | 7588156f5cf9 |
comparison
equal
deleted
inserted
replaced
2470:b025bffd6c2c | 2471:37be97a58393 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2002, 2005, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | 4 * |
5 * This code is free software; you can redistribute it and/or modify it | 5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as | 6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
97 | 97 |
98 public int hashCode() { | 98 public int hashCode() { |
99 return saKlass.hashCode(); | 99 return saKlass.hashCode(); |
100 } | 100 } |
101 | 101 |
102 public int compareTo(Object object) { | 102 public int compareTo(ReferenceType refType) { |
103 /* | 103 /* |
104 * Note that it is critical that compareTo() == 0 | 104 * Note that it is critical that compareTo() == 0 |
105 * implies that equals() == true. Otherwise, TreeSet | 105 * implies that equals() == true. Otherwise, TreeSet |
106 * will collapse classes. | 106 * will collapse classes. |
107 * | 107 * |
108 * (Classes of the same name loaded by different class loaders | 108 * (Classes of the same name loaded by different class loaders |
109 * or in different VMs must not return 0). | 109 * or in different VMs must not return 0). |
110 */ | 110 */ |
111 ReferenceTypeImpl other = (ReferenceTypeImpl)object; | 111 ReferenceTypeImpl other = (ReferenceTypeImpl)refType; |
112 int comp = name().compareTo(other.name()); | 112 int comp = name().compareTo(other.name()); |
113 if (comp == 0) { | 113 if (comp == 0) { |
114 Oop rf1 = ref(); | 114 Oop rf1 = ref(); |
115 Oop rf2 = other.ref(); | 115 Oop rf2 = other.ref(); |
116 // optimize for typical case: refs equal and VMs equal | 116 // optimize for typical case: refs equal and VMs equal |