65 lines
2.2 KiB
HTML
65 lines
2.2 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
|
|
<html>
|
|
<head>
|
|
<title>Miscellaneous Checks</title>
|
|
<link rel="stylesheet" type="text/css" href="mystyle.css">
|
|
</head>
|
|
|
|
<body>
|
|
<h1>Miscellaneous Checks</h1>
|
|
|
|
<h2>To-do comments</h2>
|
|
|
|
<p>The property <span class="code">checkstyle.pattern.todo</span> specifies
|
|
the pattern to match for to-do comments. The property type is
|
|
<a href="property_types.html#regexp">regular expression</a> and defaults to
|
|
<span class="default">TODO:</span>.</p>
|
|
|
|
<div class="tip">
|
|
<h4 class="tip">Tip</h4>
|
|
|
|
<p>Using to-do comments is a great way to keep track of tasks that need to be
|
|
done. By having them reported by Checkstyle makes it very hard to forget about
|
|
them.</p>
|
|
|
|
</div>
|
|
|
|
|
|
<h2>Integer Literals</h2>
|
|
|
|
<p>The property <span class="code">checkstyle.ignore.longell</span> specifies
|
|
whether to not require that long integer literals use an uppercase
|
|
<span class="code">L</span>. For example <span class="code">40L</span> instead
|
|
of <span class="code">40l</span>. This is in accordance to the Java Language
|
|
Specification,
|
|
<a href="http://java.sun.com/docs/books/jls/second_edition/html/lexical.doc.html#48282">Section 3.10.1</a>.
|
|
The property type is <a href="property_types.html#boolean">boolean</a> and
|
|
defaults to <span class="default">false</span>.</p>
|
|
|
|
|
|
<h2>illegal Instantiations</h2>
|
|
|
|
<p>The property <span class="code">checkstyle.illegal.instantiations</span>
|
|
contains the set of classes that should not be instantiated directly. The
|
|
property type is <a href="property_types.html#stringSet">string set</a> and
|
|
defaults to an empty set.</p>
|
|
|
|
<div class="tip">
|
|
<h4 class="tip">Tip</h4>
|
|
|
|
<p>A common mistake is to create new instances of <span
|
|
class="code">java.lang.Boolean</span> instead of using the constants <span
|
|
class="code">TRUE</span> and <span class="code">FALSE</span> or the <span
|
|
class="code">Boolean.valueOf()</span> factory methods. This increases the
|
|
program's memory requirements and wastes CPU cycles during memory allocation
|
|
and garbage collection.</p> <p>To find this error automatically, include <span
|
|
class="code">java.lang.Boolean</span> in the list of illegal
|
|
instantiations.</p>
|
|
|
|
</div>
|
|
|
|
<hr>
|
|
<p align="center">Copyright © 2002 Oliver Burn. All rights Reserved.</p>
|
|
|
|
</body>
|
|
</html> |