PersonController.java
@PutMapping("/{id}")
	@ApiOperation(value = "Updates a user specified person at the id passed", response = Person.class)
	@ApiResponses(value = {
			@ApiResponse(code = 200, message = "The updated person"),
			@ApiResponse(code = 400, message = "Person already exists"),
			@ApiResponse(code = 404, message = "Person not found"),
			@ApiResponse(code = 500, message = "Backend error")})
	public ResponseEntity updatePerson(@PathVariable int id, @RequestBody Person person) {
		try {
			Person updatedPerson = personHelper.update(conn, id, person); //Updates a person at the given id
			if(updatedPerson.equals(person)) { //Makes sure the user passed person and the returned person are the same
				return new ResponseEntity<Person>(updatedPerson, HttpStatus.OK); //Returns the updated person
			}else {
				throw new AddressException(HttpStatus.NOT_FOUND, bundle.getString("person_not_found"));
			}

		}catch(AddressException e) {
			e.printStackTrace();
			return new ResponseEntity<String>(e.getMessage(), e.getHttp());
		}
	}
/**
	 * Updates a user specified person at the id passed
	 * @param id ID of the person to be updated
	 * @param person The new person to update the current person
	 * @return A person object
	 */
Updates a user specified person at the id passed
@param id ID of the person to be updated
@param person The new person to update the current person
@return A person object
Updates a user specified person at the id passed @param id ID of the person to be updated @param person The new person to update the current person @return A person object
@PutMapping("/{id}")
	@ApiOperation(value = "Updates a user specified person at the id passed", response = Person.class)
	@ApiResponses(value = {
			@ApiResponse(code = 200, message = "The updated person"),
			@ApiResponse(code = 400, message = "Person already exists"),
			@ApiResponse(code = 404, message = "Person not found"),
			@ApiResponse(code = 500, message = "Backend error")})
	public ResponseEntity updatePerson(@PathVariable int id, @RequestBody Person person) {
		try {
			Person updatedPerson = personHelper.update(conn, id, person); 
			if(updatedPerson.equals(person)) { 
				return new ResponseEntity<Person>(updatedPerson, HttpStatus.OK); 
			}else {
				throw new AddressException(HttpStatus.NOT_FOUND, bundle.getString("person_not_found"));
			}
		}catch(AddressException e) {
			e.printStackTrace();
			return new ResponseEntity<String>(e.getMessage(), e.getHttp());
		}
	}
@ PutMapping ( "/{id}" ) @ ApiOperation ( value = "Updates a user specified person at the id passed" , response = Person . class ) @ ApiResponses ( value = { @ ApiResponse ( code = 200 , message = "The updated person" ) , @ ApiResponse ( code = 400 , message = "Person already exists" ) , @ ApiResponse ( code = 404 , message = "Person not found" ) , @ ApiResponse ( code = 500 , message = "Backend error" ) } ) public ResponseEntity updatePerson ( @ PathVariable int id , @ RequestBody Person person ) { try { Person updatedPerson = personHelper . update ( conn , id , person ) ; if ( updatedPerson . equals ( person ) ) { return new ResponseEntity < Person > ( updatedPerson , HttpStatus . OK ) ; } else { throw new AddressException ( HttpStatus . NOT_FOUND , bundle . getString ( "person_not_found" ) ) ; } } catch ( AddressException e ) { e . printStackTrace ( ) ; return new ResponseEntity < String > ( e . getMessage ( ) , e . getHttp ( ) ) ; } }
Updates a user specified person at the id passed
 @param id ID of the person to be updated
 @param person The new person to update the current person
 @return A person object
Updates a user specified person at the id passed @param id ID of the person to be updated @param person The new person to update the current person @return A person object
//Updates a person at the given id //Makes sure the user passed person and the returned person are the same //Returns the updated person