This is an automated email from the ASF dual-hosted git repository.
jleroux pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/ofbiz-plugins.git The following commit(s) were added to refs/heads/trunk by this push: new a4fb6d2 Fixed: Add support to read and register resources defined in XML DSL(OFBIZ-11995) a4fb6d2 is described below commit a4fb6d22eefbf91fe1ed0d6018d50de7a027ae0d Author: Jacques Le Roux <[hidden email]> AuthorDate: Thu Sep 24 06:59:30 2020 +0200 Fixed: Add support to read and register resources defined in XML DSL(OFBIZ-11995) Fixes a JavaDoc issue and while at it replaces // TODO Auto-generated catch block e.printStackTrace(); by Debug.logError(e, MODULE); --- .../src/main/java/org/apache/ofbiz/ebaystore/EbayStore.java | 1 - .../main/java/org/apache/ofbiz/example/ExamplePrintServices.java | 5 +---- .../main/java/org/apache/ofbiz/ws/rs/core/OFBizApiConfig.java | 3 +-- .../org/apache/ofbiz/ws/rs/process/ServiceRequestHandler.java | 9 ++++----- projectmgr/src/main/java/org/apache/ofbiz/project/Various.java | 3 +-- 5 files changed, 7 insertions(+), 14 deletions(-) diff --git a/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStore.java b/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStore.java index 25f5cd2..4ed4708 100644 --- a/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStore.java +++ b/ebaystore/src/main/java/org/apache/ofbiz/ebaystore/EbayStore.java @@ -1390,7 +1390,6 @@ public class EbayStore { } result.put("activeItems", activeItems); } catch (Exception e) { - // TODO Auto-generated catch block return ServiceUtil.returnError(e.getMessage()); } return result; diff --git a/example/src/main/java/org/apache/ofbiz/example/ExamplePrintServices.java b/example/src/main/java/org/apache/ofbiz/example/ExamplePrintServices.java index a29db19..12fdd3e 100644 --- a/example/src/main/java/org/apache/ofbiz/example/ExamplePrintServices.java +++ b/example/src/main/java/org/apache/ofbiz/example/ExamplePrintServices.java @@ -131,11 +131,8 @@ public class ExamplePrintServices { Fop fop = ApacheFopWorker.createFopInstance(out, MimeConstants.MIME_PDF); ApacheFopWorker.transform(src, null, fop); } catch (FOPException e) { - // TODO Auto-generated catch block - e.printStackTrace(); + Debug.logError(e, MODULE); } - - /* // set the content type and length response.setContentType("application/pdf"); diff --git a/ofbiz-rest-impl/src/main/java/org/apache/ofbiz/ws/rs/core/OFBizApiConfig.java b/ofbiz-rest-impl/src/main/java/org/apache/ofbiz/ws/rs/core/OFBizApiConfig.java index 126bd09..5eecd73 100644 --- a/ofbiz-rest-impl/src/main/java/org/apache/ofbiz/ws/rs/core/OFBizApiConfig.java +++ b/ofbiz-rest-impl/src/main/java/org/apache/ofbiz/ws/rs/core/OFBizApiConfig.java @@ -87,8 +87,7 @@ public class OFBizApiConfig extends ResourceConfig { MICRO_APIS.put(cName, api); } } catch (ComponentException e) { - // TODO Auto-generated catch block - e.printStackTrace(); + Debug.logError(e, MODULE); } }); } diff --git a/ofbiz-rest-impl/src/main/java/org/apache/ofbiz/ws/rs/process/ServiceRequestHandler.java b/ofbiz-rest-impl/src/main/java/org/apache/ofbiz/ws/rs/process/ServiceRequestHandler.java index b51e3fe..1ebfaa8 100644 --- a/ofbiz-rest-impl/src/main/java/org/apache/ofbiz/ws/rs/process/ServiceRequestHandler.java +++ b/ofbiz-rest-impl/src/main/java/org/apache/ofbiz/ws/rs/process/ServiceRequestHandler.java @@ -31,6 +31,7 @@ import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import org.apache.commons.lang.exception.ExceptionUtils; +import org.apache.ofbiz.base.util.Debug; import org.apache.ofbiz.base.util.UtilProperties; import org.apache.ofbiz.base.util.UtilValidate; import org.apache.ofbiz.entity.GenericEntityException; @@ -51,6 +52,7 @@ import org.codehaus.groovy.runtime.InvokerInvocationException; public final class ServiceRequestHandler extends RestRequestHandler { + private static final String MODULE = ServiceRequestHandler.class.getName(); private static final String DEFAULT_MSG_UI_LABEL_RESOURCE = "ApiUiLabels"; private String service; @@ -61,18 +63,15 @@ public final class ServiceRequestHandler extends RestRequestHandler { /** * @param data * @return - * @throws GenericServiceException */ @Override protected Response execute(ContainerRequestContext data, Map<String, Object> arguments) { LocalDispatcher dispatcher = (LocalDispatcher) getServletContext().getAttribute("dispatcher"); Map<String, Object> serviceContext = null; try { - serviceContext = dispatcher.getDispatchContext().makeValidContext(service, ModelService.IN_PARAM, - arguments); + serviceContext = dispatcher.getDispatchContext().makeValidContext(service, ModelService.IN_PARAM, arguments); } catch (GenericServiceException e) { - // TODO Auto-generated catch block - e.printStackTrace(); + Debug.logError(e, MODULE); } ModelService svc = getModelService(dispatcher.getDispatchContext()); GenericValue userLogin = (GenericValue) getHttpRequest().getAttribute("userLogin"); diff --git a/projectmgr/src/main/java/org/apache/ofbiz/project/Various.java b/projectmgr/src/main/java/org/apache/ofbiz/project/Various.java index 9c87ec9..2b469d6 100644 --- a/projectmgr/src/main/java/org/apache/ofbiz/project/Various.java +++ b/projectmgr/src/main/java/org/apache/ofbiz/project/Various.java @@ -102,8 +102,7 @@ public class Various { } } } catch (GenericEntityException e) { - // TODO Auto-generated catch block - e.printStackTrace(); + Debug.logError(e, MODULE); } } return actualHours; |
Free forum by Nabble | Edit this page |