Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JaversException MANAGED_CLASS_MAPPING_ERROR #697

Closed
Coder-X-009 opened this issue Aug 10, 2018 · 1 comment
Closed

JaversException MANAGED_CLASS_MAPPING_ERROR #697

Coder-X-009 opened this issue Aug 10, 2018 · 1 comment

Comments

@Coder-X-009
Copy link

Getting this error when using java.util.Number. Following is way to reproduce it

public class NumberTest {
    private Number testNumber;

    public NumberTest(Number testNumber) {
        this.testNumber = testNumber;
    }

    public Number getTestNumber() {
        return testNumber;
    }

    public void setTestNumber(Number testNumber) {
        this.testNumber = testNumber;
    }
}
        Javers javers = JaversBuilder.javers().build();        
        NumberTest number1 = new NumberTest(23);
        NumberTest number2 = new NumberTest(20);        
        Diff diff = javers.compare(number1, number2);

Following is exception:
JaversException MANAGED_CLASS_MAPPING_ERROR: given javaClass 'class java.lang.Integer' is mapped to PrimitiveType, expected ManagedType

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants