This is an automated email from the ASF dual-hosted git repository.

chaokunyang pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/fury.git


The following commit(s) were added to refs/heads/main by this push:
     new 30935d01 chore(java): Update the content that needs to be corrected 
when reading the code. (#2143)
30935d01 is described below

commit 30935d019bf7221677f0e39a7733903a774d9330
Author: LiangliangSui <[email protected]>
AuthorDate: Tue Apr 15 10:36:14 2025 +0800

    chore(java): Update the content that needs to be corrected when reading the 
code. (#2143)
    
    <!--
    **Thanks for contributing to Fury.**
    
    **If this is your first time opening a PR on fury, you can refer to
    
[CONTRIBUTING.md](https://github.com/apache/fury/blob/main/CONTRIBUTING.md).**
    
    Contribution Checklist
    
    - The **Apache Fury (incubating)** community has restrictions on the
    naming of pr titles. You can also find instructions in
    [CONTRIBUTING.md](https://github.com/apache/fury/blob/main/CONTRIBUTING.md).
    
    - Fury has a strong focus on performance. If the PR you submit will have
    an impact on performance, please benchmark it first and provide the
    benchmark result here.
    -->
    
    ## What does this PR do?
    
    <!-- Describe the purpose of this PR. -->
    
    ## Related issues
    
    <!--
    Is there any related issue? Please attach here.
    
    - #xxxx0
    - #xxxx1
    - #xxxx2
    -->
    
    ## Does this PR introduce any user-facing change?
    
    <!--
    If any user-facing interface changes, please [open an
    issue](https://github.com/apache/fury/issues/new/choose) describing the
    need to do so and update the document if necessary.
    -->
    
    - [ ] Does this PR introduce any public API change?
    - [ ] Does this PR introduce any binary protocol compatibility change?
    
    ## Benchmark
    
    <!--
    When the PR has an impact on performance (if you don't know whether the
    PR will have an impact on performance, you can submit the PR first, and
    if it will have impact on performance, the code reviewer will explain
    it), be sure to attach a benchmark data here.
    -->
    
    Signed-off-by: Liangliang Sui <[email protected]>
---
 .../java/org/apache/fury/type/DescriptorGrouper.java | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git 
a/java/fury-core/src/main/java/org/apache/fury/type/DescriptorGrouper.java 
b/java/fury-core/src/main/java/org/apache/fury/type/DescriptorGrouper.java
index ca9d8a19..20dc11c3 100644
--- a/java/fury-core/src/main/java/org/apache/fury/type/DescriptorGrouper.java
+++ b/java/fury-core/src/main/java/org/apache/fury/type/DescriptorGrouper.java
@@ -131,8 +131,10 @@ public class DescriptorGrouper {
   /**
    * Create a descriptor grouper.
    *
+   * @param isMonomorphic whether the class is monomorphic.
    * @param descriptors descriptors may have field with same name.
-   * @param descriptorUpdator create a new descriptor from original one.
+   * @param descriptorsGroupedOrdered whether the descriptors are grouped and 
ordered.
+   * @param descriptorUpdater create a new descriptor from original one.
    * @param primitiveComparator comparator for primitive/boxed fields.
    * @param comparator comparator for non-primitive fields.
    */
@@ -140,7 +142,7 @@ public class DescriptorGrouper {
       Predicate<Class<?>> isMonomorphic,
       Collection<Descriptor> descriptors,
       boolean descriptorsGroupedOrdered,
-      Function<Descriptor, Descriptor> descriptorUpdator,
+      Function<Descriptor, Descriptor> descriptorUpdater,
       Comparator<Descriptor> primitiveComparator,
       Comparator<Descriptor> comparator) {
     this.primitiveDescriptors =
@@ -155,18 +157,18 @@ public class DescriptorGrouper {
     this.otherDescriptors =
         descriptorsGroupedOrdered ? new ArrayList<>() : new 
TreeSet<>(comparator);
     for (Descriptor descriptor : descriptors) {
-      if (descriptor.getRawType().isPrimitive()) {
-        primitiveDescriptors.add(descriptorUpdator.apply(descriptor));
+      if (TypeUtils.isPrimitive(descriptor.getRawType())) {
+        primitiveDescriptors.add(descriptorUpdater.apply(descriptor));
       } else if (TypeUtils.isBoxed(descriptor.getRawType())) {
-        boxedDescriptors.add(descriptorUpdator.apply(descriptor));
+        boxedDescriptors.add(descriptorUpdater.apply(descriptor));
       } else if (TypeUtils.isCollection(descriptor.getRawType())) {
-        collectionDescriptors.add(descriptorUpdator.apply(descriptor));
+        collectionDescriptors.add(descriptorUpdater.apply(descriptor));
       } else if (TypeUtils.isMap(descriptor.getRawType())) {
-        mapDescriptors.add(descriptorUpdator.apply(descriptor));
+        mapDescriptors.add(descriptorUpdater.apply(descriptor));
       } else if (isMonomorphic.test(descriptor.getRawType())) {
-        finalDescriptors.add(descriptorUpdator.apply(descriptor));
+        finalDescriptors.add(descriptorUpdater.apply(descriptor));
       } else {
-        otherDescriptors.add(descriptorUpdator.apply(descriptor));
+        otherDescriptors.add(descriptorUpdater.apply(descriptor));
       }
     }
   }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to