How to solve this incompatible types in java?
<p>I get error in following lines.</p>

<pre><code>error: incompatible types
required : java.util.Map.entry&lt;java.lang.String,java.lang.String[]&gt;
found :java.lang.Object         
</code></pre>

<p>full code is below</p>

<pre><code>package com.auth.actions;

public class SocialAuthSuccessAction extends Action {

    final Log LOG = LogFactory.getLog(SocialAuthSuccessAction.class);

    @Override
    public ActionForward execute(final ActionMapping mapping,
            final ActionForm form, final HttpServletRequest request,
            final HttpServletResponse response) throws Exception {

        AuthForm authForm = (AuthForm) form;
        SocialAuthManager manager = null;
        if (authForm.getSocialAuthManager() != null) {
            manager = authForm.getSocialAuthManager();
        }
        if (manager != null) {
            List&lt;Contact&gt; contactsList = new ArrayList&lt;Contact&gt;();
            Profile profile = null;
            try {
                Map&lt;String, String&gt; paramsMap = new HashMap&lt;String, String&gt;();
                for (Map.Entry&lt;String, String[]&gt; entry :request.getParameterMap().entrySet() ) { // error in this line!
                    String key = entry.getKey();
                    String values[] = entry.getValue();
                    paramsMap.put(key, values[0].toString()); // Only 1 value is
                }
                AuthProvider provider = manager.connect(paramsMap);

                profile = provider.getUserProfile();
                contactsList = provider.getContactList();
                if (contactsList != null &amp;&amp; contactsList.size() &gt; 0) {
                    for (Contact p : contactsList) {
                        if (StringUtils.isEmpty(p.getFirstName())
                                &amp;&amp; StringUtils.isEmpty(p.getLastName())) {
                            p.setFirstName(p.getDisplayName());
                        }
                    }
                }
            } catch (Exception e) {
                e.printStackTrace();
            }
            request.setAttribute("profile", profile);
            request.setAttribute("contacts", contactsList);

            return mapping.findForward("success");
        }
        // if provider null
        return mapping.findForward("failure");
    }
}
</code></pre>

<p>Please help</p>
