LucidDB / luciddb

DEFUNCT: See README
https://github.com/LucidDB/luciddb
Apache License 2.0
53 stars 24 forks source link

[FRG-270] fix two problems reported by findbugs in DDL and JmiChangeSet #602

Closed dynamobi-build closed 12 years ago

dynamobi-build commented 12 years ago

[reporter="jvs", created="Fri, 18 May 2007 17:14:41 -0500 (GMT-05:00)"] This one hurts efficiency but not correctness.

 //open/lu/dev/farrago/src/org/eigenbase/jmi/JmiChangeSet.java
                // Avoid unnecessary updates in the case where ordinals
                // are already correct.
                if (oldOrdinal != newOrdinal) {
                    target.refSetValue("ordinal", newOrdinal);
                }
            }
        }
    }

This one isn't a problem, but using an enum instead of the pre-JDK 1.5 Integer pattern would be an improvement, and would make findbugs happy.

 //open/lu/dev/farrago/src/net/sf/farrago/ddl/DdlValidator.java
    {
        stmtValidator.setParserPosition(null);
        if (action == VALIDATE_CREATION) {
            return invokeHandler(modelElement, "validateDefinition");
        } else if (action == VALIDATE_MODIFICATION) {
            return invokeHandler(modelElement, "validateModification");
        } else if (action == VALIDATE_DELETION) {
            return invokeHandler(modelElement, "validateDrop");
        } else if (action == VALIDATE_TRUNCATION) {
            return invokeHandler(modelElement, "validateTruncation");
        } else {
            throw new AssertionError();
        }


dynamobi-build commented 12 years ago

[author="jvs", created="Tue, 29 May 2007 13:53:10 -0500 (GMT-05:00)"] Fixed a little while ago.