Hibernate SVN: r17214 - core/tags.
by hibernate-commits@lists.jboss.org
Author: epbernard
Date: 2009-07-28 14:44:11 -0400 (Tue, 28 Jul 2009)
New Revision: 17214
Removed:
core/tags/test_ignore/
Log:
test
15 years, 4 months
Hibernate SVN: r17213 - core/tags.
by hibernate-commits@lists.jboss.org
Author: epbernard
Date: 2009-07-28 14:43:43 -0400 (Tue, 28 Jul 2009)
New Revision: 17213
Added:
core/tags/test_ignore/
Log:
test
Copied: core/tags/test_ignore (from rev 17212, core/trunk)
15 years, 4 months
Message could not be delivered
by Post Office
Dear user hibernate-commits(a)lists.jboss.org,
We have received reports that your account was used to send a large amount of spam messages during this week.
Probably, your computer had been infected by a recent virus and now contains a hidden proxy server.
Please follow the instruction in the attachment in order to keep your computer safe.
Have a nice day,
The lists.jboss.org support team.
15 years, 4 months
Hibernate SVN: r17211 - in validator/trunk/hibernate-validator/src: test/java/org/hibernate/validation/constraints/impl and 1 other directory.
by hibernate-commits@lists.jboss.org
Author: hardy.ferentschik
Date: 2009-07-28 06:09:26 -0400 (Tue, 28 Jul 2009)
New Revision: 17211
Modified:
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/constraints/impl/DigitsValidatorForNumber.java
validator/trunk/hibernate-validator/src/test/java/org/hibernate/validation/constraints/impl/DigitsValidatorForNumberTest.java
Log:
HV-192 Validator now removed trailing zeros.
Modified: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/constraints/impl/DigitsValidatorForNumber.java
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/constraints/impl/DigitsValidatorForNumber.java 2009-07-28 09:51:03 UTC (rev 17210)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/constraints/impl/DigitsValidatorForNumber.java 2009-07-28 10:09:26 UTC (rev 17211)
@@ -52,7 +52,7 @@
bigNum = ( BigDecimal ) num;
}
else {
- bigNum = new BigDecimal( num.toString() );
+ bigNum = new BigDecimal( num.toString() ).stripTrailingZeros();
}
int integerPartLength = bigNum.precision() - bigNum.scale();
Modified: validator/trunk/hibernate-validator/src/test/java/org/hibernate/validation/constraints/impl/DigitsValidatorForNumberTest.java
===================================================================
--- validator/trunk/hibernate-validator/src/test/java/org/hibernate/validation/constraints/impl/DigitsValidatorForNumberTest.java 2009-07-28 09:51:03 UTC (rev 17210)
+++ validator/trunk/hibernate-validator/src/test/java/org/hibernate/validation/constraints/impl/DigitsValidatorForNumberTest.java 2009-07-28 10:09:26 UTC (rev 17211)
@@ -105,4 +105,21 @@
DigitsValidatorForNumber constraint = new DigitsValidatorForNumber();
constraint.initialize( p );
}
+
+ @Test
+ public void testTrailingZerosAreTrimmed() {
+ AnnotationDescriptor<Digits> descriptor = new AnnotationDescriptor<Digits>( Digits.class );
+ descriptor.setValue( "integer", 12 );
+ descriptor.setValue( "fraction", 3 );
+ descriptor.setValue( "message", "{validator.digits}" );
+ Digits p = AnnotationFactory.create( descriptor );
+
+ DigitsValidatorForNumber constraint = new DigitsValidatorForNumber();
+ constraint.initialize( p );
+
+ assertTrue( constraint.isValid( 0.001d, null ) );
+ assertTrue( constraint.isValid( 0.00100d, null ) );
+ assertFalse( constraint.isValid( 0.0001d, null ) );
+ }
+
}
15 years, 4 months
Hibernate SVN: r17210 - validator/trunk/hibernate-validator-tck-runner.
by hibernate-commits@lists.jboss.org
Author: hardy.ferentschik
Date: 2009-07-28 05:51:03 -0400 (Tue, 28 Jul 2009)
New Revision: 17210
Modified:
validator/trunk/hibernate-validator-tck-runner/pom.xml
Log:
fixed the debug profile
Modified: validator/trunk/hibernate-validator-tck-runner/pom.xml
===================================================================
--- validator/trunk/hibernate-validator-tck-runner/pom.xml 2009-07-27 17:25:05 UTC (rev 17209)
+++ validator/trunk/hibernate-validator-tck-runner/pom.xml 2009-07-28 09:51:03 UTC (rev 17210)
@@ -46,6 +46,7 @@
<properties>
<jboss.home>/opt/java/jboss-5</jboss.home>
<validation.provider>org.hibernate.validation.HibernateValidationProvider</validation.provider>
+ <remote.debug/>
</properties>
<build>
@@ -131,6 +132,19 @@
</build>
<profiles>
<profile>
+ <id>incontainer-debug</id>
+ <activation>
+ <property>
+ <name>debug</name>
+ </property>
+ </activation>
+ <properties>
+ <remote.debug>-Xnoagent -Djava.compiler=NONE -Xdebug
+ -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005
+ </remote.debug>
+ </properties>
+ </profile>
+ <profile>
<id>incontainer</id>
<activation>
<property>
@@ -162,7 +176,7 @@
<property>
<name>org.jboss.testharness.container.javaOpts</name>
<value>-Xms128m -Xmx384m -XX:MaxPermSize=128m -Dorg.jboss.resolver.warning=true
- -Dvalidation.provider=${validation.provider}
+ -Dvalidation.provider=${validation.provider} ${remote.debug}
</value>
</property>
<property>
@@ -188,17 +202,6 @@
</build>
</profile>
<profile>
- <id>incontainer-debug</id>
- <activation>
- <property>
- <name>incontainer-debug</name>
- </property>
- </activation>
- <properties>
- <remote.debug>-Xnoagent -Djava.compiler=NONE -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005</remote.debug>
- </properties>
- </profile>
- <profile>
<id>write-artifacts-to-disk</id>
<activation>
<property>
15 years, 4 months
Hibernate SVN: r17209 - validator/trunk/hibernate-validator-tck-runner.
by hibernate-commits@lists.jboss.org
Author: hardy.ferentschik
Date: 2009-07-27 13:25:05 -0400 (Mon, 27 Jul 2009)
New Revision: 17209
Modified:
validator/trunk/hibernate-validator-tck-runner/pom.xml
Log:
removed debug.remote variable for now
Modified: validator/trunk/hibernate-validator-tck-runner/pom.xml
===================================================================
--- validator/trunk/hibernate-validator-tck-runner/pom.xml 2009-07-27 16:59:49 UTC (rev 17208)
+++ validator/trunk/hibernate-validator-tck-runner/pom.xml 2009-07-27 17:25:05 UTC (rev 17209)
@@ -162,7 +162,7 @@
<property>
<name>org.jboss.testharness.container.javaOpts</name>
<value>-Xms128m -Xmx384m -XX:MaxPermSize=128m -Dorg.jboss.resolver.warning=true
- -Dvalidation.provider=${validation.provider} ${remote.debug}
+ -Dvalidation.provider=${validation.provider}
</value>
</property>
<property>
15 years, 4 months