chemistry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Florian Müller (JIRA) <j...@apache.org>
Subject [jira] [Resolved] (CMIS-936) The public API should be declared virtual
Date Thu, 20 Aug 2015 11:57:45 GMT

     [ https://issues.apache.org/jira/browse/CMIS-936?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Florian Müller resolved CMIS-936.
---------------------------------
       Resolution: Fixed
    Fix Version/s: DotCMIS 0.7

Thanks for the patch!

> The public API should be declared virtual
> -----------------------------------------
>
>                 Key: CMIS-936
>                 URL: https://issues.apache.org/jira/browse/CMIS-936
>             Project: Chemistry
>          Issue Type: Improvement
>          Components: dotcmis
>    Affects Versions: DotCMIS 0.6, DotCMIS 0.7
>         Environment: Windows 7, DotNet 3.5
>            Reporter: Patrice Collardez
>            Assignee: Florian Müller
>             Fix For: DotCMIS 0.7
>
>         Attachments: virtual-public-api.patch
>
>
> The public API of DotCMIS is not completely declared virtual, and it prevents the polymorphism
to work as expected, especially when creating a new ObjectFactory and specialized objects.
> Long explanation:
> With Java, every method is implicitly declared virtual, therefore overriding a method
in a subclass is as simple as a redeclaration and the polymorphism works as intended whatever
the cast of the subclass to any of its parent class or interface.
> With C#, every method is not declared virtual, therefore redeclaring a method in a subclass
does not make the polymorphism works: the first declaration of the method is used considering
the cast level in the inheritance graph.
> In order to have the same behavior with C# as the one we have with Java, every method
should be declared "virtual" and every redeclaration should be declared "override".



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message