http://git-wip-us.apache.org/repos/asf/geode/blob/a4458531/geode-core/src/main/java/org/apache/geode/internal/process/UnableToControlProcessException.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/org/apache/geode/internal/process/UnableToControlProcessException.java b/geode-core/src/main/java/org/apache/geode/internal/process/UnableToControlProcessException.java index b89b886..ac4e4c8 100755 --- a/geode-core/src/main/java/org/apache/geode/internal/process/UnableToControlProcessException.java +++ b/geode-core/src/main/java/org/apache/geode/internal/process/UnableToControlProcessException.java @@ -20,7 +20,7 @@ package org.apache.geode.internal.process; * * @since GemFire 8.0 */ -public final class UnableToControlProcessException extends Exception { +public class UnableToControlProcessException extends Exception { private static final long serialVersionUID = 7579463534993125290L; /**
http://git-wip-us.apache.org/repos/asf/geode/blob/a4458531/geode-core/src/main/java/org/apache/geode/internal/shared/NativeCalls.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/org/apache/geode/internal/shared/NativeCalls.java b/geode-core/src/main/java/org/apache/geode/internal/shared/NativeCalls.java index 86064e4..238abcf 100755 --- a/geode-core/src/main/java/org/apache/geode/internal/shared/NativeCalls.java +++ b/geode-core/src/main/java/org/apache/geode/internal/shared/NativeCalls.java @@ -81,7 +81,7 @@ public abstract class NativeCalls { } @SuppressWarnings("unchecked") - protected static final Map<String, String> getModifiableJavaEnv() { + protected static Map<String, String> getModifiableJavaEnv() { final Map<String, String> env = System.getenv(); try { final Field m = env.getClass().getDeclaredField("m"); @@ -93,7 +93,7 @@ public abstract class NativeCalls { } @SuppressWarnings("unchecked") - protected static final Map<String, String> getModifiableJavaEnvWIN() { + protected static Map<String, String> getModifiableJavaEnvWIN() { try { final Field envField = Class.forName("java.lang.ProcessEnvironment") .getDeclaredField("theCaseInsensitiveEnvironment"); @@ -355,7 +355,7 @@ public abstract class NativeCalls { * A generic implementation of {@link #setSocketOptions} for POSIX like systems that requires the * child classes to implement a few platform specific methods. */ - protected final Map<TCPSocketOptions, Throwable> setGenericSocketOptions(Socket sock, + protected Map<TCPSocketOptions, Throwable> setGenericSocketOptions(Socket sock, InputStream sockStream, Map<TCPSocketOptions, Object> optValueMap) throws UnsupportedOperationException { final Set<Map.Entry<TCPSocketOptions, Object>> optValueEntries = optValueMap.entrySet(); http://git-wip-us.apache.org/repos/asf/geode/blob/a4458531/geode-core/src/main/java/org/apache/geode/internal/shared/NativeCallsJNAImpl.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/org/apache/geode/internal/shared/NativeCallsJNAImpl.java b/geode-core/src/main/java/org/apache/geode/internal/shared/NativeCallsJNAImpl.java index 92937c9..760144a 100644 --- a/geode-core/src/main/java/org/apache/geode/internal/shared/NativeCallsJNAImpl.java +++ b/geode-core/src/main/java/org/apache/geode/internal/shared/NativeCallsJNAImpl.java @@ -59,7 +59,7 @@ import java.util.HashMap; * * @since GemFire 8.0 */ -public final class NativeCallsJNAImpl { +public class NativeCallsJNAImpl { // no instance allowed private NativeCallsJNAImpl() {} @@ -69,7 +69,7 @@ public final class NativeCallsJNAImpl { */ private static final NativeCalls instance = getImplInstance(); - private static final NativeCalls getImplInstance() { + private static NativeCalls getImplInstance() { if (Platform.isLinux()) { return new LinuxNativeCalls(); } @@ -895,7 +895,7 @@ public final class NativeCallsJNAImpl { /** * Implementation of {@link NativeCalls} for Windows platforms. */ - private static final class WinNativeCalls extends NativeCalls { + private static class WinNativeCalls extends NativeCalls { static { // for socket operations @@ -903,7 +903,7 @@ public final class NativeCallsJNAImpl { } @SuppressWarnings("unused") - public static final class TcpKeepAlive extends Structure { + public static class TcpKeepAlive extends Structure { public int onoff; public int keepalivetime; public int keepaliveinterval; @@ -921,7 +921,7 @@ public final class NativeCallsJNAImpl { static final int WSAENOPROTOOPT = 10042; static final int SIO_KEEPALIVE_VALS = -1744830460; - private static final class Kernel32 { + private static class Kernel32 { static { // kernel32 requires stdcall calling convention http://git-wip-us.apache.org/repos/asf/geode/blob/a4458531/geode-core/src/main/java/org/apache/geode/internal/shared/NativeErrorException.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/org/apache/geode/internal/shared/NativeErrorException.java b/geode-core/src/main/java/org/apache/geode/internal/shared/NativeErrorException.java index 63001f3..2a2193b 100644 --- a/geode-core/src/main/java/org/apache/geode/internal/shared/NativeErrorException.java +++ b/geode-core/src/main/java/org/apache/geode/internal/shared/NativeErrorException.java @@ -33,7 +33,7 @@ public class NativeErrorException extends Exception { this.errorCode = errorCode; } - public final int getErrorCode() { + public int getErrorCode() { return this.errorCode; } } http://git-wip-us.apache.org/repos/asf/geode/blob/a4458531/geode-core/src/main/java/org/apache/geode/internal/shared/OSType.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/org/apache/geode/internal/shared/OSType.java b/geode-core/src/main/java/org/apache/geode/internal/shared/OSType.java index afbf630..a401981 100644 --- a/geode-core/src/main/java/org/apache/geode/internal/shared/OSType.java +++ b/geode-core/src/main/java/org/apache/geode/internal/shared/OSType.java @@ -76,7 +76,7 @@ public enum OSType { /** * Indicates a Microsoft Windows family OS. */ - public final boolean isWindows() { + public boolean isWindows() { return this == WIN; } http://git-wip-us.apache.org/repos/asf/geode/blob/a4458531/geode-core/src/main/java/org/apache/geode/internal/statistics/AbstractStatisticsFactory.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/org/apache/geode/internal/statistics/AbstractStatisticsFactory.java b/geode-core/src/main/java/org/apache/geode/internal/statistics/AbstractStatisticsFactory.java index 90d141e..95e8308 100755 --- a/geode-core/src/main/java/org/apache/geode/internal/statistics/AbstractStatisticsFactory.java +++ b/geode-core/src/main/java/org/apache/geode/internal/statistics/AbstractStatisticsFactory.java @@ -59,32 +59,32 @@ public abstract class AbstractStatisticsFactory implements StatisticsFactory, St public void close() {} @Override - public final String getName() { + public String getName() { return this.name; } @Override - public final long getId() { + public long getId() { return this.id; } @Override - public final long getStartTime() { + public long getStartTime() { return this.startTime; } @Override - public final int getStatListModCount() { + public int getStatListModCount() { return this.statsListModCount; } @Override - public final List<Statistics> getStatsList() { + public List<Statistics> getStatsList() { return this.statsList; } @Override - public final int getStatisticsCount() { + public int getStatisticsCount() { int result = 0; List<Statistics> statsList = this.statsList; if (statsList != null) { @@ -94,7 +94,7 @@ public abstract class AbstractStatisticsFactory implements StatisticsFactory, St } @Override - public final Statistics findStatistics(long id) { + public Statistics findStatistics(long id) { List<Statistics> statsList = this.statsList; synchronized (statsList) { for (Statistics s : statsList) { @@ -108,7 +108,7 @@ public abstract class AbstractStatisticsFactory implements StatisticsFactory, St } @Override - public final boolean statisticsExists(long id) { + public boolean statisticsExists(long id) { List<Statistics> statsList = this.statsList; for (Statistics s : statsList) { if (s.getUniqueId() == id) { @@ -119,7 +119,7 @@ public abstract class AbstractStatisticsFactory implements StatisticsFactory, St } @Override - public final Statistics[] getStatistics() { + public Statistics[] getStatistics() { List<Statistics> statsList = this.statsList; return (Statistics[]) statsList.toArray(new Statistics[statsList.size()]); } @@ -127,17 +127,17 @@ public abstract class AbstractStatisticsFactory implements StatisticsFactory, St // StatisticsFactory methods @Override - public final Statistics createStatistics(StatisticsType type) { + public Statistics createStatistics(StatisticsType type) { return createOsStatistics(type, null, 0, 0); } @Override - public final Statistics createStatistics(StatisticsType type, String textId) { + public Statistics createStatistics(StatisticsType type, String textId) { return createOsStatistics(type, textId, 0, 0); } @Override - public final Statistics createStatistics(StatisticsType type, String textId, long numericId) { + public Statistics createStatistics(StatisticsType type, String textId, long numericId) { return createOsStatistics(type, textId, 0, 0); } @@ -157,7 +157,7 @@ public abstract class AbstractStatisticsFactory implements StatisticsFactory, St } @Override - public final Statistics[] findStatisticsByType(StatisticsType type) { + public Statistics[] findStatisticsByType(StatisticsType type) { List<Statistics> hits = new ArrayList<Statistics>(); Iterator<Statistics> it = statsList.iterator(); while (it.hasNext()) { @@ -171,7 +171,7 @@ public abstract class AbstractStatisticsFactory implements StatisticsFactory, St } @Override - public final Statistics[] findStatisticsByTextId(String textId) { + public Statistics[] findStatisticsByTextId(String textId) { List<Statistics> hits = new ArrayList<Statistics>(); Iterator<Statistics> it = statsList.iterator(); while (it.hasNext()) { @@ -185,7 +185,7 @@ public abstract class AbstractStatisticsFactory implements StatisticsFactory, St } @Override - public final Statistics[] findStatisticsByNumericId(long numericId) { + public Statistics[] findStatisticsByNumericId(long numericId) { List<Statistics> hits = new ArrayList<Statistics>(); Iterator<Statistics> it = statsList.iterator(); while (it.hasNext()) { @@ -198,7 +198,7 @@ public abstract class AbstractStatisticsFactory implements StatisticsFactory, St return (Statistics[]) hits.toArray(result); } - public final Statistics findStatisticsByUniqueId(long uniqueId) { + public Statistics findStatisticsByUniqueId(long uniqueId) { Iterator<Statistics> it = statsList.iterator(); while (it.hasNext()) { Statistics s = (Statistics) it.next(); @@ -211,7 +211,7 @@ public abstract class AbstractStatisticsFactory implements StatisticsFactory, St /** for internal use only. Its called by {@link LocalStatisticsImpl#close}. */ @Override - public final void destroyStatistics(Statistics stats) { + public void destroyStatistics(Statistics stats) { synchronized (statsList) { if (statsList.remove(stats)) { statsListModCount++; @@ -220,12 +220,12 @@ public abstract class AbstractStatisticsFactory implements StatisticsFactory, St } @Override - public final Statistics createAtomicStatistics(StatisticsType type) { + public Statistics createAtomicStatistics(StatisticsType type) { return createAtomicStatistics(type, null, 0); } @Override - public final Statistics createAtomicStatistics(StatisticsType type, String textId) { + public Statistics createAtomicStatistics(StatisticsType type, String textId) { return createAtomicStatistics(type, textId, 0); } @@ -249,86 +249,82 @@ public abstract class AbstractStatisticsFactory implements StatisticsFactory, St * Creates or finds a StatisticType for the given shared class. */ @Override - public final StatisticsType createType(String name, String description, - StatisticDescriptor[] stats) { + public StatisticsType createType(String name, String description, StatisticDescriptor[] stats) { return tf.createType(name, description, stats); } @Override - public final StatisticsType findType(String name) { + public StatisticsType findType(String name) { return tf.findType(name); } @Override - public final StatisticsType[] createTypesFromXml(Reader reader) throws IOException { + public StatisticsType[] createTypesFromXml(Reader reader) throws IOException { return tf.createTypesFromXml(reader); } @Override - public final StatisticDescriptor createIntCounter(String name, String description, String units) { + public StatisticDescriptor createIntCounter(String name, String description, String units) { return tf.createIntCounter(name, description, units); } @Override - public final StatisticDescriptor createLongCounter(String name, String description, - String units) { + public StatisticDescriptor createLongCounter(String name, String description, String units) { return tf.createLongCounter(name, description, units); } @Override - public final StatisticDescriptor createDoubleCounter(String name, String description, - String units) { + public StatisticDescriptor createDoubleCounter(String name, String description, String units) { return tf.createDoubleCounter(name, description, units); } @Override - public final StatisticDescriptor createIntGauge(String name, String description, String units) { + public StatisticDescriptor createIntGauge(String name, String description, String units) { return tf.createIntGauge(name, description, units); } @Override - public final StatisticDescriptor createLongGauge(String name, String description, String units) { + public StatisticDescriptor createLongGauge(String name, String description, String units) { return tf.createLongGauge(name, description, units); } @Override - public final StatisticDescriptor createDoubleGauge(String name, String description, - String units) { + public StatisticDescriptor createDoubleGauge(String name, String description, String units) { return tf.createDoubleGauge(name, description, units); } @Override - public final StatisticDescriptor createIntCounter(String name, String description, String units, + public StatisticDescriptor createIntCounter(String name, String description, String units, boolean largerBetter) { return tf.createIntCounter(name, description, units, largerBetter); } @Override - public final StatisticDescriptor createLongCounter(String name, String description, String units, + public StatisticDescriptor createLongCounter(String name, String description, String units, boolean largerBetter) { return tf.createLongCounter(name, description, units, largerBetter); } @Override - public final StatisticDescriptor createDoubleCounter(String name, String description, - String units, boolean largerBetter) { + public StatisticDescriptor createDoubleCounter(String name, String description, String units, + boolean largerBetter) { return tf.createDoubleCounter(name, description, units, largerBetter); } @Override - public final StatisticDescriptor createIntGauge(String name, String description, String units, + public StatisticDescriptor createIntGauge(String name, String description, String units, boolean largerBetter) { return tf.createIntGauge(name, description, units, largerBetter); } @Override - public final StatisticDescriptor createLongGauge(String name, String description, String units, + public StatisticDescriptor createLongGauge(String name, String description, String units, boolean largerBetter) { return tf.createLongGauge(name, description, units, largerBetter); } @Override - public final StatisticDescriptor createDoubleGauge(String name, String description, String units, + public StatisticDescriptor createDoubleGauge(String name, String description, String units, boolean largerBetter) { return tf.createDoubleGauge(name, description, units, largerBetter); } http://git-wip-us.apache.org/repos/asf/geode/blob/a4458531/geode-core/src/main/java/org/apache/geode/internal/statistics/CounterMonitor.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/org/apache/geode/internal/statistics/CounterMonitor.java b/geode-core/src/main/java/org/apache/geode/internal/statistics/CounterMonitor.java index 7e0ce4f..d42ff4b 100755 --- a/geode-core/src/main/java/org/apache/geode/internal/statistics/CounterMonitor.java +++ b/geode-core/src/main/java/org/apache/geode/internal/statistics/CounterMonitor.java @@ -17,7 +17,7 @@ package org.apache.geode.internal.statistics; /** * @since GemFire 7.0 */ -public final class CounterMonitor extends StatisticsMonitor { +public class CounterMonitor extends StatisticsMonitor { public static enum Type { GREATER_THAN, LESS_THAN http://git-wip-us.apache.org/repos/asf/geode/blob/a4458531/geode-core/src/main/java/org/apache/geode/internal/statistics/DummyStatisticsImpl.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/org/apache/geode/internal/statistics/DummyStatisticsImpl.java b/geode-core/src/main/java/org/apache/geode/internal/statistics/DummyStatisticsImpl.java index 120bf54..ed38f21 100644 --- a/geode-core/src/main/java/org/apache/geode/internal/statistics/DummyStatisticsImpl.java +++ b/geode-core/src/main/java/org/apache/geode/internal/statistics/DummyStatisticsImpl.java @@ -49,137 +49,137 @@ public class DummyStatisticsImpl implements Statistics { this.numericId = numericId; } - public final void close() {} + public void close() {} //////////////////////// accessor Methods /////////////////////// - public final int nameToId(String name) { + public int nameToId(String name) { return this.type.nameToId(name); } - public final StatisticDescriptor nameToDescriptor(String name) { + public StatisticDescriptor nameToDescriptor(String name) { return this.type.nameToDescriptor(name); } - public final long getUniqueId() { + public long getUniqueId() { return 0; } - public final StatisticsType getType() { + public StatisticsType getType() { return this.type; } - public final String getTextId() { + public String getTextId() { return this.textId; } - public final long getNumericId() { + public long getNumericId() { return this.numericId; } - public final boolean isAtomic() { + public boolean isAtomic() { return true; } - public final boolean isClosed() { + public boolean isClosed() { return false; } //////////////////////// set() Methods /////////////////////// - public final void setInt(int id, int value) {} + public void setInt(int id, int value) {} - public final void setInt(StatisticDescriptor descriptor, int value) {} + public void setInt(StatisticDescriptor descriptor, int value) {} - public final void setInt(String name, int value) {} + public void setInt(String name, int value) {} - public final void setLong(int id, long value) {} + public void setLong(int id, long value) {} - public final void setLong(StatisticDescriptor descriptor, long value) {} + public void setLong(StatisticDescriptor descriptor, long value) {} - public final void setLong(String name, long value) {} + public void setLong(String name, long value) {} - public final void setDouble(int id, double value) {} + public void setDouble(int id, double value) {} - public final void setDouble(StatisticDescriptor descriptor, double value) {} + public void setDouble(StatisticDescriptor descriptor, double value) {} - public final void setDouble(String name, double value) {} + public void setDouble(String name, double value) {} /////////////////////// get() Methods /////////////////////// - public final int getInt(int id) { + public int getInt(int id) { return 0; } - public final int getInt(StatisticDescriptor descriptor) { + public int getInt(StatisticDescriptor descriptor) { return 0; } - public final int getInt(String name) { + public int getInt(String name) { return 0; } - public final long getLong(int id) { + public long getLong(int id) { return 0; } - public final long getLong(StatisticDescriptor descriptor) { + public long getLong(StatisticDescriptor descriptor) { return 0; } - public final long getLong(String name) { + public long getLong(String name) { return 0; } - public final double getDouble(int id) { + public double getDouble(int id) { return 0.0; } - public final double getDouble(StatisticDescriptor descriptor) { + public double getDouble(StatisticDescriptor descriptor) { return 0.0; } - public final double getDouble(String name) { + public double getDouble(String name) { return 0.0; } private static final Number dummyNumber = Integer.valueOf(0); - public final Number get(StatisticDescriptor descriptor) { + public Number get(StatisticDescriptor descriptor) { return dummyNumber; } - public final Number get(String name) { + public Number get(String name) { return dummyNumber; } - public final long getRawBits(StatisticDescriptor descriptor) { + public long getRawBits(StatisticDescriptor descriptor) { return 0; } - public final long getRawBits(String name) { + public long getRawBits(String name) { return 0; } //////////////////////// inc() Methods //////////////////////// - public final void incInt(int id, int delta) {} + public void incInt(int id, int delta) {} - public final void incInt(StatisticDescriptor descriptor, int delta) {} + public void incInt(StatisticDescriptor descriptor, int delta) {} - public final void incInt(String name, int delta) {} + public void incInt(String name, int delta) {} - public final void incLong(int id, long delta) {} + public void incLong(int id, long delta) {} - public final void incLong(StatisticDescriptor descriptor, long delta) {} + public void incLong(StatisticDescriptor descriptor, long delta) {} - public final void incLong(String name, long delta) {} + public void incLong(String name, long delta) {} - public final void incDouble(int id, double delta) {} + public void incDouble(int id, double delta) {} - public final void incDouble(StatisticDescriptor descriptor, double delta) {} + public void incDouble(StatisticDescriptor descriptor, double delta) {} - public final void incDouble(String name, double delta) {} + public void incDouble(String name, double delta) {} @Override public IntSupplier setIntSupplier(final int id, final IntSupplier supplier) { http://git-wip-us.apache.org/repos/asf/geode/blob/a4458531/geode-core/src/main/java/org/apache/geode/internal/statistics/GaugeMonitor.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/org/apache/geode/internal/statistics/GaugeMonitor.java b/geode-core/src/main/java/org/apache/geode/internal/statistics/GaugeMonitor.java index 3b07337..8990b6e 100755 --- a/geode-core/src/main/java/org/apache/geode/internal/statistics/GaugeMonitor.java +++ b/geode-core/src/main/java/org/apache/geode/internal/statistics/GaugeMonitor.java @@ -17,7 +17,7 @@ package org.apache.geode.internal.statistics; /** * @since GemFire 7.0 */ -public final class GaugeMonitor extends StatisticsMonitor { +public class GaugeMonitor extends StatisticsMonitor { private final Number lowThreshold; private final Number highThreshold; http://git-wip-us.apache.org/repos/asf/geode/blob/a4458531/geode-core/src/main/java/org/apache/geode/internal/statistics/GemFireStatSampler.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/org/apache/geode/internal/statistics/GemFireStatSampler.java b/geode-core/src/main/java/org/apache/geode/internal/statistics/GemFireStatSampler.java index d4698ef..1bc6b8a 100644 --- a/geode-core/src/main/java/org/apache/geode/internal/statistics/GemFireStatSampler.java +++ b/geode-core/src/main/java/org/apache/geode/internal/statistics/GemFireStatSampler.java @@ -46,7 +46,7 @@ import org.apache.logging.log4j.Logger; * The StatisticsManager is implemented by DistributedSystem. * */ -public final class GemFireStatSampler extends HostStatSampler { +public class GemFireStatSampler extends HostStatSampler { private static final Logger logger = LogService.getLogger(); @@ -78,7 +78,7 @@ public final class GemFireStatSampler extends HostStatSampler { * * @since GemFire 3.5 */ - public final ProcessStats getProcessStats() { + public ProcessStats getProcessStats() { return this.processStats; } @@ -157,12 +157,12 @@ public final class GemFireStatSampler extends HostStatSampler { } @Override - public final File getArchiveFileName() { + public File getArchiveFileName() { return this.con.getConfig().getStatisticArchiveFile(); } @Override - public final long getArchiveFileSizeLimit() { + public long getArchiveFileSizeLimit() { if (fileSizeLimitInKB()) { // use KB instead of MB to speed up rolling for testing return ((long) this.con.getConfig().getArchiveFileSizeLimit()) * (1024); @@ -172,7 +172,7 @@ public final class GemFireStatSampler extends HostStatSampler { } @Override - public final long getArchiveDiskSpaceLimit() { + public long getArchiveDiskSpaceLimit() { if (fileSizeLimitInKB()) { // use KB instead of MB to speed up removal for testing return ((long) this.con.getConfig().getArchiveDiskSpaceLimit()) * (1024); @@ -216,27 +216,27 @@ public final class GemFireStatSampler extends HostStatSampler { } @Override - protected final int getSampleRate() { + protected int getSampleRate() { return this.con.getConfig().getStatisticSampleRate(); } @Override - public final boolean isSamplingEnabled() { + public boolean isSamplingEnabled() { return this.con.getConfig().getStatisticSamplingEnabled(); } @Override - protected final StatisticsManager getStatisticsManager() { + protected StatisticsManager getStatisticsManager() { return this.con; } @Override - protected final OsStatisticsFactory getOsStatisticsFactory() { + protected OsStatisticsFactory getOsStatisticsFactory() { return this.con; } @Override - protected final long getSpecialStatsId() { + protected long getSpecialStatsId() { long statId = OSProcess.getId(); if (statId == 0 || statId == -1) { statId = getStatisticsManager().getId(); @@ -245,7 +245,7 @@ public final class GemFireStatSampler extends HostStatSampler { } @Override - protected final void initProcessStats(long id) { + protected void initProcessStats(long id) { if (PureJavaMode.osStatsAreAvailable()) { if (osStatsDisabled()) { logger.info(LogMarker.STATISTICS, LocalizedMessage.create( @@ -269,7 +269,7 @@ public final class GemFireStatSampler extends HostStatSampler { } @Override - protected final void sampleProcessStats(boolean prepareOnly) { + protected void sampleProcessStats(boolean prepareOnly) { if (prepareOnly || osStatsDisabled() || !PureJavaMode.osStatsAreAvailable()) { return; } @@ -292,7 +292,7 @@ public final class GemFireStatSampler extends HostStatSampler { } @Override - protected final void closeProcessStats() { + protected void closeProcessStats() { if (PureJavaMode.osStatsAreAvailable()) { if (!osStatsDisabled()) { if (this.processStats != null) { @@ -415,12 +415,12 @@ public final class GemFireStatSampler extends HostStatSampler { private InternalDistributedMember recipient; @Override - public final int hashCode() { + public int hashCode() { return listenerId; } @Override - public final boolean equals(Object o) { + public boolean equals(Object o) { if (o == null) { return false; } http://git-wip-us.apache.org/repos/asf/geode/blob/a4458531/geode-core/src/main/java/org/apache/geode/internal/statistics/HostStatSampler.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/org/apache/geode/internal/statistics/HostStatSampler.java b/geode-core/src/main/java/org/apache/geode/internal/statistics/HostStatSampler.java index c3ed946..928956e 100644 --- a/geode-core/src/main/java/org/apache/geode/internal/statistics/HostStatSampler.java +++ b/geode-core/src/main/java/org/apache/geode/internal/statistics/HostStatSampler.java @@ -106,7 +106,7 @@ public abstract class HostStatSampler this.timer = timer; } - public final StatSamplerStats getStatSamplerStats() { + public StatSamplerStats getStatSamplerStats() { return this.samplerStats; } @@ -114,7 +114,7 @@ public abstract class HostStatSampler * Returns the number of times a statistics resource has been add or deleted. */ @Override - public final int getStatisticsModCount() { + public int getStatisticsModCount() { return getStatisticsManager().getStatListModCount(); } @@ -122,7 +122,7 @@ public abstract class HostStatSampler * Returns an array of all the current statistic resource instances. */ @Override - public final Statistics[] getStatistics() { + public Statistics[] getStatistics() { return getStatisticsManager().getStatistics(); } @@ -130,7 +130,7 @@ public abstract class HostStatSampler * Returns a unique id for the sampler's system. */ @Override - public final long getSystemId() { + public long getSystemId() { return getStatisticsManager().getId(); } @@ -138,7 +138,7 @@ public abstract class HostStatSampler * Returns the time this sampler's system was started. */ @Override - public final long getSystemStartTime() { + public long getSystemStartTime() { return getStatisticsManager().getStartTime(); } @@ -146,7 +146,7 @@ public abstract class HostStatSampler * Returns the path to this sampler's system directory; if it has one. */ @Override - public final String getSystemDirectoryPath() { + public String getSystemDirectoryPath() { try { return SocketCreator.getHostName(SocketCreator.getLocalHost()); } catch (UnknownHostException ignore) { @@ -179,7 +179,7 @@ public abstract class HostStatSampler * This service's main loop */ @Override - public final void run() { + public void run() { final boolean isDebugEnabled_STATISTICS = logger.isTraceEnabled(LogMarker.STATISTICS); if (isDebugEnabled_STATISTICS) { logger.trace(LogMarker.STATISTICS, "HostStatSampler started"); @@ -275,7 +275,7 @@ public abstract class HostStatSampler * @throws IllegalStateException if an instance of the {@link #statThread} is still running from a * previous DistributedSystem. */ - public final void start() { + public void start() { synchronized (HostStatSampler.class) { if (statThread != null) { try { @@ -311,11 +311,11 @@ public abstract class HostStatSampler /** * Tell this service's main thread to terminate. */ - public final void stop() { + public void stop() { stop(true); } - private final void stop(boolean interruptIfAlive) { + private void stop(boolean interruptIfAlive) { synchronized (HostStatSampler.class) { this.callbackSampler.stop(); if (statThread == null) { @@ -354,7 +354,7 @@ public abstract class HostStatSampler } } - public final boolean isAlive() { + public boolean isAlive() { synchronized (HostStatSampler.class) { return statThread != null && statThread.isAlive(); } @@ -367,7 +367,7 @@ public abstract class HostStatSampler * @see #initSpecialStats * @since GemFire 3.5 */ - public final void waitForInitialization() throws InterruptedException { + public void waitForInitialization() throws InterruptedException { this.statSamplerInitializedLatch.await(); } @@ -378,7 +378,7 @@ public abstract class HostStatSampler * @see #initSpecialStats * @since GemFire 7.0 */ - public final boolean waitForInitialization(long ms) throws InterruptedException { + public boolean waitForInitialization(long ms) throws InterruptedException { return awaitInitialization(ms, TimeUnit.MILLISECONDS); } @@ -387,12 +387,12 @@ public abstract class HostStatSampler * * @see #initSpecialStats */ - public final boolean awaitInitialization(final long timeout, final TimeUnit unit) + public boolean awaitInitialization(final long timeout, final TimeUnit unit) throws InterruptedException { return this.statSamplerInitializedLatch.await(timeout, unit); } - public final void changeArchive(File newFile) { + public void changeArchive(File newFile) { this.sampleCollector.changeArchive(newFile, timer.getTime()); } @@ -401,7 +401,7 @@ public abstract class HostStatSampler * * @since GemFire 3.5 */ - public final VMStatsContract getVMStats() { + public VMStatsContract getVMStats() { return this.vmStats; } @@ -449,19 +449,19 @@ public abstract class HostStatSampler return getStatisticsManager().getId(); } - protected final boolean fileSizeLimitInKB() { + protected boolean fileSizeLimitInKB() { return this.fileSizeLimitInKB; } - protected final boolean osStatsDisabled() { + protected boolean osStatsDisabled() { return this.osStatsDisabled; } - protected final boolean stopRequested() { + protected boolean stopRequested() { return stopper.isCancelInProgress() || this.stopRequested; } - public final SampleCollector getSampleCollector() { + public SampleCollector getSampleCollector() { return this.sampleCollector; } http://git-wip-us.apache.org/repos/asf/geode/blob/a4458531/geode-core/src/main/java/org/apache/geode/internal/statistics/LocalStatisticsImpl.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/org/apache/geode/internal/statistics/LocalStatisticsImpl.java b/geode-core/src/main/java/org/apache/geode/internal/statistics/LocalStatisticsImpl.java index 02292aa..28056e5 100644 --- a/geode-core/src/main/java/org/apache/geode/internal/statistics/LocalStatisticsImpl.java +++ b/geode-core/src/main/java/org/apache/geode/internal/statistics/LocalStatisticsImpl.java @@ -165,7 +165,7 @@ public class LocalStatisticsImpl extends StatisticsImpl { ////////////////////// Instance Methods ////////////////////// @Override - public final boolean isAtomic() { + public boolean isAtomic() { return intLocks != null || longLocks != null || doubleLocks != null; } @@ -180,41 +180,41 @@ public class LocalStatisticsImpl extends StatisticsImpl { //////////////////////// store() Methods /////////////////////// @Override - protected final void _setInt(int offset, int value) { + protected void _setInt(int offset, int value) { this.intStorage[offset] = value; } @Override - protected final void _setLong(int offset, long value) { + protected void _setLong(int offset, long value) { this.longStorage[offset] = value; } @Override - protected final void _setDouble(int offset, double value) { + protected void _setDouble(int offset, double value) { this.doubleStorage[offset] = value; } /////////////////////// get() Methods /////////////////////// @Override - protected final int _getInt(int offset) { + protected int _getInt(int offset) { return this.intStorage[offset]; } @Override - protected final long _getLong(int offset) { + protected long _getLong(int offset) { return this.longStorage[offset]; } @Override - protected final double _getDouble(int offset) { + protected double _getDouble(int offset) { return this.doubleStorage[offset]; } //////////////////////// inc() Methods //////////////////////// @Override - protected final void _incInt(int offset, int delta) { + protected void _incInt(int offset, int delta) { if (this.intLocks != null) { synchronized (this.intLocks[offset]) { this.intStorage[offset] += delta; @@ -225,7 +225,7 @@ public class LocalStatisticsImpl extends StatisticsImpl { } @Override - protected final void _incLong(int offset, long delta) { + protected void _incLong(int offset, long delta) { if (this.longLocks != null) { synchronized (this.longLocks[offset]) { this.longStorage[offset] += delta; @@ -236,7 +236,7 @@ public class LocalStatisticsImpl extends StatisticsImpl { } @Override - protected final void _incDouble(int offset, double delta) { + protected void _incDouble(int offset, double delta) { if (this.doubleLocks != null) { synchronized (this.doubleLocks[offset]) { this.doubleStorage[offset] += delta; @@ -248,15 +248,15 @@ public class LocalStatisticsImpl extends StatisticsImpl { /////////////////// internal package methods ////////////////// - final int[] _getIntStorage() { + int[] _getIntStorage() { return this.intStorage; } - final long[] _getLongStorage() { + long[] _getLongStorage() { return this.longStorage; } - final double[] _getDoubleStorage() { + double[] _getDoubleStorage() { return this.doubleStorage; } } http://git-wip-us.apache.org/repos/asf/geode/blob/a4458531/geode-core/src/main/java/org/apache/geode/internal/statistics/SampleCollector.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/org/apache/geode/internal/statistics/SampleCollector.java b/geode-core/src/main/java/org/apache/geode/internal/statistics/SampleCollector.java index 2abbecd..0fc76cf 100755 --- a/geode-core/src/main/java/org/apache/geode/internal/statistics/SampleCollector.java +++ b/geode-core/src/main/java/org/apache/geode/internal/statistics/SampleCollector.java @@ -293,7 +293,7 @@ public class SampleCollector { } } - public final void changeArchive(File newFile, long nanosTimeStamp) { + public void changeArchive(File newFile, long nanosTimeStamp) { synchronized (this.sampleHandlers) { if (logger.isTraceEnabled(LogMarker.STATISTICS)) { logger.trace(LogMarker.STATISTICS, http://git-wip-us.apache.org/repos/asf/geode/blob/a4458531/geode-core/src/main/java/org/apache/geode/internal/statistics/SimpleStatisticId.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/org/apache/geode/internal/statistics/SimpleStatisticId.java b/geode-core/src/main/java/org/apache/geode/internal/statistics/SimpleStatisticId.java index 64fc2f0..fd6bbb2 100755 --- a/geode-core/src/main/java/org/apache/geode/internal/statistics/SimpleStatisticId.java +++ b/geode-core/src/main/java/org/apache/geode/internal/statistics/SimpleStatisticId.java @@ -26,7 +26,7 @@ import org.apache.geode.Statistics; * * @since GemFire 7.0 */ -public final class SimpleStatisticId implements StatisticId { +public class SimpleStatisticId implements StatisticId { private final StatisticDescriptor descriptor; private final Statistics statistics; @@ -50,7 +50,7 @@ public final class SimpleStatisticId implements StatisticId { * Object equality must be based on instance identity. */ @Override - public final boolean equals(Object obj) { + public boolean equals(Object obj) { return super.equals(obj); } @@ -58,7 +58,7 @@ public final class SimpleStatisticId implements StatisticId { * Object equality must be based on instance identity. */ @Override - public final int hashCode() { + public int hashCode() { return super.hashCode(); } } http://git-wip-us.apache.org/repos/asf/geode/blob/a4458531/geode-core/src/main/java/org/apache/geode/internal/statistics/StatArchiveReader.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/org/apache/geode/internal/statistics/StatArchiveReader.java b/geode-core/src/main/java/org/apache/geode/internal/statistics/StatArchiveReader.java index 65e4370..36888e8 100644 --- a/geode-core/src/main/java/org/apache/geode/internal/statistics/StatArchiveReader.java +++ b/geode-core/src/main/java/org/apache/geode/internal/statistics/StatArchiveReader.java @@ -1344,7 +1344,7 @@ public class StatArchiveReader implements StatArchiveFormat { protected int count; - public final int getSampleCount() { + public int getSampleCount() { return this.count; } http://git-wip-us.apache.org/repos/asf/geode/blob/a4458531/geode-core/src/main/java/org/apache/geode/internal/statistics/StatArchiveWriter.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/org/apache/geode/internal/statistics/StatArchiveWriter.java b/geode-core/src/main/java/org/apache/geode/internal/statistics/StatArchiveWriter.java index 4eabe3b..3d375ad 100644 --- a/geode-core/src/main/java/org/apache/geode/internal/statistics/StatArchiveWriter.java +++ b/geode-core/src/main/java/org/apache/geode/internal/statistics/StatArchiveWriter.java @@ -800,85 +800,85 @@ public class StatArchiveWriter implements StatArchiveFormat, SampleHandler { this.dataOut = new DataOutputStream(out); } - public final long getBytesWritten() { + public long getBytesWritten() { return this.bytesWritten; } - public final void flush() throws IOException { + public void flush() throws IOException { this.dataOut.flush(); } @SuppressWarnings("unused") - public final void close() throws IOException { + public void close() throws IOException { this.dataOut.close(); } - public final void write(int b) throws IOException { + public void write(int b) throws IOException { throw new RuntimeException( LocalizedStrings.StatArchiveWriter_METHOD_UNIMPLEMENTED.toLocalizedString()); } - public final void write(byte[] b, int off, int len) throws IOException { + public void write(byte[] b, int off, int len) throws IOException { throw new RuntimeException( LocalizedStrings.StatArchiveWriter_METHOD_UNIMPLEMENTED.toLocalizedString()); } - public final void write(byte[] b) throws IOException { + public void write(byte[] b) throws IOException { throw new RuntimeException( LocalizedStrings.StatArchiveWriter_METHOD_UNIMPLEMENTED.toLocalizedString()); } - public final void writeBytes(String v) throws IOException { + public void writeBytes(String v) throws IOException { throw new RuntimeException( LocalizedStrings.StatArchiveWriter_METHOD_UNIMPLEMENTED.toLocalizedString()); } - public final void writeChar(int v) throws IOException { + public void writeChar(int v) throws IOException { throw new RuntimeException( LocalizedStrings.StatArchiveWriter_METHOD_UNIMPLEMENTED.toLocalizedString()); } - public final void writeChars(String v) throws IOException { + public void writeChars(String v) throws IOException { throw new RuntimeException( LocalizedStrings.StatArchiveWriter_METHOD_UNIMPLEMENTED.toLocalizedString()); } - public final void writeDouble(double v) throws IOException { + public void writeDouble(double v) throws IOException { throw new RuntimeException( LocalizedStrings.StatArchiveWriter_METHOD_UNIMPLEMENTED.toLocalizedString()); } - public final void writeFloat(float v) throws IOException { + public void writeFloat(float v) throws IOException { throw new RuntimeException( LocalizedStrings.StatArchiveWriter_METHOD_UNIMPLEMENTED.toLocalizedString()); } - public final void writeBoolean(boolean v) throws IOException { + public void writeBoolean(boolean v) throws IOException { this.dataOut.writeBoolean(v); this.bytesWritten += 1; } - public final void writeByte(int v) throws IOException { + public void writeByte(int v) throws IOException { this.dataOut.writeByte(v); this.bytesWritten += 1; } - public final void writeShort(int v) throws IOException { + public void writeShort(int v) throws IOException { this.dataOut.writeShort(v); this.bytesWritten += 2; } - public final void writeInt(int v) throws IOException { + public void writeInt(int v) throws IOException { this.dataOut.writeInt(v); this.bytesWritten += 4; } - public final void writeLong(long v) throws IOException { + public void writeLong(long v) throws IOException { this.dataOut.writeLong(v); this.bytesWritten += 8; } - public final void writeUTF(String v) throws IOException { + public void writeUTF(String v) throws IOException { this.dataOut.writeUTF(v); this.bytesWritten += v.length() + 2; // this is the minimum. The max is v.size()*3 +2 } http://git-wip-us.apache.org/repos/asf/geode/blob/a4458531/geode-core/src/main/java/org/apache/geode/internal/statistics/StatisticDescriptorImpl.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/org/apache/geode/internal/statistics/StatisticDescriptorImpl.java b/geode-core/src/main/java/org/apache/geode/internal/statistics/StatisticDescriptorImpl.java index b280c6d..1a59616 100644 --- a/geode-core/src/main/java/org/apache/geode/internal/statistics/StatisticDescriptorImpl.java +++ b/geode-core/src/main/java/org/apache/geode/internal/statistics/StatisticDescriptorImpl.java @@ -26,7 +26,7 @@ import org.apache.geode.internal.i18n.LocalizedStrings; * * @since GemFire 3.0 */ -public final class StatisticDescriptorImpl implements StatisticDescriptor { +public class StatisticDescriptorImpl implements StatisticDescriptor { /** A constant for an <code>byte</code> type */ static final byte BYTE = (byte) 3; @@ -82,7 +82,7 @@ public final class StatisticDescriptorImpl implements StatisticDescriptor { * * @throws IllegalArgumentException <code>code</code> is an unknown type */ - public final static String getTypeCodeName(int code) { + public static String getTypeCodeName(int code) { switch (code) { case BYTE: return "byte"; @@ -108,7 +108,7 @@ public final class StatisticDescriptorImpl implements StatisticDescriptor { * * @throws IllegalArgumentException <code>code</code> is an unknown type */ - public final static int getTypeCodeBits(int code) { + public static int getTypeCodeBits(int code) { switch (code) { case BYTE: return 8; @@ -134,7 +134,7 @@ public final class StatisticDescriptorImpl implements StatisticDescriptor { * * @throws IllegalArgumentException <code>code</code> is an unknown type */ - public final static Class<?> getTypeCodeClass(byte code) { + public static Class<?> getTypeCodeClass(byte code) { switch (code) { case BYTE: return byte.class; @@ -227,35 +227,35 @@ public final class StatisticDescriptorImpl implements StatisticDescriptor { //////////////////// StatisticDescriptor Methods //////////////////// - public final String getName() { + public String getName() { return this.name; } - public final String getDescription() { + public String getDescription() { return this.description; } - public final Class<?> getType() { + public Class<?> getType() { return getTypeCodeClass(this.typeCode); } - public final int getStorageBits() { + public int getStorageBits() { return getTypeCodeBits(this.typeCode); } - public final boolean isCounter() { + public boolean isCounter() { return this.isCounter; } - public final boolean isLargerBetter() { + public boolean isLargerBetter() { return this.isLargerBetter; } - public final String getUnit() { + public String getUnit() { return this.unit; } - public final int getId() { + public int getId() { // if (this.id == INVALID_OFFSET) { // String s = "The id has not been initialized yet."; // throw new IllegalStateException(s); @@ -265,7 +265,7 @@ public final class StatisticDescriptorImpl implements StatisticDescriptor { return this.id; } - public final Number getNumberForRawBits(long bits) { + public Number getNumberForRawBits(long bits) { switch (this.typeCode) { case StatisticDescriptorImpl.INT: return (int) bits; @@ -285,14 +285,14 @@ public final class StatisticDescriptorImpl implements StatisticDescriptor { /** * Returns the type code of this statistic */ - public final byte getTypeCode() { + public byte getTypeCode() { return this.typeCode; } /** * Sets the id of this descriptor */ - final void setId(int id) { + void setId(int id) { // Assert.assertTrue(id >= 0); this.id = id; } @@ -309,7 +309,7 @@ public final class StatisticDescriptorImpl implements StatisticDescriptor { return this.getName().compareTo(o.getName()); } - public final int checkInt() { + public int checkInt() { if (this.typeCode != INT) { throw new IllegalArgumentException( LocalizedStrings.StatisticDescriptorImpl_THE_STATISTIC_0_WITH_ID_1_IS_OF_TYPE_2_AND_IT_WAS_EXPECTED_TO_BE_AN_INT @@ -319,7 +319,7 @@ public final class StatisticDescriptorImpl implements StatisticDescriptor { return this.id; } - public final int checkLong() { + public int checkLong() { if (this.typeCode != LONG) { StringBuffer sb = new StringBuffer(); sb.append("The statistic " + getName() + " with id "); @@ -333,7 +333,7 @@ public final class StatisticDescriptorImpl implements StatisticDescriptor { return this.id; } - public final int checkDouble() { + public int checkDouble() { if (this.typeCode != DOUBLE) { throw new IllegalArgumentException( LocalizedStrings.StatisticDescriptorImpl_THE_STATISTIC_0_WITH_ID_1_IS_OF_TYPE_2_AND_IT_WAS_EXPECTED_TO_BE_A_DOUBLE http://git-wip-us.apache.org/repos/asf/geode/blob/a4458531/geode-core/src/main/java/org/apache/geode/internal/statistics/StatisticsImpl.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/org/apache/geode/internal/statistics/StatisticsImpl.java b/geode-core/src/main/java/org/apache/geode/internal/statistics/StatisticsImpl.java index 0572d4c..0e2f5f4 100644 --- a/geode-core/src/main/java/org/apache/geode/internal/statistics/StatisticsImpl.java +++ b/geode-core/src/main/java/org/apache/geode/internal/statistics/StatisticsImpl.java @@ -124,19 +124,19 @@ public abstract class StatisticsImpl implements Statistics { ////////////////////// Instance Methods ////////////////////// - public final boolean usesSystemCalls() { + public boolean usesSystemCalls() { return this.osStatFlags != 0; } - public final int getOsStatFlags() { + public int getOsStatFlags() { return this.osStatFlags; } - public final int nameToId(String name) { + public int nameToId(String name) { return this.type.nameToId(name); } - public final StatisticDescriptor nameToDescriptor(String name) { + public StatisticDescriptor nameToDescriptor(String name) { return this.type.nameToDescriptor(name); } @@ -144,27 +144,27 @@ public abstract class StatisticsImpl implements Statistics { this.closed = true; } - public final boolean isClosed() { + public boolean isClosed() { return this.closed; } public abstract boolean isAtomic(); - private final boolean isOpen() { // fix for bug 29973 + private boolean isOpen() { // fix for bug 29973 return !this.closed; } //////////////////////// attribute Methods /////////////////////// - public final StatisticsType getType() { + public StatisticsType getType() { return this.type; } - public final String getTextId() { + public String getTextId() { return this.textId; } - public final long getNumericId() { + public long getNumericId() { return this.numericId; } @@ -184,15 +184,15 @@ public abstract class StatisticsImpl implements Statistics { //////////////////////// set() Methods /////////////////////// - public final void setInt(String name, int value) { + public void setInt(String name, int value) { setInt(nameToDescriptor(name), value); } - public final void setInt(StatisticDescriptor descriptor, int value) { + public void setInt(StatisticDescriptor descriptor, int value) { setInt(getIntId(descriptor), value); } - public final void setInt(int id, int value) { + public void setInt(int id, int value) { if (isOpen()) { _setInt(id, value); } @@ -204,15 +204,15 @@ public abstract class StatisticsImpl implements Statistics { */ protected abstract void _setInt(int offset, int value); - public final void setLong(String name, long value) { + public void setLong(String name, long value) { setLong(nameToDescriptor(name), value); } - public final void setLong(StatisticDescriptor descriptor, long value) { + public void setLong(StatisticDescriptor descriptor, long value) { setLong(getLongId(descriptor), value); } - public final void setLong(int id, long value) { + public void setLong(int id, long value) { if (isOpen()) { _setLong(id, value); } @@ -224,15 +224,15 @@ public abstract class StatisticsImpl implements Statistics { */ protected abstract void _setLong(int offset, long value); - public final void setDouble(String name, double value) { + public void setDouble(String name, double value) { setDouble(nameToDescriptor(name), value); } - public final void setDouble(StatisticDescriptor descriptor, double value) { + public void setDouble(StatisticDescriptor descriptor, double value) { setDouble(getDoubleId(descriptor), value); } - public final void setDouble(int id, double value) { + public void setDouble(int id, double value) { if (isOpen()) { _setDouble(id, value); } @@ -246,15 +246,15 @@ public abstract class StatisticsImpl implements Statistics { /////////////////////// get() Methods /////////////////////// - public final int getInt(String name) { + public int getInt(String name) { return getInt(nameToDescriptor(name)); } - public final int getInt(StatisticDescriptor descriptor) { + public int getInt(StatisticDescriptor descriptor) { return getInt(getIntId(descriptor)); } - public final int getInt(int id) { + public int getInt(int id) { if (isOpen()) { return _getInt(id); } else { @@ -269,15 +269,15 @@ public abstract class StatisticsImpl implements Statistics { protected abstract int _getInt(int offset); - public final long getLong(String name) { + public long getLong(String name) { return getLong(nameToDescriptor(name)); } - public final long getLong(StatisticDescriptor descriptor) { + public long getLong(StatisticDescriptor descriptor) { return getLong(getLongId(descriptor)); } - public final long getLong(int id) { + public long getLong(int id) { if (isOpen()) { return _getLong(id); } else { @@ -292,15 +292,15 @@ public abstract class StatisticsImpl implements Statistics { */ protected abstract long _getLong(int offset); - public final double getDouble(String name) { + public double getDouble(String name) { return getDouble(nameToDescriptor(name)); } - public final double getDouble(StatisticDescriptor descriptor) { + public double getDouble(StatisticDescriptor descriptor) { return getDouble(getDoubleId(descriptor)); } - public final double getDouble(int id) { + public double getDouble(int id) { if (isOpen()) { return _getDouble(id); } else { @@ -314,7 +314,7 @@ public abstract class StatisticsImpl implements Statistics { */ protected abstract double _getDouble(int offset); - public final Number get(StatisticDescriptor descriptor) { + public Number get(StatisticDescriptor descriptor) { if (isOpen()) { return _get((StatisticDescriptorImpl) descriptor); } else { @@ -322,7 +322,7 @@ public abstract class StatisticsImpl implements Statistics { } } - public final Number get(String name) { + public Number get(String name) { return get(nameToDescriptor(name)); } @@ -340,15 +340,15 @@ public abstract class StatisticsImpl implements Statistics { //////////////////////// inc() Methods //////////////////////// - public final void incInt(String name, int delta) { + public void incInt(String name, int delta) { incInt(nameToDescriptor(name), delta); } - public final void incInt(StatisticDescriptor descriptor, int delta) { + public void incInt(StatisticDescriptor descriptor, int delta) { incInt(getIntId(descriptor), delta); } - public final void incInt(int id, int delta) { + public void incInt(int id, int delta) { if (isOpen()) { _incInt(id, delta); } @@ -360,15 +360,15 @@ public abstract class StatisticsImpl implements Statistics { */ protected abstract void _incInt(int offset, int delta); - public final void incLong(String name, long delta) { + public void incLong(String name, long delta) { incLong(nameToDescriptor(name), delta); } - public final void incLong(StatisticDescriptor descriptor, long delta) { + public void incLong(StatisticDescriptor descriptor, long delta) { incLong(getLongId(descriptor), delta); } - public final void incLong(int id, long delta) { + public void incLong(int id, long delta) { if (isOpen()) { _incLong(id, delta); } @@ -380,15 +380,15 @@ public abstract class StatisticsImpl implements Statistics { */ protected abstract void _incLong(int offset, long delta); - public final void incDouble(String name, double delta) { + public void incDouble(String name, double delta) { incDouble(nameToDescriptor(name), delta); } - public final void incDouble(StatisticDescriptor descriptor, double delta) { + public void incDouble(StatisticDescriptor descriptor, double delta) { incDouble(getDoubleId(descriptor), delta); } - public final void incDouble(int id, double delta) { + public void incDouble(int id, double delta) { if (isOpen()) { _incDouble(id, delta); } @@ -533,22 +533,22 @@ public abstract class StatisticsImpl implements Statistics { return this.uniqueId == other.getUniqueId(); } - private final static int getIntId(StatisticDescriptor descriptor) { + private static int getIntId(StatisticDescriptor descriptor) { return ((StatisticDescriptorImpl) descriptor).checkInt(); } - private final static int getLongId(StatisticDescriptor descriptor) { + private static int getLongId(StatisticDescriptor descriptor) { return ((StatisticDescriptorImpl) descriptor).checkLong(); } - private final static int getDoubleId(StatisticDescriptor descriptor) { + private static int getDoubleId(StatisticDescriptor descriptor) { return ((StatisticDescriptorImpl) descriptor).checkDouble(); } /** * Returns the value of the specified statistic descriptor. */ - private final Number _get(StatisticDescriptorImpl stat) { + private Number _get(StatisticDescriptorImpl stat) { switch (stat.getTypeCode()) { case StatisticDescriptorImpl.INT: return Integer.valueOf(_getInt(stat.getId())); @@ -566,7 +566,7 @@ public abstract class StatisticsImpl implements Statistics { /** * Returns the bits that represent the raw value of the specified statistic descriptor. */ - private final long _getRawBits(StatisticDescriptorImpl stat) { + private long _getRawBits(StatisticDescriptorImpl stat) { switch (stat.getTypeCode()) { case StatisticDescriptorImpl.INT: return _getInt(stat.getId()); http://git-wip-us.apache.org/repos/asf/geode/blob/a4458531/geode-core/src/main/java/org/apache/geode/internal/statistics/StatisticsTypeFactoryImpl.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/org/apache/geode/internal/statistics/StatisticsTypeFactoryImpl.java b/geode-core/src/main/java/org/apache/geode/internal/statistics/StatisticsTypeFactoryImpl.java index 5a025f9..df67d74 100644 --- a/geode-core/src/main/java/org/apache/geode/internal/statistics/StatisticsTypeFactoryImpl.java +++ b/geode-core/src/main/java/org/apache/geode/internal/statistics/StatisticsTypeFactoryImpl.java @@ -38,11 +38,11 @@ public class StatisticsTypeFactoryImpl implements StatisticsTypeFactory { /** * Returns the single instance of this class. */ - public final static StatisticsTypeFactory singleton() { + public static StatisticsTypeFactory singleton() { return singleton; } - protected final static void clear() { + protected static void clear() { singleton.statTypes.clear(); } http://git-wip-us.apache.org/repos/asf/geode/blob/a4458531/geode-core/src/main/java/org/apache/geode/internal/statistics/StatisticsTypeImpl.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/org/apache/geode/internal/statistics/StatisticsTypeImpl.java b/geode-core/src/main/java/org/apache/geode/internal/statistics/StatisticsTypeImpl.java index 2c7fd3c..c6594ef 100644 --- a/geode-core/src/main/java/org/apache/geode/internal/statistics/StatisticsTypeImpl.java +++ b/geode-core/src/main/java/org/apache/geode/internal/statistics/StatisticsTypeImpl.java @@ -152,23 +152,23 @@ public class StatisticsTypeImpl implements StatisticsType { ////////////////////// StatisticsType Methods ////////////////////// - public final String getName() { + public String getName() { return this.name; } - public final String getDescription() { + public String getDescription() { return this.description; } - public final StatisticDescriptor[] getStatistics() { + public StatisticDescriptor[] getStatistics() { return this.stats; } - public final int nameToId(String name) { + public int nameToId(String name) { return nameToDescriptor(name).getId(); } - public final StatisticDescriptor nameToDescriptor(String name) { + public StatisticDescriptor nameToDescriptor(String name) { StatisticDescriptorImpl stat = (StatisticDescriptorImpl) statsMap.get(name); if (stat == null) { throw new IllegalArgumentException( http://git-wip-us.apache.org/repos/asf/geode/blob/a4458531/geode-core/src/main/java/org/apache/geode/internal/statistics/platform/ProcessStats.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/org/apache/geode/internal/statistics/platform/ProcessStats.java b/geode-core/src/main/java/org/apache/geode/internal/statistics/platform/ProcessStats.java index fc2fd05..690b514 100644 --- a/geode-core/src/main/java/org/apache/geode/internal/statistics/platform/ProcessStats.java +++ b/geode-core/src/main/java/org/apache/geode/internal/statistics/platform/ProcessStats.java @@ -40,11 +40,11 @@ public abstract class ProcessStats { * * @see Statistics#close */ - public final void close() { + public void close() { this.stats.close(); } - public final Statistics getStatistics() { + public Statistics getStatistics() { return this.stats; } http://git-wip-us.apache.org/repos/asf/geode/blob/a4458531/geode-core/src/main/java/org/apache/geode/internal/stats50/Atomic50StatisticsImpl.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/org/apache/geode/internal/stats50/Atomic50StatisticsImpl.java b/geode-core/src/main/java/org/apache/geode/internal/stats50/Atomic50StatisticsImpl.java index 568329b..17f6afe 100644 --- a/geode-core/src/main/java/org/apache/geode/internal/stats50/Atomic50StatisticsImpl.java +++ b/geode-core/src/main/java/org/apache/geode/internal/stats50/Atomic50StatisticsImpl.java @@ -135,7 +135,7 @@ public class Atomic50StatisticsImpl extends StatisticsImpl { ////////////////////// Instance Methods ////////////////////// @Override - public final boolean isAtomic() { + public boolean isAtomic() { return true; } @@ -150,13 +150,13 @@ public class Atomic50StatisticsImpl extends StatisticsImpl { /** * Queue of new ThreadStorage instances. */ - private final ConcurrentLinkedQueue<ThreadStorage> threadStoreQ = + private ConcurrentLinkedQueue<ThreadStorage> threadStoreQ = new ConcurrentLinkedQueue<ThreadStorage>(); /** * List of ThreadStorage instances that will be used to roll up stat values on this instance. They * come from the threadStoreQ. */ - private final CopyOnWriteArrayList<ThreadStorage> threadStoreList = + private CopyOnWriteArrayList<ThreadStorage> threadStoreList = new CopyOnWriteArrayList<ThreadStorage>(); /** @@ -225,17 +225,17 @@ public class Atomic50StatisticsImpl extends StatisticsImpl { //////////////////////// store() Methods /////////////////////// @Override - protected final void _setInt(int offset, int value) { + protected void _setInt(int offset, int value) { doIntWrite(offset, value); } @Override - protected final void _setLong(int offset, long value) { + protected void _setLong(int offset, long value) { doLongWrite(offset, value); } @Override - protected final void _setDouble(int offset, double value) { + protected void _setDouble(int offset, double value) { throw new IllegalStateException( LocalizedStrings.Atomic50StatisticsImpl_DOUBLE_STATS_NOT_ON_ATOMIC50.toLocalizedString()); } @@ -243,17 +243,17 @@ public class Atomic50StatisticsImpl extends StatisticsImpl { /////////////////////// get() Methods /////////////////////// @Override - protected final int _getInt(int offset) { + protected int _getInt(int offset) { return doIntRead(offset); } @Override - protected final long _getLong(int offset) { + protected long _getLong(int offset) { return doLongRead(offset); } @Override - protected final double _getDouble(int offset) { + protected double _getDouble(int offset) { throw new IllegalStateException( LocalizedStrings.Atomic50StatisticsImpl_DOUBLE_STATS_NOT_ON_ATOMIC50.toLocalizedString()); } @@ -261,19 +261,19 @@ public class Atomic50StatisticsImpl extends StatisticsImpl { //////////////////////// inc() Methods //////////////////////// @Override - protected final void _incInt(int offset, int delta) { + protected void _incInt(int offset, int delta) { getThreadIntStorage().getAndAdd(offset, delta); setIntDirty(offset); } @Override - protected final void _incLong(int offset, long delta) { + protected void _incLong(int offset, long delta) { getThreadLongStorage().getAndAdd(offset, delta); setLongDirty(offset); } @Override - protected final void _incDouble(int offset, double delta) { + protected void _incDouble(int offset, double delta) { throw new IllegalStateException( LocalizedStrings.Atomic50StatisticsImpl_DOUBLE_STATS_NOT_ON_ATOMIC50.toLocalizedString()); } @@ -355,29 +355,29 @@ public class Atomic50StatisticsImpl extends StatisticsImpl { } } - private final boolean isIntDirty(final int idx) { + private boolean isIntDirty(final int idx) { return this.intDirty.get(idx) != 0; } - private final boolean isLongDirty(final int idx) { + private boolean isLongDirty(final int idx) { return this.longDirty.get(idx) != 0; } - private final boolean clearIntDirty(final int idx) { + private boolean clearIntDirty(final int idx) { if (!this.intDirty.weakCompareAndSet(idx, 1/* expected */, 0/* update */)) { return this.intDirty.compareAndSet(idx, 1/* expected */, 0/* update */); } return true; } - private final boolean clearLongDirty(final int idx) { + private boolean clearLongDirty(final int idx) { if (!this.longDirty.weakCompareAndSet(idx, 1/* expected */, 0/* update */)) { return this.longDirty.compareAndSet(idx, 1/* expected */, 0/* update */); } return true; } - private final void setIntDirty(final int idx) { + private void setIntDirty(final int idx) { if (!this.intDirty.weakCompareAndSet(idx, 0/* expected */, 1/* update */)) { if (!isIntDirty(idx)) { this.intDirty.set(idx, 1); @@ -385,7 +385,7 @@ public class Atomic50StatisticsImpl extends StatisticsImpl { } } - private final void setLongDirty(final int idx) { + private void setLongDirty(final int idx) { if (!this.longDirty.weakCompareAndSet(idx, 0/* expected */, 1/* update */)) { if (!isLongDirty(idx)) { this.longDirty.set(idx, 1); @@ -393,7 +393,7 @@ public class Atomic50StatisticsImpl extends StatisticsImpl { } } - private final int doIntRead(final int idx) { + private int doIntRead(final int idx) { // early out for sampler; it called prepareForSample if (samplerThread.get() != null) { return this.intStorage.get(idx); @@ -423,7 +423,7 @@ public class Atomic50StatisticsImpl extends StatisticsImpl { } } - private final void doIntWrite(final int idx, int value) { + private void doIntWrite(final int idx, int value) { synchronized (this.intReadPrepLock[idx]) { if (!isIntDirty(idx)) { // no need to prepare if not dirty @@ -444,7 +444,7 @@ public class Atomic50StatisticsImpl extends StatisticsImpl { } } - private final long doLongRead(final int idx) { + private long doLongRead(final int idx) { if (samplerThread.get() != null) { return this.longStorage.get(idx); } @@ -473,7 +473,7 @@ public class Atomic50StatisticsImpl extends StatisticsImpl { } } - private final void doLongWrite(int idx, long value) { + private void doLongWrite(int idx, long value) { synchronized (this.longReadPrepLock[idx]) { if (!isLongDirty(idx)) { // no need to prepare if not dirty @@ -497,17 +497,17 @@ public class Atomic50StatisticsImpl extends StatisticsImpl { /////////////////// internal package methods ////////////////// - final int[] _getIntStorage() { + int[] _getIntStorage() { throw new IllegalStateException( LocalizedStrings.Atomic50StatisticsImpl_DIRECT_ACCESS_NOT_ON_ATOMIC50.toLocalizedString()); } - final long[] _getLongStorage() { + long[] _getLongStorage() { throw new IllegalStateException( LocalizedStrings.Atomic50StatisticsImpl_DIRECT_ACCESS_NOT_ON_ATOMIC50.toLocalizedString()); } - final double[] _getDoubleStorage() { + double[] _getDoubleStorage() { throw new IllegalStateException( LocalizedStrings.Atomic50StatisticsImpl_DIRECT_ACCESS_NOT_ON_ATOMIC50.toLocalizedString()); } http://git-wip-us.apache.org/repos/asf/geode/blob/a4458531/geode-core/src/main/java/org/apache/geode/internal/tcp/ByteBufferInputStream.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/org/apache/geode/internal/tcp/ByteBufferInputStream.java b/geode-core/src/main/java/org/apache/geode/internal/tcp/ByteBufferInputStream.java index 1a67f43..216a9d9 100644 --- a/geode-core/src/main/java/org/apache/geode/internal/tcp/ByteBufferInputStream.java +++ b/geode-core/src/main/java/org/apache/geode/internal/tcp/ByteBufferInputStream.java @@ -481,7 +481,7 @@ public class ByteBufferInputStream extends InputStream return this.chunk.getDataSize(); } - private final int nextGetIndex() { + private int nextGetIndex() { int p = this.position; if (p >= this.limit) { throw new BufferUnderflowException(); @@ -490,7 +490,7 @@ public class ByteBufferInputStream extends InputStream return p; } - private final int nextGetIndex(int nb) { + private int nextGetIndex(int nb) { int p = this.position; if (this.limit - p < nb) { throw new BufferUnderflowException(); @@ -503,13 +503,13 @@ public class ByteBufferInputStream extends InputStream * Checks the given index against the limit, throwing an {@link IndexOutOfBoundsException} if it * is not smaller than the limit or is smaller than zero. */ - private final void checkIndex(int i) { + private void checkIndex(int i) { if ((i < 0) || (i >= this.limit)) { throw new IndexOutOfBoundsException(); } } - private final void checkIndex(int i, int nb) { + private void checkIndex(int i, int nb) { if ((i < 0) || (nb > this.limit - i)) { throw new IndexOutOfBoundsException(); } @@ -802,14 +802,14 @@ public class ByteBufferInputStream extends InputStream this.buffer = ByteSourceFactory.create(blob); } - public final void setBuffer(ByteSource buffer) { + public void setBuffer(ByteSource buffer) { if (buffer == null) { throw new NullPointerException(); } this.buffer = buffer; } - public final void setBuffer(ByteBuffer bb) { + public void setBuffer(ByteBuffer bb) { if (bb == null) { throw new NullPointerException(); } @@ -821,7 +821,7 @@ public class ByteBufferInputStream extends InputStream * the wrapped ByteBuffer is done this method throws BufferUnderflowException */ @Override - public final int read() { + public int read() { return (buffer.get() & 0xff); } @@ -832,7 +832,7 @@ public class ByteBufferInputStream extends InputStream * BufferUnderflowException */ @Override - public final int read(byte b[], int off, int len) { + public int read(byte b[], int off, int len) { buffer.get(b, off, len); return len; } http://git-wip-us.apache.org/repos/asf/geode/blob/a4458531/geode-core/src/main/java/org/apache/geode/internal/tcp/Connection.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/org/apache/geode/internal/tcp/Connection.java b/geode-core/src/main/java/org/apache/geode/internal/tcp/Connection.java index 70868e0..e59821d 100644 --- a/geode-core/src/main/java/org/apache/geode/internal/tcp/Connection.java +++ b/geode-core/src/main/java/org/apache/geode/internal/tcp/Connection.java @@ -106,7 +106,7 @@ public class Connection implements Runnable { /** true if connection is a shared resource that can be used by more than one thread */ private boolean sharedResource; - public final boolean isSharedResource() { + public boolean isSharedResource() { return this.sharedResource; } @@ -115,7 +115,7 @@ public class Connection implements Runnable { private final static ThreadLocal isReaderThread = new ThreadLocal(); - public final static void makeReaderThread() { + public static void makeReaderThread() { // mark this thread as a reader thread makeReaderThread(true); } @@ -125,7 +125,7 @@ public class Connection implements Runnable { } // return true if this thread is a reader thread - public final static boolean isReaderThread() { + public static boolean isReaderThread() { Object o = isReaderThread.get(); if (o == null) { return false; @@ -156,7 +156,7 @@ public class Connection implements Runnable { private final static ThreadLocal isDominoThread = new ThreadLocal(); // return true if this thread is a reader thread - public final static boolean tipDomino() { + public static boolean tipDomino() { if (DOMINO_THREAD_OWNED_SOCKETS) { // mark this thread as one who wants to send ALL on TO sockets ConnectionTable.threadWantsOwnResources(); @@ -167,7 +167,7 @@ public class Connection implements Runnable { } } - public final static boolean isDominoThread() { + public static boolean isDominoThread() { Object o = isDominoThread.get(); if (o == null) { return false; @@ -1917,7 +1917,7 @@ public class Connection implements Runnable { * checks to see if an exception should not be logged: i.e., "forcibly closed", "reset by peer", * or "connection reset" */ - public static final boolean isIgnorableIOException(Exception e) { + public static boolean isIgnorableIOException(Exception e) { if (e instanceof ClosedChannelException) { return true; } @@ -2476,7 +2476,7 @@ public class Connection implements Runnable { } @edu.umd.cs.findbugs.annotations.SuppressWarnings(value = "DE_MIGHT_IGNORE") - final int readFully(InputStream input, byte[] buffer, int len) throws IOException { + int readFully(InputStream input, byte[] buffer, int len) throws IOException { int bytesSoFar = 0; while (bytesSoFar < len) { this.owner.getConduit().getCancelCriterion().checkCancelInProgress(null); @@ -3994,21 +3994,21 @@ public class Connection implements Runnable { } - protected final void accessed() { + protected void accessed() { this.accessed = true; } /** * return the DM id of the guy on the other side of this connection. */ - public final InternalDistributedMember getRemoteAddress() { + public InternalDistributedMember getRemoteAddress() { return this.remoteAddr; } /** * Return the version of the guy on the other side of this connection. */ - public final Version getRemoteVersion() { + public Version getRemoteVersion() { return this.remoteVersion; } http://git-wip-us.apache.org/repos/asf/geode/blob/a4458531/geode-core/src/main/java/org/apache/geode/internal/tcp/MsgDestreamer.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/org/apache/geode/internal/tcp/MsgDestreamer.java b/geode-core/src/main/java/org/apache/geode/internal/tcp/MsgDestreamer.java index e85046c..6f405fc 100644 --- a/geode-core/src/main/java/org/apache/geode/internal/tcp/MsgDestreamer.java +++ b/geode-core/src/main/java/org/apache/geode/internal/tcp/MsgDestreamer.java @@ -492,7 +492,7 @@ public class MsgDestreamer { } @Override - public final void close() { + public void close() { signalDone(); } @@ -501,7 +501,7 @@ public class MsgDestreamer { * the wrapped ByteBuffer is done this method throws BufferUnderflowException */ @Override - public final int read() throws IOException { + public int read() throws IOException { ByteBuffer bb = waitForAvailableData(); // logit("read result=" + result); return (bb.get() & 0xff); @@ -514,7 +514,7 @@ public class MsgDestreamer { * BufferUnderflowException */ @Override - public final int read(byte b[], int off, int len) throws IOException { + public int read(byte b[], int off, int len) throws IOException { ByteBuffer bb = waitForAvailableData(); int remaining = bb.remaining(); int bytesToRead = len; http://git-wip-us.apache.org/repos/asf/geode/blob/a4458531/geode-core/src/main/java/org/apache/geode/internal/tcp/MsgOutputStream.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/org/apache/geode/internal/tcp/MsgOutputStream.java b/geode-core/src/main/java/org/apache/geode/internal/tcp/MsgOutputStream.java index 5c6df46..52c70ff 100644 --- a/geode-core/src/main/java/org/apache/geode/internal/tcp/MsgOutputStream.java +++ b/geode-core/src/main/java/org/apache/geode/internal/tcp/MsgOutputStream.java @@ -44,13 +44,13 @@ public class MsgOutputStream extends OutputStream implements ObjToByteArraySeria /** write the low-order 8 bits of the given int */ @Override - public final void write(int b) { + public void write(int b) { buffer.put((byte) b); } /** override OutputStream's write() */ @Override - public final void write(byte[] source, int offset, int len) { + public void write(byte[] source, int offset, int len) { this.buffer.put(source, offset, len); } @@ -61,13 +61,13 @@ public class MsgOutputStream extends OutputStream implements ObjToByteArraySeria /** * write the header after the message has been written to the stream */ - public final void setMessageHeader(int msgType, int processorType, short msgId) { + public void setMessageHeader(int msgType, int processorType, short msgId) { buffer.putInt(Connection.MSG_HEADER_SIZE_OFFSET, Connection.calcHdrSize(size())); buffer.put(Connection.MSG_HEADER_TYPE_OFFSET, (byte) (msgType & 0xff)); buffer.putShort(Connection.MSG_HEADER_ID_OFFSET, msgId); } - public final void reset() { + public void reset() { this.buffer.clear(); this.buffer.position(Connection.MSG_HEADER_BYTES); } @@ -76,7 +76,7 @@ public class MsgOutputStream extends OutputStream implements ObjToByteArraySeria * gets the content ByteBuffer, ready for reading. The stream should not be written to past this * point until it has been reset. */ - public final ByteBuffer getContentBuffer() { + public ByteBuffer getContentBuffer() { buffer.flip(); return buffer; } @@ -92,7 +92,7 @@ public class MsgOutputStream extends OutputStream implements ObjToByteArraySeria * @param v the boolean to be written. * @exception IOException if an I/O error occurs. */ - public final void writeBoolean(boolean v) throws IOException { + public void writeBoolean(boolean v) throws IOException { write(v ? 1 : 0); } @@ -106,7 +106,7 @@ public class MsgOutputStream extends OutputStream implements ObjToByteArraySeria * @param v the byte value to be written. * @exception IOException if an I/O error occurs. */ - public final void writeByte(int v) throws IOException { + public void writeByte(int v) throws IOException { write(v); } @@ -129,7 +129,7 @@ public class MsgOutputStream extends OutputStream implements ObjToByteArraySeria * @param v the <code>short</code> value to be written. * @exception IOException if an I/O error occurs. */ - public final void writeShort(int v) throws IOException { + public void writeShort(int v) throws IOException { buffer.putShort((short) v); } @@ -152,7 +152,7 @@ public class MsgOutputStream extends OutputStream implements ObjToByteArraySeria * @param v the <code>char</code> value to be written. * @exception IOException if an I/O error occurs. */ - public final void writeChar(int v) throws IOException { + public void writeChar(int v) throws IOException { buffer.putChar((char) v); } @@ -176,7 +176,7 @@ public class MsgOutputStream extends OutputStream implements ObjToByteArraySeria * @param v the <code>int</code> value to be written. * @exception IOException if an I/O error occurs. */ - public final void writeInt(int v) throws IOException { + public void writeInt(int v) throws IOException { buffer.putInt(v); } @@ -204,7 +204,7 @@ public class MsgOutputStream extends OutputStream implements ObjToByteArraySeria * @param v the <code>long</code> value to be written. * @exception IOException if an I/O error occurs. */ - public final void writeLong(long v) throws IOException { + public void writeLong(long v) throws IOException { buffer.putLong(v); } @@ -219,7 +219,7 @@ public class MsgOutputStream extends OutputStream implements ObjToByteArraySeria * @param v the <code>float</code> value to be written. * @exception IOException if an I/O error occurs. */ - public final void writeFloat(float v) throws IOException { + public void writeFloat(float v) throws IOException { buffer.putFloat(v); } @@ -234,7 +234,7 @@ public class MsgOutputStream extends OutputStream implements ObjToByteArraySeria * @param v the <code>double</code> value to be written. * @exception IOException if an I/O error occurs. */ - public final void writeDouble(double v) throws IOException { + public void writeDouble(double v) throws IOException { buffer.putDouble(v); } @@ -252,7 +252,7 @@ public class MsgOutputStream extends OutputStream implements ObjToByteArraySeria * @param str the string of bytes to be written. * @exception IOException if an I/O error occurs. */ - public final void writeBytes(String str) throws IOException { + public void writeBytes(String str) throws IOException { int strlen = str.length(); if (strlen > 0) { // I know this is a deprecated method but it is PERFECT for this impl. @@ -283,7 +283,7 @@ public class MsgOutputStream extends OutputStream implements ObjToByteArraySeria * @param s the string value to be written. * @exception IOException if an I/O error occurs. */ - public final void writeChars(String s) throws IOException { + public void writeChars(String s) throws IOException { int len = s.length(); if (len > 0) { for (int i = 0; i < len; i++) { @@ -343,11 +343,11 @@ public class MsgOutputStream extends OutputStream implements ObjToByteArraySeria * @param str the string value to be written. * @exception IOException if an I/O error occurs. */ - public final void writeUTF(String str) throws IOException { + public void writeUTF(String str) throws IOException { writeFullUTF(str); } - private final void writeFullUTF(String str) throws IOException { + private void writeFullUTF(String str) throws IOException { int strlen = str.length(); if (strlen > 65535) { throw new UTFDataFormatException(