Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [smila-dev] datamodel impls are final

I was looking at the adapter classes in solr and was wondering if we should refactor these and had the idea that these could be just subclasses of AnyMap.

 

Anyhow, i solved the problem otherwise and its not pressing but was just wondering why they are final. I tend to not make anything final as programmers should know what they are doing and limiting often hinders elegant solutions or short time hacks / at least I have been stumped a few times due to a final and had to work around it.

In this case we have already the interfaces protecting normal users from thinking, “oh let’s just subclass it”, so I think there is no real danger in allowing this.

 

Thomas Menzel @ brox IT-Solutions GmbH

 

From: smila-dev-bounces@xxxxxxxxxxx [mailto:smila-dev-bounces@xxxxxxxxxxx] On Behalf Of Jürgen Schumacher
Sent: Freitag, 20. Januar 2012 15:25
To: Smila project developer mailing list
Subject: Re: [smila-dev] datamodel impls are final

 

Hi,

 

I never had this problem or the need to subclass these classes. What do you want to achieve with it? Could you give an outline of such a test case?

In general, I don’t think that subclassing should be the first choice of achieving thinks … most of the time it causes more problems than it seems to solve.

 

Cheers,

Juergen.

 

From: smila-dev-bounces@xxxxxxxxxxx [mailto:smila-dev-bounces@xxxxxxxxxxx] On Behalf Of Thomas Menzel
Sent: Friday, January 20, 2012 11:49 AM
To: devs@smila
Subject: [smila-dev] datamodel impls are final

 

Hi folks,

 

What is the reason for the impl classes being final?

 

I find it a bit cumbersome. Shure nobody should really subclass this for real but sometimes this is convenient, particularly for tests.

I vote to just doc that subclassing is at own risk, after all they are in the impl. package

 

Thomas Menzel @ brox IT-Solutions GmbH

 

 

 

 

 

 

 

Taglocity Tags: smila


Back to the top