public abstract class Bug extends Object
You can use these constants to control the flow of your code. For example, suppose that bug CALCITE-123 causes the "INSERT" statement to return an incorrect row-count, and you want to disable unit tests. You might use the constant in your code as follows:
Statement stmt = connection.createStatement();
int rowCount = stmt.execute(
"INSERT INTO FemaleEmps SELECT * FROM Emps WHERE gender = 'F'");
if (Bug.CALCITE_123_FIXED) {
assertEquals(rowCount, 5);
}
The usage of the constant is a convenient way to identify the impact of the bug. When someone fixes the bug, they will remove the constant and all usages of it. Also, the constant helps track the propagation of the fix: as the fix is integrated into other branches, the constant will be removed from those branches.
To do
The following is a list of tasks to be completed before committing to master branch.
| Constructor and Description |
|---|
Bug() |
public static final boolean DT239_FIXED
public static final boolean DT785_FIXED
public static final boolean FNL3_FIXED
public static final boolean FRG327_FIXED
public static final boolean FRG377_FIXED
public static final boolean DT1684_FIXED
public static final boolean FNL25_FIXED
public static final boolean FRG73_FIXED
public static final boolean FRG78_FIXED
public static final boolean FRG187_FIXED
public static final boolean FRG189_FIXED
public static final boolean FRG254_FIXED
public static final boolean FRG282_FIXED
public static final boolean FRG296_FIXED
public static final boolean FRG375_FIXED
public static final boolean CALCITE_194_FIXED
public static final boolean CALCITE_319_FIXED
public static final boolean CALCITE_461_FIXED
public static final boolean CALCITE_673_FIXED
public static final boolean TODO_FIXED
public static <T> T remark(T remark)
Example #1:
if (Bug.remark("baz fixed") == null) {
baz();
}
Example #2:
/** @see Bug#remark Remove before checking in */
void uselessMethod() {}
public static boolean upgrade(String remark)
If the intended change is that a class or member be removed, flag
instead using a Deprecated annotation followed by a comment such as
"to be removed before 2.0".
Copyright © 2012–2015 The Apache Software Foundation. All rights reserved.