1919
2020package freemarker .template ;
2121
22+ import freemarker .cache .*;
23+ import freemarker .cache .TemplateCache .MaybeMissingTemplate ;
24+ import freemarker .core .*;
25+ import freemarker .ext .beans .BeansWrapper ;
26+ import freemarker .ext .beans .BeansWrapperBuilder ;
27+ import freemarker .log .Logger ;
28+ import freemarker .template .utility .*;
29+
2230import java .io .File ;
2331import java .io .IOException ;
2432import java .io .Writer ;
2533import java .lang .reflect .InvocationTargetException ;
2634import java .net .URLConnection ;
2735import java .text .Collator ;
2836import java .text .DecimalFormat ;
29- import java .util .Collection ;
30- import java .util .Collections ;
31- import java .util .HashMap ;
32- import java .util .HashSet ;
33- import java .util .Iterator ;
34- import java .util .LinkedHashMap ;
35- import java .util .List ;
36- import java .util .Locale ;
37- import java .util .Map ;
37+ import java .util .*;
3838import java .util .Map .Entry ;
39- import java .util .Properties ;
40- import java .util .Set ;
41- import java .util .TimeZone ;
42- import java .util .TreeSet ;
4339import java .util .concurrent .ConcurrentHashMap ;
4440import java .util .concurrent .ConcurrentMap ;
4541
46- import freemarker .cache .CacheStorage ;
47- import freemarker .cache .ClassTemplateLoader ;
48- import freemarker .cache .FileTemplateLoader ;
49- import freemarker .cache .MruCacheStorage ;
50- import freemarker .cache .MultiTemplateLoader ;
51- import freemarker .cache .SoftCacheStorage ;
52- import freemarker .cache .TemplateCache ;
53- import freemarker .cache .TemplateCache .MaybeMissingTemplate ;
54- import freemarker .cache .TemplateConfigurationFactory ;
55- import freemarker .cache .TemplateLoader ;
56- import freemarker .cache .TemplateLookupContext ;
57- import freemarker .cache .TemplateLookupStrategy ;
58- import freemarker .cache .TemplateNameFormat ;
59- import freemarker .cache .URLTemplateLoader ;
60- import freemarker .core .BugException ;
61- import freemarker .core .CFormat ;
62- import freemarker .core .CSSOutputFormat ;
63- import freemarker .core .CombinedMarkupOutputFormat ;
64- import freemarker .core .Configurable ;
65- import freemarker .core .Environment ;
66- import freemarker .core .HTMLOutputFormat ;
67- import freemarker .core .JSONOutputFormat ;
68- import freemarker .core .JavaScriptOrJSONCFormat ;
69- import freemarker .core .JavaScriptOutputFormat ;
70- import freemarker .core .LegacyCFormat ;
71- import freemarker .core .MarkupOutputFormat ;
72- import freemarker .core .OutputFormat ;
73- import freemarker .core .ParseException ;
74- import freemarker .core .ParserConfiguration ;
75- import freemarker .core .PlainTextOutputFormat ;
76- import freemarker .core .RTFOutputFormat ;
77- import freemarker .core .TemplateConfiguration ;
78- import freemarker .core .TemplateMarkupOutputModel ;
79- import freemarker .core .UndefinedOutputFormat ;
80- import freemarker .core .UnregisteredOutputFormatException ;
81- import freemarker .core .XHTMLOutputFormat ;
82- import freemarker .core .XMLOutputFormat ;
83- import freemarker .core .XSCFormat ;
84- import freemarker .core ._CoreAPI ;
85- import freemarker .core ._DelayedJQuote ;
86- import freemarker .core ._MiscTemplateException ;
87- import freemarker .core ._ObjectBuilderSettingEvaluator ;
88- import freemarker .core ._SettingEvaluationEnvironment ;
89- import freemarker .core ._SortedArraySet ;
90- import freemarker .core ._UnmodifiableCompositeSet ;
91- import freemarker .ext .beans .BeansWrapper ;
92- import freemarker .ext .beans .BeansWrapperBuilder ;
93- import freemarker .log .Logger ;
94- import freemarker .template .utility .CaptureOutput ;
95- import freemarker .template .utility .ClassUtil ;
96- import freemarker .template .utility .Constants ;
97- import freemarker .template .utility .HtmlEscape ;
98- import freemarker .template .utility .NormalizeNewlines ;
99- import freemarker .template .utility .NullArgumentException ;
100- import freemarker .template .utility .SecurityUtilities ;
101- import freemarker .template .utility .StandardCompress ;
102- import freemarker .template .utility .StringUtil ;
103- import freemarker .template .utility .XmlEscape ;
104-
10542/**
10643 * <b>The main entry point into the FreeMarker API</b>; encapsulates the configuration settings of FreeMarker,
10744 * also serves as a central template-loading and caching service.
@@ -877,7 +814,7 @@ public Configuration() {
877814 * <li><p>
878815 * {@link DefaultObjectWrapper} has some minor changes with {@code incompatibleImprovements} 2.3.24;
879816 * check them out at {@link DefaultObjectWrapper#DefaultObjectWrapper(Version)}. It's important to know
880- * that if you set the {@code object_wrapper} setting (to an other value than {@code "default"}), rather
817+ * that if you set the {@code object_wrapper} setting (to another value than {@code "default"}), rather
881818 * than leaving it on its default value, the {@code object_wrapper} won't inherit the
882819 * {@code incompatibleImprovements} of the {@link Configuration}. In that case, if you want the 2.3.24
883820 * improvements of {@link DefaultObjectWrapper}, you have to set it in the {@link DefaultObjectWrapper}
@@ -938,7 +875,7 @@ public Configuration() {
938875 * exception (though almost all implementation does), you couldn't use said directives inside the
939876 * transformed block. It's very unlikely that user code is affected by this, partially because these aren't
940877 * commonly implemented interfaces (especially not {@link TransformControl}), and because it's unlikely
941- * that templates utilize the the bug that's not fixed.
878+ * that templates utilize the bug that's not fixed.
942879 * </ul>
943880 * </li>
944881 * <li><p>
@@ -997,7 +934,7 @@ public Configuration() {
997934 * <p>
998935 * 2.3.33 (or higher):
999936 * <ul>
1000- * <li><p>Comparing strings is now way faster. If your template does lot of string comparisons, this can
937+ * <li><p>Comparing strings is now way faster. If your template does a lot of string comparisons, this can
1001938 * mean very significant speedup. We now use a simpler way of comparing strings, and because templates
1002939 * were only ever allowed equality comparisons between strings (not less-than, or greater-than), it's very
1003940 * unlikely to change the behavior of your templates. (Technically, what changes is that instead of using
@@ -1008,8 +945,8 @@ public Configuration() {
1008945 * normalization, so combining characters won't break your comparisons.)</p></li>
1009946 * <li><p>
1010947 * The default {@link Configuration#setObjectWrapper(ObjectWrapper) object_wrapper} now exposes Java
1011- * records public methods with 0-arguments and non-void return type are now exposed both as properties,
1012- * and as methods; see {@link BeansWrapper#BeansWrapper(Version)}.
948+ * records public methods with 0-arguments and non-void return type both as properties and as methods;
949+ * see {@link BeansWrapper#BeansWrapper(Version)}.
1013950 * </ul>
1014951 * </li>
1015952 * <li>
@@ -1025,6 +962,19 @@ public Configuration() {
1025962 * text, just as it's done for any other FTL tags.
1026963 * </ul>
1027964 * </li>
965+ * <li>
966+ * <p>
967+ * 2.3.35 (or higher):
968+ * <ul>
969+ * <li><p>
970+ * The default {@link Configuration#setObjectWrapper(ObjectWrapper) object_wrapper} now exposes "is"
971+ * methods (like {@code isExpired()}) as a JavaBeans property (like {@code obj.expirted}) even if the
972+ * return type is not primitive {@code boolean}, but {@code Boolean}. The method will be still also be
973+ * exposed as a plain method ({@code obj.isExpirted()}), so this is a mostly backward compatible change.
974+ * see {@link BeansWrapper#BeansWrapper(Version)}.
975+ * </li>
976+ * </ul>
977+ * </li>
1028978 * </ul>
1029979 *
1030980 * @throws IllegalArgumentException
0 commit comments