Should we remove modifiers when default (no modifier) is the same?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Should we remove modifiers when default (no modifier) is the same?

Jacques Le Roux
Administrator
Hi,

I was looking at the work done by Pradhan Yash Sharma for OFBIZ-10477 "Parent ticket for reducing scope of variables and methods"

This work is related to https://docs.oracle.com/javase/tutorial/java/javaOO/accesscontrol.html

I only applied the patch from OFBIZ-10478 "Reducing scope of variables in org.apache.ofbiz.base package"

Some changes are welcome, to improve security, like replacing public or protected by private when possible

I think removing public modifiers is also a good thing

What do you think?

Jacques
Reply | Threaded
Open this post in threaded view
|

Should we not remove public modifiers?

Jacques Le Roux
Administrator
Sorry my title was confusing

Le 13/08/2019 à 12:25, Jacques Le Roux a écrit :

> Hi,
>
> I was looking at the work done by Pradhan Yash Sharma for OFBIZ-10477 "Parent ticket for reducing scope of variables and methods"
>
> This work is related to https://docs.oracle.com/javase/tutorial/java/javaOO/accesscontrol.html
>
> I only applied the patch from OFBIZ-10478 "Reducing scope of variables in org.apache.ofbiz.base package"
>
> Some changes are welcome, to improve security, like replacing public or protected by private when possible
>
> I think removing public modifiers is also a good thing
>
> What do you think?
>
> Jacques
>
Reply | Threaded
Open this post in threaded view
|

Re: Should we remove modifiers when default (no modifier) is the same?

Mathieu Lirzin
In reply to this post by Jacques Le Roux
Hello Jacques,

Jacques Le Roux <[hidden email]> writes:

> I was looking at the work done by Pradhan Yash Sharma for OFBIZ-10477 "Parent ticket for reducing scope of variables and methods"
>
> This work is related to https://docs.oracle.com/javase/tutorial/java/javaOO/accesscontrol.html
>
> I only applied the patch from OFBIZ-10478 "Reducing scope of variables in org.apache.ofbiz.base package"
>
> Some changes are welcome, to improve security, like replacing public or protected by private when possible
>
> I think removing public modifiers is also a good thing
>
> What do you think?

I like the idea.

--
Mathieu Lirzin
GPG: F2A3 8D7E EB2B 6640 5761  070D 0ADE E100 9460 4D37