Github user afs commented on a diff in the pull request:

    https://github.com/apache/jena/pull/334#discussion_r158602513
  
    --- Diff: 
jena-arq/src/main/java/org/apache/jena/riot/resultset/rw/ResultsWriter.java ---
    @@ -77,19 +79,33 @@ private ResultsWriter(Lang lang, Context context) {
             this.context = context;
         }
     
    -    public void write(String url, ResultSet resultSet) {
    -        throw new NotImplemented();
    +    /** Write a result set, using the configurartion of the {@code 
ResultWriter}, to a file */ 
    +    public void write(String filename, ResultSet resultSet) {
    +        Objects.requireNonNull(filename);
    +        Objects.requireNonNull(resultSet);
    +        try ( OutputStream out = openURL(filename) ) {
    +            write(out, resultSet);
    +        } catch (IOException ex) { IO.exception(ex); }
         }
         
    +    /** Write a result set, using the configurartion of the {@code 
ResultWriter}, to an {@code OutputStream}. */ 
         public void write(OutputStream output, ResultSet resultSet) {
    +        Objects.requireNonNull(output);
    +        Objects.requireNonNull(resultSet);
             write(output, resultSet, null, lang);
         }
         
    -    public void write(String url, boolean booleanResult) {
    -        throw new NotImplemented();
    +    /** Write a boolean result, using the configurartion of the {@code 
ResultWriter}, to a file */ 
    +    public void write(String filename, boolean booleanResult) {
    +        Objects.requireNonNull(booleanResult);
    --- End diff --
    
    Thanks - fixed. Testing the wrong argument; 
`Objects.requireNonNull(booleanResult)` is never null!


---

Reply via email to