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

Question for using wrapper class at POJO #16

Open
jiminhsieh opened this issue Sep 25, 2020 · 0 comments
Open

Question for using wrapper class at POJO #16

jiminhsieh opened this issue Sep 25, 2020 · 0 comments

Comments

@jiminhsieh
Copy link

Sorry, I don't know where is a suitable place to discuss the question, so I just open an issue here to ask my question.

I have a question about the 8th point of OOP rules.

  1. [Mandatory] Rules for using primitive data types and wrapper classes:
      1) Members of a POJO class must be wrapper classes.
      2) The return value and arguments of a RPC method must be wrapper classes.
      3) [Recommended] Local variables should be primitive data types.

Based on this rule, it will only allow us to use the primitive type in local variables. Then, we need to use wrapper classes in all other places.

The thing is that most of the suggestions I saw at the Internet is we should avoid wrapper classes as much as possible.
The reasons are

  • performance
  • memory footprint

So could anybody explain the reason behind this rule? Thanks. 🙏

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

No branches or pull requests

1 participant