Skip to content

Conversation

@CodePrometheus
Copy link
Contributor

  • If this pull request closes/resolves/fixes an existing issue, replace the issue number. Closes #.
  • Update the CHANGES log.

@CodePrometheus CodePrometheus added the enhancement New feature or request label Nov 29, 2024
@CodePrometheus CodePrometheus added this to the 9.4.0 milestone Nov 29, 2024
Comment on lines +115 to +118
String constructorInterceptor = constructorInterceptPoint.getConstructorInterceptor();
if (StringUtil.isEmpty(constructorInterceptor)) {
throw new EnhanceException("no InstanceConstructorInterceptor define to enhance class " + enhanceOriginClassName);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Someone added an intercept point but no interceptor? What happens if not check? It will still be an error.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If ConstructorInterceptor is empty but there is no check, no error message during runtime, but the expected data cannot be obtained because it is not intercepted, so I want to add a check here to inform the user.

@wu-sheng wu-sheng merged commit cb764a7 into apache:main Nov 29, 2024
193 checks passed
@CodePrometheus CodePrometheus deleted the feat-constructor-intercept-error branch November 29, 2024 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants