GitHub user GabrielBrascher opened a pull request:
https://github.com/apache/cloudstack/pull/1453
Remove classes with no references
I used UCDetector (http://www.ucdetector.org/) as a plugin for Eclipse.
With this tool, I discovered a lot of code without any reference (variables,
methods and classes).
Following the work done at
[https://github.com/apache/cloudstack/pull/1448]; this pull request had the
goal of removing some of these classes. To check if I wasn't missing anything I
searched for any file that could reference some of those classes. As I haven't
found any way of these classes being used, they was removed. Note that some of
them I found other references, but references such as commented lines or tests,
nothing that could indicated the use (as xml configuring beans or another class
instantiating an object with "new").
Waiting for tests. Please tell me if I am missing something.
Removed Classes:
- org.apache.cloudstack.framework.jobs.JobCancellationException (**Note:**
removed
variable JobCancellationException in com.cloud.utils.SerialVersionUID)
- org.apache.cloudstack.ldap.NoSuchLdapUserException (**Note:** removed
test file
/cloud-plugin-user-authenticator-ldap/test/groovy/org/apache/cloudstack/ldap/NoSuchLdapUserExceptionSpec.groovy)
- com.cloud.agent.api.storage.CreateVolumeOVAAnswer
- com.cloud.exception.MissingParameterValueException
- org.apache.cloudstack.api.response.StatusResponse
- org.apache.cloudstack.api.response.VolumeDetailResponse
- org.apache.cloudstack.api.response.UpgradeVmResponse
- org.apache.cloudstack.api.response.AddIpToVmNicResponse
- org.apache.cloudstack.api.response.TemplateZoneResponse (**Note:** at
org.apache.cloudstack.api.response.TemplateResponse, there is this
comment "To avoid breaking backwards compatibility, we still treat a
template at different zones as different templates, so not embedding
template_zone information in this TemplateZoneResponse set. `private
Set<TemplateZoneResponse> zones;`" but right now it is not used)
- org.apache.cloudstack.api.response.NicDetailResponse
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/GabrielBrascher/cloudstack
brascher-removeUnusedClasses2
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/cloudstack/pull/1453.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 #1453
----
commit 3bd2fa16eb297f0484da53593e9aea7db91e910f
Author: gabrascher <[email protected]>
Date: 2016-03-26T20:01:18Z
Classes with no references
- org.apache.cloudstack.framework.jobs.JobCancellationException (removed
variable JobCancellationException in com.cloud.utils.SerialVersionUID)
- org.apache.cloudstack.ldap.NoSuchLdapUserException (removed test file
/cloud-plugin-user-authenticator-ldap/test/groovy/org/apache/cloudstack/ldap/NoSuchLdapUserExceptionSpec.groovy)
- com.cloud.agent.api.storage.CreateVolumeOVAAnswer
- com.cloud.exception.MissingParameterValueException
- org.apache.cloudstack.api.response.StatusResponse
- org.apache.cloudstack.api.response.VolumeDetailResponse
- org.apache.cloudstack.api.response.UpgradeVmResponse
- org.apache.cloudstack.api.response.AddIpToVmNicResponse
- org.apache.cloudstack.api.response.TemplateZoneResponse (at
org.apache.cloudstack.api.response.TemplateResponse, there is this
comment "To avoid breaking backwards compatibility, we still treat a
template at different zones as different templates, so not embedding
template_zone information in this TemplateZoneResponse set. `private
Set<TemplateZoneResponse> zones;`" but right now it is not used)
- org.apache.cloudstack.api.response.NicDetailResponse
----
---
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 [email protected] or file a JIRA ticket
with INFRA.
---