[vlma-devel] commit: Check return value of Set#add. (Adrien Grand )
git version control
git at videolan.org
Sat Nov 15 20:22:46 CET 2008
vlma | branch: master | Adrien Grand <jpountz at videolan.org> | Sat Nov 15 19:42:34 2008 +0100| [00abcb2e54921b4a46869c88bd18b1aa875bb9db] | committer: Adrien Grand
Check return value of Set#add.
> http://git.videolan.org/gitweb.cgi/vlma.git/?a=commit;h=00abcb2e54921b4a46869c88bd18b1aa875bb9db
---
.../main/java/org/videolan/vlma/OrderGiver.java | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/vlma-core/src/main/java/org/videolan/vlma/OrderGiver.java b/vlma-core/src/main/java/org/videolan/vlma/OrderGiver.java
index 19ab5cb..b5ef652 100644
--- a/vlma-core/src/main/java/org/videolan/vlma/OrderGiver.java
+++ b/vlma-core/src/main/java/org/videolan/vlma/OrderGiver.java
@@ -228,7 +228,9 @@ public class OrderGiver {
Adapter a = adapterIt.next();
MediaGroup g = groupIt.next();
Order order = new Order(a, g);
- orders.add(order);
+ if(!orders.add(order)) {
+ logger.error("Unexpected error while building the new set of orders");
+ }
load.put(a.getServer(), load.get(a.getServer()) + g.getLoad());
}
while(groupIt.hasNext()) {
More information about the vlma-devel
mailing list