Commit f66b5eae authored by Uwe Peuker's avatar Uwe Peuker
Browse files

Code-Bereinigung

parent 8cf3533d
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -31,7 +31,6 @@ import de.bsvrz.dav.daf.main.config.SystemObject;
import de.bsvrz.sys.funclib.losb.exceptions.FailureException;
import de.bsvrz.sys.funclib.losb.kernsoftware.ConnectionManager;
import de.bsvrz.sys.funclib.losb.ringbuffer.RingBuffer;
import jdk.nashorn.internal.ir.ThrowNode;

/**
 * Klasse die den Empfang von Daten über den Datenverteiler übernimmt. Eingehende Daten werden nur gespeichert, wenn diese einen Datenteil haben. Außerdem
@@ -86,7 +85,7 @@ public abstract class AnswerReceiver implements ClientReceiverInterface {
		this.requestId = requestId;
		this.dav = dav;
		this.receiver = receiver;
		incoming = new RingBuffer<ResultData>(INITIAL_RINGBUFFER_SIZE, RingBuffer.UNBOUNDED_SIZE);
		incoming = new RingBuffer<>(INITIAL_RINGBUFFER_SIZE, RingBuffer.UNBOUNDED_SIZE);

		DataModel model = dav.getDataModel();
		this.dataDescription = new DataDescription(model.getAttributeGroup(atg), model.getAspect(asp));
+6 −6
Original line number Diff line number Diff line
@@ -125,7 +125,7 @@ public class CmdPua {
	/////////////// Klassenvariablen und Methoden

	/** Kommandozeilen-Paramter */
	public HashMap<String, String> parameter = new HashMap<String, String>();
	public HashMap<String, String> parameter = new HashMap<>();

	/** Datenverteiler */
	public ClientDavInterface dav = null;
@@ -393,7 +393,7 @@ public class CmdPua {

			// bla=ex, blub=exs, ere=as
			String[] bind = (this.parameter.get("bindungen") == null) ? null : this.parameter.get("bindungen").split(",");
			Hashtable<String, String> aspBindings = new Hashtable<String, String>();
			Hashtable<String, String> aspBindings = new Hashtable<>();
			for(int i = 0; (bind != null && i < bind.length); i++) {
				aspBindings.put(bind[i].split("=")[0].trim(), bind[i].split("=")[1].trim());
			}
@@ -406,7 +406,7 @@ public class CmdPua {
			}

			// (123-234) (234-345)
			List<Tuple<Long, Long>> periodList = new ArrayList<Tuple<Long, Long>>();
			List<Tuple<Long, Long>> periodList = new ArrayList<>();
			String periods = this.parameter.get("zeitbereich");
			if(periods != null) {
				String[] pList = periods.replace(" ", "").split(",");
@@ -416,7 +416,7 @@ public class CmdPua {

					//unterscheiden zwischen Angabe im ms-Format oder ähnlich wie im Protokoll selbst
					try {
						periodList.add(new Tuple<Long, Long>(new Long(first), new Long(last)));
						periodList.add(new Tuple<>(new Long(first), new Long(last)));
					}
					catch(NumberFormatException nfe) {
						try {
@@ -426,7 +426,7 @@ public class CmdPua {
							gc.clear();
							gc.setTime(_sdf.parse(last));
							long end = gc.getTimeInMillis();
							periodList.add(new Tuple<Long, Long>(start, end));
							periodList.add(new Tuple<>(start, end));
						}
						catch(ParseException e) {
							throw new FailureException(
@@ -441,7 +441,7 @@ public class CmdPua {
			// (alias1,alias2) = (def1_1,def2_1) (def1_2, def2_2)
			// -> tmp[0] = (alias1,alias2)
			// -> tmp[1] = (def_1,def_2)(def_1,def_2)
			Hashtable<String, String[]> pseudoObjects = new Hashtable<String, String[]>();
			Hashtable<String, String[]> pseudoObjects = new Hashtable<>();
			String pseuObj = (this.parameter.get("pseudoobjekte") == null) ? "" : this.parameter.get("pseudoobjekte");
			if(!pseuObj.equals("")) {
				String[] tmp = pseuObj.replace(" ", "").split("=");
+1 −1
Original line number Diff line number Diff line
@@ -194,7 +194,7 @@ class ProtocolTableModel extends AbstractTableModel {
	String header[];

	/** Werte */
	ArrayList<ProtocolResult> rows = new ArrayList<ProtocolResult>(500);
	ArrayList<ProtocolResult> rows = new ArrayList<>(500);

	/** Aggregationsdatensatz */
	private ProtocolAggregationData pad = null;
+2 −2
Original line number Diff line number Diff line
@@ -115,7 +115,7 @@ public class PuaClient implements AutoCloseable {

	private static final long PROTOCOL_COMPLETION_INTERFACE_ID = -1;

	private final Set<ProtocolListenerEx> _protocolListeners = new HashSet<ProtocolListenerEx>();
	private final Set<ProtocolListenerEx> _protocolListeners = new HashSet<>();
	
	private final Set<StatusListener> _statusListeners = new CopyOnWriteArraySet<>();

@@ -795,7 +795,7 @@ public class PuaClient implements AutoCloseable {
					}
					Tuple<Long, ProcessingParameter>[] result = new Tuple[protocolIds.length];
					for(int i = 0; i < protocolIds.length; i++) {
						result[i] = new Tuple<Long, ProcessingParameter>(protocolIds[i], pp[i]);
						result[i] = new Tuple<>(protocolIds[i], pp[i]);
					}

					resultInfo.setSuccessful();
+2 −2
Original line number Diff line number Diff line
@@ -55,7 +55,7 @@ public class ProtocolAggregationData implements ProtocolResult {
	 * @param orders Orders*/
	public ProtocolAggregationData(int size, final List<ProcessingInformation.ApplyAggregation> orders) {
		_orders = orders;
		_aggregations = new ArrayList<List<String>>();
		_aggregations = new ArrayList<>();
		columnDataType = new long[size];
	}

@@ -107,7 +107,7 @@ public class ProtocolAggregationData implements ProtocolResult {
	}

	public void addAggregations(final List<Class<? extends Aggregation>> aggregationClasses) {
		final ArrayList<String> list = new ArrayList<String>(aggregationClasses.size());
		final ArrayList<String> list = new ArrayList<>(aggregationClasses.size());
		for(final Class<? extends Aggregation> aggregationClass : aggregationClasses) {
			try {
				list.add(aggregationClass.newInstance().getAggregationName());
Loading