Everything boils down to improving encapsulation. You expose the bare minimum necessary to outsider :D
Also, it is a best practice to think twice before using inheritance to determine whether there is an actual is-a relationship. As we know, inheritance is highly abused. On Mon, Aug 16, 2010 at 11:27 AM, Milinda Pathirage <[email protected]>wrote: > I think inner class is a better alternative in this case. But for example > think I exposed TenantProcessStoreImpl as a OSGi service and I exposed this > as a instance of Axis2ConfigurationContextObserver. But, somebody can get hold of your OSGi service, cast it to TenantProcessStoreImpl, and manipulate it. The intention is to program defensively so that nobody can do that, intentionally or unintentionally. > Is there any security risk in that or we are avoiding this as only a way of > reducing risks which will cause by mistakenly exposing unwanted stuff of the > implementation. > > Thanks > Milinda >
_______________________________________________ Carbon-dev mailing list [email protected] https://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
