src/share/classes/com/sun/jmx/snmp/daemon/SnmpAdaptorServer.java

Print this page
rev 10195 : 8048267: Replace uses of 'new Long()' with appropriate alternative across core classes
Reviewed-by: chegar, psandoz
Contributed-by: otaviojava@java.net

*** 856,1027 **** * * @return The <CODE>snmpOutTraps</CODE> value. */ @Override public Long getSnmpOutTraps() { ! return new Long(snmpOutTraps); } /** * Returns the <CODE>snmpOutGetResponses</CODE> value defined in MIB-II. * * @return The <CODE>snmpOutGetResponses</CODE> value. */ @Override public Long getSnmpOutGetResponses() { ! return new Long(snmpOutGetResponses); } /** * Returns the <CODE>snmpOutGenErrs</CODE> value defined in MIB-II. * * @return The <CODE>snmpOutGenErrs</CODE> value. */ @Override public Long getSnmpOutGenErrs() { ! return new Long(snmpOutGenErrs); } /** * Returns the <CODE>snmpOutBadValues</CODE> value defined in MIB-II. * * @return The <CODE>snmpOutBadValues</CODE> value. */ @Override public Long getSnmpOutBadValues() { ! return new Long(snmpOutBadValues); } /** * Returns the <CODE>snmpOutNoSuchNames</CODE> value defined in MIB-II. * * @return The <CODE>snmpOutNoSuchNames</CODE> value. */ @Override public Long getSnmpOutNoSuchNames() { ! return new Long(snmpOutNoSuchNames); } /** * Returns the <CODE>snmpOutTooBigs</CODE> value defined in MIB-II. * * @return The <CODE>snmpOutTooBigs</CODE> value. */ @Override public Long getSnmpOutTooBigs() { ! return new Long(snmpOutTooBigs); } /** * Returns the <CODE>snmpInASNParseErrs</CODE> value defined in MIB-II. * * @return The <CODE>snmpInASNParseErrs</CODE> value. */ @Override public Long getSnmpInASNParseErrs() { ! return new Long(snmpInASNParseErrs); } /** * Returns the <CODE>snmpInBadCommunityUses</CODE> value defined in MIB-II. * * @return The <CODE>snmpInBadCommunityUses</CODE> value. */ @Override public Long getSnmpInBadCommunityUses() { ! return new Long(snmpInBadCommunityUses); } /** * Returns the <CODE>snmpInBadCommunityNames</CODE> value defined in * MIB-II. * * @return The <CODE>snmpInBadCommunityNames</CODE> value. */ @Override public Long getSnmpInBadCommunityNames() { ! return new Long(snmpInBadCommunityNames); } /** * Returns the <CODE>snmpInBadVersions</CODE> value defined in MIB-II. * * @return The <CODE>snmpInBadVersions</CODE> value. */ @Override public Long getSnmpInBadVersions() { ! return new Long(snmpInBadVersions); } /** * Returns the <CODE>snmpOutPkts</CODE> value defined in MIB-II. * * @return The <CODE>snmpOutPkts</CODE> value. */ @Override public Long getSnmpOutPkts() { ! return new Long(snmpOutPkts); } /** * Returns the <CODE>snmpInPkts</CODE> value defined in MIB-II. * * @return The <CODE>snmpInPkts</CODE> value. */ @Override public Long getSnmpInPkts() { ! return new Long(snmpInPkts); } /** * Returns the <CODE>snmpInGetRequests</CODE> value defined in MIB-II. * * @return The <CODE>snmpInGetRequests</CODE> value. */ @Override public Long getSnmpInGetRequests() { ! return new Long(snmpInGetRequests); } /** * Returns the <CODE>snmpInGetNexts</CODE> value defined in MIB-II. * * @return The <CODE>snmpInGetNexts</CODE> value. */ @Override public Long getSnmpInGetNexts() { ! return new Long(snmpInGetNexts); } /** * Returns the <CODE>snmpInSetRequests</CODE> value defined in MIB-II. * * @return The <CODE>snmpInSetRequests</CODE> value. */ @Override public Long getSnmpInSetRequests() { ! return new Long(snmpInSetRequests); } /** * Returns the <CODE>snmpInTotalSetVars</CODE> value defined in MIB-II. * * @return The <CODE>snmpInTotalSetVars</CODE> value. */ @Override public Long getSnmpInTotalSetVars() { ! return new Long(snmpInTotalSetVars); } /** * Returns the <CODE>snmpInTotalReqVars</CODE> value defined in MIB-II. * * @return The <CODE>snmpInTotalReqVars</CODE> value. */ @Override public Long getSnmpInTotalReqVars() { ! return new Long(snmpInTotalReqVars); } /** * Returns the <CODE>snmpSilentDrops</CODE> value defined in RFC * 1907 NMPv2-MIB . --- 856,1027 ---- * * @return The <CODE>snmpOutTraps</CODE> value. */ @Override public Long getSnmpOutTraps() { ! return (long)snmpOutTraps; } /** * Returns the <CODE>snmpOutGetResponses</CODE> value defined in MIB-II. * * @return The <CODE>snmpOutGetResponses</CODE> value. */ @Override public Long getSnmpOutGetResponses() { ! return (long)snmpOutGetResponses; } /** * Returns the <CODE>snmpOutGenErrs</CODE> value defined in MIB-II. * * @return The <CODE>snmpOutGenErrs</CODE> value. */ @Override public Long getSnmpOutGenErrs() { ! return (long) snmpOutGenErrs; } /** * Returns the <CODE>snmpOutBadValues</CODE> value defined in MIB-II. * * @return The <CODE>snmpOutBadValues</CODE> value. */ @Override public Long getSnmpOutBadValues() { ! return (long)snmpOutBadValues; } /** * Returns the <CODE>snmpOutNoSuchNames</CODE> value defined in MIB-II. * * @return The <CODE>snmpOutNoSuchNames</CODE> value. */ @Override public Long getSnmpOutNoSuchNames() { ! return (long)snmpOutNoSuchNames; } /** * Returns the <CODE>snmpOutTooBigs</CODE> value defined in MIB-II. * * @return The <CODE>snmpOutTooBigs</CODE> value. */ @Override public Long getSnmpOutTooBigs() { ! return (long)snmpOutTooBigs; } /** * Returns the <CODE>snmpInASNParseErrs</CODE> value defined in MIB-II. * * @return The <CODE>snmpInASNParseErrs</CODE> value. */ @Override public Long getSnmpInASNParseErrs() { ! return (long)snmpInASNParseErrs; } /** * Returns the <CODE>snmpInBadCommunityUses</CODE> value defined in MIB-II. * * @return The <CODE>snmpInBadCommunityUses</CODE> value. */ @Override public Long getSnmpInBadCommunityUses() { ! return (long)snmpInBadCommunityUses; } /** * Returns the <CODE>snmpInBadCommunityNames</CODE> value defined in * MIB-II. * * @return The <CODE>snmpInBadCommunityNames</CODE> value. */ @Override public Long getSnmpInBadCommunityNames() { ! return (long)snmpInBadCommunityNames; } /** * Returns the <CODE>snmpInBadVersions</CODE> value defined in MIB-II. * * @return The <CODE>snmpInBadVersions</CODE> value. */ @Override public Long getSnmpInBadVersions() { ! return (long)snmpInBadVersions; } /** * Returns the <CODE>snmpOutPkts</CODE> value defined in MIB-II. * * @return The <CODE>snmpOutPkts</CODE> value. */ @Override public Long getSnmpOutPkts() { ! return (long)snmpOutPkts; } /** * Returns the <CODE>snmpInPkts</CODE> value defined in MIB-II. * * @return The <CODE>snmpInPkts</CODE> value. */ @Override public Long getSnmpInPkts() { ! return (long)snmpInPkts; } /** * Returns the <CODE>snmpInGetRequests</CODE> value defined in MIB-II. * * @return The <CODE>snmpInGetRequests</CODE> value. */ @Override public Long getSnmpInGetRequests() { ! return (long)snmpInGetRequests; } /** * Returns the <CODE>snmpInGetNexts</CODE> value defined in MIB-II. * * @return The <CODE>snmpInGetNexts</CODE> value. */ @Override public Long getSnmpInGetNexts() { ! return (long)snmpInGetNexts; } /** * Returns the <CODE>snmpInSetRequests</CODE> value defined in MIB-II. * * @return The <CODE>snmpInSetRequests</CODE> value. */ @Override public Long getSnmpInSetRequests() { ! return (long)snmpInSetRequests; } /** * Returns the <CODE>snmpInTotalSetVars</CODE> value defined in MIB-II. * * @return The <CODE>snmpInTotalSetVars</CODE> value. */ @Override public Long getSnmpInTotalSetVars() { ! return (long)snmpInTotalSetVars; } /** * Returns the <CODE>snmpInTotalReqVars</CODE> value defined in MIB-II. * * @return The <CODE>snmpInTotalReqVars</CODE> value. */ @Override public Long getSnmpInTotalReqVars() { ! return (long)snmpInTotalReqVars; } /** * Returns the <CODE>snmpSilentDrops</CODE> value defined in RFC * 1907 NMPv2-MIB .
*** 1030,1040 **** * * @since 1.5 */ @Override public Long getSnmpSilentDrops() { ! return new Long(snmpSilentDrops); } /** * Returns the <CODE>snmpProxyDrops</CODE> value defined in RFC * 1907 NMPv2-MIB . --- 1030,1040 ---- * * @since 1.5 */ @Override public Long getSnmpSilentDrops() { ! return (long)snmpSilentDrops; } /** * Returns the <CODE>snmpProxyDrops</CODE> value defined in RFC * 1907 NMPv2-MIB .
*** 1043,1053 **** * * @since 1.5 */ @Override public Long getSnmpProxyDrops() { ! return new Long(0); } // PUBLIC METHODS //--------------- --- 1043,1053 ---- * * @since 1.5 */ @Override public Long getSnmpProxyDrops() { ! return 0L; } // PUBLIC METHODS //---------------