Japan probably won't not attack China (I don't see why they would, not proactively at least), that's not what was being asserted. Japan however may defend Taiwan or allies/neighbors in the south china sea should things go hot there elsewise. And Japan have stated at least some interest in doing so which means that if China wants Taiwan, they might have to contend with japan.
These sort of things can work as a deterrent as much as power projection, and they don't have to get into direct violent/physical conflict for there to be diplomatic tension/worsening of relations as a result. I'm not saying this is most effective use of Japan's resources or focus or that China is for sure going to do anything or making any other such claims, just explaining the potential rational for why China would be non-plussed at Japan over F35 purchases even if they don't feel Japan is gunning for them.
Of course, if china has no actual wartime intentions in Japans sphere of influence, then yeah, they probably give much less of a shit. So depends on what their intentions really are as to how they feel about it. The fact that they're publicly broadcasting displeasure is probably not a sign that they're cool with it though.
Any protest from China is just painting themselves as being in a defensive position, whilst they make claims over the oceans and territories that the international community disagrees with. Very much not defensive acts.
Even if Japan doesn't want to defend Taiwan, the close geography makes conflict between china and Japan (and the USA) if China invades Taiwan.