]> git.mxchange.org Git - addressbook-mailer-ejb.git/commitdiff
Continued:
authorRoland Haeder <roland@mxchange.org>
Fri, 16 Oct 2015 15:27:40 +0000 (17:27 +0200)
committerRoland Haeder <roland@mxchange.org>
Fri, 16 Oct 2015 20:02:56 +0000 (22:02 +0200)
- fixed loading of address books that the current user is not sharing
- updated jar(s)

lib/jcontacts-business-core.jar
lib/jcontacts-core.jar
lib/jcore-logger-lib.jar
lib/jcoreee.jar
lib/jcountry-core.jar
lib/jphone-core.jar
lib/juser-core.jar
lib/juser-lib.jar
src/java/org/mxchange/addressbook/model/addressbook/AddressbookSessionBean.java

index b5f18b6022dd905e6d89bdcf9879c99ee71629b2..3c2c675d34181336d42c69619169c25415eb9a2a 100644 (file)
Binary files a/lib/jcontacts-business-core.jar and b/lib/jcontacts-business-core.jar differ
index 0366960c7a937add1673cd47c2056907661b0a6d..c0b14e4478c1cdddc52d75c13e9dd45854341f2f 100644 (file)
Binary files a/lib/jcontacts-core.jar and b/lib/jcontacts-core.jar differ
index 49c92f01894dfb815c1d919ba93ab65d1115e445..85d46fc0c152e78c3ff46af60fb2464cfdfdb459 100644 (file)
Binary files a/lib/jcore-logger-lib.jar and b/lib/jcore-logger-lib.jar differ
index 34dab31b1103ed439320ee2b691c9a0236fac76a..c39c629bf86965dffeb7a59d9a8109198fb4c0a6 100644 (file)
Binary files a/lib/jcoreee.jar and b/lib/jcoreee.jar differ
index 0bead8b648f4af014405b55d7156804a57dfe9ba..7b0501d2ef370d08e325c522f0da339da564ab06 100644 (file)
Binary files a/lib/jcountry-core.jar and b/lib/jcountry-core.jar differ
index eec6972ea0bf3abb4183919486c5384cd4c89967..018368a9653b49ef34de6147f45a8e7e76909cf6 100644 (file)
Binary files a/lib/jphone-core.jar and b/lib/jphone-core.jar differ
index b7c2d60f403461e5d3999b0c9849eac180a9607b..24dbe54287ff32e63ba82aa0c4093b43ed0d9e61 100644 (file)
Binary files a/lib/juser-core.jar and b/lib/juser-core.jar differ
index dcd598a1f9b05aad4a42861467a004488af83aea..b7bd137e9dfbcca350fcb893ea38f9753e0544cc 100644 (file)
Binary files a/lib/juser-lib.jar and b/lib/juser-lib.jar differ
index 15c6a3e36fe2f8d6ac698eaf95fa6dc64cfb3084..d52c1bbaa5b554281e9844bcd0506ef6fa32fd3e 100644 (file)
@@ -17,6 +17,7 @@
 package org.mxchange.addressbook.model.addressbook;
 
 import java.text.MessageFormat;
+import java.util.ArrayList;
 import java.util.LinkedList;
 import java.util.List;
 import javax.ejb.Stateless;
@@ -108,21 +109,36 @@ public class AddressbookSessionBean extends BaseDatabaseBean implements Addressb
                // Debug message
                this.getLoggerBeanLocal().logDebug(MessageFormat.format("allUsersNotSharing: allShares.size()={0}", allShares.size())); //NOI18N
 
+               // List for users aharing with given
+               List<User> sharingUsers = new ArrayList<>(allShares.size());
+
+               // Check all entries
+               for (final ShareableAddressbook share : allShares) {
+                       // Debug message
+                       this.getLoggerBeanLocal().logDebug(MessageFormat.format("allUsersNotSharing: share.shareUserSharee={0}", share.getShareUserSharee())); //NOI18N
+
+                       // Add it
+                       sharingUsers.add(share.getShareUserSharee());
+               }
+
+               // Debug message
+               this.getLoggerBeanLocal().logDebug("allUsersNotSharing: sharingUsers.size()=" + sharingUsers.size());
+
                // Init final user list
                List<User> userList = new LinkedList<>();
 
                // Walk through all users
-               for (final ShareableAddressbook share : allShares) {
-                       // Log message
-                       this.getLoggerBeanLocal().logDebug(MessageFormat.format("allUsersNotSharing: share.shareUserSharee={0}", share.getShareUserSharee())); //NOI18N
+               for (final User foundUser : allUsersExcept) {
+                       // Debug message
+                       this.getLoggerBeanLocal().logDebug(MessageFormat.format("allUsersNotSharing: foundUser={0}", foundUser)); //NOI18N
 
                        // Does the list contain it ?
-                       if (!allUsersExcept.contains(share.getShareUserSharee())) {
+                       if (!sharingUsers.contains(foundUser)) {
                                // Found one to add
-                               this.getLoggerBeanLocal().logDebug(MessageFormat.format("allUsersNotSharing: share.shareUserSharee={0} - ADDING!", share.getShareUserSharee())); //NOI18N
+                               this.getLoggerBeanLocal().logDebug(MessageFormat.format("allUsersNotSharing: foundUser={0} - ADDING!", foundUser)); //NOI18N
 
                                // Add it
-                               userList.add(share.getShareUserSharee());
+                               userList.add(foundUser);
                        }
                }