cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cristofolini <...@git.apache.org>
Subject [GitHub] cloudstack pull request: Removed duplicate code in CitrixResourceB...
Date Sat, 15 Aug 2015 20:01:57 GMT
GitHub user cristofolini opened a pull request:

    https://github.com/apache/cloudstack/pull/700

    Removed duplicate code in CitrixResourceBase and its subclasses

    Removed unnecessary duplicated code by having the body of the getPatchFiles method only
in the CitrixResourceBase superclass. Given that all of its implementations consisted of the
same code except for the path which contains the necessary file for that implementation. An
abstract method getPatchFilePath was created in the CitrixResourceBase superclass so that
each implementation may return the path containing the specific file needed by that implementation.
    
    Test cases were created for each implementation, simple as they may be. One assert is
made to verify that the path returned by each implementation corresponds to the path that
was previously specified on each getPatchFiles implementation.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/rafaelweingartner/cloudstack master-lrg-cs-hackday-001

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cloudstack/pull/700.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #700
    
----
commit 0be92a232dbeef3474d55a75549c385f9f103c2e
Author: cristofolini <lucascristofolini@gmail.com>
Date:   2015-08-15T19:27:13Z

    Removed unnecessary duplicated code by having the body of the getPatchFiles method only
in the
    CitrixResourceBase superclass. Given that all of its implementations consisted of the
same code
    except for the path which contains the necessary file for that implementation. An abstract
method
    getPatchFilePath was created in the CitrixResourceBase superclass so that each implementation
may
    return the path containing the specific file needed by that implementation.
    
    Test cases were created for each implementation, simple as they may be. One assert is
made to verify
    that the path returned by each implementation corresponds to the path that was previously
specified
    on each getPatchFiles implementation.

commit 17749e8696b30884a209dd076f5eb953e2e4910c
Author: cristofolini <lucascristofolini@gmail.com>
Date:   2015-08-15T19:27:13Z

    Removed unnecessary duplicated code by having the body of the getPatchFiles method only
in the
    CitrixResourceBase superclass. Given that all of its implementations consisted of the
same code
    except for the path which contains the necessary file for that implementation. An abstract
method
    getPatchFilePath was created in the CitrixResourceBase superclass so that each implementation
may
    return the path containing the specific file needed by that implementation.
    
    Test cases were created for each implementation, simple as they may be. One assert is
made to verify
    that the path returned by each implementation corresponds to the path that was previously
specified
    on each getPatchFiles implementation.

commit de4cd88ace654e3c810d31cb5bd34366817d787e
Author: cristofolini <lucascristofolini@gmail.com>
Date:   2015-08-15T19:45:48Z

    Merge origin/master-lrg-cs-hackday-001 into master-lrg-cs-hackday-001
    
    Conflicts:
    	plugins/hypervisors/xenserver/test/com/cloud/hypervisor/xenserver/resource/XcpOssResourcePathTest.java
    	plugins/hypervisors/xenserver/test/com/cloud/hypervisor/xenserver/resource/XcpServerResourcePathTest.java
    	plugins/hypervisors/xenserver/test/com/cloud/hypervisor/xenserver/resource/XenServer56FP1ResourcePathTest.java
    	plugins/hypervisors/xenserver/test/com/cloud/hypervisor/xenserver/resource/XenServer56ResourcePathTest.java
    	plugins/hypervisors/xenserver/test/com/cloud/hypervisor/xenserver/resource/XenServer56SP2ResourcePathTest.java
    	plugins/hypervisors/xenserver/test/com/cloud/hypervisor/xenserver/resource/XenServer600ResourcePathTest.java
    	plugins/hypervisors/xenserver/test/com/cloud/hypervisor/xenserver/resource/XenServer625ResourcePathTest.java
    	plugins/hypervisors/xenserver/test/com/cloud/hypervisor/xenserver/resource/XenServer650ResourcePathTest.java

commit 35ef0a4d269ca30b1492f1f7026b212e4a7030d7
Author: cristofolini <lucascristofolini@gmail.com>
Date:   2015-08-15T19:59:32Z

    Removed unnecessary imports

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message