]> git.mxchange.org Git - juser-login-core.git/commitdiff
Cleanup:
authorRoland Haeder <roland@mxchange.org>
Sat, 12 Mar 2016 11:46:03 +0000 (12:46 +0100)
committerRoland Haeder <roland@mxchange.org>
Sat, 12 Mar 2016 11:46:03 +0000 (12:46 +0100)
- compareTo()/Comparable<T> was used back in the TDGP times and is no longer needed
- value first, then variable on comparison to avoid accidently assignments
- updated jar(s)

lib/jcontacts-core.jar
lib/jcore.jar
lib/jcoreee.jar
src/org/mxchange/jusercore/container/login/UserLoginContainer.java
src/org/mxchange/jusercore/model/email_address/EmailAddressChange.java
src/org/mxchange/jusercore/model/user/LoginUser.java
src/org/mxchange/jusercore/model/user/User.java

index e905316a232cc3f743e47c1d041b3c782fa666f1..c06f26338a644f05dc23d0100e3b2efc31d0f98f 100644 (file)
Binary files a/lib/jcontacts-core.jar and b/lib/jcontacts-core.jar differ
index 23ef19d3e26ecc03e092895707158a0296bb95bf..097890ccbac9f229dc08c9aa1dd3e6ca12696ce6 100644 (file)
Binary files a/lib/jcore.jar and b/lib/jcore.jar differ
index f2ad1c85d97e64c5a60b7580b4a440554a198134..3f35cb503dc349a077aa978ba857bb1175b5c861 100644 (file)
Binary files a/lib/jcoreee.jar and b/lib/jcoreee.jar differ
index 9b0036819469ee576805df6ea7db6cb3053aaea0..267f70a2f8c71038f8c3fb35d8f221e297e7173e 100644 (file)
@@ -41,9 +41,9 @@ public class UserLoginContainer implements LoginContainer {
        private String userPassword;
 
        /**
-        * Constructot with user instance and unencrypted password
+        * Constructor with user instance and unencrypted password
         * <p>
-        * @param user User instance
+        * @param user         User instance
         * @param userPassword Unencrypted password
         */
        public UserLoginContainer (final User user, final String userPassword) {
index e039b2c0d22b58412a41f158f38680a1901cf385..ad516c23436876f6e0f95a028fca8643fa4d197a 100644 (file)
@@ -48,7 +48,7 @@ import org.mxchange.jusercore.model.user.User;
                        @Index (name = "email_change_user", columnList = "email_change_user")
                }
 )
-public class EmailAddressChange implements ChangeableEmailAddress, Comparable<ChangeableEmailAddress> {
+public class EmailAddressChange implements ChangeableEmailAddress {
 
        /**
         * Serial number
@@ -110,16 +110,11 @@ public class EmailAddressChange implements ChangeableEmailAddress, Comparable<Ch
                this.emailChangeStatus = EmailChangeStatus.NEW;
        }
 
-       @Override
-       public int compareTo (final ChangeableEmailAddress emailAddress) {
-               throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
-       }
-
        @Override
        public boolean equals (final Object object) {
                if (this == object) {
                        return true;
-               } else if (object == null) {
+               } else if (null == object) {
                        return false;
                } else if (this.getClass() != object.getClass()) {
                        return false;
@@ -127,7 +122,7 @@ public class EmailAddressChange implements ChangeableEmailAddress, Comparable<Ch
 
                final ChangeableEmailAddress otherEmail = (ChangeableEmailAddress) object;
 
-               if (!Objects.equals(this.getEmailChangeId(), otherEmail.getEmailChangeId())) {
+               if (!Objects.equals(this.getEmailAddress(), otherEmail.getEmailAddress())) {
                        return false;
                }
 
@@ -137,8 +132,8 @@ public class EmailAddressChange implements ChangeableEmailAddress, Comparable<Ch
        @Override
        public int hashCode () {
                int hash = 5;
-               hash = 71 * hash + Objects.hashCode(this.emailChangeId);
-               hash = 71 * hash + Objects.hashCode(this.emailChangeUser);
+               hash = 71 * hash + Objects.hashCode(this.getEmailAddress());
+               hash = 71 * hash + Objects.hashCode(this.getEmailChangeUser());
                return hash;
        }
 
index 5f4baba5b25e4a5bb55712a22f3e184a9b4ea224..c974976a111f291418e5b929283dc543ded76f14 100644 (file)
@@ -74,7 +74,7 @@ import org.mxchange.jusercore.model.user.status.UserAccountStatus;
                        @NamedQuery (name = "AllMemberPublicUsers", query = "SELECT u FROM users AS u WHERE u.userAccountStatus = :status AND u.userProfileMode IN (:public, :members) ORDER BY u.userId ASC")
                }
 )
-public class LoginUser implements User, Comparable<User> {
+public class LoginUser implements User {
 
        /**
         * Serial number
@@ -169,11 +169,6 @@ public class LoginUser implements User, Comparable<User> {
                this.userProfileMode = ProfileMode.INVISIBLE;
        }
 
-       @Override
-       public int compareTo (final User user) {
-               throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
-       }
-
        @Override
        public void copyAll (final User user) {
                // Copy also contact data
@@ -190,7 +185,7 @@ public class LoginUser implements User, Comparable<User> {
 
        @Override
        public boolean equals (final Object object) {
-               if (object == null) {
+               if (null == object) {
                        return false;
                }
                if (this.getClass() != object.getClass()) {
index 4956567b13a9b05712ec457766850c6f370a7926..915fbcf24e07e03df1560cad995708dcaf5ecf30 100644 (file)
@@ -190,22 +190,9 @@ public interface User extends Serializable {
         */
        void setUserUpdated (final Calendar userUpdated);
 
-       /**
-        * Checks if object is a User instance and whether it matches with this
-        * object.
-        * <p>
-        * @param object Object to be checked
-        * <p>
-        * @return Whether it matches this object
-        */
        @Override
        boolean equals (final Object object);
 
-       /**
-        * Hash code calculation for this object
-        * <p>
-        * @return Hash code for this object
-        */
        @Override
        int hashCode ();
 }