Skip to content

Commit

Permalink
[bamboo] Automated branch merge (from master:b5436bf431b1c497632db627…
Browse files Browse the repository at this point in the history
…ea08eff3344da507)
  • Loading branch information
opennms-bamboo committed Jun 9, 2014
2 parents d5614b0 + b5436bf commit 045643c
Show file tree
Hide file tree
Showing 302 changed files with 650 additions and 732 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public void include(ServletRequest req, ServletResponse res)
}
}

private final class RequestWrapper
private final static class RequestWrapper
extends HttpServletRequestWrapper
{
private final String requestUri;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,19 @@
* Convenience class for generating a list of IP addresses from a file URL.
*/
public class IpListFromUrl {
private final static Logger LOG = LoggerFactory.getLogger(IpListFromUrl.class);
private static final Logger LOG = LoggerFactory.getLogger(IpListFromUrl.class);

/**
* The string indicating the start of the comments in a line containing the
* IP address in a file URL
*/
private final static String COMMENT_STR = " #";
private static final String COMMENT_STR = " #";

/**
* This character at the start of a line indicates a comment line in a URL
* file
*/
private final static char COMMENT_CHAR = '#';
private static final char COMMENT_CHAR = '#';

/**
* This method is used to read all interfaces from an URL file.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public final void afterPropertiesSet() throws Exception {
/**
* <p>onInit</p>
*/
abstract protected void onInit();
protected abstract void onInit();

/**
* <p>onPause</p>
Expand Down Expand Up @@ -92,7 +92,7 @@ protected void onStop() {}
* @return a {@link java.lang.String} object.
*/
@Override
final public String getName() { return m_name; }
public final String getName() { return m_name; }

/**
* <p>Constructor for AbstractServiceDaemon.</p>
Expand Down Expand Up @@ -215,7 +215,7 @@ protected synchronized boolean isStarting() {
/**
* <p>init</p>
*/
final public void init() {
public final void init() {

Logging.withPrefix(getName(), new Runnable() {

Expand All @@ -237,7 +237,7 @@ public void run() {
* <p>pause</p>
*/
@Override
final public void pause() {
public final void pause() {
Logging.withPrefix(getName(), new Runnable() {

@Override
Expand All @@ -260,7 +260,7 @@ public void run() {
* <p>resume</p>
*/
@Override
final public void resume() {
public final void resume() {

Logging.withPrefix(getName(), new Runnable() {

Expand All @@ -285,7 +285,7 @@ public void run() {
* <p>start</p>
*/
@Override
final public synchronized void start() {
public final synchronized void start() {

Logging.withPrefix(getName(), new Runnable() {

Expand All @@ -309,7 +309,7 @@ public void run() {
* the command is silently discarded.
*/
@Override
final public synchronized void stop() {
public final synchronized void stop() {

Logging.withPrefix(getName(), new Runnable() {

Expand All @@ -332,7 +332,7 @@ public void run() {
* Destroys the current service.
*/
@Override
final public void destroy() {
public final void destroy() {
stop();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,22 +35,23 @@
import java.lang.management.ManagementFactory;
import java.net.URL;
import java.util.List;
import java.util.Map.Entry;
import java.util.Properties;
import java.util.TreeMap;
import java.util.Map.Entry;

import javax.management.MBeanServer;

import org.apache.commons.io.IOUtils;
import org.opennms.core.logging.Logging;
import org.opennms.netmgt.config.ServiceConfigFactory;
import org.opennms.netmgt.config.service.Service;
import org.opennms.netmgt.config.service.types.InvokeAtType;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
* <p>
* The Manager is reponsible for launching/starting all services in the VM
* The Manager is responsible for launching/starting all services in the VM
* that it is started for. The Manager operates in two modes, normal and
* server
* </p>
Expand Down Expand Up @@ -229,8 +230,7 @@ public void die(String message) {
private File getPropertiesFile() {
String homeDir = System.getProperty("opennms.home");
File etcDir = new File(homeDir, "etc");
File propertiesFile = new File(etcDir, "opennms.properties");
return propertiesFile;
return new File(etcDir, "opennms.properties");
}

private void start() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ public boolean accept(final File pathname) {

private final SimpleDateFormat m_dateFormatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

private final char m_spins[] = { '/', '-', '\\', '|' };
private final char[] m_spins = { '/', '-', '\\', '|' };

private List<Constraint> m_constraints;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ private MultiColumnKey getKeyForColumns(ResultSet rs, Map<String, ColumnChange>
return new MultiColumnKey(objects);
}

public class MultiColumnKey {
public static class MultiColumnKey {
private final Object[] m_keys;

public MultiColumnKey(Object[] keys) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public void run() {

if (echoReply != null && echoReply.isValid()) {
// 64 bytes from 127.0.0.1: icmp_seq=0 time=0.069 ms
System.out.printf("%d bytes from %s: tid=%d icmp_seq=%d time=%.3f ms\n",
System.out.printf("%d bytes from %s: tid=%d icmp_seq=%d time=%.3f ms%n",
echoReply.getPacketLength(),
datagram.getAddress().getHostAddress(),
echoReply.getIdentifier(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public void run() {

if (echoReply != null && echoReply.isValid()) {
// 64 bytes from 127.0.0.1: icmp_seq=0 time=0.069 ms
System.out.printf("%d bytes from [%s]: tid=%d icmp_seq=%d time=%.3f ms\n",
System.out.printf("%d bytes from [%s]: tid=%d icmp_seq=%d time=%.3f ms%n",
echoReply.getPacketLength(),
datagram.getAddress().getHostAddress(),
echoReply.getIdentifier(),
Expand Down
4 changes: 2 additions & 2 deletions core/lib/src/main/java/org/opennms/core/utils/Base64.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ public final class Base64 {
* six then it is padded with BASE64_PAD.
* </P>
*/
private static final char BASE64_CHARS[] = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/' };
private static final char[] BASE64_CHARS = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/' };

// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
private static final byte BASE64_VALUES[] = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
private static final byte[] BASE64_VALUES = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
/* 16 - 31 */-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
/* 32 - 47 */-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, 63,
/* 48 - 63 */52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, 0, -1, -1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
* @author brozow
* @version $Id: $
*/
abstract public class JDBCTemplate {
public abstract class JDBCTemplate {

private DataSource m_db;
private String m_sql;
Expand Down Expand Up @@ -81,7 +81,7 @@ private String argsToString(final Object[] values) {
return sb.toString();
}

private void doExecute(final Object values[]) throws SQLException {
private void doExecute(final Object[] values) throws SQLException {
final DBUtils d = new DBUtils(getClass());
try {
final Connection conn = m_db.getConnection();
Expand All @@ -103,7 +103,7 @@ private void doExecute(final Object values[]) throws SQLException {
* @param values an array of {@link java.lang.Object} objects.
* @return a {@link java.lang.String} object.
*/
public String reproduceStatement(final Object values[]) {
public String reproduceStatement(final Object[] values) {
return m_sql+": with vals "+argsToString(values);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public static int getKeyedInteger(@SuppressWarnings("rawtypes") final Map map, f
* @param defValues an array of int.
*/
@SuppressWarnings("unchecked")
public final static int[] getKeyedIntegerArray(final Map map, final String key, final int[] defValues) {
public static final int[] getKeyedIntegerArray(final Map map, final String key, final int[] defValues) {

if (map == null) return defValues;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@
*/
public abstract class WebSecurityUtils {

private final static Pattern ILLEGAL_IN_INTEGER = Pattern.compile("[^0-9+-]");
private static final Pattern ILLEGAL_IN_INTEGER = Pattern.compile("[^0-9+-]");

private final static Pattern ILLEGAL_IN_FLOAT = Pattern.compile("[^0-9.Ee+-]");
private static final Pattern ILLEGAL_IN_FLOAT = Pattern.compile("[^0-9.Ee+-]");

private final static Pattern ILLEGAL_IN_COLUMN_NAME_PATTERN = Pattern.compile("[^A-Za-z0-9_]");
private static final Pattern ILLEGAL_IN_COLUMN_NAME_PATTERN = Pattern.compile("[^A-Za-z0-9_]");

private final static Pattern scriptPattern = Pattern.compile("script", Pattern.CASE_INSENSITIVE);
private static final Pattern scriptPattern = Pattern.compile("script", Pattern.CASE_INSENSITIVE);

/**
* <p>sanitizeString</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public CollectionTracker getParent() {

public boolean timedOut() { return m_timedOut; }

abstract public void setMaxRepetitions(int maxRepetitions);
public abstract void setMaxRepetitions(int maxRepetitions);

public void setFailed(boolean failed) {
m_failed = failed;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public interface SnmpStrategy {

SnmpValue set(SnmpAgentConfig agentConfig, SnmpObjId oid, SnmpValue value);

SnmpValue[] set(SnmpAgentConfig agentConfig, SnmpObjId oid[], SnmpValue value[]);
SnmpValue[] set(SnmpAgentConfig agentConfig, SnmpObjId[] oid, SnmpValue[] value);

SnmpValue get(SnmpAgentConfig agentConfig, SnmpObjId oid);
SnmpValue[] get(SnmpAgentConfig agentConfig, SnmpObjId[] oids);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public static SnmpValue get(SnmpAgentConfig agentConfig, SnmpObjId oid) {
return getStrategy().get(agentConfig, oid);
}

public static SnmpValue[] get(SnmpAgentConfig agentConfig, SnmpObjId oids[]) {
public static SnmpValue[] get(SnmpAgentConfig agentConfig, SnmpObjId[] oids) {
return getStrategy().get(agentConfig, oids);
}

Expand Down
26 changes: 13 additions & 13 deletions core/snmp/api/src/main/java/org/opennms/netmgt/snmp/SnmpValue.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,31 +33,31 @@

public interface SnmpValue {
// These values match the ASN.1 constants
public final static int SNMP_INT32 = (0x02);
public static final int SNMP_INT32 = (0x02);

public final static int SNMP_OCTET_STRING = (0x04);
public static final int SNMP_OCTET_STRING = (0x04);

public final static int SNMP_NULL = (0x05);
public static final int SNMP_NULL = (0x05);

public final static int SNMP_OBJECT_IDENTIFIER = (0x06);
public static final int SNMP_OBJECT_IDENTIFIER = (0x06);

public final static int SNMP_IPADDRESS = (0x40);
public static final int SNMP_IPADDRESS = (0x40);

public final static int SNMP_COUNTER32 = (0x41);
public static final int SNMP_COUNTER32 = (0x41);

public final static int SNMP_GAUGE32 = (0x42);
public static final int SNMP_GAUGE32 = (0x42);

public final static int SNMP_TIMETICKS = (0x43);
public static final int SNMP_TIMETICKS = (0x43);

public final static int SNMP_OPAQUE = (0x44);
public static final int SNMP_OPAQUE = (0x44);

public final static int SNMP_COUNTER64 = (0x46);
public static final int SNMP_COUNTER64 = (0x46);

public final static int SNMP_NO_SUCH_OBJECT = (0x80);
public static final int SNMP_NO_SUCH_OBJECT = (0x80);

public final static int SNMP_NO_SUCH_INSTANCE = (0x81);
public static final int SNMP_NO_SUCH_INSTANCE = (0x81);

public final static int SNMP_END_OF_MIB = (0x82); // 8*16 + 2 = 130
public static final int SNMP_END_OF_MIB = (0x82); // 8*16 + 2 = 130

boolean isEndOfMib();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ public abstract class SnmpWalker implements Closeable {

private static final transient Logger LOG = LoggerFactory.getLogger(SnmpWalker.class);

protected static abstract class WalkerPduBuilder extends PduBuilder {
protected abstract static class WalkerPduBuilder extends PduBuilder {
protected WalkerPduBuilder(int maxVarsPerPdu) {
super(maxVarsPerPdu);
}

abstract public void reset();
public abstract void reset();
}

private final String m_name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,7 @@ public String toString() {
private static Address convertAddress(InetAddress address, int port) {
String transportAddress = address.getHostAddress();
transportAddress += "/" + port;
Address targetAddress = new UdpAddress(transportAddress);
return targetAddress;
return new UdpAddress(transportAddress);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ else if (data.length > 4)
public InetAddress convertToIpAddress() {
byte[] data = getString();

byte addr[] = new byte[4];
byte[] addr = new byte[4];
addr[0] = data[0];
addr[1] = data[1];
addr[2] = data[2];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public class SnmpNoSuchInstance extends SnmpV2Error {
/**
* Defines the serialization format.
*/
final static long serialVersionUID = 909796483768805665L;
static final long serialVersionUID = 909796483768805665L;

/**
* The ASN.1 value that defines this variable.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ public static String toDisplayString(SnmpOctetString octetString) {
return null;
}

byte bytes[] = octetString.getString();
byte[] bytes = octetString.getString();

// Sanity check
if (bytes == null || bytes.length == 0) {
Expand All @@ -354,7 +354,7 @@ public static String toDisplayString(SnmpOctetString octetString) {
// decimal range 32 - 126 inclusive) with an
// ASCII period char (decimal 46).
//
byte newBytes[] = new byte[bytes.length];
byte[] newBytes = new byte[bytes.length];
for (int i = 0; i < bytes.length; i++) {
newBytes[i] = Character.isISOControl((char)bytes[i]) ? (byte)'.' : bytes[i];
}
Expand All @@ -375,8 +375,7 @@ public static String toHexString(final SnmpOctetString ostr) {
sbuf.append(Integer.toHexString((int) bytes[i] & 0xf));
}
}
String physAddr = sbuf.toString().trim();
return physAddr;
return sbuf.toString().trim();
}

@Override
Expand Down
Loading

0 comments on commit 045643c

Please sign in to comment.