| Interface and Description |
|---|
| freemarker.template.TemplateMethodModel
Use
TemplateMethodModelEx instead. This interface is from the old times when the only kind of
value you could pass in was string. |
| Class and Description |
|---|
| freemarker.template.utility.CaptureOutput
Use block-assignments instead, like
<assign x>...</assign>. |
| freemarker.template.utility.Collections12
Not needed anymore, as FreeMarker now requires higher than Java 1.3
|
| freemarker.core.CommandLine
Will be removed, as a main method in a server-side library is marked as a security issue by many tools.
|
| freemarker.core.FreeMarkerTree
Will be removed, as Swing classes aren't accessible on Google App Engine.
|
| freemarker.ext.ant.FreemarkerXmlTask
FMPP is a more complete solution.
|
| freemarker.ext.jdom.NodeListModel
Use
NodeModel instead. |
| freemarker.ext.xml.NodeListModel
Use
NodeModel instead. |
| freemarker.template.SimpleList
Use SimpleSequence instead.
|
| Field and Description |
|---|
| freemarker.template.ObjectWrapper.BEANS_WRAPPER
Use
BeansWrapperBuilder.build() instead; this instance isn't read-only
and thus can't be trusted. |
| freemarker.template.Configuration.DEFAULT_INCOMPATIBLE_ENHANCEMENTS
Use
Configuration.DEFAULT_INCOMPATIBLE_IMPROVEMENTS instead. |
| freemarker.template.ObjectWrapper.DEFAULT_WRAPPER
Use
BeansWrapperBuilder.build() instead; this instance isn't
read-only and thus can't be trusted. |
| freemarker.template.Configuration.INCOMPATIBLE_ENHANCEMENTS
Use
Configuration.INCOMPATIBLE_IMPROVEMENTS instead. |
| freemarker.template.Configuration.PARSED_DEFAULT_INCOMPATIBLE_ENHANCEMENTS
Use
Configuration.DEFAULT_INCOMPATIBLE_IMPROVEMENTS instead. |
| freemarker.template.ObjectWrapper.SIMPLE_WRAPPER
No replacement as it was seldom if ever used by anyone; this instance isn't
read-only and thus can't be trusted.
|
| freemarker.core.ParseException.specialConstructor
Will be remove without replacement in 2.4.
|
| Method and Description |
|---|
| freemarker.ext.beans.BeansWrapper.finetuneMethodAppearance(Class, Method, BeansWrapper.MethodAppearanceDecision)
Use
BeansWrapper.setMethodAppearanceFineTuner(MethodAppearanceFineTuner);
no need to extend this class anymore.
Soon this method will be final, so trying to override it will break your app.
Note that if the methodAppearanceFineTuner property is set to non-null, this method is not
called anymore. |
| freemarker.template.TemplateException.getCauseException()
Java 1.4 has introduced
Throwable.getCause() - use that instead, especially as this can't return
runtime exceptions and errors as is. |
| freemarker.template.Configuration.getDefaultConfiguration()
The usage of the static singleton (the "default")
Configuration instance can easily cause erroneous, unpredictable
behavior. This is because multiple independent software components may use
FreeMarker internally inside the same application, so they will interfere
because of the common Configuration instance. Each such component
should use its own private Configuration object instead, that it
typically creates with new Configuration() when the component
is initialized. |
| freemarker.ext.beans.BeansWrapper.getDefaultInstance()
Use
BeansWrapperBuilder instead. The instance returned here is not read-only, so it's
dangerous to use. |
| freemarker.template.WrappingTemplateModel.getDefaultObjectWrapper()
Don't depend on this object, as it can be replace by anybody in the same JVM.
|
| freemarker.template.Configuration.getIncompatibleEnhancements()
Use
Configuration.getIncompatibleImprovements() instead. |
| freemarker.ext.beans.BeansWrapper.getInstance(Object, ModelFactory)
override
BeansWrapper.getModelFactory(Class) instead. Using this
method will now bypass wrapper caching (if it's enabled) and always
result in creation of a new wrapper. This method will be removed in 2.4 |
| freemarker.template.Configuration.getParsedIncompatibleEnhancements()
Use
Configuration.getIncompatibleImprovements() instead. |
| freemarker.core.Configurable.getSetting(String)
It's not possible in general to convert setting values to string,
and thus it's impossible to ensure that
Configurable.setSetting(String, String) will work with
the returned value correctly. |
| freemarker.core.Configurable.getSettings()
This method was always defective, and certainly it always
will be. Don't use it. (Simply, it's hardly possible in general to
convert setting values to text in a way that ensures that
Configurable.setSettings(Properties) will work with them correctly.) |
| freemarker.template.Configuration.getVersionNumber()
Use
Configuration.getVersion() instead. |
| freemarker.template.utility.StringUtil.HTMLEnc(String)
Use
StringUtil.XHTMLEnc(String) instead, because it escapes apostrophe-quote too. |
| freemarker.template.utility.DeepUnwrap.premissiveUnwrap(TemplateModel)
the name of this method is mistyped. Use
DeepUnwrap.permissiveUnwrap(TemplateModel) instead. |
| freemarker.cache.TemplateCache.setConfiguration(Configuration)
Use the
TemplateCache.TemplateCache(TemplateLoader, CacheStorage, Configuration) constructor. |
| freemarker.template.Configuration.setDefaultConfiguration(Configuration)
Using the "default"
Configuration instance can
easily lead to erroneous, unpredictable behaviour.
See more here.... |
| freemarker.template.WrappingTemplateModel.setDefaultObjectWrapper(ObjectWrapper)
This method has VM-wide effect, which makes it unsuitable for application where multiple components
might use FreeMarker internally.
|
| freemarker.template.Configuration.setIncompatibleEnhancements(String)
Use
Configuration.Configuration(Version), or
as last chance, Configuration.setIncompatibleImprovements(Version) instead. |
| freemarker.template.Configuration.setStrictSyntaxMode(boolean)
Only
true (the default) value will be supported sometimes in the future. |