cuba-platform / cuba-gradle-plugin

Gradle plugin for building CUBA platform and applications
https://www.cuba-platform.com
Apache License 2.0
15 stars 18 forks source link

improve enhancer error message #117

Closed kgeis closed 4 years ago

kgeis commented 4 years ago

The CubeEnhancer would complain "Unable to enhance field . with primitive type int. Use type Int." This is incorrect, as primitive type int corresponds to Integer, not Int. Also, char corresponds to Character, not char.

The Javassist CtPrimitiveType does not have a method to return the simple name of the wrapper class. The proposed change would make the message "Unable to enhance field . with primitive type int. Use type java.lang.Integer." Optionally, we could strip the package name with .replaceAll("^.+\\.", "").

CLAassistant commented 4 years ago

CLA assistant check
All committers have signed the CLA.

kgeis commented 4 years ago

Unfortunately, I haven't been able to figure out how to point my CUBA project to a locally built CUBA plugin so that I can test this.