comparison agent/src/share/classes/sun/jvm/hotspot/jdi/LocationImpl.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
comparison
equal deleted inserted replaced
2470:b025bffd6c2c 2471:37be97a58393
1 /* 1 /*
2 * Copyright (c) 2002, 2003, 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.
76 * TO DO: better hash code? 76 * TO DO: better hash code?
77 */ 77 */
78 return method().hashCode() + (int)codeIndex(); 78 return method().hashCode() + (int)codeIndex();
79 } 79 }
80 80
81 public int compareTo(Object object) { 81 public int compareTo(Location other) {
82 LocationImpl other = (LocationImpl)object;
83 int rc = method().compareTo(other.method()); 82 int rc = method().compareTo(other.method());
84 if (rc == 0) { 83 if (rc == 0) {
85 long diff = codeIndex() - other.codeIndex(); 84 long diff = codeIndex() - other.codeIndex();
86 if (diff < 0) 85 if (diff < 0)
87 return -1; 86 return -1;