Alon Bar-Lev has posted comments on this change.

Change subject: core: remove commons httpclient from provider proxy
......................................................................


Patch Set 3:

(5 comments)

http://gerrit.ovirt.org/#/c/33458/3/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/host/provider/foreman/ForemanHostProviderProxy.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/host/provider/foreman/ForemanHostProviderProxy.java:

Line 317:                 if (read > -1) {
Line 318:                     bytesOs.write(chunk, 0, read);
Line 319:                 } else {
Line 320:                     break;
Line 321:                 }
there something commons that does this loop, no?
Line 322:             }
Line 323:             result = bytesOs.toByteArray();
Line 324:             handleResponseCode(connection.getResponseCode());
Line 325:         } catch (SSLException e) {


Line 320:                     break;
Line 321:                 }
Line 322:             }
Line 323:             result = bytesOs.toByteArray();
Line 324:             handleResponseCode(connection.getResponseCode());
I think you should swap the following two lines, first get status, and if 
status is ok, read the result?
Line 325:         } catch (SSLException e) {
Line 326:             throw new 
VdcBLLException(VdcBllErrors.PROVIDER_SSL_FAILURE, e.getMessage());
Line 327:         } catch (IOException e) {
Line 328:             handleException(e);


Line 343: 
Line 344:         URL hostUrl = getUrl();
Line 345:         Connection connection = null;
Line 346:         try {
Line 347:             if (isSecured()) {
this should not be in this context, but in common place... all you need is URL 
and create connection to that url.
Line 348:                 if (hostUrl.getPort() == -1) {
Line 349:                     hostUrl =
Line 350:                             createURLWithDefaultPort(
Line 351:                                     hostUrl,


http://gerrit.ovirt.org/#/c/33458/3/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ssl/AuthSSLProtocolSocketFactory.java
File 
backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ssl/AuthSSLProtocolSocketFactory.java:

not sure what this class is.
Line 1: /*
Line 2:  * $HeadURL$
Line 3:  * $Revision$
Line 4:  * $Date$


http://gerrit.ovirt.org/#/c/33458/3/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ssl/TrustStoreProvider.java
File 
backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ssl/TrustStoreProvider.java:

this class should go away... just use files?
Line 1: package org.ovirt.engine.core.utils.ssl;
Line 2: 
Line 3: import java.security.KeyStore;
Line 4: 


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I727d34c33f357b93560d4b5a1784b3733b7fa293
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Yair Zaslavsky <yzasl...@redhat.com>
Gerrit-Reviewer: Alon Bar-Lev <alo...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to