diff options
author | Martín Schonaker <[email protected]> | 2014-09-22 13:38:17 -0300 |
---|---|---|
committer | Martín Schonaker <[email protected]> | 2014-09-22 13:54:25 -0300 |
commit | 09e9510ba6b5a472f6c04a13fe1bfcc06b01a3d3 (patch) | |
tree | 2951037a80497780cec08d39262eaa2a75f7814b /api/src/main | |
parent | e021d4ba5fbfe4adf7298bb1334d8df1c8ecd419 (diff) |
Fix #41: abstract could become concrete.
Diffstat (limited to 'api/src/main')
-rw-r--r-- | api/src/main/java/org/osjava/jardiff/Tools.java | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/api/src/main/java/org/osjava/jardiff/Tools.java b/api/src/main/java/org/osjava/jardiff/Tools.java index 0a8f5f1..e159541 100644 --- a/api/src/main/java/org/osjava/jardiff/Tools.java +++ b/api/src/main/java/org/osjava/jardiff/Tools.java @@ -66,12 +66,14 @@ public final class Tools * @return */ public static boolean isAccessChange(int oldAccess, int newAccess) { - if ((oldAccess & Opcodes.ACC_FINAL) == 0 && (newAccess & Opcodes.ACC_FINAL) > 0) { - return true; - } else { - oldAccess = oldAccess & ~Opcodes.ACC_FINAL; - newAccess = newAccess & ~Opcodes.ACC_FINAL; - } - return oldAccess != newAccess; - } + if ((oldAccess & Opcodes.ACC_FINAL) == 0 && (newAccess & Opcodes.ACC_FINAL) > 0) { + return true; + } else if ((oldAccess & Opcodes.ACC_ABSTRACT) == 0 && (newAccess & Opcodes.ACC_ABSTRACT) > 0) { + return true; + } else { + oldAccess = oldAccess & ~Opcodes.ACC_FINAL & ~Opcodes.ACC_ABSTRACT; + newAccess = newAccess & ~Opcodes.ACC_FINAL & ~Opcodes.ACC_ABSTRACT; + } + return oldAccess != newAccess; + } } |