Why is a country like Poland that is vehemently anti-refugee..
This is an incorrect statement.
Poland has been taking Ukrainian and Belarusian immigrants for years. In fact, they showed the number of existing white immigrants to the EU to justify their non-acceptance of Syrian refugees during the mass migration of Syrians.
so accommodating to the people of Ukraine?
The explanation was given here: Here’s why Poland takes in millions of migrants... just not Muslim ones
In summary, they became scared seeing the situation in Germany. Therefore, they were so selective in taking Syrian refugees.
My personal opinion:
There are certain situations in this world that can never be proven definitely. Which explanation prevails depends on the strength of propaganda machinery and muscle power. And, people take advantage of this fact.
For example, the Israeli-Palestinian conflict has different explanations from different parties. The invasion of Iraq has different explanations from different parties.
If Syrian refugees were not creating some incidents, e.g. stabbings, rapes, etc., in Germany, there could have been other explanations brought out by the Polish officials.
This is how this world goes.
I would say, their assessment was correct to some extent. Not only Germany but also Turkey and Bangladesh have been facing problems with the immigrant/refugee population regarding robbery and rape. It remains to be seen how the Ukrainian refugees fare for Poland.
Note: I live in Poland. The Eastern part of Poland, which used to be a part of the Russian empire, is vehemently xenophobic, if not racist, to colored people.