You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by se...@apache.org on 2016/04/22 15:10:59 UTC
cxf git commit: Minimizing OpenJPA noise in 3.1.x
Repository: cxf
Updated Branches:
refs/heads/3.1.x-fixes ec7743850 -> c0cd1f446
Minimizing OpenJPA noise in 3.1.x
Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/c0cd1f44
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/c0cd1f44
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/c0cd1f44
Branch: refs/heads/3.1.x-fixes
Commit: c0cd1f4464954deff337ede117c32ee5fd2b59c6
Parents: ec77438
Author: Sergey Beryozkin <sb...@gmail.com>
Authored: Fri Apr 22 14:10:28 2016 +0100
Committer: Sergey Beryozkin <sb...@gmail.com>
Committed: Fri Apr 22 14:10:28 2016 +0100
----------------------------------------------------------------------
.../rs/security/oauth2/common/Permission.java | 27 ++++++++------------
1 file changed, 11 insertions(+), 16 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cxf/blob/c0cd1f44/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/common/Permission.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/common/Permission.java b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/common/Permission.java
index 4ad7d08..8853da0 100644
--- a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/common/Permission.java
+++ b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/common/Permission.java
@@ -122,18 +122,16 @@ public class Permission implements Serializable {
}
Permission that = (Permission)object;
- if (this.permission != null && that.permission == null
- || this.permission == null && that.permission != null
- || this.permission != null && !this.permission.equals(that.permission)) {
+ if (!this.getPermission().equals(that.getPermission())) {
return false;
}
- if (this.description != null && that.description == null
- || this.description == null && that.description != null
- || this.description != null && !this.description.equals(that.description)) {
+ if (this.getDescription() != null && that.getDescription() == null
+ || this.getDescription() == null && that.getDescription() != null
+ || this.getDescription() != null && !this.getDescription().equals(that.getDescription())) {
return false;
}
- if (this.invisibleToClient != that.invisibleToClient //NOPMD
- || this.isDefaultPermission != that.isDefaultPermission) { //NOPMD
+ if (this.isInvisibleToClient() != that.isInvisibleToClient() //NOPMD
+ || this.isDefaultPermission() != that.isDefaultPermission()) { //NOPMD
return false;
}
@@ -142,15 +140,12 @@ public class Permission implements Serializable {
@Override
public int hashCode() {
- int hashCode = 17;
- if (permission != null) {
- hashCode = 31 * hashCode + permission.hashCode();
+ int hashCode = getPermission().hashCode();
+ if (getDescription() != null) {
+ hashCode = 31 * hashCode + getDescription().hashCode();
}
- if (description != null) {
- hashCode = 31 * hashCode + description.hashCode();
- }
- hashCode = 31 * hashCode + Boolean.valueOf(invisibleToClient).hashCode();
- hashCode = 31 * hashCode + Boolean.valueOf(isDefaultPermission).hashCode();
+ hashCode = 31 * hashCode + Boolean.valueOf(isInvisibleToClient()).hashCode();
+ hashCode = 31 * hashCode + Boolean.valueOf(isDefaultPermission()).hashCode();
return hashCode;
}