Relax the assertion on the inferred resource type. Now we only require that the
resource type should have a (public) close() method.

The old version requires the resource type implements AutoCloseable. When the classpath provided to Desugar has some problems, the resource type may not implement AutoCloseable, though it has the close() method.

RELNOTES:n/a.
PiperOrigin-RevId: 180950815
GitOrigin-RevId: 7bde688a21b781caa666fe2bebe4482cf987270b
Change-Id: Id0a03911e12f903ce62fec72317a7dbc8d311287
8 files changed
tree: eabf3b8d4558642be72fc3d82dd973b02c90c1e7
  1. java/
  2. test/