Transitions between pitting and intergranular corrosion in AA2024