freemarker-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ddek...@apache.org
Subject [04/10] incubator-freemarker git commit: (Private class name typo fix)
Date Sat, 25 Mar 2017 10:52:57 GMT
(Private class name typo fix)


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

Branch: refs/heads/2.3
Commit: ab4efaee1dded69d137ce57965cb8013c6096ec2
Parents: dff2c91
Author: ddekany <ddekany@apache.org>
Authored: Sat Mar 25 11:30:46 2017 +0100
Committer: ddekany <ddekany@apache.org>
Committed: Sat Mar 25 11:30:46 2017 +0100

----------------------------------------------------------------------
 .../freemarker/ext/beans/ClassIntrospector.java | 40 ++++++++++----------
 1 file changed, 20 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/ab4efaee/src/main/java/freemarker/ext/beans/ClassIntrospector.java
----------------------------------------------------------------------
diff --git a/src/main/java/freemarker/ext/beans/ClassIntrospector.java b/src/main/java/freemarker/ext/beans/ClassIntrospector.java
index 915fb42..72e8855 100644
--- a/src/main/java/freemarker/ext/beans/ClassIntrospector.java
+++ b/src/main/java/freemarker/ext/beans/ClassIntrospector.java
@@ -436,7 +436,7 @@ class ClassIntrospector {
                             mergeInPropertyReaderMethod(mergedPRMPs, propName, method);
                         } else { // It's an indexed property reader method
                             mergeInPropertyReaderMethodPair(mergedPRMPs, propName,
-                                    new PropertyReaderedMethodPair(null, method));
+                                    new PropertyReaderMethodPair(null, method));
                         }
                     }
                 }
@@ -465,8 +465,8 @@ class ClassIntrospector {
                 if (propDescObj instanceof Method) {
                     readMethod = (Method) propDescObj;
                     indexedReadMethod = null;
-                } else if (propDescObj instanceof PropertyReaderedMethodPair) {
-                    PropertyReaderedMethodPair prmp = (PropertyReaderedMethodPair) propDescObj;
+                } else if (propDescObj instanceof PropertyReaderMethodPair) {
+                    PropertyReaderMethodPair prmp = (PropertyReaderMethodPair) propDescObj;
                     readMethod = prmp.readMethod;
                     indexedReadMethod = prmp.indexedReadMethod;
                     if (readMethod != null && indexedReadMethod != null
@@ -495,36 +495,36 @@ class ClassIntrospector {
         return mergedPDs;
     }
 
-    private static class PropertyReaderedMethodPair {
+    private static class PropertyReaderMethodPair {
         private final Method readMethod;
         private final Method indexedReadMethod;
         
-        PropertyReaderedMethodPair(Method readerMethod, Method indexedReaderMethod) {
+        PropertyReaderMethodPair(Method readerMethod, Method indexedReaderMethod) {
             this.readMethod = readerMethod;
             this.indexedReadMethod = indexedReaderMethod;
         }
         
-        PropertyReaderedMethodPair(PropertyDescriptor pd) {
+        PropertyReaderMethodPair(PropertyDescriptor pd) {
             this(
                     pd.getReadMethod(),
                     pd instanceof IndexedPropertyDescriptor
                             ? ((IndexedPropertyDescriptor) pd).getIndexedReadMethod() : null);
         }
     
-        static PropertyReaderedMethodPair from(Object obj) {
-            if (obj instanceof PropertyReaderedMethodPair) {
-                return (PropertyReaderedMethodPair) obj;
+        static PropertyReaderMethodPair from(Object obj) {
+            if (obj instanceof PropertyReaderMethodPair) {
+                return (PropertyReaderMethodPair) obj;
             } else if (obj instanceof PropertyDescriptor) {
-                return new PropertyReaderedMethodPair((PropertyDescriptor) obj);
+                return new PropertyReaderMethodPair((PropertyDescriptor) obj);
             } else if (obj instanceof Method) {
-                return new PropertyReaderedMethodPair((Method) obj, null);
+                return new PropertyReaderMethodPair((Method) obj, null);
             } else {
                 throw new BugException("Unexpected obj type: " + obj.getClass().getName());
             }
         }
         
-        static PropertyReaderedMethodPair merge(PropertyReaderedMethodPair oldMethods, PropertyReaderedMethodPair
newMethods) {
-            return new PropertyReaderedMethodPair(
+        static PropertyReaderMethodPair merge(PropertyReaderMethodPair oldMethods, PropertyReaderMethodPair
newMethods) {
+            return new PropertyReaderMethodPair(
                     newMethods.readMethod != null ? newMethods.readMethod : oldMethods.readMethod,
                     newMethods.indexedReadMethod != null ? newMethods.indexedReadMethod
                             : oldMethods.indexedReadMethod);
@@ -544,7 +544,7 @@ class ClassIntrospector {
             if (this == obj) return true;
             if (obj == null) return false;
             if (getClass() != obj.getClass()) return false;
-            PropertyReaderedMethodPair other = (PropertyReaderedMethodPair) obj;
+            PropertyReaderMethodPair other = (PropertyReaderMethodPair) obj;
             return other.readMethod == readMethod && other.indexedReadMethod == indexedReadMethod;
         }
         
@@ -554,13 +554,13 @@ class ClassIntrospector {
         String propName = pd.getName();
         Object replaced = mergedPRMPs.put(propName, pd);
         if (replaced != null) {
-            PropertyReaderedMethodPair newPRMP = new PropertyReaderedMethodPair(pd);
+            PropertyReaderMethodPair newPRMP = new PropertyReaderMethodPair(pd);
             putIfMergedPropertyReaderMethodPairDiffers(mergedPRMPs, propName, replaced, newPRMP);
         }
     }
 
     private void mergeInPropertyReaderMethodPair(LinkedHashMap<String, Object> mergedPRMPs,
-            String propName, PropertyReaderedMethodPair newPRM) {
+            String propName, PropertyReaderMethodPair newPRM) {
         Object replaced = mergedPRMPs.put(propName, newPRM);
         if (replaced != null) {
             putIfMergedPropertyReaderMethodPairDiffers(mergedPRMPs, propName, replaced, newPRM);
@@ -572,14 +572,14 @@ class ClassIntrospector {
         Object replaced = mergedPRMPs.put(propName, readerMethod);
         if (replaced != null) {
             putIfMergedPropertyReaderMethodPairDiffers(mergedPRMPs, propName,
-                    replaced, new PropertyReaderedMethodPair(readerMethod, null));
+                    replaced, new PropertyReaderMethodPair(readerMethod, null));
         }
     }
 
     private void putIfMergedPropertyReaderMethodPairDiffers(LinkedHashMap<String, Object>
mergedPRMPs,
-            String propName, Object replaced, PropertyReaderedMethodPair newPRMP) {
-        PropertyReaderedMethodPair replacedPRMP = PropertyReaderedMethodPair.from(replaced);
-        PropertyReaderedMethodPair mergedPRMP = PropertyReaderedMethodPair.merge(replacedPRMP,
newPRMP);
+            String propName, Object replaced, PropertyReaderMethodPair newPRMP) {
+        PropertyReaderMethodPair replacedPRMP = PropertyReaderMethodPair.from(replaced);
+        PropertyReaderMethodPair mergedPRMP = PropertyReaderMethodPair.merge(replacedPRMP,
newPRMP);
         if (!mergedPRMP.equals(newPRMP)) {
             mergedPRMPs.put(propName, mergedPRMP);
         }


Mime
View raw message