Alon Bar-Lev has posted comments on this change.

Change subject: 6. [WIP] core: Introducing configuration loader
......................................................................


Patch Set 15:

(4 comments)

http://gerrit.ovirt.org/#/c/24365/15/backend/manager/modules/extension-manager/src/main/java/org/ovirt/engine/core/extensions/mgr/ConfigurationLoader.java
File 
backend/manager/modules/extension-manager/src/main/java/org/ovirt/engine/core/extensions/mgr/ConfigurationLoader.java:

Line 87: 
Line 88:     public ExtensionEntry getExtensionByName(String pluginName) throws 
ConfigurationException {
Line 89:         ExtensionEntry result = loadedEntries.get(pluginName);
Line 90:         if (result == null) {
Line 91:             throw new ConfigurationException("No configuration was 
found for extension named " + pluginName);
string.format

always add single quotes '%s' for strings... extension named '%s' ...
Line 92:         }
Line 93:         return result;
Line 94:     }
Line 95: 


Line 102: 
Line 103:     private void load(File directory) throws ConfigurationException {
Line 104:         // Check that the folder that contains the configuration 
files exists:
Line 105:         if (!directory.exists()) {
Line 106:             log.warn("The directory \"" + directory.getAbsolutePath()
string.format
Line 107:                     + "\" containing the configuration files doesn't "
Line 108:                             +
Line 109:                     "exist.");
Line 110:         } else {


Line 122:                             ExtensionEntry entry =
Line 123:                                     new ExtensionEntry(file);
Line 124:                             ExtensionEntry alreadyLoded = 
loadedEntries.get(entry.getName());
Line 125:                             if (alreadyLoded != null) {
Line 126:                                 throw new 
ConfigurationException(String.format("Could not load the configuration file 
\"%1$s\". The configuration file + \"%2$s\" already has the name %3$s",
single quotes please.
Line 127:                                         file.getAbsolutePath(),
Line 128:                                         
alreadyLoded.file.getAbsolutePath(),
Line 129:                                         entry.getName()));
Line 130:                             }


Line 130:                             }
Line 131:                             loadedEntries.put(entry.name, entry);
Line 132: 
Line 133:                         } catch (IOException exception) {
Line 134:                             throw new 
ConfigurationException(String.format("Can't load object configuration file 
\"%1$s\"",
single quotes please.
Line 135:                                     file.getAbsolutePath()));
Line 136:                         }
Line 137:                     }
Line 138:                 }


-- 
To view, visit http://gerrit.ovirt.org/24365
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I182904177ec088e62b35bde870ec79725fabc4e4
Gerrit-PatchSet: 15
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Yair Zaslavsky <[email protected]>
Gerrit-Reviewer: Alon Bar-Lev <[email protected]>
Gerrit-Reviewer: Martin PeÅ™ina <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to