saveMyProfile evaluates false 2 times
<p>My saveMyProfile method comes up false 2 times and I can't figure out how to get to true. Thank you for your time.</p>

<pre><code>import student.web.SharedPersistentMap; 
import student.*;
import java.util.*;
</code></pre>

<p>Creates a SharedPersistentMap for the User Profiles.</p>

<pre><code>public class ProfileViewer
extends UserProfile
{
</code></pre>

<p>Instance/static variables</p>

<pre><code>private SharedPersistentMap &lt; UserProfile &gt; profiles;
private UserProfile myProfile;
</code></pre>

<p>Constructor</p>

<p>Creates a new ProfileViewer object with the SharedPersistentMap.</p>

<pre><code>public ProfileViewer()
{
    profiles = new SharedPersistentMap &lt; UserProfile &gt; (UserProfile.class);
}
</code></pre>

<p>Methods</p>

<p>Sets a new profile name.</p>

<p>@param newMyProfile The new profile name.</p>

<pre><code>public void setMyProfile (UserProfile newMyProfile)
{
    myProfile = newMyProfile;
}
</code></pre>

<p>Gets the profile name.</p>

<p>@return myProfile;</p>

<pre><code>public UserProfile getMyProfile()
{
    return myProfile;
}
</code></pre>

<p>Creates new  </p>

<p>@param username The username.</p>

<pre><code>public void createNewMyProfile (String username)
{
    if ((username != null) &amp;&amp; !(username.isEmpty()))
    {
        UserProfile userProf2 = new UserProfile();
        userProf2.setName(username);
        setMyProfile(userProf2);
    }
}
</code></pre>

<p>Saves the new profile.</p>

<pre><code>public void saveMyProfile ()
{
    if (((myProfile != null) &amp;&amp; (myProfile.getName() != null)) 
        &amp;&amp; (myProfile.getName().isEmpty()))
    {
        profiles.put(myProfile.getName(), myProfile);
    }
}
</code></pre>

<p>Loads the desired profile.</p>

<p>@param username The username.</p>

<pre><code>public void loadMyProfile (String username)
{
    if ((username != null) &amp;&amp; !(username.equals("")))
    {
        myProfile = profiles.get(username);
    }
}
}
</code></pre>
