Re: svn commit: r742996 - /ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ControllerRequestArtifactInfo.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r742996 - /ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ControllerRequestArtifactInfo.java

Jacques Le Roux
Administrator
Thanks David,

Those artifact infos are really essentials sometimes when you get used to use it

Jacques

From: <[hidden email]>

> Author: jonesde
> Date: Tue Feb 10 15:32:41 2009
> New Revision: 742996
>
> URL: http://svn.apache.org/viewvc?rev=742996&view=rev
> Log:
> Fixed NPE when a request doesn't have an event that was causing the ArtifactInfo stuff to not successfully load
>
> Modified:
>    ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ControllerRequestArtifactInfo.java
>
> Modified: ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ControllerRequestArtifactInfo.java
> URL:
> http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ControllerRequestArtifactInfo.java?rev=742996&r1=742995&r2=742996&view=diff
> ==============================================================================
> --- ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ControllerRequestArtifactInfo.java (original)
> +++ ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ControllerRequestArtifactInfo.java Tue Feb 10 15:32:41 2009
> @@ -67,7 +67,7 @@
>     public void populateAll() throws GeneralException {
>         // populate serviceCalledByRequestEvent, requestsThatAreResponsesToThisRequest, viewsThatAreResponsesToThisRequest and
> related reverse maps
>
> -        if ("service".equals(this.requestInfoMap.event.type)) {
> +        if (this.requestInfoMap.event != null && "service".equals(this.requestInfoMap.event.type)) {
>             String serviceName = (String) this.requestInfoMap.event.invoke;
>             try {
>                 this.serviceCalledByRequestEvent = this.aif.getServiceArtifactInfo(serviceName);
> @@ -82,7 +82,7 @@
>
>         Map<String, ConfigXMLReader.RequestResponse> requestResponseMap =
> UtilGenerics.checkMap(this.requestInfoMap.requestResponseMap);
>         for (ConfigXMLReader.RequestResponse response: requestResponseMap.values()) {
> -            if (response.type.equals("view")) {
> +            if ("view".equals(response.type)) {
>                 String viewUri = response.value;
>                 if (viewUri.startsWith("/")) {
>                     viewUri = viewUri.substring(1);
>
>