Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoritrimble2011-01-04 15:48:01 -0500
committeritrimble2011-01-04 15:48:01 -0500
commit2030cc4acd870dcafebee2efa516a9aafa57c251 (patch)
tree37afe7a9e09e7a2011b339272df79a38a4457627
parenta91b69a7be4047ac652a60a2fc2d33ad2f8b6a98 (diff)
downloadwebtools.jsf-2030cc4acd870dcafebee2efa516a9aafa57c251.tar.gz
webtools.jsf-2030cc4acd870dcafebee2efa516a9aafa57c251.tar.xz
webtools.jsf-2030cc4acd870dcafebee2efa516a9aafa57c251.zip
Bug 327120 - Need to check whether getTextContent() is null before calling getTextContent().trim()
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/DTComponentIntrospector.java2
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/taglibprocessing/attributevalues/ActionType.java2
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/facet/FaceletChangeDelegate.java2
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/facet/FaceletUninstallDelegate.java3
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/TagModelParser.java2
5 files changed, 6 insertions, 5 deletions
diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/DTComponentIntrospector.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/DTComponentIntrospector.java
index 66763f4e8..c62cffed4 100644
--- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/DTComponentIntrospector.java
+++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/view/DTComponentIntrospector.java
@@ -218,7 +218,7 @@ public final class DTComponentIntrospector
final String type = component.getComponentType().getTextContent()
.trim();
- if (componentType.equals(type))
+ if (componentType.equals(type) && component.getComponentClass() != null && component.getComponentClass().getTextContent() != null)
{
return component.getComponentClass().getTextContent().trim();
}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/taglibprocessing/attributevalues/ActionType.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/taglibprocessing/attributevalues/ActionType.java
index 8204ef9a3..85a8c630f 100644
--- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/taglibprocessing/attributevalues/ActionType.java
+++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/taglibprocessing/attributevalues/ActionType.java
@@ -80,7 +80,7 @@ public class ActionType extends MethodBindingType implements IPossibleValues{
for (final NavigationRuleType rule : rules) {
for (Iterator cases=rule.getNavigationCase().iterator();cases.hasNext();) {
NavigationCaseType navCase = (NavigationCaseType)cases.next();
- if (navCase.getFromOutcome() != null &&
+ if (navCase.getFromOutcome() != null && navCase.getFromOutcome().getTextContent() != null &&
value.equals(navCase.getFromOutcome().getTextContent().trim()))
return true;
}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/facet/FaceletChangeDelegate.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/facet/FaceletChangeDelegate.java
index 84a5bb203..8f9853aa7 100644
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/facet/FaceletChangeDelegate.java
+++ b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/facet/FaceletChangeDelegate.java
@@ -146,7 +146,7 @@ public abstract class FaceletChangeDelegate implements IDelegate
{
final ViewHandlerType viewHandler = (ViewHandlerType) viewIt
.next();
- if (viewHandler != null
+ if (viewHandler != null && viewHandler.getTextContent() != null
&& RUNTIME_VIEWHANDLER_CLASS_NAME
.equals(viewHandler.getTextContent().trim()))
{
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/facet/FaceletUninstallDelegate.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/facet/FaceletUninstallDelegate.java
index 3e0170e3a..757521b11 100644
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/facet/FaceletUninstallDelegate.java
+++ b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/facet/FaceletUninstallDelegate.java
@@ -127,7 +127,8 @@ public class FaceletUninstallDelegate extends FaceletChangeDelegate
{
final ViewHandlerType viewHandlerType = (ViewHandlerType) viewHandlerIt
.next();
- if (viewHandlerType != null
+ if (viewHandlerType != null && viewHandlerType
+ .getTextContent() != null
&& RUNTIME_VIEWHANDLER_CLASS_NAME
.equals(viewHandlerType
.getTextContent().trim()))
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/TagModelParser.java b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/TagModelParser.java
index bb7c1641c..0c90da9c7 100644
--- a/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/TagModelParser.java
+++ b/jsf/plugins/org.eclipse.jst.jsf.facelet.core/src/org/eclipse/jst/jsf/facelet/core/internal/registry/taglib/TagModelParser.java
@@ -212,7 +212,7 @@ public class TagModelParser
if (node.getNodeType() == Node.ELEMENT_NODE)
{
- if (ELEMENT_NAME_LIBRARY_CLASS.equals(node.getNodeName()))
+ if (node.getTextContent() != null && ELEMENT_NAME_LIBRARY_CLASS.equals(node.getNodeName()))
{
final FaceletLibraryClassTagLib faceletLibraryClassTagLib = FaceletTaglibFactory.eINSTANCE
.createFaceletLibraryClassTagLib();

Back to the top