mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
inspection description reworded
This commit is contained in:
@@ -1,10 +1,19 @@
|
||||
<html>
|
||||
<body>
|
||||
Report occurrences where usages of "magic" constants only are allowed
|
||||
Report occurrences where usages of "magic" constants are preferred
|
||||
but other expressions are used instead. <br>
|
||||
E.g. <br>
|
||||
<b><font color="#000080">new </font></b> Font("Arial", <b><font color="#000080">2</font></b> ) // not allowed <br>
|
||||
instead of <b><font color="#000080">new </font></b> Font("Arial", Font. <b><font color="#000080">ITALIC</font></b> ) // OK <br>
|
||||
E.g.
|
||||
|
||||
<br> <br>
|
||||
|
||||
<code>// bare literal used, warning:</code><br>
|
||||
<code><b><font color="#000080">new </font></b> Font("Arial", <span style="background-color:yellow"><b><font color="#000080">2</font></b></span>)</code><br>
|
||||
|
||||
<br>
|
||||
instead of<br> <br>
|
||||
|
||||
<code>// "magic" constant used, good:</code><br>
|
||||
<code><b><font color="#000080">new </font></b> Font("Arial", Font.<b><font color="#000080">ITALIC</font></b>)</code><br>
|
||||
|
||||
<br> <br>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user