зеркало из https://github.com/mozilla/gecko-dev.git
Renaming Kit.badArg() -> Kit.argBug() for consistency with Kit.codeBug()
This commit is contained in:
Родитель
8c0cb1276d
Коммит
d4590c48fa
|
@ -301,11 +301,11 @@ public class Decompiler
|
||||||
if (length == 0) { return ""; }
|
if (length == 0) { return ""; }
|
||||||
|
|
||||||
int indent = properties.getInt(INITIAL_INDENT_PROP, 0);
|
int indent = properties.getInt(INITIAL_INDENT_PROP, 0);
|
||||||
if (indent < 0) Kit.badArg();
|
if (indent < 0) Kit.argBug();
|
||||||
int indentGap = properties.getInt(INDENT_GAP_PROP, 4);
|
int indentGap = properties.getInt(INDENT_GAP_PROP, 4);
|
||||||
if (indentGap < 0) Kit.badArg();
|
if (indentGap < 0) Kit.argBug();
|
||||||
int caseGap = properties.getInt(CASE_GAP_PROP, 2);
|
int caseGap = properties.getInt(CASE_GAP_PROP, 2);
|
||||||
if (caseGap < 0) Kit.badArg();
|
if (caseGap < 0) Kit.argBug();
|
||||||
|
|
||||||
StringBuffer result = new StringBuffer();
|
StringBuffer result = new StringBuffer();
|
||||||
boolean justFunctionBody = (0 != (flags & Decompiler.ONLY_BODY_FLAG));
|
boolean justFunctionBody = (0 != (flags & Decompiler.ONLY_BODY_FLAG));
|
||||||
|
|
|
@ -367,7 +367,17 @@ public class Kit
|
||||||
* Convinient way to throw IllegalArgumentException to indicate bad
|
* Convinient way to throw IllegalArgumentException to indicate bad
|
||||||
* argument.
|
* argument.
|
||||||
*/
|
*/
|
||||||
public static void badArg()
|
public static void argBug()
|
||||||
|
throws IllegalArgumentException
|
||||||
|
{
|
||||||
|
throw new IllegalArgumentException();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convinient way to throw IllegalStateException to indicate bad
|
||||||
|
* state.
|
||||||
|
*/
|
||||||
|
public static void stateBug()
|
||||||
throws IllegalArgumentException
|
throws IllegalArgumentException
|
||||||
{
|
{
|
||||||
throw new IllegalArgumentException();
|
throw new IllegalArgumentException();
|
||||||
|
|
Загрузка…
Ссылка в новой задаче