You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@freemarker.apache.org by dd...@apache.org on 2017/03/07 14:29:57 UTC

[1/3] incubator-freemarker git commit: Added /.out to gitignore

Repository: incubator-freemarker
Updated Branches:
  refs/heads/3 df580b495 -> 4f723584c


Added /.out to gitignore


Project: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/commit/651633c0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/tree/651633c0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/diff/651633c0

Branch: refs/heads/3
Commit: 651633c06e4f0454f5a105be2fea69d4cae99fab
Parents: df580b4
Author: ddekany <dd...@apache.org>
Authored: Tue Mar 7 15:26:39 2017 +0100
Committer: ddekany <dd...@apache.org>
Committed: Tue Mar 7 15:26:39 2017 +0100

----------------------------------------------------------------------
 .gitignore | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/651633c0/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index f30cd69..28532ff 100644
--- a/.gitignore
+++ b/.gitignore
@@ -19,6 +19,7 @@
 *.iws
 *.ipr
 .idea_modules/
+.out/
 
 *.tmp
 *.bak


[3/3] incubator-freemarker git commit: Fixed Java 8 support placeholder (forward ported from 2.3-gae)

Posted by dd...@apache.org.
Fixed Java 8 support placeholder (forward ported from 2.3-gae)


Project: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/commit/4f723584
Tree: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/tree/4f723584
Diff: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/diff/4f723584

Branch: refs/heads/3
Commit: 4f723584c4c1ddfd7e48e11b86835e954d50df22
Parents: 80300dd
Author: ddekany <dd...@apache.org>
Authored: Tue Mar 7 15:29:46 2017 +0100
Committer: ddekany <dd...@apache.org>
Committed: Tue Mar 7 15:29:46 2017 +0100

----------------------------------------------------------------------
 README                                          |  4 +-
 build.properties.sample                         |  1 +
 build.xml                                       | 32 +++++++++++++--
 .../java/org/apache/freemarker/core/_Java8.java | 34 ++++++++++++++++
 .../org/apache/freemarker/core/_Java8Impl.java  | 43 ++++++++++++++++++++
 .../org/apache/freemarker/core/util/_Java8.java | 32 ---------------
 .../apache/freemarker/core/util/_Java8Impl.java | 39 ------------------
 .../freemarker/core/util/_JavaVersions.java     |  5 ++-
 8 files changed, 112 insertions(+), 78 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/4f723584/README
----------------------------------------------------------------------
diff --git a/README b/README
index c3b68e7..18ab3bf 100644
--- a/README
+++ b/README
@@ -169,7 +169,7 @@ apply it to your development environment:
     Number of imports required for .*: 99
     Number of static imports needed for .*: 1
   - Java -> Installed JRE-s:
-    Ensure that you have JDK 7 installed, and that it was added to Eclipse.
+    Ensure that you have JDK 8 installed, and that it was added to Eclipse.
     Note that it's not JRE, but JDK.
   - Java -> Compiler -> Javadoc:
     "Malformed Javadoc comments": Error
@@ -192,7 +192,7 @@ apply it to your development environment:
         src/test/resources
     - On the "Libraries" tab:
       - Delete everyhing from there, except the "JRE System Library [...]"
-      - Edit "JRE System Library [...]" to "Execution Environment" "JavaSE 1.7"
+      - Edit "JRE System Library [...]" to "Execution Environment" "JavaSE 1.8"
       - Add all jar-s that are directly under the "ide-dependencies" directory
         (use the "Add JARs..." and select all those files).
    - Press "Finish"

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/4f723584/build.properties.sample
----------------------------------------------------------------------
diff --git a/build.properties.sample b/build.properties.sample
index fd366cf..51d253a 100644
--- a/build.properties.sample
+++ b/build.properties.sample
@@ -18,5 +18,6 @@
 # Copy this file to "build.properties" before editing!
 # These propeties should point to the rt.jar-s of the respective J2SE versions:
 boot.classpath.j2se1.7=C:/Program Files/Java/jdk1.7.0_25/jre/lib/rt.jar
+boot.classpath.j2se1.8=C:/Program Files/Java/jdk1.8.0_66/jre/lib/rt.jar
 mvnCommand=C:/Program Files (x86)/maven3/bin/mvn.cmd
 gpgCommand=C:/Program Files (x86)/GNU/GnuPG/pub/gpg.exe
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/4f723584/build.xml
----------------------------------------------------------------------
diff --git a/build.xml b/build.xml
index 1589758..7f5509c 100644
--- a/build.xml
+++ b/build.xml
@@ -46,9 +46,13 @@
   <condition property="has.explicit.boot.classpath.j2se1.7">
     <isset property="boot.classpath.j2se1.7"/>
   </condition>
+  <condition property="has.explicit.boot.classpath.j2se1.8">
+    <isset property="boot.classpath.j2se1.8"/>
+  </condition>
   <condition property="has.all.explicit.boot.classpaths">
     <and>
       <isset property="has.explicit.boot.classpath.j2se1.7"/>
+      <isset property="has.explicit.boot.classpath.j2se1.8"/>
     </and>
   </condition>
   <available property="atLeastJDK8" classname="java.util.function.Predicate"/>
@@ -56,12 +60,17 @@
   <!-- When boot.classpath.j2se* is missing, these will be the defaults: -->
   <!-- Note: Target "dist" doesn't allow using these. -->
   <property name="boot.classpath.j2se1.7" value="${sun.boot.class.path}" />
+  <property name="boot.classpath.j2se1.8" value="${sun.boot.class.path}" />
   
   <!-- For checking the correctness of the boot.classpath.j2se* -->
   <available classpath="${boot.classpath.j2se1.7}"
     classname="java.util.Objects" ignoresystemclasses="true" 
     property="boot.classpath.j2se1.7.correct"
   />
+  <available classpath="${boot.classpath.j2se1.8}"
+    classname="java.time.Instant" ignoresystemclasses="true" 
+    property="boot.classpath.j2se1.8.correct"
+  />
   
   <!-- Set up version/timestamp filters and the version property: -->
   <tstamp>
@@ -192,9 +201,16 @@
       -->the &lt;projectDir>/build.properties file, or wherever you <!--
       -->set it.<!--
     --></fail>
+    <fail unless="boot.classpath.j2se1.8.correct"><!--
+      -->The "boot.classpath.j2se1.8" property value (${boot.classpath.j2se1.8}) <!--
+      -->seems to be an incorrect boot classpath. Please fix it in <!--
+      -->the &lt;projectDir>/build.properties file, or wherever you <!--
+      -->set it.<!--
+    --></fail>
     <echo level="info"><!--
       -->Using boot classpaths:<!--
       -->Java 7: ${boot.classpath.j2se1.7}; <!--
+      -->Java 8: ${boot.classpath.j2se1.8}; <!--
     --></echo>
 
     <!-- Comment out @SuppressFBWarnings, as it causes compilation warnings in dependent Gradle projects -->    
@@ -226,7 +242,8 @@
       classpathref="ivy.dep"
       bootclasspath="${boot.classpath.j2se1.7}"
       excludes="
-    	org/apache/freemarker/servlet/**"
+        org/apache/freemarker/core/_Java?*Impl.java,
+        org/apache/freemarker/servlet/**"
     >
       <src>
         <pathelement location="build/src-main-java-filtered" />
@@ -234,6 +251,15 @@
       </src>
     </javac>
     
+    <ivy:cachepath conf="build.base" pathid="ivy.dep" />
+    <javac srcdir="build/src-main-java-filtered" destdir="build/classes" deprecation="off" 
+      debug="on" optimize="off" target="1.8" source="1.8" encoding="utf-8"
+      includeantruntime="false"
+      classpathref="ivy.dep"
+      bootclasspath="${boot.classpath.j2se1.8}"
+      includes="org/apache/freemarker/core/_Java8Impl.java"
+    />
+    
     <rmic
       base="build/classes" includes="org/apache/freemarker/core/debug/impl/Rmi*Impl.class"
       classpathref="ivy.dep"
@@ -282,11 +308,11 @@
   
     <ivy:cachepath conf="build.test" pathid="ivy.dep.build.test" />
     <javac srcdir="src/test/java" destdir="build/test-classes" deprecation="off" 
-      debug="on" optimize="off" target="1.7" source="1.7" encoding="utf-8"
+      debug="on" optimize="off" target="1.8" source="1.8" encoding="utf-8"
       includeantruntime="false"
       classpath="build/classes"
       classpathref="ivy.dep.build.test"
-      bootclasspath="${boot.classpath.j2se1.7}"
+      bootclasspath="${boot.classpath.j2se1.8}"
     />
     <copy toDir="build/test-classes">
       <fileset dir="src/test/resources"

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/4f723584/src/main/java/org/apache/freemarker/core/_Java8.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/freemarker/core/_Java8.java b/src/main/java/org/apache/freemarker/core/_Java8.java
new file mode 100644
index 0000000..037ef9a
--- /dev/null
+++ b/src/main/java/org/apache/freemarker/core/_Java8.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.freemarker.core;
+
+import java.lang.reflect.Method;
+
+/**
+ * Used internally only, might changes without notice!
+ * Used for accessing functionality that's only present in Java 6 or later.
+ */
+public interface _Java8 {
+
+    /**
+     * Returns if it's a Java 8 "default method".
+     */
+    boolean isDefaultMethod(Method method);
+}

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/4f723584/src/main/java/org/apache/freemarker/core/_Java8Impl.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/freemarker/core/_Java8Impl.java b/src/main/java/org/apache/freemarker/core/_Java8Impl.java
new file mode 100644
index 0000000..9fa40c9
--- /dev/null
+++ b/src/main/java/org/apache/freemarker/core/_Java8Impl.java
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.freemarker.core;
+
+import java.lang.reflect.Method;
+
+/**
+ * Used internally only, might changes without notice!
+ * Used for accessing functionality that's only present in Java 6 or later.
+ */
+// Compile this against Java 8
+@SuppressWarnings("Since15") // For IntelliJ inspection
+public final class _Java8Impl implements _Java8 {
+    
+    public static final _Java8 INSTANCE = new _Java8Impl();
+
+    private _Java8Impl() {
+        // Not meant to be instantiated
+    }
+
+    @Override
+    public boolean isDefaultMethod(Method method) {
+        return method.isDefault();
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/4f723584/src/main/java/org/apache/freemarker/core/util/_Java8.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/freemarker/core/util/_Java8.java b/src/main/java/org/apache/freemarker/core/util/_Java8.java
deleted file mode 100644
index 42492bd..0000000
--- a/src/main/java/org/apache/freemarker/core/util/_Java8.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.freemarker.core.util;
-
-/**
- * Used internally only, might changes without notice!
- * Used for accessing functionality that's only present in Java 6 or later.
- */
-public interface _Java8 {
-
-    /**
-     * This is just a placeholder. Remove this when we have some real functionality here.
-     */
-    void doSomething();
-    
-}

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/4f723584/src/main/java/org/apache/freemarker/core/util/_Java8Impl.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/freemarker/core/util/_Java8Impl.java b/src/main/java/org/apache/freemarker/core/util/_Java8Impl.java
deleted file mode 100644
index a0c88bd..0000000
--- a/src/main/java/org/apache/freemarker/core/util/_Java8Impl.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.freemarker.core.util;
-
-/**
- * Used internally only, might changes without notice!
- * Used for accessing functionality that's only present in Java 6 or later.
- */
-// Compile this against Java 8
-public final class _Java8Impl implements _Java8 {
-    
-    public static final _Java8 INSTANCE = new _Java8Impl();
-
-    private _Java8Impl() {
-        // Not meant to be instantiated
-    }
-
-    @Override
-    public void doSomething() {
-        // Do something that requires Java 8 here
-    }
-    
-}

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/4f723584/src/main/java/org/apache/freemarker/core/util/_JavaVersions.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/freemarker/core/util/_JavaVersions.java b/src/main/java/org/apache/freemarker/core/util/_JavaVersions.java
index e0665be..10f79fe 100644
--- a/src/main/java/org/apache/freemarker/core/util/_JavaVersions.java
+++ b/src/main/java/org/apache/freemarker/core/util/_JavaVersions.java
@@ -20,6 +20,7 @@ package org.apache.freemarker.core.util;
 
 import org.apache.freemarker.core.Version;
 import org.apache.freemarker.core._CoreLogs;
+import org.apache.freemarker.core._Java8;
 
 /**
  * Used internally only, might changes without notice!
@@ -60,11 +61,11 @@ public final class _JavaVersions {
         _Java8 java8;
         if (IS_AT_LEAST_8) {
             try {
-                java8 = (_Java8) Class.forName("org.apache.freemarker.core.util._Java8Impl")
+                java8 = (_Java8) Class.forName("org.apache.freemarker.core._Java8Impl")
                         .getField("INSTANCE").get(null);
             } catch (Exception e) {
                 try {
-                    _CoreLogs.RUNTIME.error("Failed to access Java 6 functionality", e);
+                    _CoreLogs.RUNTIME.error("Failed to access Java 8 functionality", e);
                 } catch (Exception e2) {
                     // Suppressed
                 }


[2/3] incubator-freemarker git commit: (Some code cleanup forward ported from 2.3-gae)

Posted by dd...@apache.org.
(Some code cleanup forward ported from 2.3-gae)


Project: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/commit/80300dd4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/tree/80300dd4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/diff/80300dd4

Branch: refs/heads/3
Commit: 80300dd4f285144f249389c5036c4de8ab385bba
Parents: 651633c
Author: ddekany <dd...@apache.org>
Authored: Tue Mar 7 15:28:25 2017 +0100
Committer: ddekany <dd...@apache.org>
Committed: Tue Mar 7 15:28:25 2017 +0100

----------------------------------------------------------------------
 .../core/model/impl/ClassIntrospector.java      |  2 +-
 .../core/model/impl/DefaultObjectWrapper.java   | 32 ++++++++++----------
 .../impl/DefaultObjectWrapperConfiguration.java | 28 ++++++++---------
 3 files changed, 31 insertions(+), 31 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/80300dd4/src/main/java/org/apache/freemarker/core/model/impl/ClassIntrospector.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/freemarker/core/model/impl/ClassIntrospector.java b/src/main/java/org/apache/freemarker/core/model/impl/ClassIntrospector.java
index 0d62ab9..c98fe33 100644
--- a/src/main/java/org/apache/freemarker/core/model/impl/ClassIntrospector.java
+++ b/src/main/java/org/apache/freemarker/core/model/impl/ClassIntrospector.java
@@ -190,7 +190,7 @@ class ClassIntrospector {
      * Returns a {@link ClassIntrospectorBuilder}-s that could be used to create an identical {@link #ClassIntrospector}
      * . The returned {@link ClassIntrospectorBuilder} can be modified without interfering with anything.
      */
-    ClassIntrospectorBuilder getPropertyAssignments() {
+    ClassIntrospectorBuilder createBuilder() {
         return new ClassIntrospectorBuilder(this);
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/80300dd4/src/main/java/org/apache/freemarker/core/model/impl/DefaultObjectWrapper.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/freemarker/core/model/impl/DefaultObjectWrapper.java b/src/main/java/org/apache/freemarker/core/model/impl/DefaultObjectWrapper.java
index f13caf5..f5c9a2c 100644
--- a/src/main/java/org/apache/freemarker/core/model/impl/DefaultObjectWrapper.java
+++ b/src/main/java/org/apache/freemarker/core/model/impl/DefaultObjectWrapper.java
@@ -262,11 +262,11 @@ public class DefaultObjectWrapper implements RichObjectWrapper, WriteProtectable
             // but we need to use the same sharedInrospectionLock forever, because that's what the model factories
             // synchronize on, even during the classIntrospector is being replaced.
             sharedIntrospectionLock = new Object();
-            classIntrospector = new ClassIntrospector(bwConf.classIntrospectorFactory, sharedIntrospectionLock);
+            classIntrospector = new ClassIntrospector(bwConf.classIntrospectorBuilder, sharedIntrospectionLock);
         } else {
             // As this is a read-only DefaultObjectWrapper, the classIntrospector is never replaced, and since it's shared by
             // other DefaultObjectWrapper instances, we use the lock belonging to the shared ClassIntrospector.
-            classIntrospector = bwConf.classIntrospectorFactory.build();
+            classIntrospector = bwConf.classIntrospectorBuilder.build();
             sharedIntrospectionLock = classIntrospector.getSharedLock();
         }
 
@@ -425,9 +425,9 @@ public class DefaultObjectWrapper implements RichObjectWrapper, WriteProtectable
         checkModifiable();
 
         if (classIntrospector.getExposureLevel() != exposureLevel) {
-            ClassIntrospectorBuilder pa = classIntrospector.getPropertyAssignments();
-            pa.setExposureLevel(exposureLevel);
-            replaceClassIntrospector(pa);
+            ClassIntrospectorBuilder builder = classIntrospector.createBuilder();
+            builder.setExposureLevel(exposureLevel);
+            replaceClassIntrospector(builder);
         }
     }
 
@@ -452,9 +452,9 @@ public class DefaultObjectWrapper implements RichObjectWrapper, WriteProtectable
         checkModifiable();
 
         if (classIntrospector.getExposeFields() != exposeFields) {
-            ClassIntrospectorBuilder pa = classIntrospector.getPropertyAssignments();
-            pa.setExposeFields(exposeFields);
-            replaceClassIntrospector(pa);
+            ClassIntrospectorBuilder builder = classIntrospector.createBuilder();
+            builder.setExposeFields(exposeFields);
+            replaceClassIntrospector(builder);
         }
     }
 
@@ -479,9 +479,9 @@ public class DefaultObjectWrapper implements RichObjectWrapper, WriteProtectable
         checkModifiable();
 
         if (classIntrospector.getMethodAppearanceFineTuner() != methodAppearanceFineTuner) {
-            ClassIntrospectorBuilder pa = classIntrospector.getPropertyAssignments();
-            pa.setMethodAppearanceFineTuner(methodAppearanceFineTuner);
-            replaceClassIntrospector(pa);
+            ClassIntrospectorBuilder builder = classIntrospector.createBuilder();
+            builder.setMethodAppearanceFineTuner(methodAppearanceFineTuner);
+            replaceClassIntrospector(builder);
         }
     }
 
@@ -493,9 +493,9 @@ public class DefaultObjectWrapper implements RichObjectWrapper, WriteProtectable
         checkModifiable();
 
         if (classIntrospector.getMethodSorter() != methodSorter) {
-            ClassIntrospectorBuilder pa = classIntrospector.getPropertyAssignments();
-            pa.setMethodSorter(methodSorter);
-            replaceClassIntrospector(pa);
+            ClassIntrospectorBuilder builder = classIntrospector.createBuilder();
+            builder.setMethodSorter(methodSorter);
+            replaceClassIntrospector(builder);
         }
     }
 
@@ -517,10 +517,10 @@ public class DefaultObjectWrapper implements RichObjectWrapper, WriteProtectable
      * Replaces the value of {@link #classIntrospector}, but first it unregisters
      * the model factories in the old {@link #classIntrospector}.
      */
-    private void replaceClassIntrospector(ClassIntrospectorBuilder pa) {
+    private void replaceClassIntrospector(ClassIntrospectorBuilder builder) {
         checkModifiable();
 
-        final ClassIntrospector newCI = new ClassIntrospector(pa, sharedIntrospectionLock);
+        final ClassIntrospector newCI = new ClassIntrospector(builder, sharedIntrospectionLock);
         final ClassIntrospector oldCI;
 
         // In principle this need not be synchronized, but as apps might publish the configuration improperly, or

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/80300dd4/src/main/java/org/apache/freemarker/core/model/impl/DefaultObjectWrapperConfiguration.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/freemarker/core/model/impl/DefaultObjectWrapperConfiguration.java b/src/main/java/org/apache/freemarker/core/model/impl/DefaultObjectWrapperConfiguration.java
index 958c6b3..8ca16de 100644
--- a/src/main/java/org/apache/freemarker/core/model/impl/DefaultObjectWrapperConfiguration.java
+++ b/src/main/java/org/apache/freemarker/core/model/impl/DefaultObjectWrapperConfiguration.java
@@ -35,7 +35,7 @@ public abstract class DefaultObjectWrapperConfiguration implements Cloneable {
 
     private final Version incompatibleImprovements;
 
-    protected ClassIntrospectorBuilder classIntrospectorFactory;
+    protected ClassIntrospectorBuilder classIntrospectorBuilder;
 
     // Properties and their *defaults*:
     private boolean simpleMapWrapper = false;
@@ -74,7 +74,7 @@ public abstract class DefaultObjectWrapperConfiguration implements Cloneable {
                 : DefaultObjectWrapper.normalizeIncompatibleImprovementsVersion(incompatibleImprovements);
         this.incompatibleImprovements = incompatibleImprovements;
 
-        classIntrospectorFactory = new ClassIntrospectorBuilder(incompatibleImprovements);
+        classIntrospectorBuilder = new ClassIntrospectorBuilder(incompatibleImprovements);
     }
 
     /**
@@ -94,7 +94,7 @@ public abstract class DefaultObjectWrapperConfiguration implements Cloneable {
         result = prime * result + (outerIdentity != null ? outerIdentity.hashCode() : 0);
         result = prime * result + (strict ? 1231 : 1237);
         result = prime * result + (useModelCache ? 1231 : 1237);
-        result = prime * result + classIntrospectorFactory.hashCode();
+        result = prime * result + classIntrospectorBuilder.hashCode();
         return result;
     }
 
@@ -115,15 +115,15 @@ public abstract class DefaultObjectWrapperConfiguration implements Cloneable {
         if (outerIdentity != other.outerIdentity) return false;
         if (strict != other.strict) return false;
         if (useModelCache != other.useModelCache) return false;
-        return classIntrospectorFactory.equals(other.classIntrospectorFactory);
+        return classIntrospectorBuilder.equals(other.classIntrospectorBuilder);
     }
 
     protected Object clone(boolean deepCloneKey) {
         try {
             DefaultObjectWrapperConfiguration clone = (DefaultObjectWrapperConfiguration) super.clone();
             if (deepCloneKey) {
-                clone.classIntrospectorFactory
-                        = (ClassIntrospectorBuilder) classIntrospectorFactory.clone();
+                clone.classIntrospectorBuilder
+                        = (ClassIntrospectorBuilder) classIntrospectorBuilder.clone();
             }
             return clone;
         } catch (CloneNotSupportedException e) {
@@ -175,25 +175,25 @@ public abstract class DefaultObjectWrapperConfiguration implements Cloneable {
     }
 
     public int getExposureLevel() {
-        return classIntrospectorFactory.getExposureLevel();
+        return classIntrospectorBuilder.getExposureLevel();
     }
 
     /** See {@link DefaultObjectWrapper#setExposureLevel(int)}. */
     public void setExposureLevel(int exposureLevel) {
-        classIntrospectorFactory.setExposureLevel(exposureLevel);
+        classIntrospectorBuilder.setExposureLevel(exposureLevel);
     }
 
     public boolean getExposeFields() {
-        return classIntrospectorFactory.getExposeFields();
+        return classIntrospectorBuilder.getExposeFields();
     }
 
     /** See {@link DefaultObjectWrapper#setExposeFields(boolean)}. */
     public void setExposeFields(boolean exposeFields) {
-        classIntrospectorFactory.setExposeFields(exposeFields);
+        classIntrospectorBuilder.setExposeFields(exposeFields);
     }
 
     public MethodAppearanceFineTuner getMethodAppearanceFineTuner() {
-        return classIntrospectorFactory.getMethodAppearanceFineTuner();
+        return classIntrospectorBuilder.getMethodAppearanceFineTuner();
     }
 
     /**
@@ -202,15 +202,15 @@ public abstract class DefaultObjectWrapperConfiguration implements Cloneable {
      * the value implements {@link SingletonCustomizer}.
      */
     public void setMethodAppearanceFineTuner(MethodAppearanceFineTuner methodAppearanceFineTuner) {
-        classIntrospectorFactory.setMethodAppearanceFineTuner(methodAppearanceFineTuner);
+        classIntrospectorBuilder.setMethodAppearanceFineTuner(methodAppearanceFineTuner);
     }
 
     MethodSorter getMethodSorter() {
-        return classIntrospectorFactory.getMethodSorter();
+        return classIntrospectorBuilder.getMethodSorter();
     }
 
     void setMethodSorter(MethodSorter methodSorter) {
-        classIntrospectorFactory.setMethodSorter(methodSorter);
+        classIntrospectorBuilder.setMethodSorter(methodSorter);
     }
 
 }