Skip to content
Snippets Groups Projects
Commit c53c4927 authored by Brutzman, Don's avatar Brutzman, Don
Browse files

cleanup warnings

parent dd5c5c89
No related branches found
No related tags found
No related merge requests found
......@@ -159,10 +159,10 @@ public class ExampleSimulationProgram
DisThreadedNetworkInterface.PduListener pduListener;
Pdu receivedPdu;
static final String networkAddress_DEFAULT = "239.1.2.3";
static final int networkPort_DEFAULT = 3000;
static String networkAddress = networkAddress_DEFAULT;
static int networkPort = networkPort_DEFAULT;
static final String NETWORK_ADDRESS_DEFAULT = "239.1.2.3";
static final int NETWORK_PORT_DEFAULT = 3000;
static String networkAddress = NETWORK_ADDRESS_DEFAULT;
static int networkPort = NETWORK_PORT_DEFAULT;
/**
* Constructor design goal: additional built-in initialization conveniences can go here
......@@ -299,10 +299,12 @@ public class ExampleSimulationProgram
if ((comments != null) && (comments.length > 0))
{
ArrayList<String> newCommentsList = new ArrayList<>();
for (int i = 0; i < comments.length; i++)
for (String comment : comments)
{
if (!comments[i].isEmpty())
newCommentsList.add(comments[i]); // OK found something to send
if (!comment.isEmpty())
{
newCommentsList.add(comment); // OK found something to send
}
}
if (!newCommentsList.isEmpty())
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment