Related to ISSUE-43453. Code Review changes
authorDavid Miguelez <david.miguelez@openbravo.com>
Wed, 11 Mar 2020 18:08:40 +0100
changeset 37180 dfdffb7bcad7
parent 37179 2c0e4eb6a5df
child 37181 18f65bdd0309
Related to ISSUE 43453. Code Review changes
* Adds removed throw exception to avoid possible API change
src/org/openbravo/materialmgmt/ReservationUtils.java
--- a/src/org/openbravo/materialmgmt/ReservationUtils.java	Mon Mar 09 16:44:05 2020 +0100
+++ b/src/org/openbravo/materialmgmt/ReservationUtils.java	Wed Mar 11 18:08:40 2020 +0100
@@ -49,7 +49,7 @@
   String exito;
 
   public static Reservation createReserveFromSalesOrderLine(final OrderLine soLine,
-      final boolean doProcess) {
+      final boolean doProcess) throws OBException {
     if (!soLine.getSalesOrder().isSalesTransaction()) {
       throw new OBException(OBMessageUtils.messageBD("cannotReservePurchaseOrder", false));
     }
@@ -76,7 +76,7 @@
     return null;
   }
 
-  public static OBError reserveStockAuto(final Reservation reservation) {
+  public static OBError reserveStockAuto(final Reservation reservation) throws OBException {
 
     OBDal.getInstance().flush();
     CSResponse cs = null;
@@ -108,7 +108,8 @@
    */
 
   public static ReservationStock reserveStockManual(final Reservation reservation,
-      final BaseOBObject obObject, final BigDecimal quantity, final String allocated) {
+      final BaseOBObject obObject, final BigDecimal quantity, final String allocated)
+      throws OBException {
 
     String strType = "";
 
@@ -149,7 +150,8 @@
    * <li>CL Close</li>
    * </ul>
    */
-  public static OBError processReserve(final Reservation reservation, final String action) {
+  public static OBError processReserve(final Reservation reservation, final String action)
+      throws OBException {
 
     OBContext.setAdminMode(true);
     Process process = null;
@@ -191,7 +193,7 @@
    */
 
   public static OBError reallocateStock(final Reservation reservation, final Locator storageBin,
-      final AttributeSetInstance asi, final BigDecimal quantity) {
+      final AttributeSetInstance asi, final BigDecimal quantity) throws OBException {
 
     OBDal.getInstance().flush();
     CSResponse cs = null;