You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@turbine.apache.org by tv...@apache.org on 2011/08/30 20:08:42 UTC
svn commit: r1163317 - in /turbine/core/trunk/src: changes/changes.xml
java/org/apache/turbine/services/pull/TurbinePullService.java
Author: tv
Date: Tue Aug 30 18:08:42 2011
New Revision: 1163317
URL: http://svn.apache.org/viewvc?rev=1163317&view=rev
Log:
Fix possible NPE in TurbinePullService.
Modified:
turbine/core/trunk/src/changes/changes.xml
turbine/core/trunk/src/java/org/apache/turbine/services/pull/TurbinePullService.java
Modified: turbine/core/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/turbine/core/trunk/src/changes/changes.xml?rev=1163317&r1=1163316&r2=1163317&view=diff
==============================================================================
--- turbine/core/trunk/src/changes/changes.xml (original)
+++ turbine/core/trunk/src/changes/changes.xml Tue Aug 30 18:08:42 2011
@@ -25,6 +25,9 @@
<body>
<release version="4.0-M2" date="in Subversion">
+ <action type="fix" dev="tv">
+ Fix possible NPE in TurbinePullService.
+ </action>
<action type="fix" dev="tv" issue="TRB-82">
Use lastIndexOf() to get the template extension in TurbineTemplateService.
</action>
Modified: turbine/core/trunk/src/java/org/apache/turbine/services/pull/TurbinePullService.java
URL: http://svn.apache.org/viewvc/turbine/core/trunk/src/java/org/apache/turbine/services/pull/TurbinePullService.java?rev=1163317&r1=1163316&r2=1163317&view=diff
==============================================================================
--- turbine/core/trunk/src/java/org/apache/turbine/services/pull/TurbinePullService.java (original)
+++ turbine/core/trunk/src/java/org/apache/turbine/services/pull/TurbinePullService.java Tue Aug 30 18:08:42 2011
@@ -557,7 +557,6 @@ public class TurbinePullService
* @param user The <code>User</code> object whose storage to
* retrieve the tool from.
*/
- @SuppressWarnings({ "null" })
private void populateWithSessionTools(List<ToolData> tools, Context context,
PipelineData pipelineData, User user)
{
@@ -588,16 +587,16 @@ public class TurbinePullService
// session tools are init'd with the User object
initTool(tool, user);
+ }
+ // *NOT* else
+ if(tool != null)
+ {
// store the newly created tool in the session
runData.getSession().setAttribute(
SESSION_TOOLS_ATTRIBUTE_PREFIX
+ tool.getClass().getName(), tool);
- }
- // *NOT* else
- if(tool != null)
- {
// This is a semantics change. In the old
// Turbine, Session tools were initialized and
// then refreshed every time they were pulled
@@ -647,7 +646,6 @@ public class TurbinePullService
* @param user The <code>User</code> object whose storage to
* retrieve the tool from.
*/
- @SuppressWarnings({ "null" })
private void populateWithSessionTools(List<ToolData> tools, Context context,
RunData data, User user)
{
@@ -675,16 +673,16 @@ public class TurbinePullService
// session tools are init'd with the User object
initTool(tool, user);
+ }
+ // *NOT* else
+ if(tool != null)
+ {
// store the newly created tool in the session
data.getSession().setAttribute(
SESSION_TOOLS_ATTRIBUTE_PREFIX
+ tool.getClass().getName(), tool);
- }
- // *NOT* else
- if(tool != null)
- {
// This is a semantics change. In the old
// Turbine, Session tools were initialized and
// then refreshed every time they were pulled