Reputation: 516
Class was designed with Protected Constructor as a SingleTon Class. It is shipped to Customer. Now need to submit a patch such that this Protected constructor can be made as a Private.
is it possible?
Upvotes: 1
Views: 1314
Reputation: 425083
I am guessing by your user name that your language is java...
A singleton must have a private constructor to be safe - otherwise it's not guaranteed to be a singleton!
You should just make it private. If your customer has subclassed your singleton and used the protected constructor, too bad. You shouldn't break your application design just to provide support for poisoned legacy code.
Upvotes: 3