China has been trimming the size of its military since the mid-1980s , when it had about 4.2 million soldiers .