-
Notifications
You must be signed in to change notification settings - Fork 0
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
Remove dependecy to jdk.unsupported #276
Comments
I want to contribute, to add empty constructors to DTOs. But please suggest me which DTO classes are where can I find those. This will be my first contribution if you kindly help. |
The following classes caused troubles in our case:
|
Do you mean to do this only in all files? public class SubscriptionItem {
} |
It would also be possible to do this with a Lombok annotation. This would look something like this
|
Thank you all. We will look into it |
Is this issue still open? I would like to work on this if it is. |
Most DTOs in the PubNub SDK don't have a default (empty) constructor. Gson, which is used to serialize and deserialize the DTOs, uses the empty constructor to create instances of the DTO classes. If this is not possible (as it is the case in most classes of the PubNub SDK),
sun.misc.Unsafe.allocateInstance()
is used for the allocation. This works fine under normal circumstances. However, since we use PubNub on a hardware with limited resources, we try to minimize the JRE size and memory usage. We use a tailored JRE that includes as few modules as possible.sun.misc.Unsafe.allocateInstance()
is part of thejdk.unsupported
module, which we normally don't include in our JRE.It would be helpful for us if empty constructors were added to all DTOs (for example with Lombok's
@NoArgsConstructor
) so that the PubNub SDK worked without the jdk.unsupported module.The text was updated successfully, but these errors were encountered: