svn commit: r1817709 - /ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/survey/PdfSurveyServices.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1817709 - /ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/survey/PdfSurveyServices.java

jleroux@apache.org
Author: jleroux
Date: Sun Dec 10 12:32:51 2017
New Revision: 1817709

URL: http://svn.apache.org/viewvc?rev=1817709&view=rev
Log:
No functional changes, FileNotFoundException is included in IOException so no
need to have both doing the same thing

Modified:
    ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/survey/PdfSurveyServices.java

Modified: ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/survey/PdfSurveyServices.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/survey/PdfSurveyServices.java?rev=1817709&r1=1817708&r2=1817709&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/survey/PdfSurveyServices.java (original)
+++ ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/survey/PdfSurveyServices.java Sun Dec 10 12:32:51 2017
@@ -519,7 +519,7 @@ public class PdfSurveyServices {
                         value = num.toString();
                     }
                 } else if ("SEPERATOR_LINE".equals(questionType) || "SEPERATOR_TEXT".equals(questionType)) {
-                    // not really a question; ingore completely
+                    // not really a question; ignore completely
                 } else {
                     value = surveyResponseAnswer.getString("textResponse");
                 }
@@ -567,8 +567,6 @@ public class PdfSurveyServices {
                     ByteArrayOutputStream baos = new ByteArrayOutputStream();
                     while ((c = fis.read()) != -1) baos.write(c);
                     inputByteBuffer = ByteBuffer.wrap(baos.toByteArray());
-                } catch (FileNotFoundException e) {
-                    throw(new GeneralException(e.getMessage()));
                 } catch (IOException e) {
                     throw(new GeneralException(e.getMessage()));
                 }
@@ -581,11 +579,8 @@ public class PdfSurveyServices {
                     GenericValue content = EntityQuery.use(delegator).from("Content").where("contentId", contentId).cache().queryOne();
                     String dataResourceId = content.getString("dataResourceId");
                     inputByteBuffer = DataResourceWorker.getContentAsByteBuffer(delegator, dataResourceId, https, webSiteId, locale, rootDir);
-                } catch (GenericEntityException e) {
-                    throw(new GeneralException(e.getMessage()));
-                } catch (IOException e) {
+                } catch (GenericEntityException | IOException e) {
                     throw(new GeneralException(e.getMessage()));
-                }
             }
         }
         return inputByteBuffer;