Skip to content

Commit

Permalink
Fix corner case found in Akka Persistence Testkit (#229)
Browse files Browse the repository at this point in the history
* Fix travis, actually test different scala versions

* Fix corner case found in Akka Persistence Testkit

* Add patches to test on all Scala versions
  • Loading branch information
raboof authored Mar 23, 2020
1 parent ee8e158 commit df9e2e8
Show file tree
Hide file tree
Showing 21 changed files with 301 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/scala/com/typesafe/genjavadoc/JavaSig.scala
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ trait JavaSig extends NeedsJavaSig { this: TransformCake =>
if (!primitiveOK) jsig(ObjectClass.tpe)
else if (sym == UnitClass) jsig(BoxedUnitClass.tpe)
else toJava(tp)
} else if (sym.isClass) {
} else if (sym.isClass || sym.isModule) {
val preRebound = pre.baseType(sym.owner) // #2585
val name =
if (needsJavaSig(preRebound)) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package akka.persistence.testkit;
public class EventStorage$ {
/**
* Static reference to the singleton instance of this Scala object.
*/
public static final EventStorage$ MODULE$ = null;
public EventStorage$ () { throw new RuntimeException(); }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package akka.persistence.testkit;
public interface EventStorage {
static public class JournalPolicies$ implements akka.persistence.testkit.ProcessingPolicy.DefaultPolicies<akka.persistence.testkit.JournalOperation> {
/**
* Static reference to the singleton instance of this Scala object.
*/
public static final JournalPolicies$ MODULE$ = null;
public JournalPolicies$ () { throw new RuntimeException(); }
}
public akka.persistence.testkit.ProcessingPolicy.DefaultPolicies<akka.persistence.testkit.JournalOperation>.PassAll$ DefaultPolicy () ;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package akka.persistence.testkit;
public interface JournalOperation {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package akka.persistence.testkit;
public class ProcessingPolicy$ {
/**
* Static reference to the singleton instance of this Scala object.
*/
public static final ProcessingPolicy$ MODULE$ = null;
public ProcessingPolicy$ () { throw new RuntimeException(); }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package akka.persistence.testkit;
public interface ProcessingPolicy<U extends java.lang.Object> {
static public interface DefaultPolicies<U extends java.lang.Object> {
public class PassAll {
static public java.lang.String productPrefix () { throw new RuntimeException(); }
static public int productArity () { throw new RuntimeException(); }
static public Object productElement (int x$1) { throw new RuntimeException(); }
static public scala.collection.Iterator<java.lang.Object> productIterator () { throw new RuntimeException(); }
static public boolean canEqual (Object x$1) { throw new RuntimeException(); }
static public int hashCode () { throw new RuntimeException(); }
static public java.lang.String toString () { throw new RuntimeException(); }
static public abstract boolean equals (Object that) ;
}
public class PassAll$ implements akka.persistence.testkit.ProcessingPolicy<U>, scala.Product, scala.Serializable {
/**
* Static reference to the singleton instance of this Scala object.
*/
public static final PassAll$ MODULE$ = null;
public PassAll$ () { throw new RuntimeException(); }
public java.lang.String productPrefix () { throw new RuntimeException(); }
public int productArity () { throw new RuntimeException(); }
public Object productElement (int x$1) { throw new RuntimeException(); }
public scala.collection.Iterator<java.lang.Object> productIterator () { throw new RuntimeException(); }
public boolean canEqual (Object x$1) { throw new RuntimeException(); }
public int hashCode () { throw new RuntimeException(); }
public java.lang.String toString () { throw new RuntimeException(); }
}
public akka.persistence.testkit.ProcessingPolicy.DefaultPolicies<U>.PassAll$ PassAll () ;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package akka.persistence.testkit

import akka.persistence.testkit.ProcessingPolicy.DefaultPolicies

private[testkit] trait EventStorage {
import EventStorage._

val DefaultPolicy = JournalPolicies.PassAll
}

object EventStorage {
object JournalPolicies extends DefaultPolicies[JournalOperation]
}

sealed trait JournalOperation
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package akka.persistence.testkit

trait ProcessingPolicy[U]

object ProcessingPolicy {
private[testkit] trait DefaultPolicies[U] {
type PolicyType = ProcessingPolicy[U]

case object PassAll extends PolicyType
}
}
13 changes: 13 additions & 0 deletions src/test/resources/patches/2.12.10.patch
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,16 @@
+ public void akka$actor$dsl$Inbox$InboxExtension$_setter_$DSLInboxQueueSize_$eq (int x$1) ;
}
}
--- target/expected_output/basic/akka/persistence/testkit/EventStorage.java 2020-03-23 16:04:03.313049968 +0100
+++ target/expected_output/basic/akka/persistence/testkit/EventStorage.java 2020-03-23 16:04:03.313049968 +0100
@@ -5,7 +5,9 @@
* Static reference to the singleton instance of this Scala object.
*/
public static final JournalPolicies$ MODULE$ = null;
+ public akka.persistence.testkit.ProcessingPolicy.DefaultPolicies<akka.persistence.testkit.JournalOperation>.PassAll$ PassAll () { throw new RuntimeException(); }
public JournalPolicies$ () { throw new RuntimeException(); }
}
- public akka.persistence.testkit.ProcessingPolicy.DefaultPolicies<akka.persistence.testkit.JournalOperation>.PassAll$ DefaultPolicy () ;
+ public void akka$persistence$testkit$EventStorage$_setter_$DefaultPolicy_$eq (akka.persistence.testkit.ProcessingPolicy.DefaultPolicies<akka.persistence.testkit.JournalOperation>.PassAll x$1) ;
+ public akka.persistence.testkit.ProcessingPolicy.DefaultPolicies<akka.persistence.testkit.JournalOperation>.PassAll DefaultPolicy () ;
}
13 changes: 13 additions & 0 deletions src/test/resources/patches/2.12.11.patch
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,16 @@
+ public void akka$actor$dsl$Inbox$InboxExtension$_setter_$DSLInboxQueueSize_$eq (int x$1) ;
}
}
--- target/expected_output/basic/akka/persistence/testkit/EventStorage.java 2020-03-23 16:04:03.313049968 +0100
+++ target/expected_output/basic/akka/persistence/testkit/EventStorage.java 2020-03-23 16:04:03.313049968 +0100
@@ -5,7 +5,9 @@
* Static reference to the singleton instance of this Scala object.
*/
public static final JournalPolicies$ MODULE$ = null;
+ public akka.persistence.testkit.ProcessingPolicy.DefaultPolicies<akka.persistence.testkit.JournalOperation>.PassAll$ PassAll () { throw new RuntimeException(); }
public JournalPolicies$ () { throw new RuntimeException(); }
}
- public akka.persistence.testkit.ProcessingPolicy.DefaultPolicies<akka.persistence.testkit.JournalOperation>.PassAll$ DefaultPolicy () ;
+ public void akka$persistence$testkit$EventStorage$_setter_$DefaultPolicy_$eq (akka.persistence.testkit.ProcessingPolicy.DefaultPolicies<akka.persistence.testkit.JournalOperation>.PassAll x$1) ;
+ public akka.persistence.testkit.ProcessingPolicy.DefaultPolicies<akka.persistence.testkit.JournalOperation>.PassAll DefaultPolicy () ;
}
13 changes: 13 additions & 0 deletions src/test/resources/patches/2.12.12.patch
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,16 @@
+ public void akka$actor$dsl$Inbox$InboxExtension$_setter_$DSLInboxQueueSize_$eq (int x$1) ;
}
}
--- target/expected_output/basic/akka/persistence/testkit/EventStorage.java 2020-03-23 16:04:03.313049968 +0100
+++ target/expected_output/basic/akka/persistence/testkit/EventStorage.java 2020-03-23 16:04:03.313049968 +0100
@@ -5,7 +5,9 @@
* Static reference to the singleton instance of this Scala object.
*/
public static final JournalPolicies$ MODULE$ = null;
+ public akka.persistence.testkit.ProcessingPolicy.DefaultPolicies<akka.persistence.testkit.JournalOperation>.PassAll$ PassAll () { throw new RuntimeException(); }
public JournalPolicies$ () { throw new RuntimeException(); }
}
- public akka.persistence.testkit.ProcessingPolicy.DefaultPolicies<akka.persistence.testkit.JournalOperation>.PassAll$ DefaultPolicy () ;
+ public void akka$persistence$testkit$EventStorage$_setter_$DefaultPolicy_$eq (akka.persistence.testkit.ProcessingPolicy.DefaultPolicies<akka.persistence.testkit.JournalOperation>.PassAll x$1) ;
+ public akka.persistence.testkit.ProcessingPolicy.DefaultPolicies<akka.persistence.testkit.JournalOperation>.PassAll DefaultPolicy () ;
}
13 changes: 13 additions & 0 deletions src/test/resources/patches/2.12.3.patch
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,16 @@
+ public void akka$actor$dsl$Inbox$InboxExtension$_setter_$DSLInboxQueueSize_$eq (int x$1) ;
}
}
--- target/expected_output/basic/akka/persistence/testkit/EventStorage.java 2020-03-23 16:04:03.313049968 +0100
+++ target/expected_output/basic/akka/persistence/testkit/EventStorage.java 2020-03-23 16:04:03.313049968 +0100
@@ -5,7 +5,9 @@
* Static reference to the singleton instance of this Scala object.
*/
public static final JournalPolicies$ MODULE$ = null;
+ public akka.persistence.testkit.ProcessingPolicy.DefaultPolicies<akka.persistence.testkit.JournalOperation>.PassAll$ PassAll () { throw new RuntimeException(); }
public JournalPolicies$ () { throw new RuntimeException(); }
}
- public akka.persistence.testkit.ProcessingPolicy.DefaultPolicies<akka.persistence.testkit.JournalOperation>.PassAll$ DefaultPolicy () ;
+ public void akka$persistence$testkit$EventStorage$_setter_$DefaultPolicy_$eq (akka.persistence.testkit.ProcessingPolicy.DefaultPolicies<akka.persistence.testkit.JournalOperation>.PassAll x$1) ;
+ public akka.persistence.testkit.ProcessingPolicy.DefaultPolicies<akka.persistence.testkit.JournalOperation>.PassAll DefaultPolicy () ;
}
13 changes: 13 additions & 0 deletions src/test/resources/patches/2.12.4.patch
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,16 @@
+ public void akka$actor$dsl$Inbox$InboxExtension$_setter_$DSLInboxQueueSize_$eq (int x$1) ;
}
}
--- target/expected_output/basic/akka/persistence/testkit/EventStorage.java 2020-03-23 16:04:03.313049968 +0100
+++ target/expected_output/basic/akka/persistence/testkit/EventStorage.java 2020-03-23 16:04:03.313049968 +0100
@@ -5,7 +5,9 @@
* Static reference to the singleton instance of this Scala object.
*/
public static final JournalPolicies$ MODULE$ = null;
+ public akka.persistence.testkit.ProcessingPolicy.DefaultPolicies<akka.persistence.testkit.JournalOperation>.PassAll$ PassAll () { throw new RuntimeException(); }
public JournalPolicies$ () { throw new RuntimeException(); }
}
- public akka.persistence.testkit.ProcessingPolicy.DefaultPolicies<akka.persistence.testkit.JournalOperation>.PassAll$ DefaultPolicy () ;
+ public void akka$persistence$testkit$EventStorage$_setter_$DefaultPolicy_$eq (akka.persistence.testkit.ProcessingPolicy.DefaultPolicies<akka.persistence.testkit.JournalOperation>.PassAll x$1) ;
+ public akka.persistence.testkit.ProcessingPolicy.DefaultPolicies<akka.persistence.testkit.JournalOperation>.PassAll DefaultPolicy () ;
}
13 changes: 13 additions & 0 deletions src/test/resources/patches/2.12.5.patch
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,16 @@
+ public void akka$actor$dsl$Inbox$InboxExtension$_setter_$DSLInboxQueueSize_$eq (int x$1) ;
}
}
--- target/expected_output/basic/akka/persistence/testkit/EventStorage.java 2020-03-23 16:04:03.313049968 +0100
+++ target/expected_output/basic/akka/persistence/testkit/EventStorage.java 2020-03-23 16:04:03.313049968 +0100
@@ -5,7 +5,9 @@
* Static reference to the singleton instance of this Scala object.
*/
public static final JournalPolicies$ MODULE$ = null;
+ public akka.persistence.testkit.ProcessingPolicy.DefaultPolicies<akka.persistence.testkit.JournalOperation>.PassAll$ PassAll () { throw new RuntimeException(); }
public JournalPolicies$ () { throw new RuntimeException(); }
}
- public akka.persistence.testkit.ProcessingPolicy.DefaultPolicies<akka.persistence.testkit.JournalOperation>.PassAll$ DefaultPolicy () ;
+ public void akka$persistence$testkit$EventStorage$_setter_$DefaultPolicy_$eq (akka.persistence.testkit.ProcessingPolicy.DefaultPolicies<akka.persistence.testkit.JournalOperation>.PassAll x$1) ;
+ public akka.persistence.testkit.ProcessingPolicy.DefaultPolicies<akka.persistence.testkit.JournalOperation>.PassAll DefaultPolicy () ;
}
13 changes: 13 additions & 0 deletions src/test/resources/patches/2.12.6.patch
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,16 @@
+ public void akka$actor$dsl$Inbox$InboxExtension$_setter_$DSLInboxQueueSize_$eq (int x$1) ;
}
}
--- target/expected_output/basic/akka/persistence/testkit/EventStorage.java 2020-03-23 16:04:03.313049968 +0100
+++ target/expected_output/basic/akka/persistence/testkit/EventStorage.java 2020-03-23 16:04:03.313049968 +0100
@@ -5,7 +5,9 @@
* Static reference to the singleton instance of this Scala object.
*/
public static final JournalPolicies$ MODULE$ = null;
+ public akka.persistence.testkit.ProcessingPolicy.DefaultPolicies<akka.persistence.testkit.JournalOperation>.PassAll$ PassAll () { throw new RuntimeException(); }
public JournalPolicies$ () { throw new RuntimeException(); }
}
- public akka.persistence.testkit.ProcessingPolicy.DefaultPolicies<akka.persistence.testkit.JournalOperation>.PassAll$ DefaultPolicy () ;
+ public void akka$persistence$testkit$EventStorage$_setter_$DefaultPolicy_$eq (akka.persistence.testkit.ProcessingPolicy.DefaultPolicies<akka.persistence.testkit.JournalOperation>.PassAll x$1) ;
+ public akka.persistence.testkit.ProcessingPolicy.DefaultPolicies<akka.persistence.testkit.JournalOperation>.PassAll DefaultPolicy () ;
}
13 changes: 13 additions & 0 deletions src/test/resources/patches/2.12.7.patch
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,16 @@
+ public void akka$actor$dsl$Inbox$InboxExtension$_setter_$DSLInboxQueueSize_$eq (int x$1) ;
}
}
--- target/expected_output/basic/akka/persistence/testkit/EventStorage.java 2020-03-23 16:04:03.313049968 +0100
+++ target/expected_output/basic/akka/persistence/testkit/EventStorage.java 2020-03-23 16:04:03.313049968 +0100
@@ -5,7 +5,9 @@
* Static reference to the singleton instance of this Scala object.
*/
public static final JournalPolicies$ MODULE$ = null;
+ public akka.persistence.testkit.ProcessingPolicy.DefaultPolicies<akka.persistence.testkit.JournalOperation>.PassAll$ PassAll () { throw new RuntimeException(); }
public JournalPolicies$ () { throw new RuntimeException(); }
}
- public akka.persistence.testkit.ProcessingPolicy.DefaultPolicies<akka.persistence.testkit.JournalOperation>.PassAll$ DefaultPolicy () ;
+ public void akka$persistence$testkit$EventStorage$_setter_$DefaultPolicy_$eq (akka.persistence.testkit.ProcessingPolicy.DefaultPolicies<akka.persistence.testkit.JournalOperation>.PassAll x$1) ;
+ public akka.persistence.testkit.ProcessingPolicy.DefaultPolicies<akka.persistence.testkit.JournalOperation>.PassAll DefaultPolicy () ;
}
13 changes: 13 additions & 0 deletions src/test/resources/patches/2.12.8.patch
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,16 @@
+ public void akka$actor$dsl$Inbox$InboxExtension$_setter_$DSLInboxQueueSize_$eq (int x$1) ;
}
}
--- target/expected_output/basic/akka/persistence/testkit/EventStorage.java 2020-03-23 16:04:03.313049968 +0100
+++ target/expected_output/basic/akka/persistence/testkit/EventStorage.java 2020-03-23 16:04:03.313049968 +0100
@@ -5,7 +5,9 @@
* Static reference to the singleton instance of this Scala object.
*/
public static final JournalPolicies$ MODULE$ = null;
+ public akka.persistence.testkit.ProcessingPolicy.DefaultPolicies<akka.persistence.testkit.JournalOperation>.PassAll$ PassAll () { throw new RuntimeException(); }
public JournalPolicies$ () { throw new RuntimeException(); }
}
- public akka.persistence.testkit.ProcessingPolicy.DefaultPolicies<akka.persistence.testkit.JournalOperation>.PassAll$ DefaultPolicy () ;
+ public void akka$persistence$testkit$EventStorage$_setter_$DefaultPolicy_$eq (akka.persistence.testkit.ProcessingPolicy.DefaultPolicies<akka.persistence.testkit.JournalOperation>.PassAll x$1) ;
+ public akka.persistence.testkit.ProcessingPolicy.DefaultPolicies<akka.persistence.testkit.JournalOperation>.PassAll DefaultPolicy () ;
}
13 changes: 13 additions & 0 deletions src/test/resources/patches/2.12.9.patch
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,16 @@
+ public void akka$actor$dsl$Inbox$InboxExtension$_setter_$DSLInboxQueueSize_$eq (int x$1) ;
}
}
--- target/expected_output/basic/akka/persistence/testkit/EventStorage.java 2020-03-23 16:04:03.313049968 +0100
+++ target/expected_output/basic/akka/persistence/testkit/EventStorage.java 2020-03-23 16:04:03.313049968 +0100
@@ -5,7 +5,9 @@
* Static reference to the singleton instance of this Scala object.
*/
public static final JournalPolicies$ MODULE$ = null;
+ public akka.persistence.testkit.ProcessingPolicy.DefaultPolicies<akka.persistence.testkit.JournalOperation>.PassAll$ PassAll () { throw new RuntimeException(); }
public JournalPolicies$ () { throw new RuntimeException(); }
}
- public akka.persistence.testkit.ProcessingPolicy.DefaultPolicies<akka.persistence.testkit.JournalOperation>.PassAll$ DefaultPolicy () ;
+ public void akka$persistence$testkit$EventStorage$_setter_$DefaultPolicy_$eq (akka.persistence.testkit.ProcessingPolicy.DefaultPolicies<akka.persistence.testkit.JournalOperation>.PassAll x$1) ;
+ public akka.persistence.testkit.ProcessingPolicy.DefaultPolicies<akka.persistence.testkit.JournalOperation>.PassAll DefaultPolicy () ;
}
28 changes: 28 additions & 0 deletions src/test/resources/patches/2.13.0.patch
Original file line number Diff line number Diff line change
Expand Up @@ -258,3 +258,31 @@
-public interface X extends scala.Serializable, akka.rk.buh.is.it.Y<akka.rk.buh.is.it.A> {
+public interface X extends java.io.Serializable, akka.rk.buh.is.it.Y<akka.rk.buh.is.it.A> {
}
--- target/expected_output/basic/akka/persistence/testkit/EventStorage.java 2020-03-23 16:20:58.647999228 +0100
+++ target/expected_output/basic/akka/persistence/testkit/EventStorage.java 2020-03-23 16:20:58.647999228 +0100
@@ -5,7 +5,9 @@
* Static reference to the singleton instance of this Scala object.
*/
public static final JournalPolicies$ MODULE$ = null;
+ public akka.persistence.testkit.ProcessingPolicy.DefaultPolicies<akka.persistence.testkit.JournalOperation>.PassAll$ PassAll () { throw new RuntimeException(); }
public JournalPolicies$ () { throw new RuntimeException(); }
}
- public akka.persistence.testkit.ProcessingPolicy.DefaultPolicies<akka.persistence.testkit.JournalOperation>.PassAll$ DefaultPolicy () ;
+ public void akka$persistence$testkit$EventStorage$_setter_$DefaultPolicy_$eq (akka.persistence.testkit.ProcessingPolicy.DefaultPolicies<akka.persistence.testkit.JournalOperation>.PassAll x$1) ;
+ public akka.persistence.testkit.ProcessingPolicy.DefaultPolicies<akka.persistence.testkit.JournalOperation>.PassAll DefaultPolicy () ;
}
--- target/expected_output/basic/akka/persistence/testkit/ProcessingPolicy.java 2020-03-23 16:20:58.647999228 +0100
+++ target/expected_output/basic/akka/persistence/testkit/ProcessingPolicy.java 2020-03-23 16:20:58.647999228 +0100
@@ -10,8 +10,10 @@
static public int hashCode () { throw new RuntimeException(); }
static public java.lang.String toString () { throw new RuntimeException(); }
static public abstract boolean equals (Object that) ;
+ static public java.lang.String productElementName (int n) { throw new RuntimeException(); }
+ static public scala.collection.Iterator<java.lang.String> productElementNames () { throw new RuntimeException(); }
}
- public class PassAll$ implements akka.persistence.testkit.ProcessingPolicy<U>, scala.Product, scala.Serializable {
+ public class PassAll$ implements akka.persistence.testkit.ProcessingPolicy<U>, scala.Product, java.io.Serializable {
/**
* Static reference to the singleton instance of this Scala object.
*/

Loading

0 comments on commit df9e2e8

Please sign in to comment.