Buggy code:
@ RestController @ RequestMapping ( { "${api.web}//orders" } ) public class OrdersRestController extends GeroBaseController { private static Logger logger = Logger . getLogger ( OrdersRestController . class ) ; @ Autowired private IOrdersService ordersService ; @ Autowired private IElderInfoService elderInfoService ; @ Autowired private IRelativeInfoService relativeInfoService ; @ Autowired private SystemService systemService ; @ RequestMapping ( method = RequestMethod . GET , produces = MediaTypes . JSON_UTF_8 ) public Object getOrders ( HttpServletRequest request , @ RequestParam ( value = "community_id" , required = false ) Integer communityId , @ RequestParam ( value = "order_id" , required = false ) Integer orderId , @ RequestParam ( value = "datetime_before" , required = false ) String datetimeBefore , @ RequestParam ( value = "elder_name" , required = false ) String elderName , @ RequestParam ( value = "phone_number" , required = false ) String phoneNumber , @ RequestParam ( value = "order_status" , required = false ) Integer orderStatus , @ RequestParam ( value = "fuzzy_query_params" , required = false ) String fuzzyQueryParams , @ RequestParam ( "page" ) int page , @ RequestParam ( "rows" ) int limit , @ RequestParam ( "sort" ) String orderByTag ) { } @ RequestMapping ( value = "//{order_id}" , method = RequestMethod . GET , produces = MediaTypes . JSON_UTF_8 ) public Object getOrder ( HttpServletRequest request , @ PathVariable ( "order_id" ) Integer orderId ) { } @ RequestMapping ( value = "//{orderId}//carers" , method = RequestMethod . GET , produces = MediaTypes . JSON_UTF_8 ) public Object getElders ( HttpServletRequest request , @ RequestParam ( value = "community_id" , required = false ) Integer communityId , @ RequestParam ( value = "order_id" , required = false ) Integer orderId , @ RequestParam ( value = "datetime_before" , required = false ) String datetimeBefore , @ RequestParam ( value = "elder_name" , required = false ) String elderName , @ RequestParam ( value = "phone_number" , required = false ) String phoneNumber , @ RequestParam ( value = "order_status" , required = false ) Integer orderStatus , @ RequestParam ( value = "fuzzy_query_params" , required = false ) String fuzzyQueryParams , @ RequestParam ( "page" ) int page , @ RequestParam ( "rows" ) int limit , @ RequestParam ( "sort" ) String orderByTag ) { } @ Transactional @ RequestMapping ( method = RequestMethod . POST , produces = MediaTypes . JSON_UTF_8 ) public Object postElder ( HttpServletRequest request , @ RequestBody String inJson ) { Map < String , Object > tempRquestParamMap = ParamUtils . getMapByJson ( inJson , OrdersRestController . logger ) ; Map < String , Object > requestParamMap = MapListUtils . convertMapToCamelStyle ( tempRquestParamMap ) ; requestParamMap . put ( "orderTime" , DateUtils . getDateTime ( ) ) ; boolean newElderFlag = false ; boolean newRelativeFlag = false ; if ( ( requestParamMap . get ( "elderId" ) ) == null ) { newElderFlag = true ; } if ( ( requestParamMap . get ( "relativeId" ) ) == null ) { newRelativeFlag = true ; } try { if ( ( requestParamMap . get ( "careItemId" ) ) == null ) { throw new Exception ( ) ; } System . out . println ( requestParamMap . get ( "elderId" ) ) ; if ( ( ( requestParamMap . get ( "elderId" ) ) == null ) && ( ( ( ( requestParamMap . get ( "elderName" ) ) == null ) || ( ( requestParamMap . get ( "elderPhoneNumber" ) ) == null ) ) || ( ( requestParamMap . get ( "communityId" ) ) == null ) ) ) { throw new Exception ( "老人姓名和老人电话号码是必须字段" ) ; } if ( ( ( requestParamMap . get ( "relativeId" ) ) == null ) && ( ( ( requestParamMap . get ( "relativeName" ) ) == null ) || ( ( requestParamMap . get ( "relativePhoneNumber" ) ) == null ) ) ) { throw new Exception ( ) ; } } catch ( Exception e ) { String otherMessage = ( "[" + inJson ) + "]" ; String message = ErrorConstants . format ( ORDERS_INFO_POST_PARAM_INVALID , otherMessage ) ; OrdersRestController . logger . error ( message ) ; throw new com . sjtu . icare . common . web . rest . RestException ( HttpStatus . BAD_REQUEST , message ) ; } BasicReturnedJson basicReturnedJson = new BasicReturnedJson ( ) ; try { ElderEntity postElderEntity = null ; User postElderUser = null ; RelativeEntity postRelativeEntity = null ; User postRelativeUser = null ; Integer elderId = null ; Integer elderUserId = null ; Integer relativeId = null ; Integer relativeUserId = null ; String elderName = ( ( String ) ( requestParamMap . get ( "elderName" ) ) ) ; String elderPhoneNumber = ( ( String ) ( requestParamMap . get ( "elderPhoneNumber" ) ) ) ; String relativeName = ( ( String ) ( requestParamMap . get ( "relativeName" ) ) ) ; String relativePhoneNumber = ( ( String ) ( requestParamMap . get ( "relativePhoneNumber" ) ) ) ; <START_BUG> Integer careItemId = Integer . getInteger ( ( ( String ) ( requestParamMap . get ( "careItemId" ) ) ) ) ; <END_BUG>

Fix:
Integer careItemId = Integer . parseInt ( ( ( String ) ( requestParamMap . get ( "careItemId" ) ) ) ) ;