[
https://issues.apache.org/jira/browse/KARAF-6351?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16879095#comment-16879095
]
ASF GitHub Bot commented on KARAF-6351:
---------------------------------------
skitt commented on pull request #899: [KARAF-6351] Handle package-less classes
URL: https://github.com/apache/karaf/pull/899
The classes command unconditionnally tries to extract a package name,
which fails with classes which don't have one. This patch checks for
the presence of "/" before attempting to use it as a delimiter.
Classes with no package are assumed to not be exported.
Signed-off-by: Stephen Kitt <[email protected]>
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> The classes command fails with package-less classes
> ---------------------------------------------------
>
> Key: KARAF-6351
> URL: https://issues.apache.org/jira/browse/KARAF-6351
> Project: Karaf
> Issue Type: Bug
> Components: karaf
> Affects Versions: 4.2.1, 4.2.2, 4.2.3, 4.2.4, 4.2.5, 4.2.6
> Reporter: Stephen Kitt
> Assignee: Stephen Kitt
> Priority: Minor
>
> Running
> {code:java}
> classes{code}
> often produces errors of the form
>
> {code:java}
> Unable to execute command on bundle 451: String index out of range: -1{code}
> Looking at the logs shows
> {code:java}
> Caused by: java.lang.StringIndexOutOfBoundsException: String index
> out of range: -1
> at java.lang.String.substring(String.java:1967) ~[?:?]
> at
> org.apache.karaf.bundle.command.Classes.isExported(Classes.java:81) ~[?:?]
> at
> org.apache.karaf.bundle.command.Classes.executeOnBundle(Classes.java:67)
> ~[?:?]{code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)