SpringSource/spring-security-oauth — pull request #48 by autayeu (2012-09-03 15:27:19+00:00)
Title: SECOAUTH-330: Refactor SharedConsumerSecret into interface and implementation

SharedConsumerSecret is refactored into interface (SharedConsumerSecret) and implementation (SharedConsumerSecretImpl).

This allows developers who implement OAuth support to avoid extra object allocation needed to create SharedConsumerSecret object. Instead, they can support the SharedConsumerSecret interface in their existing consumer POJOs on the par with... for example ExtraTrustConsumerDetails. This is particularly useful in case of 2-legged scenario when the amount of consumers is significant and thus the proposed patch allows one to save one object allocation per request.

P.S. There are "Base", "Core" prefixes and "Impl" suffix used for similar cases in the project. I chose "Impl" suffix. Alternatively, it is possible to rename the interface (to let say AbstractSharedConsumerSecret) and keep implementation class name intact (SharedConsumerSecret) for backward compatibility.