Summary: We already knew not to warn when non-resource `Closeable`'s like `ByteArrayOutputStream` weren't closed, but we still warned on their subtypes. This diff fixes that problem by checking subclasses in the frontend. This also removes the need for Java source code models of non-resource types, so I removed them. Reviewed By: jeremydubreil Differential Revision: D6843413 fbshipit-source-id: 60fe7fbmaster
parent
5d1e889916
commit
bc8fe4fb97
@ -1,20 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2015 - present Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*/
|
||||
|
||||
package java.io;
|
||||
|
||||
public class ByteArrayInputStream extends InputStream implements Closeable {
|
||||
|
||||
public ByteArrayInputStream(byte[] buf) {}
|
||||
|
||||
public ByteArrayInputStream(byte[] buf, int offset, int length) {}
|
||||
|
||||
public void close() {}
|
||||
|
||||
}
|
@ -1,26 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2015 - present Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*/
|
||||
|
||||
package java.io;
|
||||
|
||||
public class ByteArrayOutputStream extends OutputStream implements Closeable {
|
||||
|
||||
public ByteArrayOutputStream() {}
|
||||
|
||||
public ByteArrayOutputStream(int size) {}
|
||||
|
||||
@Override
|
||||
public void write(int b) {}
|
||||
|
||||
@Override
|
||||
public void write(byte[] b, int off, int len) {}
|
||||
|
||||
public void close() {}
|
||||
|
||||
}
|
@ -1,18 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2015 - present Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*/
|
||||
|
||||
package java.io;
|
||||
|
||||
public class StringReader implements Closeable {
|
||||
|
||||
public StringReader(String s) {}
|
||||
|
||||
public void close() {}
|
||||
|
||||
}
|
@ -1,19 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2015 - present Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*/
|
||||
|
||||
package java.io;
|
||||
|
||||
public class StringWriter implements Closeable{
|
||||
|
||||
public StringWriter() {}
|
||||
public StringWriter(int initialSize) {}
|
||||
|
||||
public void close() {}
|
||||
|
||||
}
|
Loading…
Reference in new issue