Skip to content

Commit 2ec0950

Browse files
authored
Added javadoc to XMLParser and notice about not closing the input stream in JavaUtils (#189)
* JavaUtils: Added javadoc that the method doesn't close the input * Added javadoc to XMLParser Signed-off-by: David Matějček <david.matejcek@omnifish.ee> --------- Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
1 parent c0fc248 commit 2ec0950

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

src/main/java/org/apache/xml/security/parser/XMLParser.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,15 @@
2727
*/
2828
public interface XMLParser {
2929

30+
/**
31+
* Parses a document from the input stream.
32+
* Caller is responsible for closing the stream.
33+
*
34+
* @param inputStream
35+
* @param disallowDocTypeDeclarations
36+
* @return {@link Document}
37+
* @throws XMLParserException
38+
*/
3039
Document parse(InputStream inputStream, boolean disallowDocTypeDeclarations) throws XMLParserException;
3140

3241
}

src/main/java/org/apache/xml/security/utils/JavaUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public static void writeBytesToFilename(String filename, byte[] bytes) {
9191

9292
/**
9393
* This method reads all bytes from the given InputStream till EOF and
94-
* returns them as a byte array.
94+
* returns them as a byte array. The method doesn't close the input stream.
9595
*
9696
* @param inputStream
9797
* @return the bytes read from the stream

0 commit comments

Comments
 (0)