That headline is complete nonsense, by the way, even though it's already present in the source they cite.
The actual ruling hardly cares that Israel is mentioned in the comparison. The lawsuit is purely about the use of a swastika, which is for the most part illegal here in Germany.
But because the swastika was used in a historical context and clearly with a critical stance towards Nazi Germany, its use is legal here.
That's the whole ruling. It could've also been a comparison Nazis vs. pineapple on pizza. It practically didn't matter.