Hot answers tagged

2

Initial impressions: public String addAddonToCart(final Cart addonCart) { log.info("Start : addAddonToCart method started"); final var cart = this.cartRepository.findById(addonCart.getId()) .map(e -> e) // why .orElseThrow(() -> { throw new ResourceNotFoundException(new ...


2

Missing includes - the code won't compile until I prepend #include <functional> #include <stdlib.h> #include <type_traits> (though I would recommend <cstdlib> and use the proper namespace for std::malloc()). This comment is non-portable and potentially misleading: // Member function pointer is 16B. The first 8B is the address of ...


Only top voted, non community-wiki answers of a minimum length are eligible