Avoid exception with instanceof

Avoid exception with instanceof rather than cast/catch.

All other callers of ParameterizedTypeImpl.getResolvedTypes()
do an instanceof check rather than generate/catch the
exception.

Test: atest CtsLibcoreTestCases
Change-Id: I6b517e4861e525e53f4d61052fc0aea758d4d830
1 file changed