isModified() in TomcatConfigurable

I have a question about the the isModified() method in TomcatConfigurable.
It reads:

public boolean isModified() {
TomcatConfiguration configuration = new TomcatConfiguration();
saveToConfiguration(configuration);
return configuration.equals(myConfiguration);
}

But shouldn't the last line return the opposite value of equals(), i.e.:

return !configuration.equals(myConfiguration);

Also, how could this ever work if there's no overridden equals() method in
TomcatConfiguration?

My apologies if i'm being stupid and/or missing something obvious (i really
should learn to not look at code at 2 AM).

thanks,

chris


0
1 comment

Hi Chris,

You are absolutely right about both opposite value of equals() and overriden
equals().
Both are fixed in the upcoming build. Thanks!

--

Best regards,
Eugene Zhuravlev
JetBrains, Inc, http://www.intellij.com
"Develop with pleasure!"


"Chris Bartley" <spam@feynman.org> wrote in message
news:ao8dh1$mrh$1@is.intellij.net...

I have a question about the the isModified() method in TomcatConfigurable.
It reads:

>

public boolean isModified() {
TomcatConfiguration configuration = new TomcatConfiguration();
saveToConfiguration(configuration);
return configuration.equals(myConfiguration);
}

>

But shouldn't the last line return the opposite value of equals(), i.e.:

>

return !configuration.equals(myConfiguration);

>

Also, how could this ever work if there's no overridden equals() method in
TomcatConfiguration?

>

My apologies if i'm being stupid and/or missing something obvious (i

really

should learn to not look at code at 2 AM).

>

thanks,

>

chris

>
>


0

Please sign in to leave a comment.