Juan Hernandez has posted comments on this change.

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


Patch Set 31:

(4 comments)

http://gerrit.ovirt.org/#/c/28340/31/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 41:     private TransformerFactory transfact;
Line 42:     private FopFactory fopFactory;
Line 43:     private FOUserAgent foUserAgent;
Line 44:     private ObjectFactory objectFactory;
Line 45:     private InputStream templateStream;
This should be a local variable.
Line 46: 
Line 47:     public FOPMessageBodyWriter() {
Line 48:         try {
Line 49:             String modelPackage = API.class.getPackage().getName();


Line 67:         return true;
Line 68:     }
Line 69: 
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 {
Declare templateStream hear, as a local variable.
Line 72:         try {
Line 73:             String xslName = "/" + type.getSimpleName() + "AsPdf.xsl";
Line 74:             templateStream = type.getResourceAsStream(xslName);
Line 75:             if (templateStream != null) {


Line 101:             log.error("Error while generating PDF.", e);
Line 102:         } finally {
Line 103:             if (templateStream != null) {
Line 104:                 templateStream.close();
Line 105:               }
Indent this line correctly.
Line 106:         }
Line 107:     }


http://gerrit.ovirt.org/#/c/28340/31/backend/manager/modules/restapi/interface/definition/src/main/resources/META-INF/services/javax.ws.rs.ext.Providers
File 
backend/manager/modules/restapi/interface/definition/src/main/resources/META-INF/services/javax.ws.rs.ext.Providers:

Line 1: org.ovirt.engine.api.resteasy.json.JsonProvider
Line 2: org.ovirt.engine.api.xml.JAXBMessageBodyReader
Line 3: org.ovirt.engine.api.pdf.FOPMessageBodyWriter
Line 4: 
Remove this empty line.


-- 
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: 31
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