cloudstack-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "KuiLIU (JIRA)" <>
Subject [jira] [Created] (CLOUDSTACK-10360) Inconsistent method name
Date Tue, 24 Apr 2018 08:11:00 GMT
KuiLIU created CLOUDSTACK-10360:

             Summary: Inconsistent method name
                 Key: CLOUDSTACK-10360
             Project: CloudStack
          Issue Type: Improvement
      Security Level: Public (Anyone can view this level - this is the default.)
            Reporter: KuiLIU

The following method is named as "scoped" that seems to whether the variable config is scoped
in _scopedStorages or not.
Actually, the method tries to find a storage of which scope equals to the scope of config.
So that, the method name "findStorage" should be more clear than "scoped".
    public ScopedConfigStorage scoped(ConfigKey<?> config) {
        for (ScopedConfigStorage storage : _scopedStorages) {
            if (storage.getScope() == config.scope()) {
                return storage;

        throw new CloudRuntimeException("Unable to find config storage for this scope: " +
config.scope() + " for " + config.key());

This message was sent by Atlassian JIRA

View raw message