sageserpent-open / plutonium

CQRS providing bitemporal object modelling for Java POJOs and Scala too.
MIT License
5 stars 0 forks source link

Fix crash seen when running the demo application with the efficient world implementation. #39

Closed sageserpent-open closed 6 years ago

sageserpent-open commented 6 years ago

This is reproducible in commit f1c2bfd - a null reference exception is thrown.

sageserpent-open commented 6 years ago

Stack trace:-

Exception in thread "main" java.lang.NullPointerException at java.base/java.util.HashSet.add(HashSet.java:220) at com.sageserpent.plutonium.javaApi.examples.PackageHolder.hold(PackageHolder.java:38) at com.sageserpent.plutonium.javaApi.examples.PackageItem.heldBy(PackageItem.java:113) at PackageItem_lifecyclesStateProxy.heldBy$accessor$4n00yyYV(Unknown Source) at PackageItem_lifecyclesStateProxy$auxiliary$DvtxvMnr.call(Unknown Source) at com.sageserpent.plutonium.StatefulItemProxyFactory$mutation$.apply(StatefulItemProxyFactory.scala:149) at PackageItem_lifecyclesStateProxy.heldBy(Unknown Source) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:564) at com.sageserpent.plutonium.Patch.apply(Patch.scala:86) at com.sageserpent.plutonium.IdentifiedItemAccessUsingBlobStorage.$anonfun$apply$1(IdentifiedItemAccessUsingBlobStorage.scala:127) at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12) at scala.util.DynamicVariable.withValue(DynamicVariable.scala:58) at com.sageserpent.plutonium.IdentifiedItemAccessUsingBlobStorage.apply(IdentifiedItemAccessUsingBlobStorage.scala:126) at com.sageserpent.plutonium.IdentifiedItemAccessUsingBlobStorage.apply$(IdentifiedItemAccessUsingBlobStorage.scala:122) at com.sageserpent.plutonium.TimelineImplementation$RecalculationStep$3$$anon$1.apply(TimelineImplementation.scala:66) at com.sageserpent.plutonium.TimelineImplementation$RecalculationStep$3.afterRecalculations(TimelineImplementation.scala:131) at com.sageserpent.plutonium.TimelineImplementation.revise(TimelineImplementation.scala:266) at com.sageserpent.plutonium.WorldEfficientInMemoryImplementation.revise(WorldEfficientInMemoryImplementation.scala:26) at com.sageserpent.plutonium.World.revise(World.scala:36) at com.sageserpent.plutonium.World.revise$(World.scala:35) at com.sageserpent.plutonium.WorldImplementationCodeFactoring.revise(WorldImplementationCodeFactoring.scala:94) at com.sageserpent.plutonium.javaApi.examples.DeliveringPackages.main(DeliveringPackages.java:80)

sageserpent-open commented 6 years ago

Commit fdfd5c2 indicates that the bug doesn't depend on the precise flavour of hash set implementation.

sageserpent-open commented 6 years ago

No, the actual failure is in 0fd22ca - the previous commit failed simply because an immutable conversion was used.

sageserpent-open commented 6 years ago

Whoops - put the wrong description in a commit on 'issue18' - caused this issue to be closed. Reopening...