Permalink
Browse files

2.9.6 /2016-07-08/

  • Loading branch information...
2 parents e1a9374 + be2e9d1 commit b35373d9986cbcb4222ef500118e073d35384682 @yanchenko committed Jul 7, 2016
View
11 CHANGES
@@ -1,13 +1,16 @@
-2.9.5 /2015-05-01/:
+2.9.6 /2016-07-08/:
+ * EventBus fix.
+
+2.9.5 /2016-05-01/:
* IntentService: fixed null Intent crash /kudos to @plzen/.
-2.9.4 /2015-03-04/:
+2.9.4 /2016-03-04/:
* ClearableEditText: customizable X location & misc.
-2.9.3 /2015-02-13/:
+2.9.3 /2016-02-13/:
* ClearableEditText fix.
-2.9.2 /2015-02-12/:
+2.9.2 /2016-02-12/:
* EventBus: fixed ReflectiveReceiver registered more than once /kudos to @plzen/.
* ClearableEditText: improved X tap detection.
View
2 droidparts-support/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.droidparts</groupId>
<artifactId>droidparts-parent</artifactId>
- <version>2.9.5</version>
+ <version>2.9.6</version>
</parent>
<artifactId>droidparts-support</artifactId>
View
2 droidparts-test/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.droidparts</groupId>
<artifactId>droidparts-parent</artifactId>
- <version>2.9.5</version>
+ <version>2.9.6</version>
</parent>
<artifactId>droidparts-test</artifactId>
View
23 droidparts-test/src/org/droidparts/test/testcase/EventBusTestCase.java
@@ -38,14 +38,27 @@ public void onEvent(String name, Object data) {
}
};
- private final Object aer = new Object() {
+ class AnnotatedParent {
+
+ int parentCalledBackTimes = 0;
@ReceiveEvents
private void onEvent() {
- calledBackTimes++;
+ parentCalledBackTimes++;
}
+ }
- };
+ class AnnotatedChild extends AnnotatedParent {
+
+ int childCalledBackTimes = 0;
+
+ @ReceiveEvents(name = NAME)
+ private void onEvent() {
+ childCalledBackTimes++;
+ }
+ }
+
+ private final AnnotatedChild aer = new AnnotatedChild();
@Override
protected void tearDown() throws Exception {
@@ -72,11 +85,13 @@ public void testAnnotatedReceiver() {
for (int i = 0; i < 5; i++) {
EventBus.registerAnnotatedReceiver(aer);
}
+ EventBus.postEvent("whatever");
for (int i = 0; i < 2; i++) {
EventBus.postEvent(NAME, DATA);
}
sleep();
- assertEquals(2, calledBackTimes);
+ assertEquals(3, aer.parentCalledBackTimes);
+ assertEquals(2, aer.childCalledBackTimes);
}
private void sleep() {
View
2 droidparts/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.droidparts</groupId>
<artifactId>droidparts-parent</artifactId>
- <version>2.9.5</version>
+ <version>2.9.6</version>
</parent>
<artifactId>droidparts</artifactId>
View
5 droidparts/src/org/droidparts/bus/EventBus.java
@@ -199,6 +199,11 @@ public void onEvent(String name, Object data) {
}
}
+ @Override
+ public int hashCode() {
+ return super.hashCode() + spec.method.hashCode();
+ }
+
}
}
View
2 pom.xml
@@ -12,7 +12,7 @@
<artifactId>droidparts-parent</artifactId>
<packaging>pom</packaging>
- <version>2.9.5</version>
+ <version>2.9.6</version>
<name>DroidParts - Parent</name>
<description>A carefully crafted Android framework.</description>

0 comments on commit b35373d

Please sign in to comment.