Obama , who had said Cambridge , Mass . , police " acted stupidly " in arresting black scholar Henry Louis Gates Jr . , declared the white arresting officer was a good man and invited him and the professor to the White House for a beer .