While the reason EU stop Arm sales to China is because of Tienanmen. It was an event that had nothing to do with foreign made weapons. Nor has it decrease dissent arrest or punishment. Arms sales between powers can increase trust. Like US with NATO. If China were to given technology to modernize its equipment even faster it could decrease the whole "CHINA MILITARY IS THREATENING!! Theme that happens in the western world. Also it is in my belief that there is always some sort of loophole in arm deals. So they probably have some of EU arms already.
The EU has every right to sale arms to China, whether some believe it justifiable or not. There are no sanctions preventing the sale of arms to China, so doing so is not violating any sort of international law. Furthermore, the sale of arms to China by the EU may eventually be a deal that encourages China to be a Western ally in the future.
As almost any major entity on Earth does and will likely continue to do, the EU selling weaponry to China is no different from the USA selling arms to the EU. As far as where China stands as an ally has no merit here; we have no right to govern who sells what to who, and if that is the case, then sanctions will need to be placed (causing massive issues for the US' reliance on Chinese importation).