How to show finiteness in Exercise 12.4 of Matsumura? In this exercise, we need to show that for a Krull ring $A$, then an ideal of $A$ is divisorial iff it can be expressed as the intersection of a finite number of height 1 primary ideals.
Using hints of the book, I finally understand his hint below except last sentence.

Let $\mathscr{P}$ be the set of height 1 prime ideals of $A$, and for $\mathfrak{p} \in \mathscr{P}$ by Theorem 12.3 $A_{\mathfrak{p}}$ is DVR, so Dedekind, hence every fractional ideals of $A_{\mathfrak{p}}$ is invertible. Hence, by Theorem 11.3 (iii), set $I_{\mathfrak{p}}=a_{\mathfrak{p}} A_{\mathfrak{p}}.$ for some $a_{\mathfrak{p}} \in K$ Then $x \in \tilde{I} \Leftrightarrow x I^{-1} \subset A_{\mathfrak{p}}$ for all $\mathfrak{p} \in \mathscr{P} \Leftrightarrow x \in a_{\mathfrak{p}} A$ for all $\mathfrak{p} \in \mathscr{P}$. Hence $\tilde{I}$ is the intersection of $I_{\mathfrak{p}} \cap A$ taken over the finitely many $\mathfrak{p} \in \mathscr{P}$ such that $I_{\mathfrak{p}} \neq A_{\mathfrak{p}}$.

Why there are finitely many such $\mathfrak{p}$ occur? Since $A$ may be not Noetherian, it may be not Dedekind domain, thus $I$ may not be finitely generated, so there may be infinitely many such $\mathfrak{p}$. Could you explain how to see this finiteness condition?
 A: From the comment of @user26857 , I've understood how can the finitely many primes.
Notes that by Theorem 12.3, the family of DVR generating $A$ is $\{A_{\mathfrak{p}}\}_{\mathfrak{p} \in \mathcal{P}}$, and since $A$ is Krull ring, the valuation of $x$ in $A_{\mathfrak{p}}$ is 0 except finitely many such localizations. If $x \in a_{\mathfrak{p}}A_{\mathfrak{p}}$ has zero from the valuation of $A_{\mathfrak{p}}$, then $x=a_{\mathfrak{p}}b$ for some $b \in A_{\mathfrak{p}}$ is unit in $A_{\mathfrak{p}}$. Hence, $I_{\mathfrak{p}} = A_{\mathfrak{p}}$ since $I$ is not only a fractional ideal but also the ideal of $A_{\mathfrak{p}}$. Suppose $\{A_{\mathfrak{p}_{i}}\}_{i=1}^{m}$ be such localizations which $x$ has nontrivial valuation. Then, we may write
$$I =(\bigcap_{i=1}^{n}I_{\mathfrak{p}_{i}} \cap A) \cap (\bigcap_{\mathfrak{p} \in \mathcal{P} \setminus \{ \mathfrak{p}_{i}\}}(I_{\mathfrak{p}} \cap A))= (\bigcap_{i=1}^{n}I_{\mathfrak{p}_{i}} \cap A) \cap (\bigcap_{\mathfrak{p} \in \mathcal{P} \setminus \{ \mathfrak{p}_{i}\}}(A_{\mathfrak{p}} \cap A))= (\bigcap_{i=1}^{n}I_{\mathfrak{p}_{i}} \cap A) \cap A=  (\bigcap_{i=1}^{n}I_{\mathfrak{p}_{i}} \cap A).$$
