Skip to content
Snippets Groups Projects
Commit 037f3f58 authored by brutzman's avatar brutzman
Browse files

fix imports with new build

parent a704cb4a
No related branches found
No related tags found
No related merge requests found
......@@ -77,7 +77,7 @@ public class FetterolfPduListenerSaver {
}
}
System.out.println("Ending pdu save to " + recorder.getLogFile());
} catch (IOException ex) {
} catch (Exception ex) {
System.err.println("*** Exception: " + ex.getClass().getSimpleName() + ": " + ex.getLocalizedMessage());
}
}
......
......@@ -3,7 +3,7 @@ package MV3500Cohort2019JulySeptember.homework4.Fetterolf;
import java.net.*;
import java.io.*;
import edu.nps.moves.dis7.*;
import edu.nps.moves.dis7.pdus.*;
import edu.nps.moves.dis7.enumerations.*;
import edu.nps.moves.dis7.utilities.*;
import java.util.ArrayList;
......
......@@ -4,7 +4,7 @@ import java.io.*;
import java.net.*;
import java.util.*;
import edu.nps.moves.dis7.*;
import edu.nps.moves.dis7.pdus.*;
import edu.nps.moves.dis7.enumerations.*;
/**
......@@ -104,7 +104,7 @@ public class FetterolfPduSender {
// see Garrett Loffelman and Pete Severson's code for OpenDis version 4 example
// https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500/tree/master/assignments/src/MV3500Cohort2018JulySeptember/projects/LoeffelmanSeverson
CommentPdu newCommentPdu = new CommentPdu();
ArrayList<VariableDatum> payloadList = new ArrayList<VariableDatum>();
ArrayList<VariableDatum> payloadList = new ArrayList<>();
ArrayList<String> commentsList = new ArrayList<>();
commentsList.add("Hello CommentPDU");
......@@ -117,7 +117,7 @@ public class FetterolfPduSender {
for (String comment : commentsList) {
VariableDatum newVariableDatum = new VariableDatum();
newVariableDatum.setVariableDatumValue(comment.getBytes()); // conversion
newVariableDatum.setVariableDatumLength(comment.getBytes().length * 8); // bits, not bytes, see spec and javadoc
newVariableDatum.setVariableDatumLengthInBits(comment.getBytes().length * 8); // bits, not bytes, see spec and javadoc
// alternatively, you do not need to set this and the marshaller will figure it out from the byte array
// (see javadoc for VariableDatum.setVariableDatumLength())
payloadList.add(newVariableDatum);
......
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