This content has been marked as final.
Show 2 replies
-
1. Re: AtomicInteger can't be put in test case because of java.lang.AssertionError: Check support for: class java.util.concurrent.atomic.AtomicInteger
rvansa Feb 21, 2017 12:03 PM (in response to seto)While Integer is immutable, AtomicInteger is mutable (and is mostly used as mutable instance).
This check fails (only in test) because we expect that Infinispan will provide optimized marshallers for java.util types, and AtomicInteger isn't one of them. And for good: if you have to marshall the instance, the modifications won't be applied to the unmarshalled copy.
-
2. Re: AtomicInteger can't be put in test case because of java.lang.AssertionError: Check support for: class java.util.concurrent.atomic.AtomicInteger
seto Feb 21, 2017 12:09 PM (in response to rvansa)I write a mechanism of execution task will detect the change and apply the changes based on transaction.
But since the Integer is immutable. I can't detect the change.
So I want to use AtomicInteger as a replacement. But it's not available to use in test cases.
But now, I have to wrap a int in a class myself.