Skip to content

Commit

Permalink
java.lang.AssertionError: cannot instantiate the interface class
Browse files Browse the repository at this point in the history
interface arb.functions.real.RealFunction
	at arb4j/arb.functions.Function.newCoDomainInstance(Function.java:320)
	at arb4j/arb.functions.Function.evaluate(Function.java:239)
	at arb4j/arb.functions.Function.evaluate(Function.java:220)
	at arb4j/arb.functions.integer.Sequence.evaluate(Sequence.java:47)
	at arb4j/arb.expressions.nodes.unary.SphericalBesselFunctionNodeOfTheFirstKindTest.testj0ViaRealFunctionalExpression(SphericalBesselFunctionNodeOfTheFirstKindTest.java:24)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at [email protected]/junit.framework.TestCase.runTest(TestCase.java:177)
	at [email protected]/junit.framework.TestCase.runBare(TestCase.java:142)
	at [email protected]/junit.framework.TestResult$1.protect(TestResult.java:122)
	at [email protected]/junit.framework.TestResult.runProtected(TestResult.java:142)
	at [email protected]/junit.framework.TestResult.run(TestResult.java:125)
	at [email protected]/junit.framework.TestCase.run(TestCase.java:130)
	at [email protected]/junit.framework.TestSuite.runTest(TestSuite.java:241)
	at [email protected]/junit.framework.TestSuite.run(TestSuite.java:236)
	at [email protected]/org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:90)
	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:93)
	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:40)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:530)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:758)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:453)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:211)

#253
  • Loading branch information
crowlogic committed Nov 27, 2024
1 parent b464769 commit 6aeda2e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/main/java/arb/functions/Function.java
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@ public default D newDomainInstance()

public default C newCoDomainInstance()
{
assert !coDomainType().isInterface() : "cannot instantiate the interface class " + coDomainType();
try
{
return coDomainType().getConstructor().newInstance();
Expand Down

0 comments on commit 6aeda2e

Please sign in to comment.