src/share/classes/com/sun/tools/javac/comp/Lower.java

changeset 1260
96a8278e323c
parent 1157
3809292620c9
child 1280
5c0b3faeb0b0
equal deleted inserted replaced
1259:833bab705918 1260:96a8278e323c
1604 closeIfStatement, 1604 closeIfStatement,
1605 null))); 1605 null)));
1606 } 1606 }
1607 1607
1608 private JCStatement makeResourceCloseInvocation(JCExpression resource) { 1608 private JCStatement makeResourceCloseInvocation(JCExpression resource) {
1609 // convert to AutoCloseable if needed
1610 if (types.asSuper(resource.type, syms.autoCloseableType.tsym) == null) {
1611 resource = (JCExpression) convert(resource, syms.autoCloseableType);
1612 }
1613
1609 // create resource.close() method invocation 1614 // create resource.close() method invocation
1610 JCExpression resourceClose = makeCall(resource, 1615 JCExpression resourceClose = makeCall(resource,
1611 names.close, 1616 names.close,
1612 List.<JCExpression>nil()); 1617 List.<JCExpression>nil());
1613 return make.Exec(resourceClose); 1618 return make.Exec(resourceClose);

mercurial