Skip to content

Commit

Permalink
Make Const.SHORT_TYPE_NAMES public for Type.internalTypeNameToSignature
Browse files Browse the repository at this point in the history
  • Loading branch information
nbauma109 committed Aug 29, 2023
1 parent 19121c0 commit c1e615d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/java/org/apache/bcel/Const.java
Original file line number Diff line number Diff line change
Expand Up @@ -2834,7 +2834,7 @@ public final class Const {
/**
* The signature characters corresponding to primitive types, e.g., SHORT_TYPE_NAMES[T_INT] = "I"
*/
private static final String[] SHORT_TYPE_NAMES = {ILLEGAL_TYPE, ILLEGAL_TYPE, ILLEGAL_TYPE, ILLEGAL_TYPE, "Z", "C", "F", "D", "B", "S", "I", "J", "V",
public static final String[] SHORT_TYPE_NAMES = {ILLEGAL_TYPE, ILLEGAL_TYPE, ILLEGAL_TYPE, ILLEGAL_TYPE, "Z", "C", "F", "D", "B", "S", "I", "J", "V",
ILLEGAL_TYPE, ILLEGAL_TYPE, ILLEGAL_TYPE};

/**
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/apache/bcel/generic/Type.java
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ public int hashCode() {
}

static String internalTypeNameToSignature(final String internalTypeName) {
if (StringUtils.isEmpty(internalTypeName) || StringUtils.equalsAny(internalTypeName, "B", "C", "D", "F", "I", "J", "S", "Z")) {
if (StringUtils.isEmpty(internalTypeName) || StringUtils.equalsAny(internalTypeName, Const.SHORT_TYPE_NAMES)) {
return internalTypeName;
}
switch(internalTypeName.charAt(0)) {
Expand Down

0 comments on commit c1e615d

Please sign in to comment.