You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lenya.apache.org by bu...@apache.org on 2007/04/18 16:50:48 UTC

DO NOT REPLY [Bug 42161] New: - Identical code in LenyaVersion and VersionImpl

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42161>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42161

           Summary: Identical code in LenyaVersion and VersionImpl
           Product: Lenya
           Version: 1.4
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Miscellaneous
        AssignedTo: dev@lenya.apache.org
        ReportedBy: richard.frovarp@sendit.nodak.edu


LenyaVersion (src/java/org/apache/lenya/cms/workflow/LenyaVersion.java) and
VersionImpl
(src/modules-core/workflow/java/src/org/apache/lenya/workflow/impl/VersionImpl.java)
are identical. LenyaVersion is used in
src/java/org/apache/lenya/cms/workflow/DocumentWorkflowable.java and VersionImpl
is used in
src/modules-core/workflow/java/src/org/apache/lenya/workflow/impl/WorkflowEngineImpl.java.
LenyaVersion or VersionImpl should be removed before the code freeze.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


DO NOT REPLY [Bug 42161] - Identical code in LenyaVersion and VersionImpl

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42161>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42161





------- Additional Comments From nettings@apache.org  2007-04-25 03:45 -------
can you explain what makes this duplication necessary?
i can see how the core should not depend on a module, but i'm not sure about the
details.
would moving the DocumentWorkflowable into a module help?
while we're at it: what other functionality should be modularized before 1.4?
should we maybe get rid of the old "core" entirely?

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


DO NOT REPLY [Bug 42161] - Identical code in LenyaVersion and VersionImpl

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42161>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42161





------- Additional Comments From andreas@apache.org  2007-04-25 06:36 -------
Thanks for the patch!

But there's a little problem (which is the reason why I didn't make this change
yet):

+++
src/modules-core/workflow/java/src/org/apache/lenya/workflow/impl/WorkflowEngineImpl.java
(working copy)
@@ -20,6 +20,7 @@
 import java.util.ArrayList;
 import java.util.List;
 
+import org.apache.lenya.cms.workflow.LenyaVersion;


The code in org.apache.lenya.workflow is meant to be generic for SoC reasons,
i.e. it shouldn't know anything about the CMS. That's why it shouldn't import
anything from o.a.l.cms.workflow.

IMO a clean solution would be to use an abstract factory to generate version
objects. The o.a.l.workflow package uses

  versionFactory.createVersion(...)

The o.a.l.cms.workflow package provides an implementation which generates
LenyaVersion objects.


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


DO NOT REPLY [Bug 42161] - Identical code in LenyaVersion and VersionImpl

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42161>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42161





------- Additional Comments From richard.frovarp@sendit.nodak.edu  2007-04-25 06:51 -------
Thanks for explaining. My confusion came from the fact that both files import
o.a.l.workflow.Version which is under the same file tree as
o.a.l.cms.workflow.LenyaVersion. While there might be a separation of code in
concept, I didn't see it reflected on the file system.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


DO NOT REPLY [Bug 42161] - Identical code in LenyaVersion and VersionImpl

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42161>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42161


andreas@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|1.4.1                       |2.0.1




-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


DO NOT REPLY [Bug 42161] - Identical code in LenyaVersion and VersionImpl

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42161>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42161





------- Additional Comments From richard.frovarp@sendit.nodak.edu  2007-04-25 06:31 -------
I'm not caught up enough to understand what exactly the src/java tree is. I
figure the modules should be able to depend on it. My patch is based on that
assumption. Alternatively, instead of removing a file that others may be using.
Have VersionImpl extend LenyaVersion and wipe out VersionImpl's code. This will
preserve the file, the methods presented, and operation while making any further
updates happen in one place. This might be the preferred route to get this into
the 1.4.0 release.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


DO NOT REPLY [Bug 42161] - Identical code in LenyaVersion and VersionImpl

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42161>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42161


andreas@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|1.4                         |1.4.1




------- Additional Comments From andreas@apache.org  2007-04-25 02:37 -------
That's not trivial (unless I'm missing an obvious solution). Since it doesn't
imply any functional problems, I'd say we defer it to 1.4.1.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


DO NOT REPLY [Bug 42161] - Identical code in LenyaVersion and VersionImpl

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42161>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42161


andreas@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|1.4                         |Trunk




-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


DO NOT REPLY [Bug 42161] - Identical code in LenyaVersion and VersionImpl

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42161>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42161





------- Additional Comments From richard.frovarp@sendit.nodak.edu  2007-04-25 06:26 -------
Created an attachment (id=20037)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=20037&action=view)
Removes VersionImpl

This patch causes the code to use LenyaVersion instead of VersionImpl. Builds
and runs fine. 

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


DO NOT REPLY [Bug 42161] - Identical code in LenyaVersion and VersionImpl

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42161>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42161





------- Additional Comments From andreas@apache.org  2007-04-25 06:49 -------
(In reply to comment #6)
> hmm. i see your point, but code duplication is the far greater evil imnsho.

Code duplication is not really evil. Knowledge duplication is, but IMO this is
not the case here.

> how about taking richard's patch with a loud comment on how it should
> eventually be refactored, and a low-priority enhancement bug?

I'd rather take the time to implement a factory, or think of a better approach.


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


DO NOT REPLY [Bug 42161] - Identical code in LenyaVersion and VersionImpl

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42161>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42161





------- Additional Comments From nettings@apache.org  2007-04-25 06:46 -------
hmm. i see your point, but code duplication is the far greater evil imnsho.
how about taking richard's patch with a loud comment on how it should eventually
be refactored, and a low-priority enhancement bug?


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org