Skip to content

fix(java): simplify NodeID name to methodName(paramTypes)#189

Open
wzekin wants to merge 2 commits intocloudwego:mainfrom
wzekin:fix/java-nodeid-simplify
Open

fix(java): simplify NodeID name to methodName(paramTypes)#189
wzekin wants to merge 2 commits intocloudwego:mainfrom
wzekin:fix/java-nodeid-simplify

Conversation

@wzekin
Copy link
Copy Markdown
Collaborator

@wzekin wzekin commented May 8, 2026

Java method NodeIDs were using the JAR-provided Descriptor/RawText directly, which often included modifiers, return type, throws clause, parameter names and annotations. Rebuild the name from MethodDetail's parameter list (TypeRawText, falling back to TypeFqcn) so NodeIDs are stable and concise — e.g. queryJwtToken(String,String,String).

What type of PR is this?

Check the PR title.

  • This PR title match the format: <type>(optional scope): <description>
  • The description of this PR title is user-oriented and clear enough for others to understand.
  • Attach the PR updating the user documentation if the current PR requires user awareness at the usage level. User docs repo

(Optional) Translate the PR title into Chinese.

(Optional) More detailed description for this PR(en: English/zh: Chinese).

en:
zh(optional):
优化前:

AbsPowerOpsController.public void downloadPowerOps(HttpServletResponse response, @RequestParam @ApiParam(value = "工单ID", required = true) String xflowId)

优化后:

AbsPowerOpsController.downloadPowerOps(HttpServletResponse,String)

(Optional) Which issue(s) this PR fixes:

(optional) The PR that updates user documentation:

wzekin added 2 commits May 8, 2026 20:29
Java method NodeIDs were using the JAR-provided Descriptor/RawText
directly, which often included modifiers, return type, throws clause,
parameter names and annotations. Rebuild the name from MethodDetail's
parameter list (TypeRawText, falling back to TypeFqcn) so NodeIDs are
stable and concise — e.g. queryJwtToken(String,String,String).
GetName() only splits Descriptor at '(' so when the JAR returns the
long form (e.g. "abstract void foo()"), modifiers and return type
leaked into the NodeID name. Take the last whitespace-delimited token
after GetName(), and drop empty parens for no-arg methods so the
exported "Class.method" form stays clean.
@wzekin wzekin force-pushed the fix/java-nodeid-simplify branch from 9fbf3dd to 6eecc8d Compare May 8, 2026 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant