Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

W-10888504: Avoid duplicating error handlers when referencing a global error handler #968

Open
wants to merge 3 commits into
base: support/1.4.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions api-changes.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,24 @@
"1.4.1": {
"revapi": {
"ignore": [
{
"code": "java.field.addedStaticField",
"new": "field org.mule.runtime.api.config.MuleRuntimeFeature.REUSE_GLOBAL_ERROR_HANDLER",
"package": "org.mule.runtime.api.config",
"classSimpleName": "MuleRuntimeFeature",
"fieldName": "REUSE_GLOBAL_ERROR_HANDLER",
"elementKind": "enumConstant",
"justification": "W-10888504: adding feature flag to reuse global error handlers."
},
{
"code": "java.field.addedStaticField",
"new": "field org.mule.runtime.api.util.MuleSystemProperties.REUSE_GLOBAL_ERROR_HANDLER_PROPERTY",
"package": "org.mule.runtime.api.util",
"classSimpleName": "MuleSystemProperties",
"fieldName": "REUSE_GLOBAL_ERROR_HANDLER_PROPERTY",
"elementKind": "field",
"justification": "W-10888504: adding system property to reuse global error handlers."
},
{
"code": "java.field.addedStaticField",
"new": "field org.mule.runtime.api.util.MuleSystemProperties.REVERT_SIGLETON_ERROR_HANDLER_PROPERTY",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import static org.mule.runtime.api.util.MuleSystemProperties.HANDLE_SPLITTER_EXCEPTION_PROPERTY;
import static org.mule.runtime.api.util.MuleSystemProperties.HONOUR_RESERVED_PROPERTIES_PROPERTY;
import static org.mule.runtime.api.util.MuleSystemProperties.PARALLEL_FOREACH_FLATTEN_MESSAGE_PROPERTY;
import static org.mule.runtime.api.util.MuleSystemProperties.REUSE_GLOBAL_ERROR_HANDLER_PROPERTY;
import static org.mule.runtime.api.util.MuleSystemProperties.SET_VARIABLE_WITH_NULL_VALUE_PROPERTY;
import static org.mule.runtime.api.util.MuleSystemProperties.START_EXTENSION_COMPONENTS_WITH_ARTIFACT_CLASSLOADER_PROPERTY;
import static org.mule.runtime.api.util.MuleSystemProperties.TO_STRING_TRANSFORMER_TRANSFORM_ITERATOR_ELEMENTS_PROPERTY;
Expand Down Expand Up @@ -219,6 +220,14 @@ public enum MuleRuntimeFeature implements Feature {
ENABLE_BYTE_BUDDY_OBJECT_CREATION(
"When enabled, the Objects factories will be created with Byte Buddy instead of CGLIB.",
"W-10672687", "4.5.0", ENABLE_BYTE_BUDDY_OBJECT_CREATION_PROPERTY),
/**
* When enabled, the global error handlers will be reused instead of creating local copies.
*
* @since 4.5.0
*/
REUSE_GLOBAL_ERROR_HANDLER(
"When enabled, the global error handlers will be reused instead of creating local copies.",
"W-10888504", "4.5.0", REUSE_GLOBAL_ERROR_HANDLER_PROPERTY),
;

private final String description;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,14 @@ public final class MuleSystemProperties {
public static final String REVERT_SIGLETON_ERROR_HANDLER_PROPERTY =
SYSTEM_PROPERTY_PREFIX + "revert.singletonErrorHandler";

/**
* If set to true, the global error handlers will be reused instead of creating local copies.
*
* @since 4.5.0, 4.4.1, 4.3.1
*/
public static final String REUSE_GLOBAL_ERROR_HANDLER_PROPERTY =
SYSTEM_PROPERTY_PREFIX + "reuse.globalErrorHandler";

/**
* @return {@code true} if the {@link #TESTING_MODE_PROPERTY_NAME} property has been set (regardless of the value)
*/
Expand Down