← Back to team overview

dhis2-devs team mailing list archive

Re: Fwd: A Question about Copyright Law

 

2009/10/6 Brajesh Murari <brajesh2murari@xxxxxxxxx>

> Hi Bob,
>
> On Mon, Oct 5, 2009 at 5:24 PM, Bob Jolliffe <bobjolliffe@xxxxxxxxx>wrote:
>
>> Hi
>>
>> We are mixing two related but not the same issues.
>>
>> The issue of copyright relates to the bit where you copy the ABC class
>> rather than who you put as @author.  Copyright is actually a bundle of
>> rights, including amongst others the right to modify, copy, use etc.  By
>> default the copyright holder has exclusive rights to this bundle.  Whether
>> you are allowed to do any or all of the above things is determined by the
>> copyright licence.  Different licences unbundle different rights and with
>> different conditions.
>>
>> I don't think the case you describe is necessarily related to copyright.
>> I think we are assuming that you have the right to do what you need to do
>> and it seems your question is more one of  attribution.  If you are copying
>> a class over which you have not been granted licence that is a different
>> issue.
>>
>> I think Lars' suggestion is absolutely the correct one.  If you want to
>> use the class with its content absolutely unmodified then.
>
> the preamble (the @author and @version tags) should be left as it is.
>> Otherwise extending the class is almost always the best solution.  If you
>> feel yourself doing much copying and pasting you should start to feel a
>> little voice in your head saying that you are probably doing the wrong
>> thing.
>>
>
> If i am not wrong, then i think up to this level of discussion, Lars has
> not suggested any thing.
>

Lars is smart.  He'll say something when he's ready :-)


> And another, if extending classes is the best solution
>

Its not always the best solution.  But its always better than copying and
pasting.  Sometimes it might make better sense for A to have-a B than for A
to be-a B.


> then what about those classes who have used non access modifier like
> 'final' and someone want to modify it ? and i need suggestion if someone
> help me to find out specially in some special class where class have used
> non access modifier 'final', access modifier 'public' and its constructor is
> declared 'private' , and here some one want to modify this class for there
> further use. Example of such classes we can take like "public final class
> System extends Object".
>

There is quite some religious debate about the merits of implementation
inheritance vs interface, and the constriction which "final" creates.  The
reasons given for using final generally relate to security, efficiency and
"better" API design (predictability) and testability.  (Having private
constructors is more than preventing inheritance - it is usually used to
create singleton objects or other static factory-method generated objects or
classes which cannot be instantiated at all).  So there is no instance of
System class - you can't extend it and you can't create it.

That was the designer's intent and the language simply allows him to express
that.  The System class sits right at the interface between the object
oriented virtual machine and the non-object oriented operating system
process context beneath it so you can expect it to be not quite "normal".
Personally I don't like the way System is implemented but thats an opinion.
Given the language constructs availiable its a valid design choice.

But maybe to get to your initial question - if the class is final then its
final and you can't inherit.  No matter how much you think its the right
thing to do.  Though there are other ways to reuse than to inherit - for
example to compose.


> And here what we need to do about this
>
> @author
>
> But i am sure and totally agree at some points like we should follow the
> convention what we have here on our wiki.
>
> http://208.76.222.114/confluence/display/DOC/Code+Conventions#CodeConventions-Authorandversioninformation
> but at the same time we should also try to adopt new futures in
> Conventions to make it more flexible if it require.
> Because i think here on this above link, what we can see in conventions is
> necessary for the application as well as community but does we should
> be agree here also like "is it sufficient and final ?"
>

:-)  There is no "final" on the style conventions.  But they shouldn't
change too often.  And until they do we best follow the convention so that
code loks like all the rest.  Then when we fix it we can fix in one go.
Lars, what do you want to see in the comment tags?

Cheers
Bob



>
> Brajesh
>
>
> Regards
>> Bob
>>
>> 2009/10/5 Brajesh Murari <brajesh2murari@xxxxxxxxx>
>>
>>>
>>> I have just got a mall question about the issue of Copyright
>>>>
>>>> If someone created a class *ABC.java* and then I copied it to another
>>>> one (*MYCLASS.java*) after that modifying anything without changing the
>>>> structure and meaning of the original file.
>>>>
>>>> So, what should I do with in the copyright line ?
>>>>
>>>> *For example*:
>>>>
>>>> */**
>>>>  * @author <SOMEONE NOT ME>
>>>>  * @version $Id: ABC.java 2009-09-18 17:20:00Z hieuduy$
>>>>  */
>>>> public abstract class MYCLASS
>>>>     implements Action
>>>> {..........................}
>>>> *
>>>>
>>>> Is it right, Lars ? Or I *must change like this:
>>>>
>>>> /**
>>>>  * @author Dang Duy Hieu
>>>>  * @version $Id: ABC.java 2009-09-18 17:20:00Z someone$
>>>>  */
>>>> public abstract class MYCLASS
>>>>     implements Action
>>>> {..........................}
>>>>
>>>>
>>>> *Thank you so much !*
>>>> *--
>>>> Hieu.HISPVietnam
>>>> Good Health !
>>>>
>>>>
>>>>
>>> I think it will be a better solution and good design pattern approach to
>>> use OOPS concept ie. Inheritance, specially if we make a subclass
>>> MYCLASS.java of class ABC.java rather then copying every thing from to
>>> ABC.java to MYCLASS.java. And this way we can handle copyright issue like
>>> this ...
>>>
>>> /**
>>>  * @author Dang Duy Hieu
>>>  * @version $Id: ABC.java 2009-09-18 17:20:00Z someone$
>>>  */
>>> public abstract class MYCLASS extends ABC
>>>     implements Action
>>> {..........................}
>>>
>>>
>>> This is one way to solve the issue but if ABC.java is final then .....no
>>> body can extend class ABC.java
>>>
>>> --
>>> Brajesh
>>>
>>>
>>>
>>> _______________________________________________
>>> Mailing list: https://launchpad.net/~dhis2-devs<https://launchpad.net/%7Edhis2-devs>
>>> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
>>> Unsubscribe : https://launchpad.net/~dhis2-devs<https://launchpad.net/%7Edhis2-devs>
>>> More help   : https://help.launchpad.net/ListHelp
>>>
>>>
>>
>
>
> --
> Brajesh
>
>
>

Follow ups

References