The Greenbrier Companies, a U.S. transportation company, says the war in Ukraine more than doubled its fiscal second-quarter earnings.