aboutsummaryrefslogtreecommitdiffstats
path: root/api/src/main
diff options
context:
space:
mode:
authorJulien Eluard <[email protected]>2011-02-04 15:07:54 -0800
committerJulien Eluard <[email protected]>2011-02-04 15:07:54 -0800
commit3a6c729a57ce5a57a3114b9f078f64d5b4fbe5bd (patch)
tree2fcd2a090f6951bd13f756e153152387b4d8adb1 /api/src/main
parent5455b274d803f9bf2be9fa78eda6cfafc9a9b68e (diff)
Fixed bug when a new class is added.
Diffstat (limited to 'api/src/main')
-rwxr-xr-xapi/src/main/java/org/semver/jardiff/DifferenceAccumulatingHandler.java24
1 files changed, 12 insertions, 12 deletions
diff --git a/api/src/main/java/org/semver/jardiff/DifferenceAccumulatingHandler.java b/api/src/main/java/org/semver/jardiff/DifferenceAccumulatingHandler.java
index 5d32424..ce02e04 100755
--- a/api/src/main/java/org/semver/jardiff/DifferenceAccumulatingHandler.java
+++ b/api/src/main/java/org/semver/jardiff/DifferenceAccumulatingHandler.java
@@ -93,7 +93,7 @@ public final class DifferenceAccumulatingHandler extends AbstractDiffHandler {
@Override
public void classAdded(final ClassInfo classInfo) throws DiffException {
- if (!isConsidered()) {
+ if (!isClassConsidered(classInfo.getName())) {
return;
}
@@ -102,7 +102,7 @@ public final class DifferenceAccumulatingHandler extends AbstractDiffHandler {
@Override
public void fieldAdded(final FieldInfo fieldInfo) throws DiffException {
- if (!isConsidered()) {
+ if (!isClassConsidered(getCurrentClassName())) {
return;
}
@@ -111,7 +111,7 @@ public final class DifferenceAccumulatingHandler extends AbstractDiffHandler {
@Override
public void methodAdded(final MethodInfo methodInfo) throws DiffException {
- if (!isConsidered()) {
+ if (!isClassConsidered(getCurrentClassName())) {
return;
}
@@ -133,7 +133,7 @@ public final class DifferenceAccumulatingHandler extends AbstractDiffHandler {
@Override
public void classChanged(final ClassInfo oldClassInfo, final ClassInfo newClassInfo) throws DiffException {
- if (!isConsidered()) {
+ if (!isClassConsidered(oldClassInfo.getName())) {
return;
}
@@ -142,7 +142,7 @@ public final class DifferenceAccumulatingHandler extends AbstractDiffHandler {
@Override
public void fieldChanged(final FieldInfo oldFieldInfo, final FieldInfo newFieldInfo) throws DiffException {
- if (!isConsidered()) {
+ if (!isClassConsidered(getCurrentClassName())) {
return;
}
@@ -151,7 +151,7 @@ public final class DifferenceAccumulatingHandler extends AbstractDiffHandler {
@Override
public void methodChanged(final MethodInfo oldMethodInfo, final MethodInfo newMethodInfo) throws DiffException {
- if (!isConsidered()) {
+ if (!isClassConsidered(getCurrentClassName())) {
return;
}
@@ -172,7 +172,7 @@ public final class DifferenceAccumulatingHandler extends AbstractDiffHandler {
@Override
public void classRemoved(final ClassInfo classInfo) throws DiffException {
- if (!isConsidered()) {
+ if (!isClassConsidered(classInfo.getName())) {
return;
}
@@ -181,7 +181,7 @@ public final class DifferenceAccumulatingHandler extends AbstractDiffHandler {
@Override
public void fieldRemoved(final FieldInfo fieldInfo) throws DiffException {
- if (!isConsidered()) {
+ if (!isClassConsidered(getCurrentClassName())) {
return;
}
@@ -190,7 +190,7 @@ public final class DifferenceAccumulatingHandler extends AbstractDiffHandler {
@Override
public void methodRemoved(final MethodInfo methodInfo) throws DiffException {
- if (!isConsidered()) {
+ if (!isClassConsidered(getCurrentClassName())) {
return;
}
@@ -211,16 +211,16 @@ public final class DifferenceAccumulatingHandler extends AbstractDiffHandler {
*
* @return
*/
- private boolean isConsidered() {
+ private boolean isClassConsidered(final String className) {
for (final String exclude : this.excludes) {
- if (getCurrentClassName().startsWith(exclude)) {
+ if (className.startsWith(exclude)) {
return false;
}
}
if (!this.includes.isEmpty()) {
for (final String include : this.includes) {
- if (getCurrentClassName().startsWith(include)) {
+ if (className.startsWith(include)) {
return true;
}
}