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 2013/02/07 15:48:47 UTC
svn commit: r1443510 - in /syncope/trunk/core/src:
main/java/org/apache/syncope/core/persistence/beans/
main/java/org/apache/syncope/core/persistence/validation/attrvalue/
test/java/org/apache/syncope/core/persistence/dao/
test/java/org/apache/syncope/...
Author: ilgrosso
Date: Thu Feb 7 14:48:47 2013
New Revision: 1443510
URL: http://svn.apache.org/viewvc?rev=1443510&view=rev
Log:
White noise: formatting
Modified:
syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/beans/AbstractSchema.java
syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/beans/Report.java
syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/validation/attrvalue/BasicValidator.java
syncope/trunk/core/src/test/java/org/apache/syncope/core/persistence/dao/ReportTest.java
syncope/trunk/core/src/test/java/org/apache/syncope/core/persistence/relationships/ReportTest.java
Modified: syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/beans/AbstractSchema.java
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/beans/AbstractSchema.java?rev=1443510&r1=1443509&r2=1443510&view=diff
==============================================================================
--- syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/beans/AbstractSchema.java (original)
+++ syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/beans/AbstractSchema.java Thu Feb 7 14:48:47 2013
@@ -18,13 +18,14 @@
*/
package org.apache.syncope.core.persistence.beans;
+import static javax.persistence.EnumType.STRING;
+
import java.lang.reflect.Constructor;
import java.text.DecimalFormat;
import java.text.Format;
import java.text.SimpleDateFormat;
import javax.persistence.Basic;
import javax.persistence.Column;
-import static javax.persistence.EnumType.STRING;
import javax.persistence.Enumerated;
import javax.persistence.Id;
import javax.persistence.Lob;
@@ -157,7 +158,7 @@ public abstract class AbstractSchema ext
validator = (AbstractValidator) validatorConstructor.newInstance(this);
} catch (Exception e) {
LOG.error("Could not instantiate validator of type " + getValidatorClass()
- + ", reverting to AttributeBasicValidator", e);
+ + ", reverting to " + BasicValidator.class.getSimpleName(), e);
}
}
Modified: syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/beans/Report.java
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/beans/Report.java?rev=1443510&r1=1443509&r2=1443510&view=diff
==============================================================================
--- syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/beans/Report.java (original)
+++ syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/beans/Report.java Thu Feb 7 14:48:47 2013
@@ -20,14 +20,12 @@ package org.apache.syncope.core.persiste
import java.util.ArrayList;
import java.util.List;
-
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
-
import org.apache.syncope.common.report.ReportletConf;
import org.apache.syncope.core.persistence.validation.entity.ReportCheck;
Modified: syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/validation/attrvalue/BasicValidator.java
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/validation/attrvalue/BasicValidator.java?rev=1443510&r1=1443509&r2=1443510&view=diff
==============================================================================
--- syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/validation/attrvalue/BasicValidator.java (original)
+++ syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/validation/attrvalue/BasicValidator.java Thu Feb 7 14:48:47 2013
@@ -19,7 +19,6 @@
package org.apache.syncope.core.persistence.validation.attrvalue;
import java.util.Arrays;
-
import org.apache.syncope.common.types.AttributeSchemaType;
import org.apache.syncope.core.persistence.beans.AbstractAttrValue;
import org.apache.syncope.core.persistence.beans.AbstractSchema;
@@ -33,24 +32,21 @@ public class BasicValidator extends Abst
}
@Override
- protected void doValidate(AbstractAttrValue attributeValue) throws InvalidAttrValueException {
-
+ protected void doValidate(final AbstractAttrValue attributeValue) throws InvalidAttrValueException {
if (AttributeSchemaType.Enum.equals(schema.getType())) {
final String[] enumeration = schema.getEnumerationValues().split(AbstractSchema.enumValuesSeparator);
final String value = attributeValue.getStringValue();
- Boolean found = Boolean.FALSE;
-
+ boolean found = false;
for (int i = 0; i < enumeration.length && !found; i++) {
if (enumeration[i].trim().equals(value)) {
- found = Boolean.TRUE;
+ found = true;
}
}
if (!found) {
- String error = "\"" + value + "\" is not one of: " + Arrays.toString(enumeration);
- throw new InvalidAttrValueException(error);
+ throw new InvalidAttrValueException("\"" + value + "\" is not one of: " + Arrays.toString(enumeration));
}
}
}
Modified: syncope/trunk/core/src/test/java/org/apache/syncope/core/persistence/dao/ReportTest.java
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/test/java/org/apache/syncope/core/persistence/dao/ReportTest.java?rev=1443510&r1=1443509&r2=1443510&view=diff
==============================================================================
--- syncope/trunk/core/src/test/java/org/apache/syncope/core/persistence/dao/ReportTest.java (original)
+++ syncope/trunk/core/src/test/java/org/apache/syncope/core/persistence/dao/ReportTest.java Thu Feb 7 14:48:47 2013
@@ -23,7 +23,6 @@ import static org.junit.Assert.assertNot
import static org.junit.Assert.assertNull;
import java.util.List;
-
import org.apache.syncope.common.report.UserReportletConf;
import org.apache.syncope.core.persistence.beans.Report;
import org.junit.Test;
Modified: syncope/trunk/core/src/test/java/org/apache/syncope/core/persistence/relationships/ReportTest.java
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/test/java/org/apache/syncope/core/persistence/relationships/ReportTest.java?rev=1443510&r1=1443509&r2=1443510&view=diff
==============================================================================
--- syncope/trunk/core/src/test/java/org/apache/syncope/core/persistence/relationships/ReportTest.java (original)
+++ syncope/trunk/core/src/test/java/org/apache/syncope/core/persistence/relationships/ReportTest.java Thu Feb 7 14:48:47 2013
@@ -24,9 +24,7 @@ import static org.junit.Assert.assertNot
import static org.junit.Assert.assertNull;
import java.util.Date;
-
import javax.persistence.EntityExistsException;
-
import org.apache.syncope.common.types.ReportExecStatus;
import org.apache.syncope.core.persistence.beans.Report;
import org.apache.syncope.core.persistence.beans.ReportExec;