Mistři v programování na #hovnokod

Java #4677

Miluji funkce s nazvem hack... A co tenhle pattern: a = b; if(x) -> a=b; else if(y) -> a=b; c = d;

    private void hackDataAutoExtraFup(Service service, Product product) {
        service.setServiceStatus(IntegrationUtils.operationMapClient.get(OrderItemOperationType.ADD));
        if (product.getOrderItemOperation() == OrderItemOperationType.UPDATE) {
            service.setServiceStatus(IntegrationUtils.operationMapClient.get(OrderItemOperationType.ADD));
        } else if (product.getOrderItemOperation() == OrderItemOperationType.SUSPEND ||
                product.getOrderItemOperation() == OrderItemOperationType.REMOVE ||
                product.getOrderItemOperation() == OrderItemOperationType.REMOVE_ON_END_OF_PERIOD) {
            service.setServiceStatus(IntegrationUtils.operationMapClient.get(OrderItemOperationType.ADD));
            setParameterValue(service, ProductIvmAutoExtraFup.MAX_RENEWAL_COUNT, "0");
        }
    }

Anonymous,