Juan Hernandez has posted comments on this change.

Change subject: restapi : RestApi to export volume profile to pdf
......................................................................


Patch Set 26:

(5 comments)

http://gerrit.ovirt.org/#/c/28340/26/backend/manager/modules/restapi/interface/definition/src/main/java/org/ovirt/engine/api/pdf/FOPMessageBodyWriter.java
File 
backend/manager/modules/restapi/interface/definition/src/main/java/org/ovirt/engine/api/pdf/FOPMessageBodyWriter.java:

Line 52:             fopFactory = FopFactory.newInstance();
Line 53:             foUserAgent = fopFactory.newFOUserAgent();
Line 54:             objectFactory = new ObjectFactory();
Line 55:         } catch (Exception error) {
Line 56:             log.error(error.toString());
Send the complete stack trace of the exception to the log:

  log.error("Error while creating FOP message body writer.", error);
Line 57:         }
Line 58:     }
Line 59: 
Line 60:     @Override


Line 70:     @Override
Line 71:     public void writeTo(final Object data, Class<?> type, Type 
genericType, Annotation[] annotations, MediaType mediaType, 
MultivaluedMap<String, Object> httpHeaders, OutputStream entityStream) throws 
IOException, WebApplicationException {
Line 72:         try {
Line 73:             String xslName = "/" + type.getSimpleName() + "AsPdf.xsl";
Line 74:             InputStream templateStream = 
type.getResourceAsStream(xslName);
Here we should check if the stream is null, and generate an error message that 
clearly indicates that the XSL doesn't exist.

Also we should make sure that this stream is closed when finished.

  InputStream templateStream = null;
  try {
    ...
  }
  catch (...) {
  }
  finally {
    if (templateStream != null) {
      templateStream.close();
    }
  }
Line 75:             StreamSource transformSource = new 
StreamSource(templateStream);
Line 76: 
Line 77:             Method factoryMethod = null;
Line 78:             for (Method currentMethod : 
objectFactory.getClass().getDeclaredMethods()) {


http://gerrit.ovirt.org/#/c/28340/26/ovirt-engine.spec.in
File ovirt-engine.spec.in:

Line 195: Requires:     %{name}-userportal = %{version}-%{release}
Line 196: Requires:     %{name}-webadmin-portal = %{version}-%{release}
Line 197: Requires:     %{name}-websocket-proxy >= %{version}-%{release}
Line 198: Requires:     java
Line 199: Requires:     fop
Make sure that this is alphabetically sorted, fop goes before java.
Line 200: Requires:     java-1.7.0-openjdk >= 1:1.7.0.9-2.3.3.2
Line 201: Requires:     jpackage-utils
Line 202: Requires:     ovirt-image-uploader >= 3.3.0
Line 203: Requires:     ovirt-iso-uploader >= 3.3.0


Line 690:       src="%{_javadir}/${src}"
Line 691:       rm -f "%{buildroot}${dst}"
Line 692:       ln -s "${src}" "%{buildroot}${dst}"
Line 693: done << __EOF__
Line 694: org/apache/ws/commons/main/ws-commons-util.jar
Make sure that this list is alphabetically sorted.
Line 695: org/apache/avalon/framework/main/avalon-framework-impl.jar
Line 696: org/apache/avalon/framework/main/avalon-framework-api.jar
Line 697: org/apache/commons/io/main/commons-io.jar
Line 698: org/apache/xmlgraphics/batik/main/batik-awt-util.jar 
batik/batik-awt-util.jar


http://gerrit.ovirt.org/#/c/28340/26/pom.xml
File pom.xml:

Line 95:     <fop.version>1.0</fop.version>
Line 96:     <xmlgraphics-commons.version>1.4</xmlgraphics-commons.version>
Line 97:     <batik.version>1.7</batik.version>
Line 98:     <avalon.version>4.3.1</avalon.version>
Line 99:     <avalon.version>4.3.1</avalon.version>
This line is repeated.
Line 100:     <commons-io.version>1.3</commons-io.version>
Line 101:     <c3p0.version>0.9.1.1</c3p0.version>
Line 102:     <aopalliance.version>1.0</aopalliance.version>
Line 103:     <snmp4j.version>2.2.2</snmp4j.version>


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie3ff28f5cf18bd7a2bcb53a169873fe6ae3541ed
Gerrit-PatchSet: 26
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: anmolbabu <[email protected]>
Gerrit-Reviewer: Alexander Wels <[email protected]>
Gerrit-Reviewer: Juan Hernandez <[email protected]>
Gerrit-Reviewer: Kanagaraj M <[email protected]>
Gerrit-Reviewer: Ramesh N <[email protected]>
Gerrit-Reviewer: Sahina Bose <[email protected]>
Gerrit-Reviewer: Shubhendu Tripathi <[email protected]>
Gerrit-Reviewer: anmolbabu <[email protected]>
Gerrit-Reviewer: [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