Skip to content

Commit

Permalink
Merge branch 'master' into SearchFilter-JDT#18
Browse files Browse the repository at this point in the history
  • Loading branch information
ShahzaibIbrahim authored Apr 18, 2024
2 parents ef1edce + e6fdac4 commit a117e07
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@
class TestMethodsCache {
/**
* An <code>AutoCloseable</code> that can contain nested instances and can run a
* <code>Runnable</code> upon closing the <i>outer</i> instance. <br/>
* <code>Runnable</code> upon creating the <i>outer</i> instance. <br/>
* <br/>
* Example:
*
* <pre>
*
* try (var outer= new NestedAutoCloseable(() -> System.out.println("Bye bye outer"))) {
* try (var inner= new NestedAutoCloseable(() -> System.out.println("Bye bye inner"))) {
* try (var outer= new NestedAutoCloseable(() -> System.out.println("Hello outer"))) { // prints "Hello outer"
* try (var inner= new NestedAutoCloseable(() -> System.out.println("Hello inner"))) { // doesn't print anything
* // ...
* } // doesn't print anything
* } // prints "Bye bye outer"
* }
* }
* </pre>
*/
private static class NestedAutoCloseable implements AutoCloseable {
Expand Down

0 comments on commit a117e07

Please sign in to comment.