Skip to content

Commit 1fca5ce

Browse files
authored
Merge pull request #416 from magento/286-StringIndexOutOfBoundsException
#286 Fixed StringIndexOutOfBoundsException on PluginInspection
2 parents 7f30949 + d2e840d commit 1fca5ce

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/com/magento/idea/magento2plugin/inspections/php/PluginInspection.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,9 @@ private String getTargetMethodName(
323323
final String pluginMethodName = pluginMethod.getName();
324324
final String targetClassMethodName = pluginMethodName
325325
.replace(pluginPrefix, "");
326+
if (targetClassMethodName.isEmpty()) {
327+
return null;
328+
}
326329
final char firstCharOfTargetName = targetClassMethodName.charAt(0);
327330
final int charType = Character.getType(firstCharOfTargetName);
328331
if (charType == Character.LOWERCASE_LETTER) {

0 commit comments

Comments
 (0)