You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beehive.apache.org by cr...@apache.org on 2007/09/14 07:28:15 UTC
svn commit: r575538 - in /beehive/trunk/netui:
src/compiler-core/org/apache/beehive/netui/compiler/
test/src/compilerTests/testsuite/Jira1205/
test/src/compilerTests/testsuite/Jira1205/Jira1205/
test/src/compilerTests/testsuite/Jira1205/expectedOutput/...
Author: crogers
Date: Thu Sep 13 22:28:14 2007
New Revision: 575538
URL: http://svn.apache.org/viewvc?rev=575538&view=rev
Log:
Fix for BEEHIVE-1205. Modify FlowControllerInfo.setSharedFlowInfo() to check that the global.Global class inherits from SharedFlowController. Includes a new compiler test.
Tests: NetUI BVT (WinXP passed)
Added:
beehive/trunk/netui/test/src/compilerTests/testsuite/Jira1205/
beehive/trunk/netui/test/src/compilerTests/testsuite/Jira1205/Jira1205/
beehive/trunk/netui/test/src/compilerTests/testsuite/Jira1205/Jira1205/Controller.java (with props)
beehive/trunk/netui/test/src/compilerTests/testsuite/Jira1205/Jira1205/index.jsp (with props)
beehive/trunk/netui/test/src/compilerTests/testsuite/Jira1205/expectedOutput/
beehive/trunk/netui/test/src/compilerTests/testsuite/Jira1205/expectedOutput/struts-config-Jira1205.expected (with props)
beehive/trunk/netui/test/src/compilerTests/testsuite/Jira1205/global/
beehive/trunk/netui/test/src/compilerTests/testsuite/Jira1205/global/Global.java (with props)
Modified:
beehive/trunk/netui/src/compiler-core/org/apache/beehive/netui/compiler/FlowControllerInfo.java
Modified: beehive/trunk/netui/src/compiler-core/org/apache/beehive/netui/compiler/FlowControllerInfo.java
URL: http://svn.apache.org/viewvc/beehive/trunk/netui/src/compiler-core/org/apache/beehive/netui/compiler/FlowControllerInfo.java?rev=575538&r1=575537&r2=575538&view=diff
==============================================================================
--- beehive/trunk/netui/src/compiler-core/org/apache/beehive/netui/compiler/FlowControllerInfo.java (original)
+++ beehive/trunk/netui/src/compiler-core/org/apache/beehive/netui/compiler/FlowControllerInfo.java Thu Sep 13 22:28:14 2007
@@ -235,7 +235,9 @@
if ( _sharedFlowTypes.isEmpty() )
{
TypeDeclaration type = env.getTypeDeclaration( GLOBALAPP_FULL_CLASSNAME );
- if ( type != null ) _sharedFlowTypes.put( GLOBALAPP_SHARED_FLOW_NAME, type );
+ if (type != null && CompilerUtils.isAssignableFrom(SHARED_FLOW_BASE_CLASS, type, env)) {
+ _sharedFlowTypes.put(GLOBALAPP_SHARED_FLOW_NAME, type);
+ }
}
_sharedFlowTypeNames = new LinkedHashMap();
Added: beehive/trunk/netui/test/src/compilerTests/testsuite/Jira1205/Jira1205/Controller.java
URL: http://svn.apache.org/viewvc/beehive/trunk/netui/test/src/compilerTests/testsuite/Jira1205/Jira1205/Controller.java?rev=575538&view=auto
==============================================================================
--- beehive/trunk/netui/test/src/compilerTests/testsuite/Jira1205/Jira1205/Controller.java (added)
+++ beehive/trunk/netui/test/src/compilerTests/testsuite/Jira1205/Jira1205/Controller.java Thu Sep 13 22:28:14 2007
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Header:$
+ */
+package Jira1205;
+
+import org.apache.beehive.netui.pageflow.PageFlowController;
+import org.apache.beehive.netui.pageflow.annotations.Jpf;
+
+/*
+ * Test that a global.Global POJO class does not get set as a
+ * shared flow (deprecated GlobalApp) property of the Controller.
+ */
+@Jpf.Controller(
+ simpleActions={
+ @Jpf.SimpleAction(name="begin", path="index.jsp")
+ }
+)
+public class Controller extends PageFlowController
+{
+}
Propchange: beehive/trunk/netui/test/src/compilerTests/testsuite/Jira1205/Jira1205/Controller.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: beehive/trunk/netui/test/src/compilerTests/testsuite/Jira1205/Jira1205/index.jsp
URL: http://svn.apache.org/viewvc/beehive/trunk/netui/test/src/compilerTests/testsuite/Jira1205/Jira1205/index.jsp?rev=575538&view=auto
==============================================================================
(empty)
Propchange: beehive/trunk/netui/test/src/compilerTests/testsuite/Jira1205/Jira1205/index.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Added: beehive/trunk/netui/test/src/compilerTests/testsuite/Jira1205/expectedOutput/struts-config-Jira1205.expected
URL: http://svn.apache.org/viewvc/beehive/trunk/netui/test/src/compilerTests/testsuite/Jira1205/expectedOutput/struts-config-Jira1205.expected?rev=575538&view=auto
==============================================================================
--- beehive/trunk/netui/test/src/compilerTests/testsuite/Jira1205/expectedOutput/struts-config-Jira1205.expected (added)
+++ beehive/trunk/netui/test/src/compilerTests/testsuite/Jira1205/expectedOutput/struts-config-Jira1205.expected Thu Sep 13 22:28:14 2007
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
+<struts-config>
+ <!-- Generated from /Jira1205/Controller.java on Thu Sep 13 12:05:00 MDT 2007 -->
+ <form-beans/>
+ <global-exceptions/>
+ <global-forwards>
+ <forward name="_auto" path=""/>
+ </global-forwards>
+ <action-mappings>
+ <action className="org.apache.beehive.netui.pageflow.config.PageFlowActionMapping" parameter="Jira1205.Controller" path="/begin" scope="request" type="org.apache.beehive.netui.pageflow.internal.FlowControllerAction" validate="false">
+ <set-property property="readonly" value="true"/>
+ <set-property property="simpleAction" value="true"/>
+ <set-property property="defaultForward" value="_defaultForward"/>
+ <forward name="_defaultForward" path="/index.jsp"/>
+ </action>
+ </action-mappings>
+ <controller className="org.apache.beehive.netui.pageflow.config.PageFlowControllerConfig" inputForward="true" processorClass="org.apache.beehive.netui.pageflow.PageFlowRequestProcessor">
+ <set-property property="isReturnToPageDisabled" value="true"/>
+ <set-property property="isReturnToActionDisabled" value="true"/>
+ <set-property property="sharedFlows" value=""/>
+ <set-property property="controllerClass" value="Jira1205.Controller"/>
+ <set-property property="isMissingDefaultMessages" value="true"/>
+ </controller>
+ <message-resources key="_defaultMsgs" null="true" parameter="org.apache.beehive.netui.pageflow.validation.defaultMessages"/>
+</struts-config>
Propchange: beehive/trunk/netui/test/src/compilerTests/testsuite/Jira1205/expectedOutput/struts-config-Jira1205.expected
------------------------------------------------------------------------------
svn:eol-style = native
Added: beehive/trunk/netui/test/src/compilerTests/testsuite/Jira1205/global/Global.java
URL: http://svn.apache.org/viewvc/beehive/trunk/netui/test/src/compilerTests/testsuite/Jira1205/global/Global.java?rev=575538&view=auto
==============================================================================
--- beehive/trunk/netui/test/src/compilerTests/testsuite/Jira1205/global/Global.java (added)
+++ beehive/trunk/netui/test/src/compilerTests/testsuite/Jira1205/global/Global.java Thu Sep 13 22:28:14 2007
@@ -0,0 +1,22 @@
+package global;
+
+public class Global implements java.io.Serializable {
+
+ private static final long serialVersionUID = 1L;
+ private String _name = "foo";
+ private String _id = "bar";
+
+
+ public Global() { }
+
+ public Global(String name, String id) {
+ _name = name;
+ _id = id;
+ }
+
+ public String getName() { return _name; }
+ public void setName(String name) { _name = name; }
+
+ public String getId() { return _id; }
+ public void setId(String id) { _id = id; }
+}
Propchange: beehive/trunk/netui/test/src/compilerTests/testsuite/Jira1205/global/Global.java
------------------------------------------------------------------------------
svn:eol-style = native