You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by Martin Zaun <Ma...@Sun.COM> on 2007/11/30 23:01:54 UTC
copy&paste bug in BaseMonitor?
Hi,
a particular line of code
java/engine/org/apache/derby/impl/services/monitor/BaseMonitor.java:1086
very much looks like a copy&paste bug to me:
private Vector getImplementations(Properties moduleList, boolean actualModuleList) {
...
if (key.startsWith(Property.MODULE_PREFIX)) {
tag = key.substring(Property.MODULE_PREFIX.length());
} else if (key.startsWith(Property.SUB_SUB_PROTOCOL_PREFIX)) {
tag = key.substring(Property.MODULE_PREFIX.length());
^^^^^^^^^^^^^
} ...
I guess MODULE_PREFIX was meant to be replaced with SUB_SUB_PROTOCOL_PREFIX.
Comments?
Regards,
Martin
Re: copy&paste bug in BaseMonitor?
Posted by Knut Anders Hatlen <Kn...@Sun.COM>.
Martin Zaun <Ma...@Sun.COM> writes:
> Hi,
> a particular line of code
> java/engine/org/apache/derby/impl/services/monitor/BaseMonitor.java:1086
> very much looks like a copy&paste bug to me:
>
> private Vector getImplementations(Properties moduleList, boolean actualModuleList) {
> ...
> if (key.startsWith(Property.MODULE_PREFIX)) {
> tag = key.substring(Property.MODULE_PREFIX.length());
> } else if (key.startsWith(Property.SUB_SUB_PROTOCOL_PREFIX)) {
> tag = key.substring(Property.MODULE_PREFIX.length());
> ^^^^^^^^^^^^^
> } ...
>
> I guess MODULE_PREFIX was meant to be replaced with SUB_SUB_PROTOCOL_PREFIX.
>
> Comments?
Hi Martin,
I agree that it looks like a bug. Seems like it was introduced by one of
the check-ins for DERBY-927, which is still open. Perhaps you could add
a comment on that issue.
--
Knut Anders