package io.collap.bryg;

import io.collap.bryg.exception.InvalidInputParameterException;
import io.collap.bryg.model.Model;

import javax.annotation.Nullable;
import java.io.Writer;

/**
 * Implementations of the template interface must be thread-safe, as only a single object is used to render all instances
 * of the template.
 */
public interface Template {

    /**
     * @param model May be null if no parameters are expected.
     * @throws InvalidInputParameterException Thrown when the Model does not contain a variable.
     * @throws java.lang.ClassCastException Thrown when the supplied variable in the Model has a type that can not be
     *                                      casted to the expected type.
     */
    public void render (Writer writer, @Nullable Model model) throws InvalidInputParameterException, ClassCastException;

}

@@ -122,42 +122,8 @@
 l;%0A%0A
-import javax.annotation.Nullable;%0A
 impo
@@ -333,71 +333,8 @@
 /**%0A
-     * @param model May be null if no parameters are expected.%0A
     
@@ -667,18 +667,8 @@
 ter,
- @Nullable
  Mod

Remove nullability of the Model when invoking a template, to reduce problems with global variables.