Feature #304 prioritization
Merge request reports
Activity
SonarQube analysis reported 7 issues
-
⛔ 1 blocker -
🚫 1 critical -
🔽 3 minor -
ℹ 2 info
-
⛔ Add some tests to this class.📘 -
🚫 Make this class "Serializable".📘 -
🔽 Drop this interface in favor of "java.util.function.BiFunction<Collection,List,Collection>".📘 -
🔽 Drop this interface in favor of "java.util.function.Function<Collection,List>".📘 -
🔽 Add a 'package-info.java' file to document the 'prioritizers' package📘 -
ℹ Complete the task associated to this TODO comment.📘 -
ℹ Complete the task associated to this TODO comment.📘
-
SonarQube analysis reported 7 issues
-
⛔ 1 blocker -
🚫 1 critical -
🔽 3 minor -
ℹ 2 info
-
⛔ Add some tests to this class.📘 -
🚫 Make this class "Serializable".📘 -
🔽 Drop this interface in favor of "java.util.function.BiFunction<Collection,List,Collection>".📘 -
🔽 Drop this interface in favor of "java.util.function.Function<Collection,List>".📘 -
🔽 Add a 'package-info.java' file to document the 'prioritizers' package📘 -
ℹ Complete the task associated to this TODO comment.📘 -
ℹ Complete the task associated to this TODO comment.📘
-
SonarQube analysis reported 6 issues
-
⛔ 1 blocker -
🚫 1 critical -
🔽 2 minor -
ℹ 2 info
-
⛔ Add some tests to this class.📘 -
🚫 Make this class "Serializable".📘 -
🔽 Drop this interface in favor of "java.util.function.BiFunction<Collection,List,Collection>".📘 -
🔽 Add a 'package-info.java' file to document the 'prioritizers' package📘 -
ℹ Complete the task associated to this TODO comment.📘 -
ℹ Complete the task associated to this TODO comment.📘
-
SonarQube analysis reported 7 issues
-
⛔ 1 blocker -
🚫 1 critical -
🔽 3 minor -
ℹ 2 info
-
⛔ Add some tests to this class.📘 -
🚫 Make this class "Serializable".📘 -
🔽 Drop this interface in favor of "java.util.function.BiFunction<Collection,List,Collection>".📘 -
🔽 Use a cryptographically strong random number generator (RNG) like "java.security.SecureRandom" in place of this PRNG📘 -
🔽 Add a 'package-info.java' file to document the 'prioritizers' package📘 -
ℹ Complete the task associated to this TODO comment.📘 -
ℹ Complete the task associated to this TODO comment.📘
-
mentioned in merge request !86 (merged)
added 50 commits
-
0c82bb97...11b66319 - 49 commits from branch
master
- 6dcd0777 - Merge remote-tracking branch 'remotes/origin/master' into feature-#304-prioritization
-
0c82bb97...11b66319 - 49 commits from branch
added Needs Review label
SonarQube analysis reported 2 issues
-
🚫 1 critical -
🔽 1 minor
-
assigned to @nilsweid
I only have some general remarks. After solving that, the MR can be merged directly.
- In the class diagram, there is an aggregation betweeen DisasterPrioritization and ReplicationsDensityManager. I only see that the ReplicationsDensityManager is used in the test cases... Could you explain its role to me briefly?
- There is still some critical SonarLint issue and a merge conflict. Please solve this locally and try again!
added Needs Changes Needs information from dev and removed Needs Review labels
added 29 commits
-
6dcd0777...4adb5d50 - 28 commits from branch
master
- b6b82ddf - Merge remote-tracking branch 'remotes/origin/master' into feature-#304-prioritization
-
6dcd0777...4adb5d50 - 28 commits from branch
We need to know a message's replications density to prioritize. Originally, I planned to do that by providing the DisasterPrioritzation with the correct instantiation of the ReplicationsDensityManager. However, I later decided that this introduces dependencies and invited possible misuse of the manager I'd rather not have, and added a method
public double getReplicationsDensity(Message m)
to theDisasterRouter
instead (note we now have an attached router, which wasn't planned originally).removed Needs information from dev label
added Needs Review and removed Needs Changes labels
114 * 115 * @param host host prioritizing the messages. 116 */ 117 @Override 118 public void setAttachedHost(DTNHost host) { 119 this.nonHeadStartPrioritization.setAttachedHost(host); 120 } 121 122 /** 123 * Sorts the provided message - connection tuples according to strategy. 124 * 125 * @param messages The message - connection tuples to sort. 126 * @return The provided messages in sorted order, most important messages first. 127 */ 128 @Override 129 public List<Tuple<Message, Connection>> sortMessages(Collection<Tuple<Message, Connection>> messages) { 155 if (headStartMessagesIndex == INDEX_NOT_FOUND) { 156 headStartMessagesIndex = otherMessages.size(); 157 } 158 otherMessages.addAll(headStartMessagesIndex, headStartMessages); 159 160 // Return the sorted messages. 161 return otherMessages; 162 } 163 164 /** 165 * Finds the first index at which an item is stored that does not wrap a {@link DataMessage}. 166 * @param messages Message list to search. 167 * @return The found index, or {@link #INDEX_NOT_FOUND} if there was none. 168 */ 169 private static int findFirstNonDataMessageIndex(List<Tuple<Message, Connection>> messages) { 170 int firstOrdinaryMessageIndex = INDEX_NOT_FOUND; mentioned in commit cd299f0f