8276628: Use blessed modifier order in serviceability code

Reviewed-by: dholmes, lmesnik, cjplummer
This commit is contained in:
Magnus Ihse Bursie 2021-11-05 12:07:58 +00:00
parent b9331360f5
commit 7023b3f8a1
89 changed files with 284 additions and 284 deletions
src
java.management/share/classes
jdk.attach
aix/classes/sun/tools/attach
linux/classes/sun/tools/attach
macosx/classes/sun/tools/attach
jdk.hotspot.agent/share/classes/sun/jvm/hotspot
jdk.jcmd/share/classes/sun/tools/jinfo
jdk.jconsole/share/classes/sun/tools/jconsole/inspector
jdk.jdi/share/classes/com/sun
jdk.management.agent/share/classes
jdk/internal/agent
sun/management/jdp
jdk.management/share/classes/com/sun/management/internal

@ -120,7 +120,7 @@ import sun.reflect.misc.ReflectUtil;
* @since 1.6
*/
public class DefaultMXBeanMappingFactory extends MXBeanMappingFactory {
static abstract class NonNullMXBeanMapping extends MXBeanMapping {
abstract static class NonNullMXBeanMapping extends MXBeanMapping {
NonNullMXBeanMapping(Type javaType, OpenType<?> openType) {
super(javaType, openType);
}
@ -936,7 +936,7 @@ public class DefaultMXBeanMappingFactory extends MXBeanMappingFactory {
}
/** Converts from a CompositeData to an instance of the targetClass. */
private static abstract class CompositeBuilder {
private abstract static class CompositeBuilder {
CompositeBuilder(Class<?> targetClass, String[] itemNames) {
this.targetClass = targetClass;
this.itemNames = itemNames;

@ -66,7 +66,7 @@ import sun.reflect.misc.ReflectUtil;
* @since 1.5
*/
public class Introspector {
final public static boolean ALLOW_NONPUBLIC_MBEAN;
public static final boolean ALLOW_NONPUBLIC_MBEAN;
static {
@SuppressWarnings("removal")
String val = AccessController.doPrivileged(new GetPropertyAction("jdk.jmx.mbeans.allowNonPublic"));

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -53,7 +53,7 @@ final class MBeanServerDelegateImpl
extends MBeanServerDelegate
implements DynamicMBean, MBeanRegistration {
final private static String[] attributeNames = new String[] {
private static final String[] attributeNames = new String[] {
"MBeanServerId",
"SpecificationName",
"SpecificationVersion",
@ -106,22 +106,22 @@ final class MBeanServerDelegateImpl
null,getNotificationInfo());
}
final public ObjectName preRegister (MBeanServer server, ObjectName name)
public final ObjectName preRegister (MBeanServer server, ObjectName name)
throws java.lang.Exception {
if (name == null) return DELEGATE_NAME;
else return name;
}
final public void postRegister (Boolean registrationDone) {
public final void postRegister (Boolean registrationDone) {
}
final public void preDeregister()
public final void preDeregister()
throws java.lang.Exception {
throw new IllegalArgumentException(
"The MBeanServerDelegate MBean cannot be unregistered");
}
final public void postDeregister() {
public final void postDeregister() {
}
/**

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -89,7 +89,7 @@ public class MXBeanProxy {
}
}
private static abstract class Handler {
private abstract static class Handler {
Handler(String name, ConvertingMethod cm) {
this.name = name;
this.convertingMethod = cm;

@ -146,22 +146,22 @@ public abstract class ClientNotifForwarder {
/**
* Called to fetch notifications from a server.
*/
abstract protected NotificationResult fetchNotifs(long clientSequenceNumber,
protected abstract NotificationResult fetchNotifs(long clientSequenceNumber,
int maxNotifications,
long timeout)
throws IOException, ClassNotFoundException;
abstract protected Integer addListenerForMBeanRemovedNotif()
protected abstract Integer addListenerForMBeanRemovedNotif()
throws IOException, InstanceNotFoundException;
abstract protected void removeListenerForMBeanRemovedNotif(Integer id)
protected abstract void removeListenerForMBeanRemovedNotif(Integer id)
throws IOException, InstanceNotFoundException,
ListenerNotFoundException;
/**
* Used to send out a notification about lost notifs
*/
abstract protected void lostNotifs(String message, long number);
protected abstract void lostNotifs(String message, long number);
public synchronized void addNotificationListener(Integer listenerID,

@ -85,7 +85,7 @@ import static java.nio.charset.StandardCharsets.UTF_8;
* clear-text password file. If generated by the user, hashed passwords must
* follow the format specified above.
*/
final public class HashedPasswordManager {
public final class HashedPasswordManager {
private static final class UserCredentials {

@ -355,7 +355,7 @@ public class MBeanServerFactory {
* caller's permissions do not include or imply <code>{@link
* MBeanServerPermission}("findMBeanServer")</code>.
*/
public synchronized static
public static synchronized
ArrayList<MBeanServer> findMBeanServer(String agentId) {
checkPermission("findMBeanServer");

@ -351,7 +351,7 @@ public class ObjectName implements Comparable<ObjectName>, QueryExp {
/**
* a shared empty array for empty property lists
*/
static final private Property[] _Empty_property_array = new Property[0];
private static final Property[] _Empty_property_array = new Property[0];
// Class private fields <==============================

@ -144,7 +144,7 @@ public class RequiredModelMBean
private static final JavaSecurityAccess javaSecurityAccess = SharedSecrets.getJavaSecurityAccess();
@SuppressWarnings("removal")
final private AccessControlContext acc = AccessController.getContext();
private final AccessControlContext acc = AccessController.getContext();
/*************************************/
/* constructors */

@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -127,7 +127,7 @@ public class Timer extends NotificationBroadcasterSupport
* Table containing all the timer notifications of this timer,
* with the associated date, period and number of occurrences.
*/
final private Map<Integer,Object[]> timerTable =
private final Map<Integer,Object[]> timerTable =
new HashMap<>();
/**
@ -162,7 +162,7 @@ public class Timer extends NotificationBroadcasterSupport
* The notification counter ID.
* Used to keep the max key value inserted into the timer table.
*/
volatile private int counterID = 0;
private volatile int counterID = 0;
private java.util.Timer timer;

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -68,7 +68,7 @@ class ClassLoadingImpl implements ClassLoadingMXBean {
setVerboseClass(value);
}
native static void setVerboseClass(boolean value);
static native void setVerboseClass(boolean value);
public ObjectName getObjectName() {
return Util.newObjectName(ManagementFactory.CLASS_LOADING_MXBEAN_NAME);

@ -193,5 +193,5 @@ public abstract class NotificationEmitterSupport implements NotificationEmitter
*/
private List<ListenerInfo> listenerList = Collections.emptyList();
abstract public MBeanNotificationInfo[] getNotificationInfo();
public abstract MBeanNotificationInfo[] getNotificationInfo();
}

@ -65,8 +65,8 @@ class VMManagementImpl implements VMManagement {
}
initOptionalSupportFields();
}
private native static String getVersion0();
private native static void initOptionalSupportFields();
private static native String getVersion0();
private static native void initOptionalSupportFields();
// Optional supports
public boolean isCompilationTimeMonitoringSupported() {

@ -135,10 +135,10 @@ public class VirtualMachineImpl extends HotSpotVirtualMachine {
}
// protocol version
private final static String PROTOCOL_VERSION = "1";
private static final String PROTOCOL_VERSION = "1";
// known errors
private final static int ATTACH_ERROR_BADVERSION = 101;
private static final int ATTACH_ERROR_BADVERSION = 101;
/**
* Execute the given command in the target VM.

@ -139,10 +139,10 @@ public class VirtualMachineImpl extends HotSpotVirtualMachine {
}
// protocol version
private final static String PROTOCOL_VERSION = "1";
private static final String PROTOCOL_VERSION = "1";
// known errors
private final static int ATTACH_ERROR_BADVERSION = 101;
private static final int ATTACH_ERROR_BADVERSION = 101;
/**
* Execute the given command in the target VM.

@ -135,10 +135,10 @@ public class VirtualMachineImpl extends HotSpotVirtualMachine {
}
// protocol version
private final static String PROTOCOL_VERSION = "1";
private static final String PROTOCOL_VERSION = "1";
// known errors
private final static int ATTACH_ERROR_BADVERSION = 101;
private static final int ATTACH_ERROR_BADVERSION = 101;
/**
* Execute the given command in the target VM.

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -77,7 +77,7 @@ public class OopMapValue {
DERIVED_OOP_VALUE = db.lookupIntConstant("OopMapValue::derived_oop_value").intValue();
}
public static abstract class OopTypes {
public abstract static class OopTypes {
public static final OopTypes OOP_VALUE = new OopTypes() { int getValue() { return OopMapValue.OOP_VALUE; }};
public static final OopTypes NARROWOOP_VALUE = new OopTypes() { int getValue() { return OopMapValue.NARROWOOP_VALUE; }};
public static final OopTypes CALLEE_SAVED_VALUE = new OopTypes() { int getValue() { return OopMapValue.CALLEE_SAVED_VALUE; }};

@ -92,7 +92,7 @@ public class BsdDebuggerLocal extends DebuggerBase implements BsdDebugger {
// native methods
private native static void init0()
private static native void init0()
throws DebuggerException;
private native void attach0(int pid)
throws DebuggerException;
@ -108,7 +108,7 @@ public class BsdDebuggerLocal extends DebuggerBase implements BsdDebugger {
throws DebuggerException;
private native byte[] readBytesFromProcess0(long address, long numBytes)
throws DebuggerException;
public native static int getAddressSize() ;
public static native int getAddressSize() ;
// Note on Bsd threads are really processes. When target process is
// attached by a serviceability agent thread, only that thread can do

@ -32,7 +32,7 @@ import sun.jvm.hotspot.debugger.bsd.*;
import sun.jvm.hotspot.debugger.cdbg.*;
import sun.jvm.hotspot.debugger.cdbg.basic.*;
final public class BsdAARCH64CFrame extends BasicCFrame {
public final class BsdAARCH64CFrame extends BasicCFrame {
public BsdAARCH64CFrame(BsdDebugger dbg, Address fp, Address pc) {
super(dbg.getCDebugger());
this.fp = fp;

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -30,7 +30,7 @@ import sun.jvm.hotspot.debugger.bsd.*;
import sun.jvm.hotspot.debugger.cdbg.*;
import sun.jvm.hotspot.debugger.cdbg.basic.*;
final public class BsdAMD64CFrame extends BasicCFrame {
public final class BsdAMD64CFrame extends BasicCFrame {
public BsdAMD64CFrame(BsdDebugger dbg, Address rbp, Address rip) {
super(dbg.getCDebugger());
this.rbp = rbp;

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -30,7 +30,7 @@ import sun.jvm.hotspot.debugger.cdbg.*;
import sun.jvm.hotspot.debugger.cdbg.basic.*;
import sun.jvm.hotspot.debugger.x86.*;
final public class BsdX86CFrame extends BasicCFrame {
public final class BsdX86CFrame extends BasicCFrame {
// package/class internals only
public BsdX86CFrame(BsdDebugger dbg, Address ebp, Address pc) {
super(dbg.getCDebugger());

@ -98,7 +98,7 @@ public class LinuxDebuggerLocal extends DebuggerBase implements LinuxDebugger {
// native methods
private native static void init0()
private static native void init0()
throws DebuggerException;
private native void setSAAltRoot0(String altroot);
private native void attach0(int pid)
@ -115,7 +115,7 @@ public class LinuxDebuggerLocal extends DebuggerBase implements LinuxDebugger {
throws DebuggerException;
private native byte[] readBytesFromProcess0(long address, long numBytes)
throws DebuggerException;
public native static int getAddressSize() ;
public static native int getAddressSize() ;
@Override
public native String demangle(String sym);

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, Red Hat Inc.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@ -31,7 +31,7 @@ import sun.jvm.hotspot.debugger.linux.*;
import sun.jvm.hotspot.debugger.cdbg.*;
import sun.jvm.hotspot.debugger.cdbg.basic.*;
final public class LinuxAARCH64CFrame extends BasicCFrame {
public final class LinuxAARCH64CFrame extends BasicCFrame {
public LinuxAARCH64CFrame(LinuxDebugger dbg, Address fp, Address pc) {
super(dbg.getCDebugger());
this.fp = fp;

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -30,7 +30,7 @@ import sun.jvm.hotspot.debugger.linux.*;
import sun.jvm.hotspot.debugger.cdbg.*;
import sun.jvm.hotspot.debugger.cdbg.basic.*;
final public class LinuxAMD64CFrame extends BasicCFrame {
public final class LinuxAMD64CFrame extends BasicCFrame {
public static LinuxAMD64CFrame getTopFrame(LinuxDebugger dbg, Address rip, ThreadContext context) {
Address libptr = dbg.findLibPtrByAddress(rip);

@ -1,5 +1,5 @@
/*
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -30,7 +30,7 @@ import sun.jvm.hotspot.debugger.linux.*;
import sun.jvm.hotspot.debugger.cdbg.*;
import sun.jvm.hotspot.debugger.cdbg.basic.*;
final public class LinuxPPC64CFrame extends BasicCFrame {
public final class LinuxPPC64CFrame extends BasicCFrame {
// package/class internals only
public LinuxPPC64CFrame(LinuxDebugger dbg, Address sp, Address pc, int address_size) {

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -30,7 +30,7 @@ import sun.jvm.hotspot.debugger.cdbg.*;
import sun.jvm.hotspot.debugger.cdbg.basic.*;
import sun.jvm.hotspot.debugger.x86.*;
final public class LinuxX86CFrame extends BasicCFrame {
public final class LinuxX86CFrame extends BasicCFrame {
// package/class internals only
public LinuxX86CFrame(LinuxDebugger dbg, Address ebp, Address pc) {
super(dbg.getCDebugger());

@ -48,19 +48,19 @@ import sun.jvm.hotspot.tools.HeapSummary;
public class G1CollectedHeap extends CollectedHeap {
// HeapRegionManager _hrm;
static private long hrmFieldOffset;
private static long hrmFieldOffset;
// MemRegion _g1_reserved;
static private long g1ReservedFieldOffset;
private static long g1ReservedFieldOffset;
// size_t _summary_bytes_used;
static private CIntegerField summaryBytesUsedField;
private static CIntegerField summaryBytesUsedField;
// G1MonitoringSupport* _monitoring_support;
static private AddressField monitoringSupportField;
private static AddressField monitoringSupportField;
// HeapRegionSet _old_set;
static private long oldSetFieldOffset;
private static long oldSetFieldOffset;
// HeapRegionSet _archive_set;
static private long archiveSetFieldOffset;
private static long archiveSetFieldOffset;
// HeapRegionSet _humongous_set;
static private long humongousSetFieldOffset;
private static long humongousSetFieldOffset;
static {
VM.registerVMInitializedObserver(new Observer() {
@ -70,7 +70,7 @@ public class G1CollectedHeap extends CollectedHeap {
});
}
static private synchronized void initialize(TypeDataBase db) {
private static synchronized void initialize(TypeDataBase db) {
Type type = db.lookupType("G1CollectedHeap");
hrmFieldOffset = type.getField("_hrm").getOffset();

@ -1,5 +1,5 @@
/*
* Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -42,15 +42,15 @@ import sun.jvm.hotspot.types.TypeDataBase;
public class G1HeapRegionTable extends VMObject {
// HeapRegion** _base;
static private AddressField baseField;
private static AddressField baseField;
// uint _length;
static private CIntegerField lengthField;
private static CIntegerField lengthField;
// HeapRegion** _biased_base
static private AddressField biasedBaseField;
private static AddressField biasedBaseField;
// size_t _bias
static private CIntegerField biasField;
private static CIntegerField biasField;
// uint _shift_by
static private CIntegerField shiftByField;
private static CIntegerField shiftByField;
static {
VM.registerVMInitializedObserver(new Observer() {
@ -60,7 +60,7 @@ public class G1HeapRegionTable extends VMObject {
});
}
static private synchronized void initialize(TypeDataBase db) {
private static synchronized void initialize(TypeDataBase db) {
Type type = db.lookupType("G1HeapRegionTable");
baseField = type.getAddressField("_base");

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -38,17 +38,17 @@ import sun.jvm.hotspot.types.TypeDataBase;
public class G1MonitoringSupport extends VMObject {
// size_t _eden_space_committed;
static private CIntegerField edenSpaceCommittedField;
private static CIntegerField edenSpaceCommittedField;
// size_t _eden_space_used;
static private CIntegerField edenSpaceUsedField;
private static CIntegerField edenSpaceUsedField;
// size_t _survivor_space_committed;
static private CIntegerField survivorSpaceCommittedField;
private static CIntegerField survivorSpaceCommittedField;
// size_t _survivor_space_used;
static private CIntegerField survivorSpaceUsedField;
private static CIntegerField survivorSpaceUsedField;
// size_t _old_gen_committed;
static private CIntegerField oldGenCommittedField;
private static CIntegerField oldGenCommittedField;
// size_t _old_gen_used;
static private CIntegerField oldGenUsedField;
private static CIntegerField oldGenUsedField;
static {
VM.registerVMInitializedObserver(new Observer() {
@ -58,7 +58,7 @@ public class G1MonitoringSupport extends VMObject {
});
}
static private synchronized void initialize(TypeDataBase db) {
private static synchronized void initialize(TypeDataBase db) {
Type type = db.lookupType("G1MonitoringSupport");
edenSpaceCommittedField = type.getCIntegerField("_eden_space_committed");

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -46,11 +46,11 @@ import sun.jvm.hotspot.types.TypeDataBase;
public class HeapRegion extends CompactibleSpace implements LiveRegionsProvider {
private static AddressField bottomField;
static private AddressField topField;
private static AddressField topField;
private static AddressField endField;
private static AddressField compactionTopField;
static private CIntegerField grainBytesField;
private static CIntegerField grainBytesField;
private static long typeFieldOffset;
private static long pointerSize;
@ -64,7 +64,7 @@ public class HeapRegion extends CompactibleSpace implements LiveRegionsProvider
});
}
static private synchronized void initialize(TypeDataBase db) {
private static synchronized void initialize(TypeDataBase db) {
Type type = db.lookupType("HeapRegion");
bottomField = type.getAddressField("_bottom");
@ -78,7 +78,7 @@ public class HeapRegion extends CompactibleSpace implements LiveRegionsProvider
pointerSize = db.lookupType("HeapRegion*").getSize();
}
static public long grainBytes() {
public static long grainBytes() {
return grainBytesField.getValue();
}

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -41,7 +41,7 @@ import sun.jvm.hotspot.types.TypeDataBase;
public class HeapRegionManager extends VMObject {
// G1HeapRegionTable _regions
static private long regionsFieldOffset;
private static long regionsFieldOffset;
static {
VM.registerVMInitializedObserver(new Observer() {
@ -51,7 +51,7 @@ public class HeapRegionManager extends VMObject {
});
}
static private synchronized void initialize(TypeDataBase db) {
private static synchronized void initialize(TypeDataBase db) {
Type type = db.lookupType("HeapRegionManager");
regionsFieldOffset = type.getField("_regions").getOffset();

@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -42,7 +42,7 @@ import sun.jvm.hotspot.types.TypeDataBase;
public class HeapRegionSetBase extends VMObject {
// uint _length
static private CIntegerField lengthField;
private static CIntegerField lengthField;
static {
VM.registerVMInitializedObserver(new Observer() {
@ -52,7 +52,7 @@ public class HeapRegionSetBase extends VMObject {
});
}
static private synchronized void initialize(TypeDataBase db) {
private static synchronized void initialize(TypeDataBase db) {
Type type = db.lookupType("HeapRegionSetBase");
lengthField = type.getCIntegerField("_length");

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -35,7 +35,7 @@ import sun.jvm.hotspot.utilities.*;
import sun.jvm.hotspot.utilities.Observable;
import sun.jvm.hotspot.utilities.Observer;
abstract public class GenCollectedHeap extends CollectedHeap {
public abstract class GenCollectedHeap extends CollectedHeap {
private static AddressField youngGenField;
private static AddressField oldGenField;

@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, 2019, Red Hat, Inc. All rights reserved.
* Copyright (c) 2017, 2021, Red Hat, Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -42,13 +42,13 @@ import sun.jvm.hotspot.utilities.Observable;
import sun.jvm.hotspot.utilities.Observer;
public class ShenandoahHeap extends CollectedHeap {
static private CIntegerField numRegions;
static private CIntegerField used;
static private CIntegerField committed;
static private AddressField regions;
static private CIntegerField logMinObjAlignmentInBytes;
private static CIntegerField numRegions;
private static CIntegerField used;
private static CIntegerField committed;
private static AddressField regions;
private static CIntegerField logMinObjAlignmentInBytes;
static private long regionPtrFieldSize;
private static long regionPtrFieldSize;
static {
VM.registerVMInitializedObserver(new Observer() {
public void update(Observable o, Object data) {
@ -57,7 +57,7 @@ public class ShenandoahHeap extends CollectedHeap {
});
}
static private synchronized void initialize(TypeDataBase db) {
private static synchronized void initialize(TypeDataBase db) {
Type type = db.lookupType("ShenandoahHeap");
numRegions = type.getCIntegerField("_num_regions");
used = type.getCIntegerField("_used");

@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, 2019, Red Hat, Inc. All rights reserved.
* Copyright (c) 2017, 2021, Red Hat, Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -74,7 +74,7 @@ public class ShenandoahHeapRegion extends VMObject implements LiveRegionsProvide
});
}
static private synchronized void initialize(TypeDataBase db) {
private static synchronized void initialize(TypeDataBase db) {
Type type = db.lookupType("ShenandoahHeapRegion");
RegionSizeBytesField = type.getCIntegerField("RegionSizeBytes");
RegionStateField = type.getField("_state");

@ -40,7 +40,7 @@ public class ZAttachedArrayForForwarding extends VMObject {
VM.registerVMInitializedObserver((o, d) -> initialize(VM.getVM().getTypeDataBase()));
}
static private synchronized void initialize(TypeDataBase db) {
private static synchronized void initialize(TypeDataBase db) {
Type type = db.lookupType("ZAttachedArrayForForwarding");
lengthField = type.getCIntegerField("_length");

@ -46,7 +46,7 @@ public class ZForwarding extends VMObject {
VM.registerVMInitializedObserver((o, d) -> initialize(VM.getVM().getTypeDataBase()));
}
static private synchronized void initialize(TypeDataBase db) {
private static synchronized void initialize(TypeDataBase db) {
type = db.lookupType("ZForwarding");
virtualFieldOffset = type.getField("_virtual").getOffset();

@ -41,7 +41,7 @@ public class ZForwardingEntry extends VMObject {
VM.registerVMInitializedObserver((o, d) -> initialize(VM.getVM().getTypeDataBase()));
}
static private synchronized void initialize(TypeDataBase db) {
private static synchronized void initialize(TypeDataBase db) {
type = db.lookupType("ZForwardingEntry");
entryField = type.getCIntegerField("_entry");

@ -40,7 +40,7 @@ public class ZForwardingTable extends VMObject {
VM.registerVMInitializedObserver((o, d) -> initialize(VM.getVM().getTypeDataBase()));
}
static private synchronized void initialize(TypeDataBase db) {
private static synchronized void initialize(TypeDataBase db) {
Type type = db.lookupType("ZForwardingTable");
mapFieldOffset = type.getAddressField("_map").getOffset();

@ -61,7 +61,7 @@ public class ZGlobals {
VM.registerVMInitializedObserver((o, d) -> initialize(VM.getVM().getTypeDataBase()));
}
static private synchronized void initialize(TypeDataBase db) {
private static synchronized void initialize(TypeDataBase db) {
Type type = db.lookupType("ZGlobalsForVMStructs");
instanceField = type.getField("_instance_p");

@ -47,7 +47,7 @@ class ZGlobalsForVMStructs extends VMObject {
VM.registerVMInitializedObserver((o, d) -> initialize(VM.getVM().getTypeDataBase()));
}
static private synchronized void initialize(TypeDataBase db) {
private static synchronized void initialize(TypeDataBase db) {
Type type = db.lookupType("ZGlobalsForVMStructs");
ZGlobalPhaseField = type.getAddressField("_ZGlobalPhase");

@ -39,7 +39,7 @@ public class ZGranuleMapForForwarding extends VMObject {
VM.registerVMInitializedObserver((o, d) -> initialize(VM.getVM().getTypeDataBase()));
}
static private synchronized void initialize(TypeDataBase db) {
private static synchronized void initialize(TypeDataBase db) {
Type type = db.lookupType("ZGranuleMapForForwarding");
mapField = type.getAddressField("_map");

@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -38,7 +38,7 @@ public class ZGranuleMapForPageTable extends VMObject {
VM.registerVMInitializedObserver((o, d) -> initialize(VM.getVM().getTypeDataBase()));
}
static private synchronized void initialize(TypeDataBase db) {
private static synchronized void initialize(TypeDataBase db) {
Type type = db.lookupType("ZGranuleMapForPageTable");
mapField = type.getAddressField("_map");

@ -51,7 +51,7 @@ public class ZPage extends VMObject implements LiveRegionsProvider {
VM.registerVMInitializedObserver((o, d) -> initialize(VM.getVM().getTypeDataBase()));
}
static private synchronized void initialize(TypeDataBase db) {
private static synchronized void initialize(TypeDataBase db) {
Type type = db.lookupType("ZPage");
typeField = type.getCIntegerField("_type");

@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -43,7 +43,7 @@ public class ZPageAllocator extends VMObject {
VM.registerVMInitializedObserver((o, d) -> initialize(VM.getVM().getTypeDataBase()));
}
static private synchronized void initialize(TypeDataBase db) {
private static synchronized void initialize(TypeDataBase db) {
Type type = db.lookupType("ZPageAllocator");
maxCapacityField = type.getCIntegerField("_max_capacity");

@ -40,7 +40,7 @@ public class ZPageTable extends VMObject {
VM.registerVMInitializedObserver((o, d) -> initialize(VM.getVM().getTypeDataBase()));
}
static private synchronized void initialize(TypeDataBase db) {
private static synchronized void initialize(TypeDataBase db) {
Type type = db.lookupType("ZPageTable");
mapFieldOffset = type.getAddressField("_map").getOffset();

@ -38,7 +38,7 @@ public class ZRelocate extends VMObject {
VM.registerVMInitializedObserver((o, d) -> initialize(VM.getVM().getTypeDataBase()));
}
static private synchronized void initialize(TypeDataBase db) {
private static synchronized void initialize(TypeDataBase db) {
Type type = db.lookupType("ZRelocate");
}

@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -39,7 +39,7 @@ public class ZVirtualMemory extends VMObject {
VM.registerVMInitializedObserver((o, d) -> initialize(VM.getVM().getTypeDataBase()));
}
static private synchronized void initialize(TypeDataBase db) {
private static synchronized void initialize(TypeDataBase db) {
Type type = db.lookupType("ZVirtualMemory");
startField = type.getCIntegerField("_start");

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -477,7 +477,7 @@ public class ConstantPool extends Metadata implements ClassConstants {
return values;
}
final private static String[] nameForTag = new String[] {
private static final String[] nameForTag = new String[] {
};
private String nameForTag(int tag) {

@ -120,7 +120,7 @@ public class DataLayout {
return VM.getVM().isLP64() ? 1 : 2;
}
static public int computeSizeInBytes(int cellCount) {
public static int computeSizeInBytes(int cellCount) {
return headerSizeInBytes() + cellCount * MethodData.cellSize;
}

@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -29,7 +29,7 @@ import sun.jvm.hotspot.debugger.Address;
/** A DefaultMetadataVisitor implements basic no-op MetadataVisitor
functionality except that the setObj() and getObj() methods are
implemented properly. */
abstract public class DefaultMetadataVisitor implements MetadataVisitor {
public abstract class DefaultMetadataVisitor implements MetadataVisitor {
private Metadata obj;
public void prologue() {}
@ -46,7 +46,7 @@ abstract public class DefaultMetadataVisitor implements MetadataVisitor {
}
// Callback methods for each field type in an object
abstract public void doMetadata(MetadataField field, boolean isVMField);
public abstract void doMetadata(MetadataField field, boolean isVMField);
public void doOop(OopField field, boolean isVMField) {}
public void doOop(NarrowOopField field, boolean isVMField) {}
public void doByte(ByteField field, boolean isVMField) {}

@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -34,7 +34,7 @@ import sun.jvm.hotspot.types.*;
import sun.jvm.hotspot.utilities.Observable;
import sun.jvm.hotspot.utilities.Observer;
abstract public class Metadata extends VMObject {
public abstract class Metadata extends VMObject {
static {
VM.registerVMInitializedObserver(new Observer() {
public void update(Observable o, Object data) {
@ -86,7 +86,7 @@ abstract public class Metadata extends VMObject {
void iterateFields(MetadataVisitor visitor) {
}
abstract public void printValueOn(PrintStream tty);
public abstract void printValueOn(PrintStream tty);
public void dumpReplayData(PrintStream out) {
out.println("# Unknown Metadata");
}

@ -331,7 +331,7 @@ public class MethodData extends Metadata implements MethodDataInterface<Klass,Me
return new DataLayout(this, sizeInBytes());
}
static public int extraNbCells(DataLayout dataLayout) {
public static int extraNbCells(DataLayout dataLayout) {
int nbCells = 0;
switch(dataLayout.tag()) {
case DataLayout.bitDataTag:

@ -1,5 +1,5 @@
/*
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -63,7 +63,7 @@ public class ParametersTypeData<K,M> extends ArrayData {
return parameters.type(i);
}
static public int typeIndex(int i) {
public static int typeIndex(int i) {
return typeLocalOffset(i);
}

@ -1,5 +1,5 @@
/*
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -57,7 +57,7 @@ public class SpeculativeTrapData<K, M> extends ProfileData {
return methodData.getMethodAtAddress(addressAt(speculativeTrapMethod));
}
static public int methodIndex() {
public static int methodIndex() {
return speculativeTrapMethod;
}

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -48,7 +48,7 @@ public class CallRuntimeNode extends CallNode {
nameField = type.getAddressField("_name");
}
static private AddressField nameField;
private static AddressField nameField;
public String name() {
return CStringUtilities.getString(nameField.getValue(getAddress()));

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -48,7 +48,7 @@ public class CallStaticJavaNode extends CallJavaNode {
nameField = type.getAddressField("_name");
}
static private AddressField nameField;
private static AddressField nameField;
public String name() {
return CStringUtilities.getString(nameField.getValue(getAddress()));

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -74,11 +74,11 @@ public class Node extends VMObject {
static HashMap constructors = new HashMap();
static abstract class Instantiator {
abstract static class Instantiator {
abstract Node create(Address addr);
}
static public Node create(Address addr) {
public static Node create(Address addr) {
if (addr == null) return null;
Node result = nodes.get(addr);
if (result == null) {

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -36,13 +36,13 @@ import sun.jvm.hotspot.HotSpotTypeDataBase;
Various subclasses provide different mechanisms for identifying the
appropriate wrapper. */
abstract public class InstanceConstructor<T> {
public abstract class InstanceConstructor<T> {
/** Instantiate the most-precisely typed wrapper object available
for the type of the given Address. If no type in the mapping
matched the type of the Address, throws a WrongTypeException.
Returns null for a null address (similar behavior to
VMObjectFactory). */
abstract public T instantiateWrapperFor(Address addr) throws WrongTypeException;
public abstract T instantiateWrapperFor(Address addr) throws WrongTypeException;
protected WrongTypeException newWrongTypeException(Address addr) {
String message = "No suitable match for type of address " + addr;

@ -652,7 +652,7 @@ public class VM {
}
// Convenience function for conversions
static public long getAddressValue(Address addr) {
public static long getAddressValue(Address addr) {
return VM.getVM().getDebugger().getAddressValue(addr);
}

@ -118,7 +118,7 @@ public class ByteCodeRewriter
}
}
static private void writeShort(byte[] buf, int index, short value) {
private static void writeShort(byte[] buf, int index, short value) {
buf[index] = (byte) ((value >> 8) & 0x00FF);
buf[index + 1] = (byte) (value & 0x00FF);
}

@ -1,5 +1,5 @@
/*
* Copyright (c) 2004, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2004, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -36,8 +36,8 @@ import sun.jvm.hotspot.utilities.CStringUtilities;
/** Encapsulates an arbitrary type value in a tree handled by SimpleTreeModel */
public class CTypeTreeNodeAdapter extends FieldTreeNodeAdapter {
final private Address addr;
final private Type type;
private final Address addr;
private final Type type;
private CTypeFieldIdentifier[] fields = null;
private void collectFields(Type type, ArrayList<CTypeFieldIdentifier> list, boolean statics, boolean recurse) {
@ -65,8 +65,8 @@ public class CTypeTreeNodeAdapter extends FieldTreeNodeAdapter {
}
static class CTypeFieldIdentifier extends FieldIdentifier {
final private Field field;
final private Type holder;
private final Field field;
private final Type holder;
CTypeFieldIdentifier(Type t, Field f) {
holder = t;

@ -1,5 +1,5 @@
/*
* Copyright (c) 2004, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2004, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -127,7 +127,7 @@ public abstract class AbstractHeapGraphWriter implements HeapGraphWriter {
}
}
abstract protected int calculateOopDumpRecordSize(Oop oop) throws IOException;
protected abstract int calculateOopDumpRecordSize(Oop oop) throws IOException;
protected void writeJavaThreads() throws IOException {
Threads threads = VM.getVM().getThreads();

@ -1,5 +1,5 @@
/*
* Copyright (c) 2006, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2006, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -40,7 +40,7 @@ import sun.tools.common.PrintStreamPrinter;
* and decides if the command should be satisfied using the VM attach mechanism
* or an SA tool.
*/
final public class JInfo {
public final class JInfo {
public static void main(String[] args) throws Exception {
if (args.length == 0) {

@ -107,7 +107,7 @@ public class XOpenTypeViewer extends JPanel implements ActionListener {
static interface XViewedArrayData extends Navigatable {
}
static abstract class XOpenTypeData extends JTable {
abstract static class XOpenTypeData extends JTable {
XOpenTypeData parent;
protected int col1Width = -1;
protected int col2Width = -1;

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -56,7 +56,7 @@ public class Bootstrap extends Object {
* ("{@code virtualMachineManager}") or other unspecified
* permissions required by the implementation.
*/
static public synchronized VirtualMachineManager virtualMachineManager() {
public static synchronized VirtualMachineManager virtualMachineManager() {
return VirtualMachineManagerImpl.virtualMachineManager();
}
}

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -101,7 +101,7 @@ public abstract class TransportService {
/**
* The transport service capabilities.
*/
public static abstract class Capabilities {
public abstract static class Capabilities {
/**
* Constructor for subclasses to call.
*/
@ -236,7 +236,7 @@ public abstract class TransportService {
* #stopListening stopListening} to stop the transport
* service from listening on an address.
*/
public static abstract class ListenKey {
public abstract static class ListenKey {
/**
* Constructor for subclasses to call.
*/

@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -117,7 +117,7 @@ public class ExpressionParser implements ExpressionParserConstants {
/*
* Type, name and expression syntax follows.
*/
final public void Type() throws ParseException {
public final void Type() throws ParseException {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case BOOLEAN:
case BYTE:
@ -152,7 +152,7 @@ public class ExpressionParser implements ExpressionParserConstants {
}
}
final public void PrimitiveType() throws ParseException {
public final void PrimitiveType() throws ParseException {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case BOOLEAN:
jj_consume_token(BOOLEAN);
@ -185,7 +185,7 @@ public class ExpressionParser implements ExpressionParserConstants {
}
}
final public String Name() throws ParseException {
public final String Name() throws ParseException {
StringBuilder sb = new StringBuilder();
jj_consume_token(IDENTIFIER);
sb.append(token);
@ -204,7 +204,7 @@ public class ExpressionParser implements ExpressionParserConstants {
throw new Error("Missing return statement in function");
}
final public void NameList() throws ParseException {
public final void NameList() throws ParseException {
Name();
label_3:
while (true) {
@ -224,7 +224,7 @@ public class ExpressionParser implements ExpressionParserConstants {
/*
* Expression syntax follows.
*/
final public void Expression() throws ParseException {
public final void Expression() throws ParseException {
if (jj_2_2(2147483647)) {
Assignment();
} else {
@ -257,14 +257,14 @@ public class ExpressionParser implements ExpressionParserConstants {
}
}
final public void Assignment() throws ParseException {
public final void Assignment() throws ParseException {
PrimaryExpression();
AssignmentOperator();
Expression();
LValue exprVal = pop(); pop().setValue(exprVal); push(exprVal);
}
final public void AssignmentOperator() throws ParseException {
public final void AssignmentOperator() throws ParseException {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case ASSIGN:
jj_consume_token(ASSIGN);
@ -309,7 +309,7 @@ public class ExpressionParser implements ExpressionParserConstants {
}
}
final public void ConditionalExpression() throws ParseException {
public final void ConditionalExpression() throws ParseException {
ConditionalOrExpression();
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case HOOK:
@ -332,7 +332,7 @@ public class ExpressionParser implements ExpressionParserConstants {
}
}
final public void ConditionalOrExpression() throws ParseException {
public final void ConditionalOrExpression() throws ParseException {
ConditionalAndExpression();
label_4:
while (true) {
@ -350,7 +350,7 @@ public class ExpressionParser implements ExpressionParserConstants {
}
}
final public void ConditionalAndExpression() throws ParseException {
public final void ConditionalAndExpression() throws ParseException {
InclusiveOrExpression();
label_5:
while (true) {
@ -368,7 +368,7 @@ public class ExpressionParser implements ExpressionParserConstants {
}
}
final public void InclusiveOrExpression() throws ParseException {
public final void InclusiveOrExpression() throws ParseException {
ExclusiveOrExpression();
label_6:
while (true) {
@ -386,7 +386,7 @@ public class ExpressionParser implements ExpressionParserConstants {
}
}
final public void ExclusiveOrExpression() throws ParseException {
public final void ExclusiveOrExpression() throws ParseException {
AndExpression();
label_7:
while (true) {
@ -404,7 +404,7 @@ public class ExpressionParser implements ExpressionParserConstants {
}
}
final public void AndExpression() throws ParseException {
public final void AndExpression() throws ParseException {
EqualityExpression();
label_8:
while (true) {
@ -422,7 +422,7 @@ public class ExpressionParser implements ExpressionParserConstants {
}
}
final public void EqualityExpression() throws ParseException {
public final void EqualityExpression() throws ParseException {
Token tok;
InstanceOfExpression();
label_9:
@ -454,7 +454,7 @@ public class ExpressionParser implements ExpressionParserConstants {
}
}
final public void InstanceOfExpression() throws ParseException {
public final void InstanceOfExpression() throws ParseException {
RelationalExpression();
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case INSTANCEOF:
@ -468,7 +468,7 @@ public class ExpressionParser implements ExpressionParserConstants {
}
}
final public void RelationalExpression() throws ParseException {
public final void RelationalExpression() throws ParseException {
Token tok;
ShiftExpression();
label_10:
@ -508,7 +508,7 @@ public class ExpressionParser implements ExpressionParserConstants {
}
}
final public void ShiftExpression() throws ParseException {
public final void ShiftExpression() throws ParseException {
AdditiveExpression();
label_11:
while (true) {
@ -542,7 +542,7 @@ public class ExpressionParser implements ExpressionParserConstants {
}
}
final public void AdditiveExpression() throws ParseException {
public final void AdditiveExpression() throws ParseException {
Token tok;
MultiplicativeExpression();
label_12:
@ -574,7 +574,7 @@ public class ExpressionParser implements ExpressionParserConstants {
}
}
final public void MultiplicativeExpression() throws ParseException {
public final void MultiplicativeExpression() throws ParseException {
Token tok;
UnaryExpression();
label_13:
@ -610,7 +610,7 @@ public class ExpressionParser implements ExpressionParserConstants {
}
}
final public void UnaryExpression() throws ParseException {
public final void UnaryExpression() throws ParseException {
Token tok;
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case PLUS:
@ -659,19 +659,19 @@ public class ExpressionParser implements ExpressionParserConstants {
}
}
final public void PreIncrementExpression() throws ParseException {
public final void PreIncrementExpression() throws ParseException {
jj_consume_token(INCR);
PrimaryExpression();
{if (true) throw new ParseException("operation not yet supported");}
}
final public void PreDecrementExpression() throws ParseException {
public final void PreDecrementExpression() throws ParseException {
jj_consume_token(DECR);
PrimaryExpression();
{if (true) throw new ParseException("operation not yet supported");}
}
final public void UnaryExpressionNotPlusMinus() throws ParseException {
public final void UnaryExpressionNotPlusMinus() throws ParseException {
Token tok;
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case BANG:
@ -723,7 +723,7 @@ public class ExpressionParser implements ExpressionParserConstants {
// This production is to determine lookahead only. The LOOKAHEAD specifications
// below are not used, but they are there just to indicate that we know about
// this.
final public void CastLookahead() throws ParseException {
public final void CastLookahead() throws ParseException {
if (jj_2_4(2)) {
jj_consume_token(LPAREN);
PrimitiveType();
@ -783,7 +783,7 @@ public class ExpressionParser implements ExpressionParserConstants {
}
}
final public void PostfixExpression() throws ParseException {
public final void PostfixExpression() throws ParseException {
PrimaryExpression();
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case INCR:
@ -808,7 +808,7 @@ public class ExpressionParser implements ExpressionParserConstants {
}
}
final public void CastExpression() throws ParseException {
public final void CastExpression() throws ParseException {
if (jj_2_6(2)) {
jj_consume_token(LPAREN);
PrimitiveType();
@ -856,7 +856,7 @@ public class ExpressionParser implements ExpressionParserConstants {
}
}
final public void PrimaryExpression() throws ParseException {
public final void PrimaryExpression() throws ParseException {
PrimaryPrefix();
label_16:
while (true) {
@ -874,7 +874,7 @@ public class ExpressionParser implements ExpressionParserConstants {
}
}
final public void PrimaryPrefix() throws ParseException {
public final void PrimaryPrefix() throws ParseException {
String name;
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case FALSE:
@ -915,7 +915,7 @@ public class ExpressionParser implements ExpressionParserConstants {
}
}
final public void PrimarySuffix() throws ParseException {
public final void PrimarySuffix() throws ParseException {
List<Value> argList;
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case LBRACKET:
@ -941,7 +941,7 @@ public class ExpressionParser implements ExpressionParserConstants {
}
}
final public void Literal() throws ParseException {
public final void Literal() throws ParseException {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case INTEGER_LITERAL:
jj_consume_token(INTEGER_LITERAL);
@ -975,7 +975,7 @@ public class ExpressionParser implements ExpressionParserConstants {
}
}
final public void BooleanLiteral() throws ParseException {
public final void BooleanLiteral() throws ParseException {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case TRUE:
jj_consume_token(TRUE);
@ -990,11 +990,11 @@ public class ExpressionParser implements ExpressionParserConstants {
}
}
final public void NullLiteral() throws ParseException {
public final void NullLiteral() throws ParseException {
jj_consume_token(NULL);
}
final public List<Value> Arguments() throws ParseException {
public final List<Value> Arguments() throws ParseException {
List<Value> argList = new ArrayList<>();
jj_consume_token(LPAREN);
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
@ -1027,7 +1027,7 @@ public class ExpressionParser implements ExpressionParserConstants {
throw new Error("Missing return statement in function");
}
final public void ArgumentList(List<Value> argList) throws ParseException {
public final void ArgumentList(List<Value> argList) throws ParseException {
Expression();
argList.add(pop().interiorGetValue());
label_17:
@ -1046,7 +1046,7 @@ public class ExpressionParser implements ExpressionParserConstants {
}
}
final public void AllocationExpression() throws ParseException {
public final void AllocationExpression() throws ParseException {
List<Value> argList; String className;
if (jj_2_7(2)) {
jj_consume_token(NEW);
@ -1084,7 +1084,7 @@ public class ExpressionParser implements ExpressionParserConstants {
* The second LOOKAHEAD specification below is to parse to PrimarySuffix
* if there is an expression between the "[...]".
*/
final public void ArrayDimensions() throws ParseException {
public final void ArrayDimensions() throws ParseException {
label_18:
while (true) {
jj_consume_token(LBRACKET);
@ -2050,11 +2050,11 @@ public class ExpressionParser implements ExpressionParserConstants {
private Token jj_scanpos, jj_lastpos;
private int jj_la;
private int jj_gen;
final private int[] jj_la1 = new int[44];
static private int[] jj_la1_0;
static private int[] jj_la1_1;
static private int[] jj_la1_2;
static private int[] jj_la1_3;
private final int[] jj_la1 = new int[44];
private static int[] jj_la1_0;
private static int[] jj_la1_1;
private static int[] jj_la1_2;
private static int[] jj_la1_3;
static {
jj_la1_init_0();
jj_la1_init_1();
@ -2073,7 +2073,7 @@ public class ExpressionParser implements ExpressionParserConstants {
private static void jj_la1_init_3() {
jj_la1_3 = new int[] {0x0,0x0,0x0,0x0,0x0,0xffe00,0x0,0x0,0x0,0x8,0x10,0x4,0x0,0x0,0x0,0x0,0x0,0x1c0,0x1c0,0x0,0x0,0x23,0x23,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,};
}
final private JJCalls[] jj_2_rtns = new JJCalls[9];
private final JJCalls[] jj_2_rtns = new JJCalls[9];
private boolean jj_rescan = false;
private int jj_gc = 0;
@ -2174,8 +2174,8 @@ public class ExpressionParser implements ExpressionParserConstants {
}
@SuppressWarnings("serial") // JDK implementation class
static private final class LookaheadSuccess extends java.lang.Error { }
final private LookaheadSuccess jj_ls = new LookaheadSuccess();
private static final class LookaheadSuccess extends java.lang.Error { }
private final LookaheadSuccess jj_ls = new LookaheadSuccess();
private boolean jj_scan_token(int kind) {
if (jj_scanpos == jj_lastpos) {
jj_la--;
@ -2199,7 +2199,7 @@ public class ExpressionParser implements ExpressionParserConstants {
/** Get the next Token. */
final public Token getNextToken() {
public final Token getNextToken() {
if (token.next != null) token = token.next;
else token = token.next = token_source.getNextToken();
jj_ntk = -1;
@ -2208,7 +2208,7 @@ public class ExpressionParser implements ExpressionParserConstants {
}
/** Get the specific Token. */
final public Token getToken(int index) {
public final Token getToken(int index) {
Token t = token;
for (int i = 0; i < index; i++) {
if (t.next != null) t = t.next;
@ -2299,11 +2299,11 @@ public class ExpressionParser implements ExpressionParserConstants {
}
/** Enable tracing. */
final public void enable_tracing() {
public final void enable_tracing() {
}
/** Disable tracing. */
final public void disable_tracing() {
public final void disable_tracing() {
}
private void jj_rescan_token() {

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -110,7 +110,7 @@ class Env {
return sourceMapper.getSourcePath();
}
static private List<String> excludes() {
private static List<String> excludes() {
if (excludes == null) {
setExcludes("java.*, javax.*, sun.*, com.sun.*, jdk.*");
}

@ -304,15 +304,15 @@ class VMConnection {
return al;
}
static private boolean isPreviousCharWhitespace(char[] arr, int curr_pos) {
private static boolean isPreviousCharWhitespace(char[] arr, int curr_pos) {
return isCharWhitespace(arr, curr_pos - 1);
}
static private boolean isNextCharWhitespace(char[] arr, int curr_pos) {
private static boolean isNextCharWhitespace(char[] arr, int curr_pos) {
return isCharWhitespace(arr, curr_pos + 1);
}
static private boolean isCharWhitespace(char[] arr, int pos) {
private static boolean isCharWhitespace(char[] arr, int pos) {
if (pos < 0 || pos >= arr.length) {
// outside arraybounds is considered an implicit space
return true;
@ -323,7 +323,7 @@ class VMConnection {
return false;
}
static private boolean isLastChar(char[] arr, int pos) {
private static boolean isLastChar(char[] arr, int pos) {
return (pos + 1 == arr.length);
}

@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -46,14 +46,14 @@ import com.sun.jdi.connect.spi.TransportService;
abstract class AbstractLauncher extends ConnectorImpl
implements LaunchingConnector
{
abstract public VirtualMachine
public abstract VirtualMachine
launch(Map<String, ? extends Connector.Argument> arguments)
throws IOException, IllegalConnectorArgumentsException,
VMStartException;
abstract public String name();
public abstract String name();
abstract public String description();
public abstract String description();
ThreadGroup grp;

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -42,11 +42,11 @@ import com.sun.jdi.ThreadReference;
import com.sun.jdi.Value;
import com.sun.jdi.VirtualMachine;
final public class ClassTypeImpl extends InvokableTypeImpl
public final class ClassTypeImpl extends InvokableTypeImpl
implements ClassType
{
private static class IResult implements InvocationResult {
final private JDWP.ClassType.InvokeMethod rslt;
private final JDWP.ClassType.InvokeMethod rslt;
public IResult(JDWP.ClassType.InvokeMethod rslt) {
this.rslt = rslt;

@ -48,7 +48,7 @@ public class ConcreteMethodImpl extends MethodImpl {
/*
* A subset of the line number info that is softly cached
*/
static private class SoftLocationXRefs {
private static class SoftLocationXRefs {
final String stratumID; // The stratum of this information
final Map<Integer, List<Location>> lineMapper; // Maps line number to location(s)
final List<Location> lineLocations; // List of locations ordered by code index

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -36,11 +36,11 @@ import com.sun.jdi.Method;
import com.sun.jdi.ReferenceType;
import com.sun.jdi.VirtualMachine;
final public class InterfaceTypeImpl extends InvokableTypeImpl
public final class InterfaceTypeImpl extends InvokableTypeImpl
implements InterfaceType {
private static class IResult implements InvocationResult {
final private JDWP.InterfaceType.InvokeMethod rslt;
private final JDWP.InterfaceType.InvokeMethod rslt;
public IResult(JDWP.InterfaceType.InvokeMethod rslt) {
this.rslt = rslt;

@ -92,7 +92,7 @@ abstract class InvokableTypeImpl extends ReferenceTypeImpl {
* compatibility.
* @throws VMCannotBeModifiedException if the VirtualMachine is read-only - see {@link VirtualMachine#canBeModified()}.
*/
final public Value invokeMethod(ThreadReference threadIntf, Method methodIntf,
public final Value invokeMethod(ThreadReference threadIntf, Method methodIntf,
List<? extends Value> origArguments, int options)
throws InvalidTypeException,
ClassNotLoadedException,

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -28,12 +28,12 @@ package com.sun.tools.jdi;
import java.io.IOException;
public class Packet extends Object {
public final static short NoFlags = 0x0;
public final static short Reply = 0x80;
public final static short ReplyNoError = 0x0;
public static final short NoFlags = 0x0;
public static final short Reply = 0x80;
public static final short ReplyNoError = 0x0;
static int uID = 1;
final static byte[] nullData = new byte[0];
static final byte[] nullData = new byte[0];
// Note! flags, cmdSet, and cmd are all byte values.
// We represent them as shorts to make them easier
@ -121,7 +121,7 @@ public class Packet extends Object {
data = nullData;
}
static synchronized private int uniqID() {
private static synchronized int uniqID() {
/*
* JDWP spec does not require this id to be sequential and
* increasing, but our implementation does. See

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -39,14 +39,14 @@ public abstract class PrimitiveValueImpl extends ValueImpl
super(aVm);
}
abstract public boolean booleanValue();
abstract public byte byteValue();
abstract public char charValue();
abstract public short shortValue();
abstract public int intValue();
abstract public long longValue();
abstract public float floatValue();
abstract public double doubleValue();
public abstract boolean booleanValue();
public abstract byte byteValue();
public abstract char charValue();
public abstract short shortValue();
public abstract int intValue();
public abstract long longValue();
public abstract float floatValue();
public abstract double doubleValue();
/*
* The checked versions of the value accessors throw

@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -38,9 +38,9 @@ import com.sun.jdi.connect.spi.TransportService;
public class RawCommandLineLauncher extends AbstractLauncher {
static private final String ARG_COMMAND = "command";
static private final String ARG_ADDRESS = "address";
static private final String ARG_QUOTE = "quote";
private static final String ARG_COMMAND = "command";
private static final String ARG_ADDRESS = "address";
private static final String ARG_QUOTE = "quote";
TransportService transportService;
Transport transport;

@ -565,7 +565,7 @@ public abstract class ReferenceTypeImpl extends TypeImpl implements ReferenceTyp
return list;
}
abstract public List<Method> allMethods();
public abstract List<Method> allMethods();
public List<Method> methodsByName(String name) {
List<Method> methods = visibleMethods();

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -40,12 +40,12 @@ import com.sun.jdi.connect.spi.TransportService;
public class SunCommandLineLauncher extends AbstractLauncher {
static private final String ARG_HOME = "home";
static private final String ARG_OPTIONS = "options";
static private final String ARG_MAIN = "main";
static private final String ARG_INIT_SUSPEND = "suspend";
static private final String ARG_QUOTE = "quote";
static private final String ARG_VM_EXEC = "vmexec";
private static final String ARG_HOME = "home";
private static final String ARG_OPTIONS = "options";
private static final String ARG_MAIN = "main";
private static final String ARG_INIT_SUSPEND = "suspend";
private static final String ARG_QUOTE = "quote";
private static final String ARG_VM_EXEC = "vmexec";
TransportService transportService;
Transport transport;

@ -52,8 +52,8 @@ public class TargetVM implements Runnable {
* TO DO: The limit numbers below are somewhat arbitrary and should
* be configurable in the future.
*/
static private final int OVERLOADED_QUEUE = 10000;
static private final int UNDERLOADED_QUEUE = 100;
private static final int OVERLOADED_QUEUE = 10000;
private static final int UNDERLOADED_QUEUE = 100;
TargetVM(VirtualMachineImpl vm, Connection connection) {
this.vm = vm;

@ -407,7 +407,7 @@ public class ThreadReferenceImpl extends ObjectReferenceImpl
* Private version of frames() allows "-1" to specify all
* remaining frames.
*/
synchronized private List<StackFrame> privateFrames(int start, int length)
private synchronized List<StackFrame> privateFrames(int start, int length)
throws IncompatibleThreadStateException {
// Lock must be held while creating stack frames so if that two threads

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -29,7 +29,7 @@ import com.sun.jdi.ReferenceType;
import com.sun.jdi.TypeComponent;
import com.sun.jdi.VirtualMachine;
abstract public class TypeComponentImpl extends MirrorImpl
public abstract class TypeComponentImpl extends MirrorImpl
implements TypeComponent
{
protected final long ref;

@ -124,7 +124,7 @@ class VirtualMachineImpl extends MirrorImpl
// "objectsByID" protected by "synchronized(this)".
private final Map<Long, SoftObjectReference> objectsByID = new HashMap<>();
private final ReferenceQueue<ObjectReferenceImpl> referenceQueue = new ReferenceQueue<>();
static private final int DISPOSE_THRESHOLD = 50;
private static final int DISPOSE_THRESHOLD = 50;
private final List<SoftObjectReference> batchedDisposeRequests =
Collections.synchronizedList(new ArrayList<>(DISPOSE_THRESHOLD + 10));
@ -1548,7 +1548,7 @@ class VirtualMachineImpl extends MirrorImpl
return threadGroupForJDI;
}
static private class SoftObjectReference extends SoftReference<ObjectReferenceImpl> {
private static class SoftObjectReference extends SoftReference<ObjectReferenceImpl> {
int count;
Long key;

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -68,7 +68,7 @@ public class Agent {
/**
* Agent status collector strategy class
*/
private static abstract class StatusCollector {
private abstract static class StatusCollector {
protected static final Map<String, String> DEFAULT_PROPS = new HashMap<>();
static {
@ -93,8 +93,8 @@ public class Agent {
}
final protected StringBuilder sb = new StringBuilder();
final public String collect() {
protected final StringBuilder sb = new StringBuilder();
public final String collect() {
Properties agentProps = VMSupport.getAgentProperties();
String localConnAddr = (String)agentProps.get(LOCAL_CONNECTOR_ADDRESS_PROP);
if (localConnAddr != null || jmxServer != null) {
@ -169,21 +169,21 @@ public class Agent {
return (T t) -> p.test(f.apply(t));
}
abstract protected void addAgentStatus(boolean enabled);
abstract protected void appendConnectionsHeader();
abstract protected void appendConnectionsFooter();
abstract protected void addConnectionDetails(JMXServiceURL u);
abstract protected void appendConnectionHeader(boolean remote);
abstract protected void appendConnectionFooter(boolean remote);
abstract protected void appendConfigPropsHeader();
abstract protected void appendConfigPropsFooter();
abstract protected void addConfigProp(Map.Entry<?, ?> prop);
protected abstract void addAgentStatus(boolean enabled);
protected abstract void appendConnectionsHeader();
protected abstract void appendConnectionsFooter();
protected abstract void addConnectionDetails(JMXServiceURL u);
protected abstract void appendConnectionHeader(boolean remote);
protected abstract void appendConnectionFooter(boolean remote);
protected abstract void appendConfigPropsHeader();
protected abstract void appendConfigPropsFooter();
protected abstract void addConfigProp(Map.Entry<?, ?> prop);
}
/**
* Free-text status collector strategy implementation
*/
final private static class TextStatusCollector extends StatusCollector {
private static final class TextStatusCollector extends StatusCollector {
@Override
protected void addAgentStatus(boolean enabled) {

@ -1,5 +1,5 @@
/*
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -51,32 +51,32 @@ public final class JdpJmxPacket
/**
* Session ID
*/
public final static String UUID_KEY = "DISCOVERABLE_SESSION_UUID";
public static final String UUID_KEY = "DISCOVERABLE_SESSION_UUID";
/**
* Name of main class
*/
public final static String MAIN_CLASS_KEY = "MAIN_CLASS";
public static final String MAIN_CLASS_KEY = "MAIN_CLASS";
/**
* JMX service URL
*/
public final static String JMX_SERVICE_URL_KEY = "JMX_SERVICE_URL";
public static final String JMX_SERVICE_URL_KEY = "JMX_SERVICE_URL";
/**
* Name of Java instance
*/
public final static String INSTANCE_NAME_KEY = "INSTANCE_NAME";
public static final String INSTANCE_NAME_KEY = "INSTANCE_NAME";
/**
* PID of java process, optional presented if it could be obtained
*/
public final static String PROCESS_ID_KEY = "PROCESS_ID";
public static final String PROCESS_ID_KEY = "PROCESS_ID";
/**
* Hostname of rmi server, optional presented if user overrides rmi server
* hostname by java.rmi.server.hostname property
*/
public final static String RMI_HOSTNAME_KEY = "RMI_HOSTNAME";
public static final String RMI_HOSTNAME_KEY = "RMI_HOSTNAME";
/**
* Configured broadcast interval, optional
*/
public final static String BROADCAST_INTERVAL_KEY = "BROADCAST_INTERVAL";
public static final String BROADCAST_INTERVAL_KEY = "BROADCAST_INTERVAL";
private UUID id;
private String mainClass;

@ -335,10 +335,10 @@ public class DiagnosticCommandImpl extends NotificationEmitterSupport
return new ImmutableDescriptor(map);
}
private final static String notifName =
private static final String notifName =
"javax.management.Notification";
private final static String[] diagFramNotifTypes = {
private static final String[] diagFramNotifTypes = {
"jmx.mbean.info.changed"
};

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -70,10 +70,10 @@ public class GarbageCollectorExtImpl extends GarbageCollectorImpl
return info;
}
private final static String notifName =
private static final String notifName =
"javax.management.Notification";
private final static String[] gcNotifTypes = {
private static final String[] gcNotifTypes = {
GarbageCollectionNotificationInfo.GARBAGE_COLLECTION_NOTIFICATION
};

@ -46,7 +46,7 @@ import sun.management.spi.PlatformMBeanProvider;
@SuppressWarnings("removal")
public final class PlatformMBeanProviderImpl extends PlatformMBeanProvider {
final static String DIAGNOSTIC_COMMAND_MBEAN_NAME =
static final String DIAGNOSTIC_COMMAND_MBEAN_NAME =
"com.sun.management:type=DiagnosticCommand";
private final List<PlatformComponent<?>> mxbeanList;