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

Javassist compile error for primitive type mapping when respective converter is present. #13

Closed
GoogleCodeExporter opened this issue Apr 14, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Register mapping between primitive double and BigDecimal
2. Register bidirectional converter between Double and BigDecimal
3. Run application

What is the expected output? What do you see instead?
Mapping facade building fails with message
compile error: invalid types for !=
    at javassist.compiler.CodeGen.badTypes(CodeGen.java:1255) ...

What version of the product are you using? On what operating system?
1.1.0 on Mac OS, Weblogic 12.1.1 Java 6

Please provide any additional information below.
When the convertor is not registered, facade building succeeds. Javassist 
prints the whole failing code where the critical part is retyping double and 
comparing it with null(in my opinion. names obfuscated):

if(((double)((xxx)((yyy)((zzz)source.getRequestBody()).aaa()).bbb()).getAmount()
) != null){
                destination.setAmount((java.math.BigDecimal) mapperFacade.convert(((double)((xxx)((yyy)((zzz)source.getRequestBody()).aaa()).bbb()).getAmount()), usedTypes[4], usedTypes[3], null));

            }

Original issue reported on code.google.com by frantise...@calavera.info on 26 Apr 2012 at 5:22

@GoogleCodeExporter
Copy link
Author

You're primtives should not be compared to null, and that's what we do in Orika.

Il will check this ASAP and reply you
Thanks for the issue report.


Original comment by elaat...@gmail.com on 27 Apr 2012 at 10:33

@GoogleCodeExporter
Copy link
Author

Original comment by elaat...@gmail.com on 29 Apr 2012 at 8:26

  • Changed state: Fixed

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

1 participant