Skip to content

Commit 5aa85e3

Browse files
committed
coverity 1116759: null pointer check before indexOf
1 parent 81123a6 commit 5aa85e3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

framework/ipc/src/org/apache/cloudstack/framework/serializer/OnwireClassRegistry.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ static Set<Class<?>> getClasses(ClassLoader loader, String packageName) {
107107
while (resources.hasMoreElements()) {
108108
String filePath = resources.nextElement().getFile();
109109
// WINDOWS HACK
110-
if (filePath.indexOf("%20") > 0)
110+
if (filePath != null && filePath.indexOf("%20") > 0)
111111
filePath = filePath.replaceAll("%20", " ");
112112
if (filePath != null) {
113113
if ((filePath.indexOf("!") > 0) && (filePath.indexOf(".jar") > 0)) {

0 commit comments

Comments
 (0)