  We investigate the stability of $\pi$-phase in a polarized superfluid Fermi
gas ($N_\uparrow>N_\downarrow$, where $N_\sigma$ is the number of atoms in the
hyperfine state described by pseudospin-$\sigma$). In our previous paper [T.
Kashimura, S. Tsuchiya, and Y. Ohashi, Phys. Rev. A {\bf 82}, 033617 (2010)],
we showed that excess atoms ($\Delta N=N_\uparrow-N_\downarrow$) localized
around a potential barrier embedded in the system induces the $\pi$-phase at
T=0, where the phase of superfluid order parameter differ by $\pi$ across the
junction. In this paper, we extend our previous work to include temperature
effects within the mean-field theory. We show that the $\pi$-phase is stable
even at finite temperatures, although transition from the $\pi$-phase to
0-phase eventually occurs at a certain temperature. Our results indicate that
the $\pi$-phase is experimentally accessible in cold Fermi gases.
