提交 f31539cc authored 作者: Thomas Mueller Graf's avatar Thomas Mueller Graf

Javadocs

上级 d69c4432
......@@ -1913,6 +1913,13 @@ public class Parser {
}
}
/**
* Find out which of the table filters appears first in the "from" clause.
*
* @param o1 the first table filter
* @param o2 the second table filter
* @return -1 if o1 appears first, and 1 if o2 appears first
*/
static int compareTableFilters(TableFilter o1, TableFilter o2) {
assert o1.getOrderInFrom() != o2.getOrderInFrom();
return o1.getOrderInFrom() > o2.getOrderInFrom() ? 1 : -1;
......
......@@ -159,6 +159,7 @@ public abstract class BaseIndex extends SchemaObjectBase implements Index {
* @param filters all joined table filters
* @param filter the current table filter index
* @param sortOrder the sort order
* @param isScanIndex whether this is a "table scan" index
* @return the estimated cost
*/
protected final long getCostRangeIndex(int[] masks, long rowCount,
......
......@@ -225,6 +225,14 @@ public class ViewIndex extends BaseIndex implements SpatialIndex {
return new ViewCursor(this, result, first, last);
}
/**
* Set the query parameters.
*
* @param session the session
* @param first the lower bound
* @param last the upper bound
* @param intersection the intersection
*/
public void setupQueryParameters(Session session, SearchRow first, SearchRow last,
SearchRow intersection) {
ArrayList<Parameter> paramList = query.getParameters();
......
......@@ -37,6 +37,10 @@ import org.h2.value.ValueLong;
* @author Sergi Vladykin
*/
public final class JoinBatch {
/**
* An empty cursor.
*/
static final Cursor EMPTY_CURSOR = new Cursor() {
@Override
public boolean previous() {
......@@ -64,11 +68,29 @@ public final class JoinBatch {
}
};
/**
* An empty future cursor.
*/
static final Future<Cursor> EMPTY_FUTURE_CURSOR = new DoneFuture<Cursor>(EMPTY_CURSOR);
/**
* The top cursor.
*/
Future<Cursor> viewTopFutureCursor;
/**
* The top filter.
*/
JoinFilter top;
/**
* The filters.
*/
JoinFilter[] filters;
/**
* Whether this is a batched subquery.
*/
boolean batchedSubQuery;
private boolean started;
......@@ -125,6 +147,8 @@ public final class JoinBatch {
}
/**
* Register the table filter and lookup batch.
*
* @param filter table filter
* @param lookupBatch lookup batch
*/
......@@ -135,8 +159,10 @@ public final class JoinBatch {
}
/**
* Get the value for the given column.
*
* @param filterId table filter id
* @param column column
* @param column the column
* @return column value for current row
*/
public Value getValue(int filterId, Column column) {
......
......@@ -123,8 +123,8 @@ public class TableFilter implements ColumnResolver {
* @param alias the alias name
* @param rightsChecked true if rights are already checked
* @param select the select statement
* @param orderInFrom Original order number of this table filter in FROM
* clause.
* @param orderInFrom original order number (index) of this table filter in
* FROM clause (0, 1, 2,...)
*/
public TableFilter(Session session, Table table, String alias,
boolean rightsChecked, Select select, int orderInFrom) {
......@@ -140,6 +140,12 @@ public class TableFilter implements ColumnResolver {
this.orderInFrom = orderInFrom;
}
/**
* Get the order number (index) of this table filter in the "from" clause of
* the query.
*
* @return the index (0, 1, 2,...)
*/
public int getOrderInFrom() {
return orderInFrom;
}
......@@ -375,6 +381,8 @@ public class TableFilter implements ColumnResolver {
* Attempt to initialize batched join.
*
* @param jb join batch if it is already created
* @param filters the table filters
* @param filter the filter index (0, 1,...)
* @return join batch if query runs over index which supports batched
* lookups, {@code null} otherwise
*/
......@@ -555,6 +563,13 @@ public class TableFilter implements ColumnResolver {
// scanCount);
}
/**
* Whether the current value of the condition is true, or there is no
* condition.
*
* @param condition the condition (null for no condition)
* @return true if yes
*/
boolean isOk(Expression condition) {
if (condition == null) {
return true;
......
......@@ -414,6 +414,11 @@ public class TableView extends Table {
invalidate();
}
/**
* Clear the cached indexes for all sessions.
*
* @param database the database
*/
public static void clearIndexCaches(Database database) {
for (Session s : database.getSessions(true)) {
s.clearViewIndexCache();
......
......@@ -906,12 +906,17 @@ public class DateTimeUtils {
}
/**
* Adds the number of months to the date. If the resulting month's number of days is less than the original's day-of-month, the resulting
* Adds the number of months to the date. If the resulting month's number of
* days is less than the original's day-of-month, the resulting
* day-of-months gets adjusted accordingly:
*
* <br>
* 30.04.2007 - 2 months = 28.02.2007
*
* @param refDate the original date
* @param nrOfMonthsToAdd the number of months to add
* @return the new timestamp
*/
public static Timestamp addMonths(final Timestamp refDate, final int nrOfMonthsToAdd) {
public static Timestamp addMonths(Timestamp refDate, int nrOfMonthsToAdd) {
Calendar calendar = Calendar.getInstance();
calendar.setTime(refDate);
calendar.add(Calendar.MONTH, nrOfMonthsToAdd);
......
......@@ -137,6 +137,12 @@ public class ToDateParser {
return p;
}
/**
* Remove a token from a string.
*
* @param inputFragmentStr the input fragment
* @param formatFragment the format fragment
*/
void remove(String inputFragmentStr, String formatFragment) {
if (inputFragmentStr != null && inputStr.length() >= inputFragmentStr.length()) {
inputStr = inputStr.substring(inputFragmentStr.length());
......@@ -167,11 +173,25 @@ public class ToDateParser {
return sb.toString();
}
/**
* Parse a string as a timestamp with the given format.
*
* @param input the input
* @param format the format
* @return the timestamp
*/
public static Timestamp toTimestamp(String input, String format) {
ToDateParser parser = getTimestampParser(input, format);
return parser.getResultingTimestamp();
}
/**
* Parse a string as a date with the given format.
*
* @param input the input
* @param format the format
* @return the date as a timestamp
*/
public static Timestamp toDate(String input, String format) {
ToDateParser parser = getDateParser(input, format);
return parser.getResultingTimestamp();
......
......@@ -30,31 +30,95 @@ import org.h2.message.DbException;
* TO_DATE-format conventions and how to parse the corresponding data.
*/
class ToDateTokenizer {
/**
* The pattern for a number.
*/
static final Pattern PATTERN_NUMBER = Pattern.compile("^([+-]?[0-9]+)");
/**
* The pattern for for digits (typically a year).
*/
static final Pattern PATTERN_FOUR_DIGITS = Pattern.compile("^([+-]?[0-9]{4})");
/**
* The pattern for three digits.
*/
static final Pattern PATTERN_THREE_DIGITS = Pattern.compile("^([+-]?[0-9]{3})");
/**
* The pattern for two digits.
*/
static final Pattern PATTERN_TWO_DIGITS = Pattern.compile("^([+-]?[0-9]{2})");
/**
* The pattern for one or two digits.
*/
static final Pattern PATTERN_TWO_DIGITS_OR_LESS =
Pattern.compile("^([+-]?[0-9][0-9]?)");
/**
* The pattern for one digit.
*/
static final Pattern PATTERN_ONE_DIGIT =
Pattern.compile("^([+-]?[0-9])");
/**
* The pattern for a fraction (of a second for example).
*/
static final Pattern PATTERN_FF =
Pattern.compile("^(FF[0-9]?)", Pattern.CASE_INSENSITIVE);
/**
* The pattern for "am" or "pm".
*/
static final Pattern PATTERN_AM_PM =
Pattern.compile("^(AM|A\\.M\\.|PM|P\\.M\\.)", Pattern.CASE_INSENSITIVE);
/**
* The pattern for "bc" or "ad".
*/
static final Pattern PATTERN_BC_AD =
Pattern.compile("^(BC|B\\.C\\.|AD|A\\.D\\.)", Pattern.CASE_INSENSITIVE);
/**
* The parslet for a year.
*/
static final YearParslet PARSLET_YEAR = new YearParslet();
/**
* The parslet for a month.
*/
static final MonthParslet PARSLET_MONTH = new MonthParslet();
/**
* The parslet for a day.
*/
static final DayParslet PARSLET_DAY = new DayParslet();
/**
* The parslet for time.
*/
static final TimeParslet PARSLET_TIME = new TimeParslet();
/**
* The number of milliseconds in a day.
*/
static final int MILLIS_IN_HOUR = 60 * 60 * 1000;
/**
* Interface of the classes that can parse a specialized small bit of the
* TO_DATE format-string
* TO_DATE format-string.
*/
interface ToDateParslet {
/**
* Parse a date part.
*
* @param params the parameters that contains the string
* @param formatTokenEnum the format
* @param formatTokenStr the format string
*/
void parse(ToDateParser params, FormatTokenEnum formatTokenEnum,
String formatTokenStr);
}
......@@ -75,7 +139,7 @@ class ToDateTokenizer {
case IYYY:
inputFragmentStr = matchStringOrThrow(
PATTERN_FOUR_DIGITS, params, formatTokenEnum);
dateNr = parseInt(inputFragmentStr);
dateNr = Integer.parseInt(inputFragmentStr);
// Gregorian calendar does not have a year 0.
// 0 = 0001 BC, -1 = 0002 BC, ... so we adjust
result.set(Calendar.YEAR, dateNr >= 0 ? dateNr : dateNr + 1);
......@@ -84,7 +148,7 @@ class ToDateTokenizer {
case IYY:
inputFragmentStr = matchStringOrThrow(
PATTERN_THREE_DIGITS, params, formatTokenEnum);
dateNr = parseInt(inputFragmentStr);
dateNr = Integer.parseInt(inputFragmentStr);
// Gregorian calendar does not have a year 0.
// 0 = 0001 BC, -1 = 0002 BC, ... so we adjust
result.set(Calendar.YEAR, dateNr >= 0 ? dateNr : dateNr + 1);
......@@ -92,7 +156,7 @@ class ToDateTokenizer {
case RRRR:
inputFragmentStr = matchStringOrThrow(
PATTERN_TWO_DIGITS, params, formatTokenEnum);
dateNr = parseInt(inputFragmentStr);
dateNr = Integer.parseInt(inputFragmentStr);
dateNr += dateNr < 50 ? 2000 : 1900;
result.set(Calendar.YEAR, dateNr);
break;
......@@ -101,7 +165,7 @@ class ToDateTokenizer {
int cc = calendar.get(Calendar.YEAR) / 100;
inputFragmentStr = matchStringOrThrow(
PATTERN_TWO_DIGITS, params, formatTokenEnum);
dateNr = parseInt(inputFragmentStr) + cc * 100;
dateNr = Integer.parseInt(inputFragmentStr) + cc * 100;
result.set(Calendar.YEAR, dateNr);
break;
case EE /*NOT supported yet*/:
......@@ -116,7 +180,7 @@ class ToDateTokenizer {
case IY:
inputFragmentStr = matchStringOrThrow(
PATTERN_TWO_DIGITS, params, formatTokenEnum);
dateNr = parseInt(inputFragmentStr);
dateNr = Integer.parseInt(inputFragmentStr);
// Gregorian calendar does not have a year 0.
// 0 = 0001 BC, -1 = 0002 BC, ... so we adjust
result.set(Calendar.YEAR, dateNr >= 0 ? dateNr : dateNr + 1);
......@@ -125,14 +189,14 @@ class ToDateTokenizer {
case CC:
inputFragmentStr = matchStringOrThrow(
PATTERN_TWO_DIGITS, params, formatTokenEnum);
dateNr = parseInt(inputFragmentStr) * 100;
dateNr = Integer.parseInt(inputFragmentStr) * 100;
result.set(Calendar.YEAR, dateNr);
break;
case Y:
case I:
inputFragmentStr = matchStringOrThrow(
PATTERN_ONE_DIGIT, params, formatTokenEnum);
dateNr = parseInt(inputFragmentStr);
dateNr = Integer.parseInt(inputFragmentStr);
// Gregorian calendar does not have a year 0.
// 0 = 0001 BC, -1 = 0002 BC, ... so we adjust
result.set(Calendar.YEAR, dateNr >= 0 ? dateNr : dateNr + 1);
......@@ -186,7 +250,7 @@ class ToDateTokenizer {
// Note: In Calendar Month go from 0 - 11
inputFragmentStr = matchStringOrThrow(
PATTERN_TWO_DIGITS_OR_LESS, params, formatTokenEnum);
dateNr = parseInt(inputFragmentStr);
dateNr = Integer.parseInt(inputFragmentStr);
result.set(Calendar.MONTH, dateNr - 1);
break;
case RM:
......@@ -231,19 +295,19 @@ class ToDateTokenizer {
case DDD:
inputFragmentStr = matchStringOrThrow(
PATTERN_NUMBER, params, formatTokenEnum);
dateNr = parseInt(inputFragmentStr);
dateNr = Integer.parseInt(inputFragmentStr);
result.set(Calendar.DAY_OF_YEAR, dateNr);
break;
case DD:
inputFragmentStr = matchStringOrThrow(
PATTERN_TWO_DIGITS_OR_LESS, params, formatTokenEnum);
dateNr = parseInt(inputFragmentStr);
dateNr = Integer.parseInt(inputFragmentStr);
result.set(Calendar.DAY_OF_MONTH, dateNr);
break;
case D:
inputFragmentStr = matchStringOrThrow(
PATTERN_ONE_DIGIT, params, formatTokenEnum);
dateNr = parseInt(inputFragmentStr);
dateNr = Integer.parseInt(inputFragmentStr);
result.set(Calendar.DAY_OF_MONTH, dateNr);
break;
case DAY:
......@@ -289,32 +353,32 @@ class ToDateTokenizer {
case HH24:
inputFragmentStr = matchStringOrThrow(
PATTERN_TWO_DIGITS_OR_LESS, params, formatTokenEnum);
dateNr = parseInt(inputFragmentStr);
dateNr = Integer.parseInt(inputFragmentStr);
result.set(Calendar.HOUR_OF_DAY, dateNr);
break;
case HH12:
case HH:
inputFragmentStr = matchStringOrThrow(
PATTERN_TWO_DIGITS_OR_LESS, params, formatTokenEnum);
dateNr = parseInt(inputFragmentStr);
dateNr = Integer.parseInt(inputFragmentStr);
result.set(Calendar.HOUR, dateNr);
break;
case MI:
inputFragmentStr = matchStringOrThrow(
PATTERN_TWO_DIGITS_OR_LESS, params, formatTokenEnum);
dateNr = parseInt(inputFragmentStr);
dateNr = Integer.parseInt(inputFragmentStr);
result.set(Calendar.MINUTE, dateNr);
break;
case SS:
inputFragmentStr = matchStringOrThrow(
PATTERN_TWO_DIGITS_OR_LESS, params, formatTokenEnum);
dateNr = parseInt(inputFragmentStr);
dateNr = Integer.parseInt(inputFragmentStr);
result.set(Calendar.SECOND, dateNr);
break;
case SSSSS:
inputFragmentStr = matchStringOrThrow(
PATTERN_NUMBER, params, formatTokenEnum);
dateNr = parseInt(inputFragmentStr);
dateNr = Integer.parseInt(inputFragmentStr);
result.set(Calendar.HOUR_OF_DAY, 0);
result.set(Calendar.MINUTE, 0);
result.set(Calendar.SECOND, dateNr);
......@@ -341,7 +405,7 @@ class ToDateTokenizer {
case TZH:
inputFragmentStr = matchStringOrThrow(
PATTERN_TWO_DIGITS_OR_LESS, params, formatTokenEnum);
dateNr = parseInt(inputFragmentStr);
dateNr = Integer.parseInt(inputFragmentStr);
TimeZone tz = result.getTimeZone();
int offsetMillis = tz.getRawOffset();
// purge min and sec
......@@ -352,7 +416,7 @@ class ToDateTokenizer {
case TZM:
inputFragmentStr = matchStringOrThrow(
PATTERN_TWO_DIGITS_OR_LESS, params, formatTokenEnum);
dateNr = parseInt(inputFragmentStr);
dateNr = Integer.parseInt(inputFragmentStr);
tz = result.getTimeZone();
offsetMillis = tz.getRawOffset();
// purge hour
......@@ -390,16 +454,14 @@ class ToDateTokenizer {
}
}
static int parseInt(String s) {
int result = 0;
if (s.length() > 0 && s.charAt(0) == '+') {
result = Integer.parseInt(s.substring(1));
} else {
result = Integer.parseInt(s);
}
return result;
}
/**
* Match the pattern, or if not possible throw an exception.
*
* @param p the pattern
* @param params the parameters with the input string
* @param aEnum the pattern name
* @return the matched value
*/
static String matchStringOrThrow(Pattern p, ToDateParser params, Enum<?> aEnum) {
String s = params.getInputStr();
Matcher matcher = p.matcher(s);
......@@ -409,6 +471,15 @@ class ToDateTokenizer {
return matcher.group(1);
}
/**
* Set the given field in the calendar.
*
* @param c the calendar
* @param params the parameters with the input string
* @param field the field to set
* @param style the data type
* @return the matched value
*/
static String setByName(Calendar c, ToDateParser params, int field, int style) {
String inputFragmentStr = null;
String s = params.getInputStr();
......@@ -430,6 +501,12 @@ class ToDateTokenizer {
return inputFragmentStr;
}
/**
* Throw a parse exception.
*
* @param params the parameters with the input string
* @param errorStr the error string
*/
static void throwException(ToDateParser params, String errorStr) {
throw DbException.get(
ErrorCode.INVALID_TO_DATE_FORMAT,
......@@ -440,7 +517,7 @@ class ToDateTokenizer {
/**
* The format tokens.
*/
static enum FormatTokenEnum {
public static enum FormatTokenEnum {
// 4-digit year
YYYY(PARSLET_YEAR),
// 4-digit year with sign (- = B.C.)
......@@ -525,11 +602,22 @@ class ToDateTokenizer {
private final ToDateParslet toDateParslet;
private final Pattern patternToUse;
/**
* Construct a format token.
*
* @param toDateParslet the date parslet
* @param patternToUse the pattern
*/
FormatTokenEnum(ToDateParslet toDateParslet, Pattern patternToUse) {
this.toDateParslet = toDateParslet;
this.patternToUse = patternToUse;
}
/**
* Construct a format token.
*
* @param toDateParslet the date parslet
*/
FormatTokenEnum(ToDateParslet toDateParslet) {
this.toDateParslet = toDateParslet;
patternToUse = Pattern.compile(format("^(%s)", name()), Pattern.CASE_INSENSITIVE);
......@@ -539,6 +627,9 @@ class ToDateTokenizer {
* Optimization: Only return a list of {@link FormatTokenEnum} that
* share the same 1st char using the 1st char of the 'to parse'
* formatStr. Or return empty list if no match.
*
* @param formatStr the format string
* @return the list of tokens
*/
static List<FormatTokenEnum> getTokensInQuestion(String formatStr) {
List<FormatTokenEnum> result = EMPTY_LIST;
......@@ -586,6 +677,9 @@ class ToDateTokenizer {
/**
* Parse the format-string with passed token of {@link FormatTokenEnum}.
* If token matches return true, otherwise false.
*
* @param params the parameters
* @return true if it matches
*/
boolean parseFormatStrWithToken(ToDateParser params) {
Matcher matcher = patternToUse.matcher(params.getFormatStr());
......
......@@ -96,7 +96,9 @@ public final class ValueTimestampUtc extends Value {
/**
* Time in nanoseconds since 1 Jan 1970 i.e. similar format to
* System.currentTimeMillis()
* System.currentTimeMillis().
*
* @return the number of milliseconds
*/
public long getUtcDateTimeNanos() {
return utcDateTimeNanos;
......@@ -105,11 +107,18 @@ public final class ValueTimestampUtc extends Value {
/**
* Time in milliseconds since 1 Jan 1970 i.e. same format as
* System.currentTimeMillis()
*
* @return the number of milliseconds
*/
public long getUtcDateTimeMillis() {
return utcDateTimeNanos / 1000 / 1000;
}
/**
* Get the number of nanoseconds since the last full millisecond.
*
* @return the number of nanoseconds
*/
int getNanosSinceLastMillis() {
return (int) (utcDateTimeNanos % (1000 * 1000));
}
......
......@@ -21,6 +21,9 @@ import javax.tools.Diagnostic;
*/
public class TestAnnotationProcessor extends AbstractProcessor {
/**
* The message key.
*/
public static final String MESSAGES_KEY =
TestAnnotationProcessor.class.getName() + "-messages";
......
......@@ -1414,23 +1414,31 @@ public class TestFunctions extends TestBase implements AggregateFunction {
Timestamp expected;
// 01-Aug-03 + 3 months = 01-Nov-03
date = new Timestamp(new SimpleDateFormat("yyyy-MM-dd").parse("2003-08-01").getTime());
expected = new Timestamp(new SimpleDateFormat("yyyy-MM-dd").parse("2003-11-01").getTime());
date = new Timestamp(
new SimpleDateFormat("yyyy-MM-dd").parse("2003-08-01").getTime());
expected = new Timestamp(
new SimpleDateFormat("yyyy-MM-dd").parse("2003-11-01").getTime());
assertEquals(expected, DateTimeUtils.addMonths(new Timestamp(date.getTime()), 3));
// 31-Jan-03 + 1 month = 28-Feb-2003
date = new Timestamp(new SimpleDateFormat("yyyy-MM-dd").parse("2003-01-31").getTime());
expected = new Timestamp(new SimpleDateFormat("yyyy-MM-dd").parse("2003-02-28").getTime());
date = new Timestamp(
new SimpleDateFormat("yyyy-MM-dd").parse("2003-01-31").getTime());
expected = new Timestamp(
new SimpleDateFormat("yyyy-MM-dd").parse("2003-02-28").getTime());
assertEquals(expected, DateTimeUtils.addMonths(new Timestamp(date.getTime()), 1));
// 21-Aug-2003 - 3 months = 21-May-2003
date = new Timestamp(new SimpleDateFormat("yyyy-MM-dd").parse("2003-08-21").getTime());
expected = new Timestamp(new SimpleDateFormat("yyyy-MM-dd").parse("2003-05-21").getTime());
date = new Timestamp(
new SimpleDateFormat("yyyy-MM-dd").parse("2003-08-21").getTime());
expected = new Timestamp(
new SimpleDateFormat("yyyy-MM-dd").parse("2003-05-21").getTime());
assertEquals(expected, DateTimeUtils.addMonths(new Timestamp(date.getTime()), -3));
// 21-Aug-2003 00:00:00:333 - 3 months = 21-May-2003 00:00:00:333
date = new Timestamp(new SimpleDateFormat("yyyy-MM-dd SSS").parse("2003-08-21 333").getTime());
expected = new Timestamp(new SimpleDateFormat("yyyy-MM-dd SSS").parse("2003-05-21 333").getTime());
date = new Timestamp(
new SimpleDateFormat("yyyy-MM-dd SSS").parse("2003-08-21 333").getTime());
expected = new Timestamp(
new SimpleDateFormat("yyyy-MM-dd SSS").parse("2003-05-21 333").getTime());
assertEquals(expected, DateTimeUtils.addMonths(new Timestamp(date.getTime()), -3));
}
......
......@@ -49,6 +49,9 @@ public class TestRowFactory extends TestBase {
*/
public static class MyTestRowFactory extends RowFactory {
/**
* A simple counter.
*/
static final AtomicInteger COUNTER = new AtomicInteger();
@Override
......
......@@ -684,6 +684,12 @@ public class TestTableEngines extends TestBase {
}
}
/**
* A static assertion method.
*
* @param condition the condition
* @param message the error message
*/
static void assert0(boolean condition, String message) {
if (!condition) {
throw new AssertionError(message);
......
......@@ -52,7 +52,7 @@ public class TestView extends TestBase {
deleteDb("view");
}
public void testSubQueryViewIndexCache() throws SQLException {
private void testSubQueryViewIndexCache() throws SQLException {
if (config.networked) {
return;
}
......
......@@ -1055,7 +1055,8 @@ public class TestPreparedStatement extends TestBase {
Statement stat = conn.createStatement();
stat.execute("CREATE SEQUENCE SEQ");
stat.execute("CREATE TABLE TEST(ID INT)");
PreparedStatement prep = conn.prepareStatement("INSERT INTO TEST VALUES(NEXT VALUE FOR SEQ)");
PreparedStatement prep = conn.prepareStatement(
"INSERT INTO TEST VALUES(NEXT VALUE FOR SEQ)");
prep.addBatch();
prep.addBatch();
prep.addBatch();
......
......@@ -122,6 +122,12 @@ public class TestMvcc4 extends TestBase {
setup.close();
}
/**
* Wait for the given thread to block on synchronizing on the database
* object.
*
* @param t the thread
*/
static void waitForThreadToBlockOnDB(Thread t) {
while (true) {
// TODO must not use getAllStackTraces, as the method names are
......
......@@ -783,3 +783,4 @@ diagnostic filer stamp turn going cancellation fetched produced incurring
interpreter batching fewer runners imperial correspond nine purge meridian
calendars moscow messager lookups unhandled buddha parslet
tzh roc xii tzm viii myydd mar vii
cristan branda fabien adam bio gomes mahon steven aug meijer lisboa todescato
......@@ -484,7 +484,8 @@ public class Doclet {
&& method.parameters().length == 0
&& returnType != null
&& returnType.toString().equals("boolean");
if (!setterOrGetter) {
boolean enumValueMethod = name.equals("values") || name.equals("valueOf");
if (!setterOrGetter && !enumValueMethod) {
addError("Undocumented method " + " ("
+ getLink(clazz, method.position().line()) + ") "
+ clazz + "." + name + " " + raw);
......
......@@ -530,7 +530,7 @@ public class ArchiveTool {
dataOut.flush();
}
static long openSegments(List<Long> segmentStart, TreeSet<ChunkStream> segmentIn,
private static long openSegments(List<Long> segmentStart, TreeSet<ChunkStream> segmentIn,
String tempFileName, boolean readKey) throws IOException {
long inPos = 0;
int bufferTotal = 64 * 1024 * 1024;
......@@ -549,7 +549,7 @@ public class ArchiveTool {
return inPos;
}
static Iterator<Chunk> merge(final TreeSet<ChunkStream> segmentIn, final Log log) {
private static Iterator<Chunk> merge(final TreeSet<ChunkStream> segmentIn, final Log log) {
return new Iterator<Chunk>() {
@Override
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论