Skip to content

Commit cf3120d

Browse files
committed
7010849: 5/5 Extraneous javac source/target options when building sa-jdi
Make code changes necessary to get rid of the '-source 1.4 -target 1.4' options. Reviewed-by: dholmes, dcubed
1 parent df96662 commit cf3120d

File tree

18 files changed

+50
-59
lines changed

18 files changed

+50
-59
lines changed

hotspot/agent/src/share/classes/sun/jvm/hotspot/HelloWorld.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2000, 2001, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -55,7 +55,7 @@ private static int d(String x) {
5555
synchronized(lock) {
5656
if (useMethodInvoke) {
5757
try {
58-
Method method = HelloWorld.class.getMethod("e", null);
58+
Method method = HelloWorld.class.getMethod("e");
5959
Integer result = (Integer) method.invoke(null, new Object[0]);
6060
return result.intValue();
6161
}

hotspot/agent/src/share/classes/sun/jvm/hotspot/jdi/ByteValueImpl.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
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.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -52,12 +52,10 @@ public int hashCode() {
5252
return intValue();
5353
}
5454

55-
public int compareTo(Object obj) {
56-
byte other = ((ByteValue)obj).value();
57-
return value() - other;
55+
public int compareTo(ByteValue byteVal) {
56+
return value() - byteVal.value();
5857
}
5958

60-
6159
public Type type() {
6260
return vm.theByteType();
6361
}

hotspot/agent/src/share/classes/sun/jvm/hotspot/jdi/CharValueImpl.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
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.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -52,9 +52,8 @@ public int hashCode() {
5252
return intValue();
5353
}
5454

55-
public int compareTo(Object obj) {
56-
char other = ((CharValue)obj).value();
57-
return value() - other;
55+
public int compareTo(CharValue charVal) {
56+
return value() - charVal.value();
5857
}
5958

6059
public Type type() {

hotspot/agent/src/share/classes/sun/jvm/hotspot/jdi/ConnectorImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2002, 2004, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -186,7 +186,7 @@ private static String getVMVersion(Throwable throwable)
186186
// assert isVMVersionMismatch(throwable), "not a VMVersionMismatch"
187187
Class expClass = throwable.getClass();
188188
Method targetVersionMethod = expClass.getMethod("getTargetVersion", new Class[0]);
189-
return (String) targetVersionMethod.invoke(throwable, null);
189+
return (String) targetVersionMethod.invoke(throwable);
190190
}
191191

192192
/** If the causal chain has a sun.jvm.hotspot.runtime.VMVersionMismatchException,

hotspot/agent/src/share/classes/sun/jvm/hotspot/jdi/DoubleValueImpl.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
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.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -45,8 +45,8 @@ public boolean equals(Object obj) {
4545
}
4646
}
4747

48-
public int compareTo(Object obj) {
49-
double other = ((DoubleValue)obj).value();
48+
public int compareTo(DoubleValue doubleVal) {
49+
double other = doubleVal.value();
5050
if (value() < other) {
5151
return -1;
5252
} else if (value() == other) {

hotspot/agent/src/share/classes/sun/jvm/hotspot/jdi/FieldImpl.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,7 @@ public String genericSignature() {
145145
}
146146

147147
// From interface Comparable
148-
public int compareTo(Object object) {
149-
Field field = (Field)object;
148+
public int compareTo(Field field) {
150149
ReferenceTypeImpl declaringType = (ReferenceTypeImpl)declaringType();
151150
int rc = declaringType.compareTo(field.declaringType());
152151
if (rc == 0) {

hotspot/agent/src/share/classes/sun/jvm/hotspot/jdi/FloatValueImpl.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
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.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -52,8 +52,8 @@ public int hashCode() {
5252
return intValue();
5353
}
5454

55-
public int compareTo(Object obj) {
56-
float other = ((FloatValue)obj).value();
55+
public int compareTo(FloatValue floatVal) {
56+
float other = floatVal.value();
5757
if (value() < other) {
5858
return -1;
5959
} else if (value() == other) {

hotspot/agent/src/share/classes/sun/jvm/hotspot/jdi/IntegerValueImpl.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
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.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -52,9 +52,8 @@ public int hashCode() {
5252
return intValue();
5353
}
5454

55-
public int compareTo(Object obj) {
56-
int other = ((IntegerValue)obj).value();
57-
return value() - other;
55+
public int compareTo(IntegerValue integerVal) {
56+
return value() - integerVal.value();
5857
}
5958

6059
public Type type() {

hotspot/agent/src/share/classes/sun/jvm/hotspot/jdi/LocalVariableImpl.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2002, 2004, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -67,8 +67,8 @@ public int hashCode() {
6767
return (int)method.hashCode() + slot();
6868
}
6969

70-
public int compareTo(Object object) {
71-
LocalVariableImpl other = (LocalVariableImpl)object;
70+
public int compareTo(LocalVariable localVar) {
71+
LocalVariableImpl other = (LocalVariableImpl) localVar;
7272
int rc = method.compareTo(other.method);
7373
if (rc == 0) {
7474
rc = slot() - other.slot();

hotspot/agent/src/share/classes/sun/jvm/hotspot/jdi/LocationImpl.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
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.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -78,8 +78,7 @@ public int hashCode() {
7878
return method().hashCode() + (int)codeIndex();
7979
}
8080

81-
public int compareTo(Object object) {
82-
LocationImpl other = (LocationImpl)object;
81+
public int compareTo(Location other) {
8382
int rc = method().compareTo(other.method());
8483
if (rc == 0) {
8584
long diff = codeIndex() - other.codeIndex();

0 commit comments

Comments
 (0)