Axel Nennker created CB-5537:
--------------------------------

             Summary: ClassNotFound in PluginEntry for empty string
                 Key: CB-5537
                 URL: https://issues.apache.org/jira/browse/CB-5537
             Project: Apache Cordova
          Issue Type: Bug
         Environment: Android
https://github.com/apache/cordova-android/
            Reporter: Axel Nennker


PluginEntry.getClassByName is called with an argument of "" (not null).
The method getClassByName checks for null but not for "" and so it throws 
ClassNotFound.
This happens for the service http://api.phonegap.com/1.0/device

I am using cordova-3.1.0-0.2.0 but this seems to be in the latest code too.
A screenshot of the debugging window is attached to my email to dev-cordova.

A simple fix seems to be to never to set this.pluginClass in PluginEntry.java 
to "" but to null. 
PluginManager.java contains the assignment: pluginClass = ""
Or to check not only for null but for "" too.

-Axel

https://github.com/apache/cordova-android/blob/master/framework/src/org/apache/cordova/PluginEntry.java#L116
https://github.com/apache/cordova-android/blob/master/framework/src/org/apache/cordova/PluginManager.java#L121



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to