#vulnerable code 
                              @Test public void readerEmptyValueObject() throws Exception {
    JsonReader reader = newReader("{}");
    reader.beginObject();
    assertThat(reader.peek()).isEqualTo(JsonReader.Token.END_OBJECT);
    reader.promoteNameToValue();
    assertThat(reader.getPath()).isEqualTo("$.");
    reader.endObject();
    assertThat(reader.getPath()).isEqualTo("$");
  } 
                            #location 9 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                              @Test public void readerEmptyValueObject() throws Exception {
    JsonReader reader = factory.newReader("{}");
    reader.beginObject();
    assertThat(reader.peek()).isEqualTo(JsonReader.Token.END_OBJECT);
    reader.promoteNameToValue();
    assertThat(reader.getPath()).isEqualTo("$.");
    reader.endObject();
    assertThat(reader.getPath()).isEqualTo("$");
  }