Claudenw commented on code in PR #233:
URL: https://github.com/apache/creadur-rat/pull/233#discussion_r1564479047


##########
apache-rat-core/src/main/java/org/apache/rat/configuration/builders/NotBuilder.java:
##########
@@ -19,24 +19,23 @@
 package org.apache.rat.configuration.builders;
 
 import org.apache.rat.ConfigurationException;
-import org.apache.rat.analysis.IHeaderMatcher;
 import org.apache.rat.analysis.matchers.NotMatcher;
 
 /**
  * A builder for the NotMatcher.
  */
 public class NotBuilder extends ChildContainerBuilder {
-    
+
     @Override
-    public IHeaderMatcher build() {
+    public NotMatcher build() {
         if (children.size() != 1) {
             throw new ConfigurationException("'not' type matcher requires one 
and only one enclosed matcher");
         }
         return new NotMatcher(getId(), children.get(0).build());
     }
-    
+
     @Override
     public String toString() {
-        return String.format( "NotBuilder: %s", !children.isEmpty() ? 
children.get(0) : null );
+        return String.format("NotBuilder: %s", !children.isEmpty() ? 
children.get(0) : null);

Review Comment:
   The builder can be in a state where the enclosed matcher has not yet been 
constructed.  However, when the `build()` method is called it will throw an 
exception if the enclosed matcher is not defined.  
   
   I suppose the NotBuilder is in a Schrodengers Cat state if the matcher has 
not been defined.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@creadur.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to