[JIRA] Updated: (CC-1043) Update does not work, actually
"Daniel Tihelka (JIRA)" <[email protected]> Sat, 23 Jul 2011 16:32:18 -0500 (CDT)
| Newsgroups | gmane.comp.java.cruise-control.devel |
|---|---|
| Message-ID | <1963285565.1311456738090.JavaMail.jira@chidmzhosting02.thoughtworks.com> |
[ http://jira.public.thoughtworks.org/browse/CC-1043?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Daniel Tihelka updated CC-1043:
-------------------------------
Attachment: fix_01.patch
I have analysed it deeply and the problem is with ProjectXMLHelper class, as it is basically a parent of path where CC objects are created. Although correct FileResolver instance is passed to the ProjectXMLHelper, it is lost later when classes corresponding to the project are instantiated.
The reason is the default constructor of ProjectXMLHelper. New instance of this class is crated in various places (when instantiating classes according to the XML config), and such instance does not hold the correct FileResolver set to their "master" instance. And it is the reason why DefaultPropertiesPlugin gets only "dummy" File resolver when it is instantiated.
The fix_01.patch patch attempts to fix it. It also contains new test XMLConfigManagerTest#testShouldDetectChangesToPropertyFiles() which really failed with the original implementation.
The fix introduces new interface ResolverHolder, providing methods to get Xml and File resolvers. This interface is one of the parameters passed to the ProjectXMLHelper instance, but it is the parameter which always MUST be set to it (there is no default constructor of this class furthermore). Also, the interface is passed to all ProjectXMLHelper methods which instantiate new instance of this class.
In addition, I have created "dummy" resolvers which should be used instead of setting NULL pointer. They avoid NullPointerException in case that the implementation is not correct. There is a question, if such dummy resolvers should rather throw an exception, but they write warning to log, so if there are problems with resolver not working, they should be trackeable somehow ...
The rest of the patch are trivial fixes required by class interface changes.
> Update does not work, actually
> ------------------------------
>
> Key: CC-1043
> URL: http://jira.public.thoughtworks.org/browse/CC-1043
> Project: CruiseControl
> Issue Type: Sub-task
> Components: Core Application
> Affects Versions: 2.8.4
> Reporter: Daniel Tihelka
> Priority: Major
> Attachments: fix_01.patch
>
>
> I have found that the original issue http://jira.public.thoughtworks.org/browse/CC-952 has not, actually, be resolved - the update of properties does not work.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.public.thoughtworks.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
Storage Efficiency Calculator
This modeling tool is based on patent-pending intellectual property that
has been used successfully in hundreds of IBM storage optimization engage-
ments, worldwide. Store less, Store more with what you own, Move data to
the right place. Try It Now! http://www.accelacomm.com/jaw/sfnl/114/51427378/