If you were using Java 8, you could totally have the factory in the
interface now.
On 30 June 2016 at 10:12, sebb wrote:
> On 30 June 2016 at 13:59, Emmanuel Bourg wrote:
> > Would it make sense to move the factory method to the base class?
> >
> >CryptoRandom random = CryptoRandom.getInsta
On 30 June 2016 at 13:59, Emmanuel Bourg wrote:
> Would it make sense to move the factory method to the base class?
>
>CryptoRandom random = CryptoRandom.getInstance();
It's an interface, not a base class.
> Emmanuel Bourg
>
>
> ---
On 30 June 2016 at 12:15, sebb wrote:
> It would also allow the following usage:
> import static
> org.apache.commons.crypto.random.CryptoRandomFactory.getCryptoRandom;
> CryptoRandom random = getCryptoRandom(properties);
I didn't consider static import. You've won me over, the above is best!
Would it make sense to move the factory method to the base class?
CryptoRandom random = CryptoRandom.getInstance();
Emmanuel Bourg
-
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail:
On 30 June 2016 at 12:37, Benedikt Ritter wrote:
> sebb schrieb am Do., 30. Juni 2016 um 13:16 Uhr:
>
>> On 30 June 2016 at 11:01, Stian Soiland-Reyes wrote:
>> > On 30 June 2016 at 00:53, sebb wrote:
>> >> As the subject says; the two factories use a different naming
>> convention.
>> >>
>> >>
sebb schrieb am Do., 30. Juni 2016 um 13:16 Uhr:
> On 30 June 2016 at 11:01, Stian Soiland-Reyes wrote:
> > On 30 June 2016 at 00:53, sebb wrote:
> >> As the subject says; the two factories use a different naming
> convention.
> >>
> >> Would it be sensible to standardise on getInstance, given
On 30 June 2016 at 11:01, Stian Soiland-Reyes wrote:
> On 30 June 2016 at 00:53, sebb wrote:
>> As the subject says; the two factories use a different naming convention.
>>
>> Would it be sensible to standardise on getInstance, given that the
>> class name says what the instance will be?
>
> Hm,
On 30 June 2016 at 00:53, sebb wrote:
> As the subject says; the two factories use a different naming convention.
>
> Would it be sensible to standardise on getInstance, given that the
> class name says what the instance will be?
Hm, but CryptoRandomFactory.getCryptoRandom() returns a CryptoRando
On Wed, Jun 29, 2016 at 4:53 PM, sebb wrote:
> As the subject says; the two factories use a different naming convention.
>
> Would it be sensible to standardise on getInstance, given that the
> class name says what the instance will be?
>
+1
Gary
>
> --