You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-commits@axis.apache.org by ro...@apache.org on 2026/04/07 00:30:25 UTC

(axis-axis2-java-core) branch master updated (82e6e243a6 -> f39a3b4897)

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

robertlazarski pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/axis-axis2-java-core.git


    from 82e6e243a6 springbootdemo-tomcat11: apply Gemini review fixes + add FinancialBenchmarkServiceTest
     new 29af78975a docs: update MCP.md — C1 complete, update next steps
     new f39a3b4897 springbootdemo-tomcat11: apply Gemini LOW findings from second review

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 MCP.md                                                   |  9 ++++-----
 .../webservices/FinancialBenchmarkService.java           | 16 ++++++++--------
 .../webservices/FinancialBenchmarkServiceTest.java       |  8 ++------
 3 files changed, 14 insertions(+), 19 deletions(-)


(axis-axis2-java-core) 01/02: docs: update MCP.md — C1 complete, update next steps

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

robertlazarski pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/axis-axis2-java-core.git

commit 29af78975a32d18d8f57ded121e36076645572d7
Author: Robert Lazarski <ro...@gmail.com>
AuthorDate: Mon Apr 6 14:11:10 2026 -1000

    docs: update MCP.md — C1 complete, update next steps
    
    Co-Authored-By: Claude Sonnet 4.6 <no...@anthropic.com>
---
 MCP.md | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/MCP.md b/MCP.md
index b6ecfd7bfc..50fb1e14cb 100644
--- a/MCP.md
+++ b/MCP.md
@@ -319,12 +319,11 @@ opt-in per-operation.
 
 ## Next Steps
 
-### Immediate — C port is now unblocked
+### C1 — complete ✅
 
-Java A2 is validated against Claude Desktop. The Axis2/C `financial_benchmark_service`
-can now implement C1 (stdio MCP mode) in parallel with any Java Track B work.
-
-See `docs/MCP.md` in the `axis-axis2-c-core` repo for the C1 plan.
+`finbench_mcp.c` + `finbench_mcp_main.c` committed to `axis-axis2-c-core`.
+Builds with `build_financial_service.sh`; installs to `/usr/local/axis2c/bin/financial-benchmark-mcp`.
+See `docs/MCP.md` in the `axis-axis2-c-core` repo for the full C implementation plan.
 
 ### Track A remaining
 


(axis-axis2-java-core) 02/02: springbootdemo-tomcat11: apply Gemini LOW findings from second review

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

robertlazarski pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/axis-axis2-java-core.git

commit f39a3b4897eee6471efaa1198145d32d3dec9559
Author: Robert Lazarski <ro...@gmail.com>
AuthorDate: Mon Apr 6 14:12:40 2026 -1000

    springbootdemo-tomcat11: apply Gemini LOW findings from second review
    
    Fixes from Gemini 2.5 Pro review of commit 82e6e243a6:
    
    - FinancialBenchmarkServiceTest: fix compilation error — resp.getInitialValue()
      does not exist on MonteCarloResponse; corrected to req.getInitialValue()
      (the redundant getInitialValue(req) helper has been removed as suggested)
    
    - FinancialBenchmarkServiceTest: use assertEquals(4L, ...) instead of
      assertTrue(... == 4, ...) for more informative failure messages
    
    - FinancialBenchmarkService: use SLF4J parameterized logging
      logger.warn("{} validation failed: {}", logPrefix, err) instead of
      string concatenation — avoids concatenation cost when WARN is disabled
    
    Co-Authored-By: Claude Sonnet 4.6 <no...@anthropic.com>
---
 .../webservices/FinancialBenchmarkService.java           | 16 ++++++++--------
 .../webservices/FinancialBenchmarkServiceTest.java       |  8 ++------
 2 files changed, 10 insertions(+), 14 deletions(-)

diff --git a/modules/samples/userguide/src/userguide/springbootdemo-tomcat11/src/main/java/userguide/springboot/webservices/FinancialBenchmarkService.java b/modules/samples/userguide/src/userguide/springbootdemo-tomcat11/src/main/java/userguide/springboot/webservices/FinancialBenchmarkService.java
index b1c6622022..f8f00780cf 100644
--- a/modules/samples/userguide/src/userguide/springbootdemo-tomcat11/src/main/java/userguide/springboot/webservices/FinancialBenchmarkService.java
+++ b/modules/samples/userguide/src/userguide/springbootdemo-tomcat11/src/main/java/userguide/springboot/webservices/FinancialBenchmarkService.java
@@ -95,7 +95,7 @@ public class FinancialBenchmarkService {
         int n = request.getNAssets();
         if (n <= 0 || n > MAX_ASSETS) {
             String err = "n_assets=" + n + " is out of range [1, " + MAX_ASSETS + "].";
-            logger.warn(logPrefix + "validation failed: " + err);
+            logger.warn("{} validation failed: {}", logPrefix, err);
             return PortfolioVarianceResponse.failed(err);
         }
 
@@ -104,19 +104,19 @@ public class FinancialBenchmarkService {
         if (cov == null) {
             String err = "Missing or malformed \"covarianceMatrix\": provide a " + n + "×" + n +
                 " 2D array or a flat array of " + (long) n * n + " elements in row-major order.";
-            logger.warn(logPrefix + "validation failed: " + err);
+            logger.warn("{} validation failed: {}", logPrefix, err);
             return PortfolioVarianceResponse.failed(err);
         }
         if (cov.length != n) {
             String err = "covarianceMatrix row count " + cov.length + " != nAssets " + n + ".";
-            logger.warn(logPrefix + "validation failed: " + err);
+            logger.warn("{} validation failed: {}", logPrefix, err);
             return PortfolioVarianceResponse.failed(err);
         }
         for (int i = 0; i < n; i++) {
             if (cov[i] == null || cov[i].length != n) {
                 String err = "covarianceMatrix row " + i + " has " +
                     (cov[i] == null ? 0 : cov[i].length) + " columns, expected " + n + ".";
-                logger.warn(logPrefix + "validation failed: " + err);
+                logger.warn("{} validation failed: {}", logPrefix, err);
                 return PortfolioVarianceResponse.failed(err);
             }
         }
@@ -131,7 +131,7 @@ public class FinancialBenchmarkService {
             if (weightSum <= 0.0) {
                 String err = "normalizeWeights=true but weights sum to " + weightSum +
                     ". Cannot normalize a zero-weight portfolio.";
-                logger.warn(logPrefix + "validation failed: " + err);
+                logger.warn("{} validation failed: {}", logPrefix, err);
                 return PortfolioVarianceResponse.failed(err);
             }
             if (Math.abs(weightSum - 1.0) > 1e-10) {
@@ -144,7 +144,7 @@ public class FinancialBenchmarkService {
                 String err = "weights sum to " + String.format("%.8f", weightSum) +
                     ", expected 1.0 (tolerance 1e-4). " +
                     "Pass normalizeWeights=true to rescale automatically.";
-                logger.warn(logPrefix + "validation failed: " + err);
+                logger.warn("{} validation failed: {}", logPrefix, err);
                 return PortfolioVarianceResponse.failed(err);
             }
         }
@@ -346,7 +346,7 @@ public class FinancialBenchmarkService {
         int nAssets = assets.size();
         if (nAssets > MAX_ASSETS) {
             String err = "assets count " + nAssets + " exceeds maximum " + MAX_ASSETS + ".";
-            logger.warn(logPrefix + "validation failed: " + err);
+            logger.warn("{} validation failed: {}", logPrefix, err);
             return ScenarioAnalysisResponse.failed(err);
         }
 
@@ -369,7 +369,7 @@ public class FinancialBenchmarkService {
                     "Pass probTolerance to adjust validation strictness.",
                     i, asset.getAssetId(), probSum, probTolerance,
                     asset.getScenarios().size());
-                logger.warn(logPrefix + "validation failed: " + err);
+                logger.warn("{} validation failed: {}", logPrefix, err);
                 return ScenarioAnalysisResponse.failed(err);
             }
         }
diff --git a/modules/samples/userguide/src/userguide/springbootdemo-tomcat11/src/test/java/userguide/springboot/webservices/FinancialBenchmarkServiceTest.java b/modules/samples/userguide/src/userguide/springbootdemo-tomcat11/src/test/java/userguide/springboot/webservices/FinancialBenchmarkServiceTest.java
index 2cbfc4dbaa..f399739c15 100644
--- a/modules/samples/userguide/src/userguide/springbootdemo-tomcat11/src/test/java/userguide/springboot/webservices/FinancialBenchmarkServiceTest.java
+++ b/modules/samples/userguide/src/userguide/springbootdemo-tomcat11/src/test/java/userguide/springboot/webservices/FinancialBenchmarkServiceTest.java
@@ -67,7 +67,7 @@ class FinancialBenchmarkServiceTest {
             "annualized volatility uses nPeriodsPerYear=252 by default");
         assertEquals(1.0, resp.getWeightSum(), 1e-10, "weight_sum should be 1.0");
         assertFalse(resp.isWeightsNormalized(), "weights should not be normalized when already summing to 1.0");
-        assertTrue(resp.getMatrixOperations() == 4, "2x2 matrix = 4 operations");
+        assertEquals(4L, resp.getMatrixOperations(), "2x2 matrix = 4 operations");
     }
 
     @Test
@@ -253,7 +253,7 @@ class FinancialBenchmarkServiceTest {
 
         assertEquals("SUCCESS", resp.getStatus());
         // With zero drift and zero volatility, all paths end at initialValue
-        assertEquals(resp.getInitialValue(), resp.getMeanFinalValue(), 1.0,
+        assertEquals(req.getInitialValue(), resp.getMeanFinalValue(), 1.0,
             "zero vol, zero drift: mean should equal initialValue");
     }
 
@@ -521,8 +521,4 @@ class FinancialBenchmarkServiceTest {
         return asset;
     }
 
-    /** Expose initialValue for test assertions (not in response, but useful here). */
-    private double getInitialValue(MonteCarloRequest req) {
-        return req.getInitialValue();
-    }
 }