This change bundle holds a number of error message changes, namely adding the name of the null property to the NullPointerException messages. Changes to the Messages*.properties were made to support this change. This bundle also holds a number of big fixes and code cleanups as suggested by FindBugs. One unit test was change to reflect the l10n change for the NPE updates. After that change, all unit tests run and finish correctly. SECTION: Modified Files ---------------------------- M jsf-api/src/javax/faces/component/UIComponent.java M jsf-api/src/javax/faces/webapp/UIComponentClassicTagBase.java M jsf-api/src/javax/faces/webapp/UIComponentTagBase.java M jsf-ri/src/com/sun/faces/application/ApplicationFactoryImpl.java M jsf-ri/src/com/sun/faces/application/ApplicationImpl.java M jsf-ri/src/com/sun/faces/application/NavigationHandlerImpl.java M jsf-ri/src/com/sun/faces/application/StateManagerImpl.java M jsf-ri/src/com/sun/faces/application/ViewHandlerImpl.java M jsf-ri/src/com/sun/faces/application/ViewHandlerResponseWrapper.java M jsf-ri/src/com/sun/faces/context/FacesContextImpl.java M jsf-ri/src/com/sun/faces/el/FacesResourceBundleELResolver.java M jsf-ri/src/com/sun/faces/el/ImplicitObjectELResolver.java M jsf-ri/src/com/sun/faces/el/ImplicitObjectELResolverForJsp.java M jsf-ri/src/com/sun/faces/el/ManagedBeanELResolver.java M jsf-ri/src/com/sun/faces/el/PropertyResolverImpl.java M jsf-ri/src/com/sun/faces/el/ScopedAttributeELResolver.java M jsf-ri/src/com/sun/faces/el/VariableResolverChainWrapper.java M jsf-ri/src/com/sun/faces/el/VariableResolverImpl.java M jsf-ri/src/com/sun/faces/lifecycle/LifecycleFactoryImpl.java M jsf-ri/src/com/sun/faces/lifecycle/LifecycleImpl.java M jsf-ri/src/com/sun/faces/renderkit/RenderKitFactoryImpl.java M jsf-ri/src/com/sun/faces/renderkit/RenderKitImpl.java M jsf-ri/src/com/sun/faces/renderkit/RenderKitUtils.java M jsf-ri/src/com/sun/faces/renderkit/html_basic/ButtonRenderer.java M jsf-ri/src/com/sun/faces/renderkit/html_basic/CheckboxRenderer.java M jsf-ri/src/com/sun/faces/renderkit/html_basic/CommandLinkRenderer.java M jsf-ri/src/com/sun/faces/renderkit/html_basic/FormRenderer.java M jsf-ri/src/com/sun/faces/renderkit/html_basic/GridRenderer.java M jsf-ri/src/com/sun/faces/renderkit/html_basic/GroupRenderer.java M jsf-ri/src/com/sun/faces/renderkit/html_basic/HiddenRenderer.java M jsf-ri/src/com/sun/faces/renderkit/html_basic/HtmlBasicRenderer.java M jsf-ri/src/com/sun/faces/renderkit/html_basic/HtmlResponseWriter.java M jsf-ri/src/com/sun/faces/renderkit/html_basic/ImageRenderer.java M jsf-ri/src/com/sun/faces/renderkit/html_basic/LabelRenderer.java M jsf-ri/src/com/sun/faces/renderkit/html_basic/MenuRenderer.java M jsf-ri/src/com/sun/faces/renderkit/html_basic/MessageRenderer.java M jsf-ri/src/com/sun/faces/renderkit/html_basic/MessagesRenderer.java M jsf-ri/src/com/sun/faces/renderkit/html_basic/OutputLinkRenderer.java M jsf-ri/src/com/sun/faces/renderkit/html_basic/OutputMessageRenderer.java M jsf-ri/src/com/sun/faces/renderkit/html_basic/SecretRenderer.java M jsf-ri/src/com/sun/faces/renderkit/html_basic/SelectManyCheckboxListRenderer.java M jsf-ri/src/com/sun/faces/renderkit/html_basic/TableRenderer.java M jsf-ri/src/com/sun/faces/renderkit/html_basic/TextRenderer.java M jsf-ri/src/com/sun/faces/renderkit/html_basic/TextareaRenderer.java M jsf-ri/src/com/sun/faces/taglib/jsf_core/SetPropertyActionListenerImpl.java M jsf-ri/src/com/sun/faces/util/Util.java M jsf-ri/src/javax/faces/Messages.properties M jsf-ri/src/javax/faces/Messages_de.properties M jsf-ri/src/javax/faces/Messages_en.properties M jsf-ri/src/javax/faces/Messages_es.properties M jsf-ri/src/javax/faces/Messages_fr.properties M jsf-ri/systest/src/com/sun/faces/systest/render/ButtonRenderer.java M jsf-ri/systest/src/com/sun/faces/systest/render/CustomRenderKitImpl.java M jsf-ri/systest/src/com/sun/faces/systest/render/CustomResponseWriter.java M jsf-ri/systest/src/com/sun/faces/systest/render/FormRenderer.java M jsf-ri/systest/src/com/sun/faces/systest/render/TextRenderer.java M jsf-ri/test/com/sun/faces/application/DeprStateManagerImpl.java M jsf-ri/test/com/sun/faces/util/TestUtil_messages.java M jsf-ri/test-sqe/src/com/sun/faces/systest/render/CustomRenderKitImpl.java M jsf-tools/src/com/sun/faces/tools/GlassfishUpdater.java M jsf-tools/template-src/MessageFactory.java SECTION: Diffs ---------------------------- Index: jsf-api/src/javax/faces/application/Application.java =================================================================== RCS file: /cvs/javaserverfaces-sources/jsf-api/src/javax/faces/application/Application.java,v retrieving revision 1.45 diff -u -r1.45 Application.java --- jsf-api/src/javax/faces/application/Application.java 7 Mar 2006 21:02:45 -0000 1.45 +++ jsf-api/src/javax/faces/application/Application.java 16 May 2006 15:18:32 -0000 @@ -592,6 +592,7 @@ throws FacesException { if (null == componentExpression || null == context || null == componentType) { + // PENDING - i18n String message = "null parameters"; message = message +" componentExpression " + componentExpression + " context " + context + " componentType " + componentType; Index: jsf-api/src/javax/faces/component/UIComponent.java =================================================================== RCS file: /cvs/javaserverfaces-sources/jsf-api/src/javax/faces/component/UIComponent.java,v retrieving revision 1.145 diff -u -r1.145 UIComponent.java --- jsf-api/src/javax/faces/component/UIComponent.java 24 Apr 2006 19:38:43 -0000 1.145 +++ jsf-api/src/javax/faces/component/UIComponent.java 16 May 2006 15:18:33 -0000 @@ -674,7 +674,7 @@ } else { Iterator itr = this.getFacetsAndChildren(); - while (itr.hasNext() & !found) { + while (itr.hasNext() && !found) { found = itr.next().invokeOnComponent(context, clientId, callback); } Index: jsf-api/src/javax/faces/webapp/UIComponentClassicTagBase.java =================================================================== RCS file: /cvs/javaserverfaces-sources/jsf-api/src/javax/faces/webapp/UIComponentClassicTagBase.java,v retrieving revision 1.19 diff -u -r1.19 UIComponentClassicTagBase.java --- jsf-api/src/javax/faces/webapp/UIComponentClassicTagBase.java 10 May 2006 21:06:10 -0000 1.19 +++ jsf-api/src/javax/faces/webapp/UIComponentClassicTagBase.java 16 May 2006 15:18:33 -0000 @@ -262,7 +262,7 @@ * Set in {@link #release}. Never cleared. */ - private String oldJspId = null; + //private String oldJspId = null; /** * This is simply the jspId prefixed by {@link #UNIQUE_ID_PREFIX}. @@ -956,10 +956,15 @@ UIComponent component) { int indexOfComponentInParent = 0; UIComponent parent = component.getParent(); - List children = parent.getChildren(); + + // invert the order of this if and the assignment below. Since this line is + // here, it appears an early return is acceptable/desired if parent is null, + // and, if it is null, we should probably check for that before we try to + // access it. 2006-03-15 jdl if (null == parent) { return; } + List children = parent.getChildren(); indexOfComponentInParent = children.indexOf(component); if (children.size() - 1 == indexOfComponentInParent) { children.add(verbatim); Index: jsf-api/src/javax/faces/webapp/UIComponentTagBase.java =================================================================== RCS file: /cvs/javaserverfaces-sources/jsf-api/src/javax/faces/webapp/UIComponentTagBase.java,v retrieving revision 1.7 diff -u -r1.7 UIComponentTagBase.java --- jsf-api/src/javax/faces/webapp/UIComponentTagBase.java 22 Mar 2006 20:49:58 -0000 1.7 +++ jsf-api/src/javax/faces/webapp/UIComponentTagBase.java 16 May 2006 15:18:33 -0000 @@ -48,7 +48,7 @@ public abstract class UIComponentTagBase extends Object implements JspTag { - protected static Logger log = Logger.getLogger("javax.faces.webapp", + protected static final Logger log = Logger.getLogger("javax.faces.webapp", "javax.faces.LogStrings"); /** Index: jsf-ri/src/com/sun/faces/application/ApplicationFactoryImpl.java =================================================================== RCS file: /cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/application/ApplicationFactoryImpl.java,v retrieving revision 1.13 diff -u -r1.13 ApplicationFactoryImpl.java --- jsf-ri/src/com/sun/faces/application/ApplicationFactoryImpl.java 29 Mar 2006 23:03:42 -0000 1.13 +++ jsf-ri/src/com/sun/faces/application/ApplicationFactoryImpl.java 16 May 2006 15:18:33 -0000 @@ -111,8 +111,7 @@ public void setApplication(Application application) { if (application == null) { String message = MessageUtils.getExceptionMessageString - (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID); - message = message + " Application " + application; + (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "application"); throw new NullPointerException(message); } Index: jsf-ri/src/com/sun/faces/application/ApplicationImpl.java =================================================================== RCS file: /cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/application/ApplicationImpl.java,v retrieving revision 1.76 diff -u -r1.76 ApplicationImpl.java --- jsf-ri/src/com/sun/faces/application/ApplicationImpl.java 11 May 2006 18:48:04 -0000 1.76 +++ jsf-ri/src/com/sun/faces/application/ApplicationImpl.java 16 May 2006 15:18:34 -0000 @@ -182,14 +182,21 @@ public UIComponent createComponent(ValueExpression componentExpression, FacesContext context, String componentType) throws FacesException { - if (null == componentExpression || null == context || - null == componentType) { - String message = MessageUtils.getExceptionMessageString - (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID); - message = message +" componentExpression " + componentExpression + - " context " + context + " componentType " + componentType; - throw new NullPointerException(message); - } + if (null == componentExpression) { + String message = MessageUtils.getExceptionMessageString + (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "componentExpression"); + throw new NullPointerException(message); + } + if (null == context) { + String message = MessageUtils.getExceptionMessageString + (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "context"); + throw new NullPointerException(message); + } + if (null == componentType) { + String message = MessageUtils.getExceptionMessageString + (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "componentType"); + throw new NullPointerException(message); + } Object result = null; boolean createOne = false; @@ -300,8 +307,7 @@ public void setViewHandler(ViewHandler handler) { if (handler == null) { String message = MessageUtils.getExceptionMessageString - (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID); - message = message +" ViewHandler " + handler; + (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "handler"); throw new NullPointerException(message); } synchronized (this) { @@ -331,8 +337,7 @@ public void setStateManager(StateManager manager) { if (manager == null) { String message = MessageUtils.getExceptionMessageString - (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID); - message = message + " StateManager " + manager; + (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "manager"); throw new NullPointerException(message); } synchronized (this) { @@ -357,8 +362,7 @@ public void setActionListener(ActionListener listener) { if (listener == null) { String message = MessageUtils.getExceptionMessageString - (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID); - message = message +" ActionListener " + listener; + (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "listener"); throw new NullPointerException(message); } synchronized (this) { @@ -394,8 +398,7 @@ public void setNavigationHandler(NavigationHandler handler) { if (handler == null) { String message = MessageUtils.getExceptionMessageString - (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID); - message = message +" NavigationHandler " + handler; + (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "handler"); throw new NullPointerException(message); } synchronized (this) { @@ -434,8 +437,7 @@ } if (resolver == null) { String message = MessageUtils.getExceptionMessageString - (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID); - message = message +" PropertyResolver " + resolver; + (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "resolver"); throw new NullPointerException(message); } synchronized (this) { @@ -451,8 +453,7 @@ MethodExpression result = null; if (ref == null) { String message = MessageUtils.getExceptionMessageString - (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID); - message = message +" ref " + ref; + (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "ref"); throw new NullPointerException(message); } if (!(ref.startsWith("#{") && ref.endsWith("}"))) { @@ -483,8 +484,7 @@ throws ReferenceSyntaxException { if (ref == null) { String message = MessageUtils.getExceptionMessageString - (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID); - message = message +" ref " + ref; + (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "ref"); throw new NullPointerException(message); } ValueExpression result = null; @@ -521,8 +521,7 @@ } if (resolver == null) { String message = MessageUtils.getExceptionMessageString - (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID); - message = message +" VariableResolver " + resolver; + (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "resolver"); throw new NullPointerException(message); } synchronized (this) { @@ -535,11 +534,14 @@ public void addComponent(String componentType, String componentClass) { - if (componentType == null || componentClass == null) { + if (componentType == null) { String message = MessageUtils.getExceptionMessageString - (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID); - message = message +" componentType " + componentType + - " componentClass " + componentClass; + (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "componentType"); + throw new NullPointerException(message); + } + if (componentClass == null) { + String message = MessageUtils.getExceptionMessageString + (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "componentClass"); throw new NullPointerException(message); } @@ -556,8 +558,7 @@ throws FacesException { if (componentType == null) { String message = MessageUtils.getExceptionMessageString - (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID); - message = message +" componentType " + componentType; + (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "componentType"); throw new NullPointerException(message); } UIComponent returnVal = null; @@ -591,14 +592,21 @@ FacesContext context, String componentType) throws FacesException { - if (null == componentBinding || null == context || - null == componentType) { + if (null == componentBinding) { String message = MessageUtils.getExceptionMessageString - (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID); - message = message +" componentBinding " + componentBinding + - " context " + context + " componentType " + componentType; + (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "componentBinding"); throw new NullPointerException(message); } + if (null == context) { + String message = MessageUtils.getExceptionMessageString + (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "context"); + throw new NullPointerException(message); + } + if (null == componentType) { + String message = MessageUtils.getExceptionMessageString + (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "componentType"); + throw new NullPointerException(message); + } Object result = null; boolean createOne = false; @@ -628,11 +636,14 @@ public void addConverter(String converterId, String converterClass) { - if (converterId == null || converterClass == null) { + if (converterId == null) { String message = MessageUtils.getExceptionMessageString - (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID); - message = message + " converterId " + converterId + - " converterClass " + converterClass; + (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "converterId"); + throw new NullPointerException(message); + } + if (converterClass == null) { + String message = MessageUtils.getExceptionMessageString + (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "converterClass"); throw new NullPointerException(message); } @@ -646,11 +657,14 @@ public void addConverter(Class targetClass, String converterClass) { - if (targetClass == null || converterClass == null) { + if (targetClass == null) { + String message = MessageUtils.getExceptionMessageString + (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "targetClass"); + throw new NullPointerException(message); + } + if (converterClass == null) { String message = MessageUtils.getExceptionMessageString - (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID); - message = message +" targetClass " + targetClass + - " converterClass " + converterClass; + (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "converterClass"); throw new NullPointerException(message); } @@ -665,8 +679,7 @@ public Converter createConverter(String converterId) { if (converterId == null) { String message = MessageUtils.getExceptionMessageString - (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID); - message = message +" converterId " + converterId; + (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "convertedId"); throw new NullPointerException(message); } Converter returnVal = (Converter) newThing(converterId, converterIdMap); @@ -689,8 +702,7 @@ public Converter createConverter(Class targetClass) { if (targetClass == null) { String message = MessageUtils.getExceptionMessageString - (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID); - message = message +" targetClass " + targetClass; + (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "targetClass"); throw new NullPointerException(message); } Converter returnVal = (Converter) newConverter(targetClass, @@ -810,8 +822,7 @@ public void setSupportedLocales(Collection newLocales) { if (null == newLocales) { String message = MessageUtils.getExceptionMessageString - (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID); - message = message +" newLocales " + newLocales; + (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "newLocales"); throw new NullPointerException(message); } synchronized (this) { @@ -835,8 +846,7 @@ if (locale == null) { String message = MessageUtils.getExceptionMessageString - (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID); - message = message + " locale " + locale; + (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "locale"); throw new NullPointerException(message); } @@ -864,11 +874,14 @@ public void addValidator(String validatorId, String validatorClass) { - if (validatorId == null || validatorClass == null) { + if (validatorId == null) { + String message = MessageUtils.getExceptionMessageString + (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "validatorId"); + throw new NullPointerException(message); + } + if (validatorClass == null) { String message = MessageUtils.getExceptionMessageString - (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID); - message = message + " validatorId " + validatorId + - " validatorClass " + validatorClass; + (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "validatorClass"); throw new NullPointerException(message); } @@ -884,8 +897,7 @@ public Validator createValidator(String validatorId) throws FacesException { if (validatorId == null) { String message = MessageUtils.getExceptionMessageString - (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID); - message = message +" validatorId " + validatorId; + (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "validatorId"); throw new NullPointerException(message); } Validator returnVal = (Validator) newThing(validatorId, validatorMap); Index: jsf-ri/src/com/sun/faces/application/NavigationHandlerImpl.java =================================================================== RCS file: /cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/application/NavigationHandlerImpl.java,v retrieving revision 1.47 diff -u -r1.47 NavigationHandlerImpl.java --- jsf-ri/src/com/sun/faces/application/NavigationHandlerImpl.java 11 May 2006 02:40:28 -0000 1.47 +++ jsf-ri/src/com/sun/faces/application/NavigationHandlerImpl.java 16 May 2006 15:18:34 -0000 @@ -126,14 +126,13 @@ String outcome) { if (context == null) { String message = MessageUtils.getExceptionMessageString - (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID); - message = message + " context " + context; + (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "context"); throw new NullPointerException(message); } if (outcome == null) { if (logger.isLoggable(Level.FINE)) { - logger.fine("No navigation rule found for outcome " - + outcome + "and viewId " + + logger.fine("No navigation rule found for null outcome " + + "and viewId " + context.getViewRoot().getViewId() + " Explicitly remain on the current view "); } Index: jsf-ri/src/com/sun/faces/application/StateManagerImpl.java =================================================================== RCS file: /cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/application/StateManagerImpl.java,v retrieving revision 1.46 diff -u -r1.46 StateManagerImpl.java --- jsf-ri/src/com/sun/faces/application/StateManagerImpl.java 5 Apr 2006 17:53:44 -0000 1.46 +++ jsf-ri/src/com/sun/faces/application/StateManagerImpl.java 16 May 2006 15:18:34 -0000 @@ -206,8 +206,7 @@ if (null == renderKitId) { String message = MessageUtils.getExceptionMessageString - (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID); - message = message + " renderKitId " + renderKitId; + (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "renderKitId"); throw new IllegalArgumentException(message); } @@ -587,8 +586,7 @@ if (null == renderKitId) { String message = MessageUtils.getExceptionMessageString - (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID); - message = message + " renderKitId " + renderKitId; + (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "renderKitId"); throw new IllegalArgumentException(message); } Object state = null; @@ -647,8 +645,7 @@ if (null == renderKitId) { String message = MessageUtils.getExceptionMessageString - (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID); - message = message + " renderKitId " + renderKitId; + (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "renderKitId"); throw new IllegalArgumentException(message); } UIComponent viewRoot = null; Index: jsf-ri/src/com/sun/faces/application/ViewHandlerImpl.java =================================================================== RCS file: /cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/application/ViewHandlerImpl.java,v retrieving revision 1.72 diff -u -r1.72 ViewHandlerImpl.java --- jsf-ri/src/com/sun/faces/application/ViewHandlerImpl.java 10 May 2006 00:24:50 -0000 1.72 +++ jsf-ri/src/com/sun/faces/application/ViewHandlerImpl.java 16 May 2006 15:18:34 -0000 @@ -263,8 +263,7 @@ public UIViewRoot restoreView(FacesContext context, String viewId) { if (context == null) { String message = MessageUtils.getExceptionMessageString - (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID); - message = message +" context " + context; + (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "context"); throw new NullPointerException(message); } @@ -315,8 +314,7 @@ public UIViewRoot createView(FacesContext context, String viewId) { if (context == null) { String message = MessageUtils.getExceptionMessageString - (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID); - message = message +"context " + context; + (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "context"); throw new NullPointerException(message); } @@ -390,11 +388,14 @@ private boolean executePageToBuildView(FacesContext context, UIViewRoot viewToExecute) throws IOException, FacesException { - if (null == context || null == viewToExecute) { + if (null == context) { String message = MessageUtils.getExceptionMessageString - (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID); - message = message + " context " + context + " viewToExecute " + - viewToExecute; + (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "context"); + throw new NullPointerException(message); + } + if (null == viewToExecute) { + String message = MessageUtils.getExceptionMessageString + (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "viewToExecute"); throw new NullPointerException(message); } @@ -496,8 +497,7 @@ if (context == null) { String message = MessageUtils.getExceptionMessageString - (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID); - message = message +"context " + context; + (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "context"); throw new NullPointerException(message); } @@ -529,8 +529,7 @@ if (context == null) { String message = MessageUtils.getExceptionMessageString - (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID); - message = message +"context " + context; + (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "context"); throw new NullPointerException(message); } String result = null; @@ -605,8 +604,7 @@ public void writeState(FacesContext context) throws IOException { if (context == null) { String message = MessageUtils.getExceptionMessageString - (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID); - message = message +"context " + context; + (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "context"); throw new NullPointerException(message); } @@ -627,10 +625,14 @@ public String getActionURL(FacesContext context, String viewId) { - if (context == null || viewId == null) { + if (context == null) { + String message = MessageUtils.getExceptionMessageString + (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "context"); + throw new NullPointerException(message); + } + if (viewId == null) { String message = MessageUtils.getExceptionMessageString - (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID); - message = message +"context " + context + " viewId " + viewId; + (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "viewId"); throw new NullPointerException(message); } @@ -710,8 +712,7 @@ if (context == null) { String message = MessageUtils.getExceptionMessageString - (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID); - message = message +" context " + context; + (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "context"); throw new NullPointerException(message); } Index: jsf-ri/src/com/sun/faces/application/ViewHandlerResponseWrapper.java =================================================================== RCS file: /cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/application/ViewHandlerResponseWrapper.java,v retrieving revision 1.7 diff -u -r1.7 ViewHandlerResponseWrapper.java --- jsf-ri/src/com/sun/faces/application/ViewHandlerResponseWrapper.java 29 Mar 2006 23:03:42 -0000 1.7 +++ jsf-ri/src/com/sun/faces/application/ViewHandlerResponseWrapper.java 16 May 2006 15:18:34 -0000 @@ -152,7 +152,6 @@ } public void clearWrappedResponse() throws IOException { - ServletResponse wrapped = this.getResponse(); if (null != caw) { caw.reset(); } Index: jsf-ri/src/com/sun/faces/context/FacesContextImpl.java =================================================================== RCS file: /cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/context/FacesContextImpl.java,v retrieving revision 1.80 diff -u -r1.80 FacesContextImpl.java --- jsf-ri/src/com/sun/faces/context/FacesContextImpl.java 29 Mar 2006 23:03:43 -0000 1.80 +++ jsf-ri/src/com/sun/faces/context/FacesContextImpl.java 16 May 2006 15:18:34 -0000 @@ -115,11 +115,13 @@ public FacesContextImpl(ExternalContext ec, Lifecycle lifecycle) { - if (null == ec || null == lifecycle) { + if (null == ec) { throw new NullPointerException - ( - MessageUtils.getExceptionMessageString( - MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID)); + (MessageUtils.getExceptionMessageString(MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "ec")); + } + if (null == lifecycle) { + throw new NullPointerException + (MessageUtils.getExceptionMessageString(MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "lifecycle")); } this.externalContext = ec; setCurrentInstance(this); @@ -294,7 +296,7 @@ if (root == null) { throw new NullPointerException (MessageUtils.getExceptionMessageString( - MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID)); + MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "root")); } viewRoot = root; @@ -325,7 +327,7 @@ throw new NullPointerException ( MessageUtils.getExceptionMessageString( - MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID)); + MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "message")); } if (componentMessageLists == null) { Index: jsf-ri/src/com/sun/faces/el/FacesResourceBundleELResolver.java =================================================================== RCS file: /cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/el/FacesResourceBundleELResolver.java,v retrieving revision 1.6 diff -u -r1.6 FacesResourceBundleELResolver.java --- jsf-ri/src/com/sun/faces/el/FacesResourceBundleELResolver.java 29 Mar 2006 23:03:44 -0000 1.6 +++ jsf-ri/src/com/sun/faces/el/FacesResourceBundleELResolver.java 16 May 2006 15:18:35 -0000 @@ -65,7 +65,7 @@ } if (null == base && null == property) { String message = MessageUtils.getExceptionMessageString - (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID); + (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "base and property"); // ????? throw new PropertyNotFoundException(message); } ResourceBundle result = null; @@ -92,7 +92,7 @@ if (null == base && null == property) { String message = MessageUtils.getExceptionMessageString - (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID); + (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "base and property"); // ????? throw new PropertyNotFoundException(message); } @@ -117,8 +117,7 @@ if (base == null && property == null) { message = MessageUtils.getExceptionMessageString - (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID); - message = message + " base " + base + " property " + property; + (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "base and property"); // ????? throw new PropertyNotFoundException(message); } @@ -146,8 +145,7 @@ } if (property == null) { String message = MessageUtils.getExceptionMessageString - (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID); - message = message + " base " + base + " property " + property; + (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "property"); throw new PropertyNotFoundException(message); } ResourceBundle result = null; Index: jsf-ri/src/com/sun/faces/el/ImplicitObjectELResolver.java =================================================================== RCS file: /cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/el/ImplicitObjectELResolver.java,v retrieving revision 1.9 diff -u -r1.9 ImplicitObjectELResolver.java --- jsf-ri/src/com/sun/faces/el/ImplicitObjectELResolver.java 29 Mar 2006 23:03:44 -0000 1.9 +++ jsf-ri/src/com/sun/faces/el/ImplicitObjectELResolver.java 16 May 2006 15:18:35 -0000 @@ -65,8 +65,7 @@ } if (property == null) { String message = MessageUtils.getExceptionMessageString - (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID); - message = message + " base " + base + " property " + property; + (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "property"); throw new PropertyNotFoundException(message); } @@ -133,8 +132,7 @@ } if (property == null) { String message = MessageUtils.getExceptionMessageString - (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID); - message = message + " base " + base + " property " + property; + (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "property"); throw new PropertyNotFoundException(message); } @@ -151,8 +149,7 @@ } if (property == null) { String message = MessageUtils.getExceptionMessageString - (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID); - message = message + " base " + base + " property " + property; + (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "property"); throw new PropertyNotFoundException(message); } @@ -171,8 +168,7 @@ } if (property == null) { String message = MessageUtils.getExceptionMessageString - (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID); - message = message + " base " + base + " property " + property; + (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "property"); throw new PropertyNotFoundException(message); } Index: jsf-ri/src/com/sun/faces/el/ImplicitObjectELResolverForJsp.java =================================================================== RCS file: /cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/el/ImplicitObjectELResolverForJsp.java,v retrieving revision 1.10 diff -u -r1.10 ImplicitObjectELResolverForJsp.java --- jsf-ri/src/com/sun/faces/el/ImplicitObjectELResolverForJsp.java 29 Mar 2006 23:03:44 -0000 1.10 +++ jsf-ri/src/com/sun/faces/el/ImplicitObjectELResolverForJsp.java 16 May 2006 15:18:35 -0000 @@ -57,8 +57,7 @@ } if (property == null) { String message = MessageUtils.getExceptionMessageString - (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID); - message = message + " base " + base + " property " + property; + (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "property"); throw new PropertyNotFoundException(message); } @@ -89,8 +88,7 @@ } if (property == null) { String message = MessageUtils.getExceptionMessageString - (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID); - message = message + " base " + base + " property " + property; + (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "property"); throw new PropertyNotFoundException(message); } @@ -115,8 +113,7 @@ } if (property == null) { String message = MessageUtils.getExceptionMessageString - (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID); - message = message + " base " + base + " property " + property; + (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "property"); throw new PropertyNotFoundException(message); } @@ -142,8 +139,7 @@ } if (property == null) { String message = MessageUtils.getExceptionMessageString - (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID); - message = message + " base " + base + " property " + property; + (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "property"); throw new PropertyNotFoundException(message); } // return value will be ignored unless context.propertyResolved is Index: jsf-ri/src/com/sun/faces/el/ManagedBeanELResolver.java =================================================================== RCS file: /cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/el/ManagedBeanELResolver.java,v retrieving revision 1.13 diff -u -r1.13 ManagedBeanELResolver.java --- jsf-ri/src/com/sun/faces/el/ManagedBeanELResolver.java 29 Mar 2006 23:03:44 -0000 1.13 +++ jsf-ri/src/com/sun/faces/el/ManagedBeanELResolver.java 16 May 2006 15:18:35 -0000 @@ -60,8 +60,7 @@ } if (property == null) { String message = MessageUtils.getExceptionMessageString - (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID); - message = message + " base " + base + " property " + property; + (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "property"); throw new PropertyNotFoundException(message); } @@ -95,8 +94,7 @@ if (base == null && property == null) { String message = MessageUtils.getExceptionMessageString - (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID); - message = message + " base " + base + " property " + property; + (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "base and property"); // ????? throw new PropertyNotFoundException(message); } @@ -109,8 +107,7 @@ if (base == null && property == null) { String message = MessageUtils.getExceptionMessageString - (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID); - message = message + " base " + base + " property " + property; + (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "base and property"); // ????? throw new PropertyNotFoundException(message); } @@ -123,8 +120,7 @@ } if (property == null) { String message = MessageUtils.getExceptionMessageString - (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID); - message = message + " base " + base + " property " + property; + (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "property"); throw new PropertyNotFoundException(message); } Index: jsf-ri/src/com/sun/faces/el/PropertyResolverImpl.java =================================================================== RCS file: /cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/el/PropertyResolverImpl.java,v retrieving revision 1.23 diff -u -r1.23 PropertyResolverImpl.java --- jsf-ri/src/com/sun/faces/el/PropertyResolverImpl.java 29 Mar 2006 23:03:44 -0000 1.23 +++ jsf-ri/src/com/sun/faces/el/PropertyResolverImpl.java 16 May 2006 15:18:35 -0000 @@ -223,10 +223,14 @@ protected static void assertInput(Object base, Object property) throws PropertyNotFoundException { - if (base == null || property == null) { + if (base == null) { + String message = MessageUtils.getExceptionMessageString + (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "base"); + throw new PropertyNotFoundException(message); + } + if (property == null) { String message = MessageUtils.getExceptionMessageString - (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID); - message = message + " base " + base + " property " + property; + (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "property"); throw new PropertyNotFoundException(message); } } @@ -235,8 +239,7 @@ throws PropertyNotFoundException { if (base == null) { String message = MessageUtils.getExceptionMessageString - (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID); - message = message + " base " + base; + (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "base"); throw new PropertyNotFoundException(message); } if (index < 0) { Index: jsf-ri/src/com/sun/faces/el/ScopedAttributeELResolver.java =================================================================== RCS file: /cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/el/ScopedAttributeELResolver.java,v retrieving revision 1.7 diff -u -r1.7 ScopedAttributeELResolver.java --- jsf-ri/src/com/sun/faces/el/ScopedAttributeELResolver.java 29 Mar 2006 23:03:45 -0000 1.7 +++ jsf-ri/src/com/sun/faces/el/ScopedAttributeELResolver.java 16 May 2006 15:18:35 -0000 @@ -56,8 +56,7 @@ } if ( base == null && property == null) { String message = MessageUtils.getExceptionMessageString - (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID); - message = message + " base " + base + " property " + property; + (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "base and property"); // ????? throw new PropertyNotFoundException(message); } @@ -85,8 +84,7 @@ } if ( base == null && property == null) { String message = MessageUtils.getExceptionMessageString - (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID); - message = message + " base " + base + " property " + property; + (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "base and property"); // ????? throw new PropertyNotFoundException(message); } @@ -104,8 +102,7 @@ } if ( base == null && property == null) { String message = MessageUtils.getExceptionMessageString - (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID); - message = message + " base " + base + " property " + property; + (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "base and property"); // ????? throw new PropertyNotFoundException(message); } @@ -138,8 +135,7 @@ } if ( base == null && property == null) { String message = MessageUtils.getExceptionMessageString - (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID); - message = message + " base " + base + " property " + property; + (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "base and property"); // ????? throw new PropertyNotFoundException(message); } context.setPropertyResolved(true); Index: jsf-ri/src/com/sun/faces/el/VariableResolverChainWrapper.java =================================================================== RCS file: /cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/el/VariableResolverChainWrapper.java,v retrieving revision 1.7 diff -u -r1.7 VariableResolverChainWrapper.java --- jsf-ri/src/com/sun/faces/el/VariableResolverChainWrapper.java 3 May 2006 14:49:22 -0000 1.7 +++ jsf-ri/src/com/sun/faces/el/VariableResolverChainWrapper.java 16 May 2006 15:18:35 -0000 @@ -68,8 +68,7 @@ } if ( base == null && property == null) { String message = MessageUtils.getExceptionMessageString - (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID); - message = message + " base " + base + " property " + property; + (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "base and property"); // ????? throw new PropertyNotFoundException(message); } Object result = null; Index: jsf-ri/src/com/sun/faces/el/VariableResolverImpl.java =================================================================== RCS file: /cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/el/VariableResolverImpl.java,v retrieving revision 1.28 diff -u -r1.28 VariableResolverImpl.java --- jsf-ri/src/com/sun/faces/el/VariableResolverImpl.java 29 Mar 2006 23:03:45 -0000 1.28 +++ jsf-ri/src/com/sun/faces/el/VariableResolverImpl.java 16 May 2006 15:18:35 -0000 @@ -60,10 +60,14 @@ public Object resolveVariable(FacesContext context, String name) throws EvaluationException { Object result = null; - if (context == null || name == null) { + if (context == null) { String message = MessageUtils.getExceptionMessageString - (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID); - message = message + " context " + context + " name " + name; + (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "context"); + throw new NullPointerException(message); + } + if (name == null) { + String message = MessageUtils.getExceptionMessageString + (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "name"); throw new NullPointerException(message); } Index: jsf-ri/src/com/sun/faces/lifecycle/LifecycleFactoryImpl.java =================================================================== RCS file: /cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/lifecycle/LifecycleFactoryImpl.java,v retrieving revision 1.29 diff -u -r1.29 LifecycleFactoryImpl.java --- jsf-ri/src/com/sun/faces/lifecycle/LifecycleFactoryImpl.java 29 Mar 2006 23:03:45 -0000 1.29 +++ jsf-ri/src/com/sun/faces/lifecycle/LifecycleFactoryImpl.java 16 May 2006 15:18:35 -0000 @@ -128,9 +128,13 @@ LifecycleWrapper wrapper = null; Lifecycle result = null; Object[] params = {lifecycleId}; - if (null == lifecycleId || null == phase) { + if (null == phase) { throw new NullPointerException( - MessageUtils.getExceptionMessageString(MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID)); + MessageUtils.getExceptionMessageString(MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "lifecycleId")); + } + if (null == phase) { + throw new NullPointerException( + MessageUtils.getExceptionMessageString(MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "phace")); } if (null == @@ -175,9 +179,13 @@ // public void addLifecycle(String lifecycleId, Lifecycle lifecycle) { - if (lifecycleId == null || lifecycle == null) { + if (lifecycleId == null) { + throw new NullPointerException( + MessageUtils.getExceptionMessageString(MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "lifecycleId")); + } + if (lifecycle == null) { throw new NullPointerException( - MessageUtils.getExceptionMessageString(MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID)); + MessageUtils.getExceptionMessageString(MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "lifecycle")); } if (null != lifecycleMap.get(lifecycleId)) { Object params[] = {lifecycleId}; @@ -203,7 +211,7 @@ if (null == lifecycleId) { throw new NullPointerException( - MessageUtils.getExceptionMessageString(MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID)); + MessageUtils.getExceptionMessageString(MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "lifecycleId")); } if (null == lifecycleMap.get(lifecycleId)) { Index: jsf-ri/src/com/sun/faces/lifecycle/LifecycleImpl.java =================================================================== RCS file: /cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/lifecycle/LifecycleImpl.java,v retrieving revision 1.62 diff -u -r1.62 LifecycleImpl.java --- jsf-ri/src/com/sun/faces/lifecycle/LifecycleImpl.java 11 May 2006 18:48:04 -0000 1.62 +++ jsf-ri/src/com/sun/faces/lifecycle/LifecycleImpl.java 16 May 2006 15:18:35 -0000 @@ -100,7 +100,7 @@ if (context == null) { throw new NullPointerException (MessageUtils.getExceptionMessageString - (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID)); + (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "context")); } if (LOGGER.isLoggable(Level.FINE)) { @@ -133,7 +133,7 @@ if (context == null) { throw new NullPointerException (MessageUtils.getExceptionMessageString - (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID)); + (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "context")); } if (LOGGER.isLoggable(Level.FINE)) { @@ -153,7 +153,7 @@ if (listener == null) { throw new NullPointerException (MessageUtils.getExceptionMessageString - (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID)); + (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "listener")); } if (LOGGER.isLoggable(Level.FINE)) { LOGGER.fine("addPhaseListener(" + listener.getPhaseId().toString() @@ -178,7 +178,7 @@ if (listener == null) { throw new NullPointerException (MessageUtils.getExceptionMessageString - (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID)); + (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "listener")); } if (LOGGER.isLoggable(Level.FINE)) { LOGGER.fine("removePhaseListener(" + Index: jsf-ri/src/com/sun/faces/renderkit/RenderKitFactoryImpl.java =================================================================== RCS file: /cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/renderkit/RenderKitFactoryImpl.java,v retrieving revision 1.26 diff -u -r1.26 RenderKitFactoryImpl.java --- jsf-ri/src/com/sun/faces/renderkit/RenderKitFactoryImpl.java 29 Mar 2006 23:03:46 -0000 1.26 +++ jsf-ri/src/com/sun/faces/renderkit/RenderKitFactoryImpl.java 16 May 2006 15:18:35 -0000 @@ -71,11 +71,14 @@ public void addRenderKit(String renderKitId, RenderKit renderKit) { - if (renderKitId == null || renderKit == null) { + if (renderKitId == null) { + String message = MessageUtils.getExceptionMessageString + (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "renderKitId"); + throw new NullPointerException(message); + } + if (renderKit == null) { String message = MessageUtils.getExceptionMessageString - (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID); - message = message + " renderKitId " + renderKitId + - " renderKit " + renderKit; + (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "renderKit"); throw new NullPointerException(message); } @@ -89,8 +92,7 @@ if (renderKitId == null) { String message = MessageUtils.getExceptionMessageString - (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID); - message = message + " renderKitId " + renderKitId; + (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "renderKitId"); throw new NullPointerException(message); } //PENDING (rogerk) do something with FacesContext ... Index: jsf-ri/src/com/sun/faces/renderkit/RenderKitImpl.java =================================================================== RCS file: /cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/renderkit/RenderKitImpl.java,v retrieving revision 1.39 diff -u -r1.39 RenderKitImpl.java --- jsf-ri/src/com/sun/faces/renderkit/RenderKitImpl.java 10 May 2006 20:03:23 -0000 1.39 +++ jsf-ri/src/com/sun/faces/renderkit/RenderKitImpl.java 16 May 2006 15:18:35 -0000 @@ -117,15 +117,22 @@ public void addRenderer(String family, String rendererType, Renderer renderer) { - if (family == null || rendererType == null || renderer == null) { + if (family == null) { String message = MessageUtils.getExceptionMessageString - (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID); - message = message + " family " + family + " rendererType " + - rendererType + " renderer " + renderer; + (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "family"); throw new NullPointerException(message); - } - HashMap renderers = null; + if (rendererType == null) { + String message = MessageUtils.getExceptionMessageString + (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "rendererType"); + throw new NullPointerException(message); + } + if (renderer == null) { + String message = MessageUtils.getExceptionMessageString + (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "renderer"); + throw new NullPointerException(message); + } + HashMap renderers = null; synchronized (rendererFamilies) { // PENDING(edburns): generics would be nice here. @@ -139,11 +146,14 @@ public Renderer getRenderer(String family, String rendererType) { - if (rendererType == null || family == null) { + if (rendererType == null) { + String message = MessageUtils.getExceptionMessageString + (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "rendererType"); + throw new NullPointerException(message); + } + if (family == null) { String message = MessageUtils.getExceptionMessageString - (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID); - message = message + " family " + family + " rendererType " + - rendererType; + (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "family"); throw new NullPointerException(message); } @@ -276,8 +286,6 @@ private String findMatch(FacesContext context, String desiredContentTypeList, String[] supportedTypes) { String contentType = null; - - Map requestMap = context.getExternalContext().getRequestMap(); String [] desiredTypes = contentTypeSplit(desiredContentTypeList); String curContentType = null, curDesiredType = null; Index: jsf-ri/src/com/sun/faces/renderkit/RenderKitUtils.java =================================================================== RCS file: /cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/renderkit/RenderKitUtils.java,v retrieving revision 1.11 diff -u -r1.11 RenderKitUtils.java --- jsf-ri/src/com/sun/faces/renderkit/RenderKitUtils.java 10 May 2006 20:03:23 -0000 1.11 +++ jsf-ri/src/com/sun/faces/renderkit/RenderKitUtils.java 16 May 2006 15:18:35 -0000 @@ -280,7 +280,7 @@ if (context == null) { throw new IllegalArgumentException( MessageUtils.getExceptionMessageString( - MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID)); + MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "context")); } ArrayList list = new ArrayList(); @@ -438,7 +438,7 @@ if (excludes == null) { throw new IllegalArgumentException( MessageUtils.getExceptionMessageString( - MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID)); + MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "excludes")); } if (hasPassThruAttributes(component)) { @@ -520,7 +520,7 @@ if (excludes == null) { throw new IllegalArgumentException( MessageUtils.getExceptionMessageString( - MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID)); + MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "excludes")); } if (excludes.length > 0) { @@ -657,7 +657,7 @@ return arrayAccept; // some helper variables String token = null; - String typeSubType = null; + StringBuffer typeSubType = null; String type = null; String subtype = null; String level = null; @@ -674,13 +674,13 @@ // Example: text/html;level=1,text/html;level=2; q=.5 if (token.contains(";")) { String[] typeParts = token.split(";"); - typeSubType = typeParts[0].trim(); + typeSubType = new StringBuffer(typeParts[0].trim()); for (int j=1; j= 0) { + String[] typeSubTypeParts = typeSubType.toString().split(CONTENT_TYPE_SUBTYPE_DELIMITER); type = typeSubTypeParts[0].trim(); subtype = typeSubTypeParts[1].trim(); } else { - type = typeSubType; + type = typeSubType.toString(); subtype = ""; } // check quality and assign values Index: jsf-ri/src/com/sun/faces/renderkit/html_basic/ButtonRenderer.java =================================================================== RCS file: /cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/renderkit/html_basic/ButtonRenderer.java,v retrieving revision 1.97 diff -u -r1.97 ButtonRenderer.java --- jsf-ri/src/com/sun/faces/renderkit/html_basic/ButtonRenderer.java 5 May 2006 17:26:29 -0000 1.97 +++ jsf-ri/src/com/sun/faces/renderkit/html_basic/ButtonRenderer.java 16 May 2006 15:18:36 -0000 @@ -94,9 +94,13 @@ // public void decode(FacesContext context, UIComponent component) { - if (context == null || component == null) { + if (context == null) { throw new NullPointerException(MessageUtils.getExceptionMessageString( - MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID)); + MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "context")); + } + if (component == null) { + throw new NullPointerException(MessageUtils.getExceptionMessageString( + MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "component")); } if (logger.isLoggable(Level.FINER)) { logger.log(Level.FINER, @@ -150,9 +154,13 @@ public void encodeBegin(FacesContext context, UIComponent component) throws IOException { - if (context == null || component == null) { + if (context == null) { + throw new NullPointerException(MessageUtils.getExceptionMessageString( + MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "context")); + } + if (component == null) { throw new NullPointerException(MessageUtils.getExceptionMessageString( - MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID)); + MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "component")); } if (logger.isLoggable(Level.FINER)) { logger.log(Level.FINER, @@ -238,9 +246,13 @@ public void encodeEnd(FacesContext context, UIComponent component) throws IOException { - if (context == null || component == null) { + if (context == null) { + throw new NullPointerException(MessageUtils.getExceptionMessageString( + MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "context")); + } + if (component == null) { throw new NullPointerException(MessageUtils.getExceptionMessageString( - MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID)); + MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "component")); } } Index: jsf-ri/src/com/sun/faces/renderkit/html_basic/CheckboxRenderer.java =================================================================== RCS file: /cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/renderkit/html_basic/CheckboxRenderer.java,v retrieving revision 1.79 diff -u -r1.79 CheckboxRenderer.java --- jsf-ri/src/com/sun/faces/renderkit/html_basic/CheckboxRenderer.java 29 Mar 2006 23:03:47 -0000 1.79 +++ jsf-ri/src/com/sun/faces/renderkit/html_basic/CheckboxRenderer.java 16 May 2006 15:18:36 -0000 @@ -93,9 +93,13 @@ public void decode(FacesContext context, UIComponent component) { - if (context == null || component == null) { + if (context == null) { throw new NullPointerException(MessageUtils.getExceptionMessageString( - MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID)); + MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "context")); + } + if (component == null) { + throw new NullPointerException(MessageUtils.getExceptionMessageString( + MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "component")); } if (logger.isLoggable(Level.FINER)) { logger.log(Level.FINER, @@ -155,9 +159,13 @@ public void encodeBegin(FacesContext context, UIComponent component) throws IOException { - if (context == null || component == null) { + if (context == null) { + throw new NullPointerException( + MessageUtils.getExceptionMessageString(MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "context")); + } + if (component == null) { throw new NullPointerException( - MessageUtils.getExceptionMessageString(MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID)); + MessageUtils.getExceptionMessageString(MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "component")); } } Index: jsf-ri/src/com/sun/faces/renderkit/html_basic/CommandLinkRenderer.java =================================================================== RCS file: /cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/renderkit/html_basic/CommandLinkRenderer.java,v retrieving revision 1.50 diff -u -r1.50 CommandLinkRenderer.java --- jsf-ri/src/com/sun/faces/renderkit/html_basic/CommandLinkRenderer.java 10 May 2006 20:03:23 -0000 1.50 +++ jsf-ri/src/com/sun/faces/renderkit/html_basic/CommandLinkRenderer.java 16 May 2006 15:18:36 -0000 @@ -95,9 +95,13 @@ public void decode(FacesContext context, UIComponent component) { - if (context == null || component == null) { + if (context == null) { throw new NullPointerException(MessageUtils.getExceptionMessageString( - MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID)); + MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "context")); + } + if (component == null) { + throw new NullPointerException(MessageUtils.getExceptionMessageString( + MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "component")); } if (logger.isLoggable(Level.FINER)) { @@ -149,9 +153,13 @@ public void encodeBegin(FacesContext context, UIComponent component) throws IOException { - if (context == null || component == null) { + if (context == null) { throw new NullPointerException( - MessageUtils.getExceptionMessageString(MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID)); + MessageUtils.getExceptionMessageString(MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "context")); + } + if (component == null) { + throw new NullPointerException( + MessageUtils.getExceptionMessageString(MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "component")); } if (logger.isLoggable(Level.FINER)) { logger.log(Level.FINER, @@ -197,9 +205,13 @@ public void encodeChildren(FacesContext context, UIComponent component) throws IOException { - if (context == null || component == null) { + if (context == null) { throw new NullPointerException( - MessageUtils.getExceptionMessageString(MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID)); + MessageUtils.getExceptionMessageString(MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "context")); + } + if (component == null) { + throw new NullPointerException( + MessageUtils.getExceptionMessageString(MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "component")); } if (logger.isLoggable(Level.FINER)) { logger.log(Level.FINER, @@ -230,10 +242,15 @@ public void encodeEnd(FacesContext context, UIComponent component) throws IOException { - if (context == null || component == null) { + if (context == null) { + throw new NullPointerException( + MessageUtils.getExceptionMessageString(MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "context")); + } + if (component == null) { throw new NullPointerException( - MessageUtils.getExceptionMessageString(MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID)); + MessageUtils.getExceptionMessageString(MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "component")); } + UICommand command = (UICommand) component; // suppress rendering if "rendered" property on the command is @@ -404,7 +421,6 @@ private void writeScriptContent(FacesContext context, ResponseWriter writer, UIComponent component) throws IOException { - Map requestMap = context.getExternalContext().getRequestMap(); UIForm myForm = getMyForm(component); boolean isXHTML = writer.getContentType().equals(RIConstants.XHTML_CONTENT_TYPE); Index: jsf-ri/src/com/sun/faces/renderkit/html_basic/FormRenderer.java =================================================================== RCS file: /cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/renderkit/html_basic/FormRenderer.java,v retrieving revision 1.95 diff -u -r1.95 FormRenderer.java --- jsf-ri/src/com/sun/faces/renderkit/html_basic/FormRenderer.java 29 Mar 2006 23:03:47 -0000 1.95 +++ jsf-ri/src/com/sun/faces/renderkit/html_basic/FormRenderer.java 16 May 2006 15:18:36 -0000 @@ -114,9 +114,13 @@ throws IOException { String styleClass = null; - if (context == null || component == null) { - throw new NullPointerException(MessageUtils.getExceptionMessageString( - MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID)); + if (context == null) { + throw new NullPointerException( + MessageUtils.getExceptionMessageString(MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "context")); + } + if (component == null) { + throw new NullPointerException( + MessageUtils.getExceptionMessageString(MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "component")); } if (logger.isLoggable(Level.FINER)) { logger.log(Level.FINER, "Begin encoding component " + @@ -175,9 +179,13 @@ public void encodeEnd(FacesContext context, UIComponent component) throws IOException { - if (context == null || component == null) { - throw new NullPointerException(MessageUtils.getExceptionMessageString( - MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID)); + if (context == null) { + throw new NullPointerException( + MessageUtils.getExceptionMessageString(MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "context")); + } + if (component == null) { + throw new NullPointerException( + MessageUtils.getExceptionMessageString(MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "component")); } // suppress rendering if "rendered" property on the component is // false. Index: jsf-ri/src/com/sun/faces/renderkit/html_basic/GridRenderer.java =================================================================== RCS file: /cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/renderkit/html_basic/GridRenderer.java,v retrieving revision 1.42 diff -u -r1.42 GridRenderer.java --- jsf-ri/src/com/sun/faces/renderkit/html_basic/GridRenderer.java 29 Mar 2006 23:03:47 -0000 1.42 +++ jsf-ri/src/com/sun/faces/renderkit/html_basic/GridRenderer.java 16 May 2006 15:18:36 -0000 @@ -95,9 +95,13 @@ public void encodeBegin(FacesContext context, UIComponent component) throws IOException { - if (context == null || component == null) { - throw new NullPointerException(MessageUtils.getExceptionMessageString( - MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID)); + if (context == null) { + throw new NullPointerException( + MessageUtils.getExceptionMessageString(MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "context")); + } + if (component == null) { + throw new NullPointerException( + MessageUtils.getExceptionMessageString(MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "component")); } if (logger.isLoggable(Level.FINER)) { @@ -198,9 +202,13 @@ public void encodeChildren(FacesContext context, UIComponent component) throws IOException { - if (context == null || component == null) { - throw new NullPointerException(MessageUtils.getExceptionMessageString( - MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID)); + if (context == null) { + throw new NullPointerException( + MessageUtils.getExceptionMessageString(MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "context")); + } + if (component == null) { + throw new NullPointerException( + MessageUtils.getExceptionMessageString(MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "component")); } if (logger.isLoggable(Level.FINER)) { logger.log(Level.FINER,"Begin encoding children " + component.getId()); @@ -288,9 +296,13 @@ public void encodeEnd(FacesContext context, UIComponent component) throws IOException { - if (context == null || component == null) { - throw new NullPointerException(MessageUtils.getExceptionMessageString( - MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID)); + if (context == null) { + throw new NullPointerException( + MessageUtils.getExceptionMessageString(MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "context")); + } + if (component == null) { + throw new NullPointerException( + MessageUtils.getExceptionMessageString(MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "component")); } // suppress rendering if "rendered" property on the component is // false. Index: jsf-ri/src/com/sun/faces/renderkit/html_basic/GroupRenderer.java =================================================================== RCS file: /cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/renderkit/html_basic/GroupRenderer.java,v retrieving revision 1.30 diff -u -r1.30 GroupRenderer.java --- jsf-ri/src/com/sun/faces/renderkit/html_basic/GroupRenderer.java 29 Mar 2006 23:03:47 -0000 1.30 +++ jsf-ri/src/com/sun/faces/renderkit/html_basic/GroupRenderer.java 16 May 2006 15:18:36 -0000 @@ -161,9 +161,13 @@ public void encodeEnd(FacesContext context, UIComponent component) throws IOException { - if (context == null || component == null) { - throw new NullPointerException(MessageUtils.getExceptionMessageString( - MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID)); + if (context == null) { + throw new NullPointerException( + MessageUtils.getExceptionMessageString(MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "context")); + } + if (component == null) { + throw new NullPointerException( + MessageUtils.getExceptionMessageString(MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "component")); } // suppress rendering if "rendered" property on the component is // false. Index: jsf-ri/src/com/sun/faces/renderkit/html_basic/HiddenRenderer.java =================================================================== RCS file: /cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/renderkit/html_basic/HiddenRenderer.java,v retrieving revision 1.27 diff -u -r1.27 HiddenRenderer.java --- jsf-ri/src/com/sun/faces/renderkit/html_basic/HiddenRenderer.java 29 Mar 2006 23:03:47 -0000 1.27 +++ jsf-ri/src/com/sun/faces/renderkit/html_basic/HiddenRenderer.java 16 May 2006 15:18:36 -0000 @@ -84,9 +84,13 @@ public void encodeBegin(FacesContext context, UIComponent component) throws IOException { - if (context == null || component == null) { - throw new NullPointerException(MessageUtils.getExceptionMessageString( - MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID)); + if (context == null) { + throw new NullPointerException( + MessageUtils.getExceptionMessageString(MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "context")); + } + if (component == null) { + throw new NullPointerException( + MessageUtils.getExceptionMessageString(MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "component")); } } Index: jsf-ri/src/com/sun/faces/renderkit/html_basic/HtmlBasicRenderer.java =================================================================== RCS file: /cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/renderkit/html_basic/HtmlBasicRenderer.java,v retrieving revision 1.107 diff -u -r1.107 HtmlBasicRenderer.java --- jsf-ri/src/com/sun/faces/renderkit/html_basic/HtmlBasicRenderer.java 29 Mar 2006 23:03:48 -0000 1.107 +++ jsf-ri/src/com/sun/faces/renderkit/html_basic/HtmlBasicRenderer.java 16 May 2006 15:18:36 -0000 @@ -123,9 +123,13 @@ public void decode(FacesContext context, UIComponent component) { - if (context == null || component == null) { - throw new NullPointerException(MessageUtils.getExceptionMessageString( - MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID)); + if (context == null) { + throw new NullPointerException( + MessageUtils.getExceptionMessageString(MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "context")); + } + if (component == null) { + throw new NullPointerException( + MessageUtils.getExceptionMessageString(MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "component")); } if (logger.isLoggable(Level.FINER)) { @@ -181,9 +185,13 @@ String currentValue = null; ResponseWriter writer = null; - if (context == null || component == null) { - throw new NullPointerException(MessageUtils.getExceptionMessageString( - MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID)); + if (context == null) { + throw new NullPointerException( + MessageUtils.getExceptionMessageString(MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "context")); + } + if (component == null) { + throw new NullPointerException( + MessageUtils.getExceptionMessageString(MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "component")); } if (logger.isLoggable(Level.FINER)) { Index: jsf-ri/src/com/sun/faces/renderkit/html_basic/HtmlResponseWriter.java =================================================================== RCS file: /cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/renderkit/html_basic/HtmlResponseWriter.java,v retrieving revision 1.26 diff -u -r1.26 HtmlResponseWriter.java --- jsf-ri/src/com/sun/faces/renderkit/html_basic/HtmlResponseWriter.java 29 Mar 2006 23:03:48 -0000 1.26 +++ jsf-ri/src/com/sun/faces/renderkit/html_basic/HtmlResponseWriter.java 16 May 2006 15:18:36 -0000 @@ -177,7 +177,7 @@ throws IOException { if (name == null) { throw new NullPointerException(MessageUtils.getExceptionMessageString( - MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID)); + MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "name")); } closeStartIfNecessary(); char firstChar = name.charAt(0); @@ -208,7 +208,7 @@ public void endElement(String name) throws IOException { if (name == null) { throw new NullPointerException(MessageUtils.getExceptionMessageString( - MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID)); + MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "name")); } // always turn escaping back on once an element ends @@ -254,7 +254,7 @@ throws IOException { if (name == null) { throw new NullPointerException(MessageUtils.getExceptionMessageString( - MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID)); + MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "name")); } if ( value == null ) { return; @@ -309,9 +309,13 @@ public void writeURIAttribute(String name, Object value, String componentPropertyName) throws IOException { - if (name == null || value == null) { + if (name == null) { + throw new NullPointerException(MessageUtils.getExceptionMessageString( + MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "name")); + } + if (value == null) { throw new NullPointerException(MessageUtils.getExceptionMessageString( - MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID)); + MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "value")); } writer.write(' '); @@ -346,7 +350,7 @@ public void writeComment(Object comment) throws IOException { if (comment == null) { throw new NullPointerException(MessageUtils.getExceptionMessageString( - MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID)); + MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "comment")); } closeStartIfNecessary(); // Don't include a trailing space after the '