(Minor javadoc content improvement)
diff --git a/src/main/java/freemarker/core/Environment.java b/src/main/java/freemarker/core/Environment.java
index 65563de..bb43571 100644
--- a/src/main/java/freemarker/core/Environment.java
+++ b/src/main/java/freemarker/core/Environment.java
@@ -202,6 +202,14 @@
threadEnv.set(env);
}
+ /**
+ * Creates an environment with the given main (top-level) template that it intends to {@linkplain #process()} later;
+ * typically, it's better to use {@link Template#createProcessingEnvironment(Object, Writer)} instead of this.
+ *
+ * @param template Not {@code null}
+ * @param rootDataModel Not {@code null}
+ * @param out Not {@code null}
+ */
public Environment(Template template, final TemplateHashModel rootDataModel, Writer out) {
super(template);
configuration = template.getConfiguration();
diff --git a/src/main/java/freemarker/template/Template.java b/src/main/java/freemarker/template/Template.java
index 595b6d8..967d222 100644
--- a/src/main/java/freemarker/template/Template.java
+++ b/src/main/java/freemarker/template/Template.java
@@ -413,11 +413,12 @@
}
/**
- * Creates a {@link freemarker.core.Environment Environment} object, using this template, the data-model provided as
- * parameter. You have to call {@link Environment#process()} on the return value to set off the actual rendering.
+ * Creates a {@link freemarker.core.Environment Environment} object, with this template as the main (top-level
+ * template), and the data-model provided as parameter. You have to call {@link Environment#process()} on the return
+ * value to start actual template processing (that is, to run the template, to generate output).
*
* <p>Use this method if you want to do some special initialization on the {@link Environment} before template
- * processing, or if you want to read the {@link Environment} after template processing. Otherwise using
+ * processing, or if you want to read the {@link Environment} after template processing. Otherwise, using
* {@link Template#process(Object, Writer)} is simpler.
*
* <p>Example:
@@ -445,12 +446,12 @@
* TemplateModel x = env.getVariable("x"); // read back a variable set by the template</pre>
*
* @param dataModel the holder of the variables visible from all templates; see {@link #process(Object, Writer)} for
- * more details.
+ * more details. If {@code null}, the data model will be empty.
* @param wrapper The {@link ObjectWrapper} to use to wrap objects into {@link TemplateModel}
* instances. Normally you left it {@code null}, in which case {@link Configurable#getObjectWrapper()} will be
* used.
* @param out The {@link Writer} where the output of the template will go; see {@link #process(Object, Writer)} for
- * more details.
+ * more details. Can't be {@code null}.
*
* @return the {@link Environment} object created for processing. Call {@link Environment#process()} to process the
* template.