You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by il...@apache.org on 2012/10/09 18:23:01 UTC
svn commit: r1396093 - in /incubator/syncope/trunk: ./
core/src/main/java/org/apache/syncope/core/persistence/beans/
core/src/main/java/org/apache/syncope/core/persistence/beans/user/
core/src/test/java/org/apache/syncope/core/persistence/dao/
Author: ilgrosso
Date: Tue Oct 9 16:23:00 2012
New Revision: 1396093
URL: http://svn.apache.org/viewvc?rev=1396093&view=rev
Log:
Merge from 1_0_X
Modified:
incubator/syncope/trunk/ (props changed)
incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/beans/AbstractExec.java
incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/beans/user/SyncopeUser.java
incubator/syncope/trunk/core/src/test/java/org/apache/syncope/core/persistence/dao/TaskExecTest.java
incubator/syncope/trunk/pom.xml
Propchange: incubator/syncope/trunk/
------------------------------------------------------------------------------
Merged /incubator/syncope/branches/1_0_X:r1396078-1396091
Modified: incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/beans/AbstractExec.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/beans/AbstractExec.java?rev=1396093&r1=1396092&r2=1396093&view=diff
==============================================================================
--- incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/beans/AbstractExec.java (original)
+++ incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/beans/AbstractExec.java Tue Oct 9 16:23:00 2012
@@ -63,7 +63,16 @@ public abstract class AbstractExec exten
return message;
}
+ /**
+ * Set a message for this execution, taking care of replacing every null character with newline.
+ *
+ * @see https://issues.apache.org/jira/browse/SYNCOPE-214
+ * @param message the message to set for this execution
+ */
public void setMessage(String message) {
+ if (message != null) {
+ message = message.replace('\0', '\n');
+ }
this.message = message;
}
Modified: incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/beans/user/SyncopeUser.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/beans/user/SyncopeUser.java?rev=1396093&r1=1396092&r2=1396093&view=diff
==============================================================================
--- incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/beans/user/SyncopeUser.java (original)
+++ incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/beans/user/SyncopeUser.java Tue Oct 9 16:23:00 2012
@@ -420,7 +420,7 @@ public class SyncopeUser extends Abstrac
public boolean hasTokenExpired() {
return tokenExpireTime == null
- ? null
+ ? false
: tokenExpireTime.before(new Date());
}
Modified: incubator/syncope/trunk/core/src/test/java/org/apache/syncope/core/persistence/dao/TaskExecTest.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/core/src/test/java/org/apache/syncope/core/persistence/dao/TaskExecTest.java?rev=1396093&r1=1396092&r2=1396093&view=diff
==============================================================================
--- incubator/syncope/trunk/core/src/test/java/org/apache/syncope/core/persistence/dao/TaskExecTest.java (original)
+++ incubator/syncope/trunk/core/src/test/java/org/apache/syncope/core/persistence/dao/TaskExecTest.java Tue Oct 9 16:23:00 2012
@@ -18,6 +18,7 @@
*/
package org.apache.syncope.core.persistence.dao;
+import java.util.Date;
import static org.junit.Assert.*;
import java.util.List;
@@ -30,6 +31,7 @@ import org.apache.syncope.core.persisten
import org.apache.syncope.core.persistence.beans.SchedTask;
import org.apache.syncope.core.persistence.beans.SyncTask;
import org.apache.syncope.core.persistence.beans.TaskExec;
+import org.apache.syncope.types.PropagationTaskExecStatus;
@Transactional
public class TaskExecTest extends AbstractTest {
@@ -66,4 +68,27 @@ public class TaskExecTest extends Abstra
assertNotNull(latestStarted);
assertEquals(Long.valueOf(1L), latestStarted.getId());
}
+
+ @Test
+ public void issueSYNCOPE214() {
+ PropagationTask task = taskDAO.find(1L);
+ assertNotNull(task);
+
+ String faultyMessage = "A faulty message";
+ faultyMessage = faultyMessage.replace('a', '\0');
+
+ TaskExec exec = new TaskExec();
+ exec.setStartDate(new Date());
+ exec.setEndDate(new Date());
+ exec.setStatus(PropagationTaskExecStatus.SUCCESS.name());
+ exec.setMessage(faultyMessage);
+
+ task.addExec(exec);
+ exec.setTask(task);
+
+ exec = taskExecDAO.save(exec);
+ assertNotNull(exec);
+
+ assertEquals(faultyMessage.replace('\0', '\n'), exec.getMessage());
+ }
}
Modified: incubator/syncope/trunk/pom.xml
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/pom.xml?rev=1396093&r1=1396092&r2=1396093&view=diff
==============================================================================
--- incubator/syncope/trunk/pom.xml (original)
+++ incubator/syncope/trunk/pom.xml Tue Oct 9 16:23:00 2012
@@ -247,8 +247,8 @@ under the License.
<spring.version>3.1.2.RELEASE</spring.version>
<spring-security.version>3.1.2.RELEASE</spring-security.version>
- <aspectj.version>1.7.0</aspectj.version>
- <jackson.version>1.9.9</jackson.version>
+ <aspectj.version>1.7.1</aspectj.version>
+ <jackson.version>1.9.10</jackson.version>
<xstream.version>1.4.3</xstream.version>
<velocity.version>1.7</velocity.version>
<quartz.version>1.8.6</quartz.version>
@@ -265,14 +265,14 @@ under the License.
<h2.version>1.3.168</h2.version>
<logback.version>1.0.7</logback.version>
- <slf4j.version>1.7.0</slf4j.version>
+ <slf4j.version>1.7.1</slf4j.version>
<junit.version>4.10</junit.version>
<selenium-java-client-driver.version>1.0.2</selenium-java-client-driver.version>
<apacheds.version>1.5.7</apacheds.version>
- <tomcat.version>7.0.30</tomcat.version>
+ <tomcat.version>7.0.32</tomcat.version>
<jasypt.version>1.9.0</jasypt.version>
@@ -757,7 +757,7 @@ under the License.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
- <version>2.12.2</version>
+ <version>2.12.4</version>
<configuration>
<redirectTestOutputToFile>true</redirectTestOutputToFile>
</configuration>
@@ -765,7 +765,7 @@ under the License.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
- <version>2.2</version>
+ <version>2.3</version>
<configuration>
<attachClasses>true</attachClasses>
<webResources>
@@ -807,7 +807,7 @@ under the License.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
- <version>2.12.2</version>
+ <version>2.12.4</version>
<configuration>
<redirectTestOutputToFile>true</redirectTestOutputToFile>
<encoding>utf-8</encoding>
@@ -830,7 +830,7 @@ under the License.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
- <version>2.5</version>
+ <version>2.5.1</version>
<configuration>
<artifactItems>
<artifactItem>
@@ -1143,7 +1143,7 @@ under the License.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
- <version>2.8.1</version>
+ <version>2.9</version>
<reportSets>
<reportSet>
<reports>