struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Musachy Barroso <musa...@gmail.com>
Subject synchronized code in DefaultActionInvocation
Date Wed, 22 Jul 2009 00:56:57 GMT
This code in DefaultActionInvocation.createResult:

ActionConfig config = proxy.getConfig();
Map<String, ResultConfig> results = config.getResults();

ResultConfig resultConfig = null;

 synchronized (config) {
            try {
                resultConfig = results.get(resultCode);
            } catch (NullPointerException e) {
                // swallow
            }
            if (resultConfig == null) {
                // If no result is found for the given resultCode, try
to get a wildcard '*' match.
                resultConfig = results.get("*");
            }
        }

I can't see why wee need to synchronize that block...any ideas?

musachy
-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Mime
View raw message