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/fory.git


The following commit(s) were added to refs/heads/main by this push:
     new 7b5f94ba0 fix(java): log ForyBuilder advisories at info level (#3777)
7b5f94ba0 is described below

commit 7b5f94ba04dbc346f9d36d76b9f84b4c124b84fa
Author: Shawn Yang <[email protected]>
AuthorDate: Mon Jun 22 20:00:04 2026 +0530

    fix(java): log ForyBuilder advisories at info level (#3777)
    
    ## Why?
    
    
    
    ## What does this PR do?
    
    
    
    ## Related issues
    
    
    
    ## AI Contribution Checklist
    
    
    
    - [ ] Substantial AI assistance was used in this PR: `yes` / `no`
    - [ ] If `yes`, I included a completed [AI Contribution
    
Checklist](https://github.com/apache/fory/blob/main/AI_POLICY.md#9-contributor-checklist-for-ai-assisted-prs)
    in this PR description and the required `AI Usage Disclosure`.
    - [ ] If `yes`, my PR description includes the required `ai_review`
    summary and screenshot evidence of the final clean AI review results
    from both fresh reviewers on the current PR diff or current HEAD after
    the latest code changes.
    
    
    
    ## Does this PR introduce any user-facing change?
    
    
    
    - [ ] Does this PR introduce any public API change?
    - [ ] Does this PR introduce any binary protocol compatibility change?
    
    ## Benchmark
---
 .../src/main/java/org/apache/fory/config/ForyBuilder.java      | 10 +++++-----
 .../java/org/apache/fory/resolver/AllowListCheckerTest.java    |  2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git 
a/java/fory-core/src/main/java/org/apache/fory/config/ForyBuilder.java 
b/java/fory-core/src/main/java/org/apache/fory/config/ForyBuilder.java
index 8625c85c3..48d9dcb43 100644
--- a/java/fory-core/src/main/java/org/apache/fory/config/ForyBuilder.java
+++ b/java/fory-core/src/main/java/org/apache/fory/config/ForyBuilder.java
@@ -642,12 +642,12 @@ public final class ForyBuilder {
     }
     if (ENABLE_CLASS_REGISTRATION_FORCIBLY) {
       if (!requireClassRegistration) {
-        LOG.warn("Class registration is enabled forcibly.");
+        LOG.info("Class registration is enabled forcibly.");
         requireClassRegistration = true;
       }
     }
     if (defaultJDKStreamSerializerType == JavaSerializer.class) {
-      LOG.warn(
+      LOG.info(
           "JDK serialization is used for types which customized java 
serialization by "
               + "implementing methods such as writeObject/readObject. This is 
not secure, try to "
               + "use {} instead, or implement a custom {}.",
@@ -681,7 +681,7 @@ public final class ForyBuilder {
         deserializeUnknownClass = false;
       }
       if (scopedMetaShareEnabled != null && scopedMetaShareEnabled) {
-        LOG.warn("Scoped meta share is for compatible mode only, disabling 
it");
+        LOG.info("Scoped meta share is for compatible mode only, disabling 
it");
       }
       scopedMetaShareEnabled = false;
       if (metaShareEnabled == null) {
@@ -693,7 +693,7 @@ public final class ForyBuilder {
     }
     if (!requireClassRegistration) {
       if (typeChecker == null) {
-        LOG.warn(
+        LOG.info(
             "Class registration isn't forced, unknown classes can be 
deserialized. "
                 + "If the environment isn't secure, please enable class 
registration by "
                 + "`ForyBuilder#requireClassRegistration(true)` or configure 
TypeChecker by "
@@ -710,7 +710,7 @@ public final class ForyBuilder {
         codeGenEnabled != null ? codeGenEnabled.booleanValue() : 
!runtimeCodegenUnsupported;
     if (runtimeCodegenUnsupported && resolvedCodegen) {
       if (Boolean.TRUE.equals(codeGenEnabled)) {
-        LOG.warn(
+        LOG.info(
             "The current platform does not support Fory runtime code 
generation; "
                 + "interpreter serializers will be used instead.");
       }
diff --git 
a/java/fory-core/src/test/java/org/apache/fory/resolver/AllowListCheckerTest.java
 
b/java/fory-core/src/test/java/org/apache/fory/resolver/AllowListCheckerTest.java
index cdd929344..f4ba0824c 100644
--- 
a/java/fory-core/src/test/java/org/apache/fory/resolver/AllowListCheckerTest.java
+++ 
b/java/fory-core/src/test/java/org/apache/fory/resolver/AllowListCheckerTest.java
@@ -128,7 +128,7 @@ public class AllowListCheckerTest {
       ByteArrayOutputStream output = new ByteArrayOutputStream();
       try (PrintStream capture = new PrintStream(output, true, 
StandardCharsets.UTF_8.name())) {
         System.setOut(capture);
-        LoggerFactory.setLogLevel(LogLevel.WARN_LEVEL);
+        LoggerFactory.setLogLevel(LogLevel.INFO_LEVEL);
 
         Fory.builder()
             .withXlang(false)


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

Reply via email to