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

    https://github.com/apache/storm/pull/2467#discussion_r159120430
  
    --- Diff: 
external/storm-solr/src/main/java/org/apache/storm/solr/schema/SolrFieldTypeFinder.java
 ---
    @@ -70,13 +73,22 @@ public String toString() {
         /**
          * Initiates class containing all the information relating fields with 
their types.
          * This information is parsed from the schema
    -     * @param schema SolrSchema containing the information about fields 
and types
    +     * @param schemaBuilder schemaBuilder to build the information about 
fields and types
          * */
    -    public SolrFieldTypeFinder(Schema schema) {
    -        if (schema == null) {
    -            throw new IllegalArgumentException("Schema object is null");
    +    public SolrFieldTypeFinder(SchemaBuilder schemaBuilder) {
    +        this.schemaBuilder = schemaBuilder;
    +    }
    +
    +    public void initialize() {
    +        if (schemaBuilder == null) {
    +            throw new IllegalArgumentException("schemaBuilder object is 
null");
    --- End diff --
    
    Should this IllegalArgumentException  validation be done in the constructor 
to avoid this exception from occurring at runtime?  If it is intended to be 
done here, perhaps it should be IllegalStateException.


---

Reply via email to