[428212] Exception in Decorator. The 'JavaScript Function Override Indicator' decorator will be disabled.
An additional check is added due to prevent AIOOB exception
Signed-off-by: vrubezhny <vrubezhny@exadel.com>
diff --git a/bundles/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/core/SearchableEnvironment.java b/bundles/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/core/SearchableEnvironment.java
index 595bdf9..a41cc45 100644
--- a/bundles/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/core/SearchableEnvironment.java
+++ b/bundles/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/core/SearchableEnvironment.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2014 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -156,6 +156,9 @@
else if (sourceType.getHandle().getClassFile()!=null)
types = sourceType.getHandle().getClassFile().getTypes();
+ if (types == null || types.length == 0)
+ return null;
+
ISourceType[] sourceTypes = new ISourceType[types.length];
// in the resulting collection, ensure the requested type is