Skip to content

Commit

Permalink
fix: add missing " * " on new line for block comments, flip addCodeCo…
Browse files Browse the repository at this point in the history
…mment args (#2145)
  • Loading branch information
skylot committed Apr 8, 2024
1 parent dbadbb0 commit 41d6b00
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
12 changes: 8 additions & 4 deletions jadx-core/src/main/java/jadx/api/data/CommentStyle.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,33 @@ public enum CommentStyle {
*/
LINE("// ", "// ", ""),

// @formatter:off
/**
* <pre>
* /*
* * comment
* *&#47;
* *&#47;
* </pre>
*/
BLOCK("/*\n ", " ", "\n */"),
// @formatter:on
BLOCK("/*\n * ", " * ", "\n */"),

/**
* <pre>
* /* comment *&#47;
* </pre>
*/
BLOCK_CONDENSED("/* ", " ", " */"),
BLOCK_CONDENSED("/* ", " * ", " */"),

// @formatter:off
/**
* <pre>
* /**
* * comment
* *&#47;
* *&#47;
* </pre>
*/
// @formatter:on
JAVADOC("/**\n * ", " * ", "\n */"),

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public void addCodeComment(String comment) {
addAttr(AType.CODE_COMMENTS, new CodeComment(comment, CommentStyle.LINE));
}

public void addCodeComment(CommentStyle style, String comment) {
public void addCodeComment(String comment, CommentStyle style) {
addAttr(AType.CODE_COMMENTS, new CodeComment(comment, style));
}

Expand Down

0 comments on commit 41d6b00

Please sign in to comment.