Alon Bar-Lev has posted comments on this change.

Change subject: core: [WIP] Manage OS properties in a repository
......................................................................


Patch Set 4: (2 inline comments)

....................................................
File 
backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/osinfo/OsInfoPreferencesLoader.java
Line 34:     private Log log = LogFactory.getLog(OsInfoPreferencesLoader.class);
Line 35: 
Line 36: 
Line 37:     public void init() {
Line 38:         
load(FileSystems.getDefault().getPath(EngineLocalConfig.getInstance().getUsrDir().getAbsolutePath(),
 "osinfo.conf.d"));
I don't think there is a reason to load at usrDir, unless there is something I 
miss. I think we have fully functional if we read only etc.
Line 39:         
load(FileSystems.getDefault().getPath(EngineLocalConfig.getInstance().getEtcDir().getAbsolutePath(),
 "osinfo.conf.d"));
Line 40:     }
Line 41: 
Line 42:     public void load(Path directoryPath) {


Line 46:             for (Path path: dirStream) {
Line 47:                 paths.add(path);
Line 48:             }
Line 49:             // load files by name order. 00-os.properties should be 
loaded first
Line 50:             Collections.sort(paths);
Fine with me!

What I hate in java is that it does not return the reference... so you cannot 
do:

 for (x : sort(a)) {
 }

So:

 for (x : new TreeSet(Arrays.asList(a))) {
 }

Has no useless temp vars... :)

But this is just me have issues with my-self... :)
Line 51: 
Line 52:             for (Path path: paths) {
Line 53:                 loadFile(path);
Line 54:             }


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I50384bf3b6763fa7a34badc2449e06242186a858
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Roy Golan <rgo...@redhat.com>
Gerrit-Reviewer: Alon Bar-Lev <alo...@redhat.com>
Gerrit-Reviewer: Michal Skrivanek <michal.skriva...@redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com>
Gerrit-Reviewer: Roy Golan <rgo...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to