Jesus M. Rodriguez wrote:
John,

http://git.fedorahosted.org/git/?p=spacewalk.git;a=commitdiff;h=c8317564eecd3839769971a39535ea3e189849ac

One nitpick with the hardware_device_by_id query. Right justify the
SQL keywords for example, the T of SELECT
should line up with the M in FROM and the final E in WHERE. The rest
of the query looks ok.

Why are you doing the cast if the DataResult has a type?

+                DataResult<HardwareDeviceDto> dr =
+                    SystemManager.getHardwareDeviceById(hwId);
+                if ((dr != null) && (dr.size() > 0)) {
+                    sr.setHw((HardwareDeviceDto)dr.get(0));

Just my own ignorance, will fix.

Also, if you're expecting only ONE HardwareDevice, then I'd change
getHardwareDeviceById method
to retun the HardwareDeviceDto directly instead.

  sr.setHw(SystemManager.getHardwareDeviceById(hwId));

Makes sense, will change.

Everything else looks ok. Good job.

jesus


Thanks for looking this over

-John

_______________________________________________
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Reply via email to