Skip to content

Result of resolveArguments() is unused in ICUMessageSourceSupport #2

Description

@eneveu

In ICUMessageSourceSupport, I'm wondering if we should do

    synchronized (messageFormat) {
        return resolveArguments(args, locale).formatWith(messageFormat);
    }

instead of:

    resolveArguments(args, locale);
    synchronized (messageFormat) {
        return args.formatWith(messageFormat);
    }

That's what they do in the Spring MessageSourceSupport, and I don't understand what resolveArguments() does if we don't use the result?

resolveArguments(args, locale);
synchronized (messageFormat) {
return args.formatWith(messageFormat);
}

https://github.com/spring-projects/spring-framework/blob/00d2606b000f9bdafbd7f4a16b6599fb51b53fa4/spring-context/src/main/java/org/springframework/context/support/MessageSourceSupport.java#L147-L149

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions