Hibernate SVN: r16904 - beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/validation.
by hibernate-commits@lists.jboss.org
Author: hardy.ferentschik
Date: 2009-06-23 12:27:28 -0400 (Tue, 23 Jun 2009)
New Revision: 16904
Modified:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/validation/ActorListBased.java
Log:
Removed recursive toString method
Modified: beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/validation/ActorListBased.java
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/validation/ActorListBased.java 2009-06-23 16:21:35 UTC (rev 16903)
+++ beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/validation/ActorListBased.java 2009-06-23 16:27:28 UTC (rev 16904)
@@ -40,11 +40,4 @@
public void addPlayedWith(Actor playedWith) {
this.playedWith.add( playedWith );
}
-
- @Override
- public String toString() {
- return "ActorListBased{" +
- "playedWith=" + playedWith +
- '}';
- }
}
\ No newline at end of file
15 years, 5 months
Hibernate SVN: r16903 - in core/branches/Branch_3_3/cache-jbosscache2/src/test/java/org/hibernate/test/cache/jbc2/functional: classloader and 1 other directory.
by hibernate-commits@lists.jboss.org
Author: bstansberry(a)jboss.com
Date: 2009-06-23 12:21:35 -0400 (Tue, 23 Jun 2009)
New Revision: 16903
Modified:
core/branches/Branch_3_3/cache-jbosscache2/src/test/java/org/hibernate/test/cache/jbc2/functional/Contact.java
core/branches/Branch_3_3/cache-jbosscache2/src/test/java/org/hibernate/test/cache/jbc2/functional/Customer.java
core/branches/Branch_3_3/cache-jbosscache2/src/test/java/org/hibernate/test/cache/jbc2/functional/classloader/Account.java
Log:
Get rid of redundant JPA annotations
Modified: core/branches/Branch_3_3/cache-jbosscache2/src/test/java/org/hibernate/test/cache/jbc2/functional/Contact.java
===================================================================
--- core/branches/Branch_3_3/cache-jbosscache2/src/test/java/org/hibernate/test/cache/jbc2/functional/Contact.java 2009-06-23 12:59:27 UTC (rev 16902)
+++ core/branches/Branch_3_3/cache-jbosscache2/src/test/java/org/hibernate/test/cache/jbc2/functional/Contact.java 2009-06-23 16:21:35 UTC (rev 16903)
@@ -24,9 +24,6 @@
package org.hibernate.test.cache.jbc2.functional;
import java.io.Serializable;
-import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.ManyToOne;
/**
* Entity that has a many-to-one relationship to a Customer
@@ -46,7 +43,6 @@
}
- @Id
public Integer getId()
{
return id;
@@ -77,8 +73,6 @@
this.tlf = tlf;
}
- @ManyToOne
- @JoinColumn(name="CUST_ID")
public Customer getCustomer()
{
return customer;
Modified: core/branches/Branch_3_3/cache-jbosscache2/src/test/java/org/hibernate/test/cache/jbc2/functional/Customer.java
===================================================================
--- core/branches/Branch_3_3/cache-jbosscache2/src/test/java/org/hibernate/test/cache/jbc2/functional/Customer.java 2009-06-23 12:59:27 UTC (rev 16902)
+++ core/branches/Branch_3_3/cache-jbosscache2/src/test/java/org/hibernate/test/cache/jbc2/functional/Customer.java 2009-06-23 16:21:35 UTC (rev 16903)
@@ -26,8 +26,6 @@
import java.io.Serializable;
import java.util.Set;
-import javax.persistence.Id;
-
/**
* Company customer
*
@@ -47,7 +45,6 @@
{
}
- @Id
public Integer getId()
{
return id;
Modified: core/branches/Branch_3_3/cache-jbosscache2/src/test/java/org/hibernate/test/cache/jbc2/functional/classloader/Account.java
===================================================================
--- core/branches/Branch_3_3/cache-jbosscache2/src/test/java/org/hibernate/test/cache/jbc2/functional/classloader/Account.java 2009-06-23 12:59:27 UTC (rev 16902)
+++ core/branches/Branch_3_3/cache-jbosscache2/src/test/java/org/hibernate/test/cache/jbc2/functional/classloader/Account.java 2009-06-23 16:21:35 UTC (rev 16903)
@@ -31,24 +31,6 @@
* @author Brian Stansberry
* @version $Revision: 60233 $
*/
-// @NamedQuery(name="account.totalbalance.default",query="select account.balance from Account as account where account.accountHolder = ?1",
-// hints={@QueryHint(name="org.hibernate.cacheable",value="true")}),
-// @NamedQuery(name="account.totalbalance.namedregion",query="select account.balance from Account as account where account.accountHolder = ?1",
-// hints={@QueryHint(name="org.hibernate.cacheRegion",value="AccountRegion"),
-// @QueryHint(name="org.hibernate.cacheable",value="true")
-// }),
-// @NamedQuery(name="account.branch.default",query="select account.branch from Account as account where account.accountHolder = ?1",
-// hints={@QueryHint(name="org.hibernate.cacheable",value="true")}),
-// @NamedQuery(name="account.branch.namedregion",query="select account.branch from Account as account where account.accountHolder = ?1",
-// hints={@QueryHint(name="org.hibernate.cacheRegion",value="AccountRegion"),
-// @QueryHint(name="org.hibernate.cacheable",value="true")
-// }),
-// @NamedQuery(name="account.bybranch.default",query="select account from Account as account where account.branch = ?1",
-// hints={@QueryHint(name="org.hibernate.cacheable",value="true")}),
-// @NamedQuery(name="account.bybranch.namedregion",query="select account from Account as account where account.branch = ?1",
-// hints={@QueryHint(name="org.hibernate.cacheRegion",value="AccountRegion"),
-// @QueryHint(name="org.hibernate.cacheable",value="true")
-// })
public class Account implements Serializable
{
15 years, 5 months
Hibernate SVN: r16902 - validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/engine.
by hibernate-commits@lists.jboss.org
Author: hardy.ferentschik
Date: 2009-06-23 08:59:27 -0400 (Tue, 23 Jun 2009)
New Revision: 16902
Modified:
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/engine/ConstraintValidatorContextImpl.java
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/engine/ExecutionContext.java
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/engine/NodeImpl.java
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/engine/PathImpl.java
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/engine/ValidatorImpl.java
Log:
HV-177
Modified: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/engine/ConstraintValidatorContextImpl.java
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/engine/ConstraintValidatorContextImpl.java 2009-06-23 12:57:02 UTC (rev 16901)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/engine/ConstraintValidatorContextImpl.java 2009-06-23 12:59:27 UTC (rev 16902)
@@ -48,7 +48,7 @@
}
public ErrorBuilder buildErrorWithMessageTemplate(String messageTemplate) {
- return null; //To change body of implemented methods use File | Settings | File Templates.
+ return new ErrorBuilderImpl( messageTemplate, propertyPath );
}
public ConstraintDescriptor<?> getConstraintDescriptor() {
@@ -86,4 +86,103 @@
return propertyPath;
}
}
+
+ class ErrorBuilderImpl implements ErrorBuilder {
+ String messageTemplate;
+ Path propertyPath;
+
+ ErrorBuilderImpl(String template, Path path) {
+ messageTemplate = template;
+ propertyPath = path;
+ }
+
+ public NodeBuilder inSubNode(String name) {
+ PathImpl path = new PathImpl();
+ path.addNode( new NodeImpl( name ) );
+ return new NodeBuilderImpl( messageTemplate, path );
+ }
+
+ public ConstraintValidatorContext addError() {
+ errorMessages.add( new ErrorMessage( messageTemplate, propertyPath ) );
+ return ConstraintValidatorContextImpl.this;
+ }
+ }
+
+ class NodeBuilderImpl implements ErrorBuilder.NodeBuilder {
+ String messageTemplate;
+ PathImpl propertyPath;
+
+ NodeBuilderImpl(String template, PathImpl path) {
+ messageTemplate = template;
+ propertyPath = path;
+ }
+
+ public ErrorBuilder.InIterableNodeBuilder inSubNode(String name) {
+ NodeImpl node = new NodeImpl( name );
+ propertyPath.addNode( node );
+ return new InIterableNodeBuilderImpl( messageTemplate, propertyPath );
+ }
+
+ public ConstraintValidatorContext addError() {
+ errorMessages.add( new ErrorMessage( messageTemplate, propertyPath ) );
+ return ConstraintValidatorContextImpl.this;
+ }
+ }
+
+ class InIterableNodeBuilderImpl implements ErrorBuilder.InIterableNodeBuilder {
+ String messageTemplate;
+ PathImpl propertyPath;
+
+ InIterableNodeBuilderImpl(String template, PathImpl path) {
+ messageTemplate = template;
+ propertyPath = path;
+ }
+
+ public ErrorBuilder.InIterablePropertiesBuilder inIterable() {
+ return new InIterablePropertiesBuilderImpl(messageTemplate, propertyPath);
+ }
+
+ public ErrorBuilder.InIterableNodeBuilder inSubNode(String name) {
+ Path.Node node = new NodeImpl( name );
+ propertyPath.addNode( node );
+ return this;
+ }
+
+ public ConstraintValidatorContext addError() {
+ errorMessages.add( new ErrorMessage( messageTemplate, propertyPath ) );
+ return ConstraintValidatorContextImpl.this;
+ }
+ }
+
+ class InIterablePropertiesBuilderImpl implements ErrorBuilder.InIterablePropertiesBuilder {
+ String messageTemplate;
+ PathImpl propertyPath;
+
+ InIterablePropertiesBuilderImpl(String template, PathImpl path) {
+ messageTemplate = template;
+ propertyPath = path;
+ propertyPath.getLeafNode().setInIterable( true );
+ }
+
+ public ErrorBuilder.NodeBuilder atKey(Object key) {
+ propertyPath.getLeafNode().setKey( key );
+ return new NodeBuilderImpl( messageTemplate, propertyPath );
+ }
+
+ public ErrorBuilder.NodeBuilder atIndex(Integer index) {
+ propertyPath.getLeafNode().setIndex( index );
+ return new NodeBuilderImpl( messageTemplate, propertyPath );
+ }
+
+ public ErrorBuilder.InIterableNodeBuilder inSubNode(String name) {
+ Path.Node node = new NodeImpl( name );
+ propertyPath.addNode( node );
+ return new InIterableNodeBuilderImpl( messageTemplate, propertyPath );
+ }
+
+ public ConstraintValidatorContext addError() {
+ errorMessages.add( new ErrorMessage( messageTemplate, propertyPath ) );
+ return ConstraintValidatorContextImpl.this;
+ }
+ }
}
Modified: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/engine/ExecutionContext.java
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/engine/ExecutionContext.java 2009-06-23 12:57:02 UTC (rev 16901)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/engine/ExecutionContext.java 2009-06-23 12:59:27 UTC (rev 16902)
@@ -22,16 +22,15 @@
import java.lang.reflect.Member;
import java.util.ArrayList;
import java.util.HashMap;
+import java.util.HashSet;
import java.util.IdentityHashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.Stack;
-import java.util.HashSet;
import javax.validation.ConstraintValidatorFactory;
import javax.validation.ConstraintViolation;
import javax.validation.MessageInterpolator;
-import javax.validation.Path;
import javax.validation.TraversableResolver;
import javax.validation.metadata.ConstraintDescriptor;
@@ -68,7 +67,7 @@
/**
* Maps an object to a list of paths in which it has been invalidated.
*/
- private final Map<Object, Set<Path>> processedPaths;
+ private final Map<Object, Set<PathImpl>> processedPaths;
/**
* A list of all failing constraints so far.
@@ -95,7 +94,7 @@
*
* @todo Make this boolean a configurable item.
*/
- private boolean allowOneValidationPerPath = false;
+ private boolean allowOneValidationPerPath = true;
/**
* The message resolver which should be used in this context.
@@ -148,7 +147,7 @@
beanStack.push( object );
processedObjects = new HashMap<Class<?>, IdentitySet>();
- processedPaths = new IdentityHashMap<Object, Set<Path>>();
+ processedPaths = new IdentityHashMap<Object, Set<PathImpl>>();
propertyPath = new PathImpl();
failingConstraintViolations = new ArrayList<ConstraintViolation<T>>();
}
@@ -232,29 +231,21 @@
* Drops the last level of the current property path of this context.
*/
public void popProperty() {
- propertyPath.removeLast();
+ propertyPath.removeLeafNode();
}
public void markCurrentPropertyAsIterable() {
- ((NodeImpl)propertyPath.getLast()).setInIterable( true );
+ ( ( NodeImpl ) propertyPath.getLeafNode() ).setInIterable( true );
}
public void setPropertyIndex(String index) {
- ((NodeImpl)propertyPath.getLast()).setIndex( Integer.getInteger( index ) );
+ ( ( NodeImpl ) propertyPath.getLeafNode() ).setIndex( new Integer( index ) );
}
- public Path peekPropertyPath() {
- return new PathImpl(propertyPath);
+ public PathImpl peekPropertyPath() {
+ return new PathImpl( propertyPath );
}
- public Path.Node peekProperty() {
- return propertyPath.getLast();
- }
-
- public Path peekParentPath() {
- return propertyPath.getParentPath();
- }
-
@SuppressWarnings("SimplifiableIfStatement")
public boolean isValidationRequired(MetaConstraint metaConstraint) {
if ( !metaConstraint.getGroupList().contains( currentGroup ) ) {
@@ -263,9 +254,9 @@
return traversableResolver.isReachable(
peekCurrentBean(),
- peekProperty(),
+ propertyPath.getLeafNode(),
getRootBeanClass(),
- peekParentPath(),
+ propertyPath.getPathWithoutLeafNode(),
metaConstraint.getElementType()
);
}
@@ -276,16 +267,16 @@
final Object traversableobject = peekCurrentBean();
return traversableResolver.isReachable(
traversableobject,
- peekProperty(),
+ propertyPath.getLeafNode(),
rootBeanType,
- peekParentPath(),
+ propertyPath.getPathWithoutLeafNode(),
type
)
&& traversableResolver.isCascadable(
traversableobject,
- peekProperty(),
+ propertyPath.getLeafNode(),
rootBeanType,
- peekParentPath(),
+ propertyPath.getPathWithoutLeafNode(),
type
);
}
@@ -320,10 +311,17 @@
}
private boolean isAlreadyValidatedForPath(Object value) {
- Set<Path> pathSet = processedPaths.get( value );
- if(pathSet != null && pathSet.contains( peekPropertyPath() )) {
- return true;
+ Set<PathImpl> pathSet = processedPaths.get( value );
+ if ( pathSet == null ) {
+ return false;
}
+
+ for (PathImpl p : pathSet) {
+ if (p.isSubPathOf(peekPropertyPath()) || peekPropertyPath().isSubPathOf(p)) {
+ return true;
+ }
+ }
+
return false;
}
@@ -344,7 +342,7 @@
processedPaths.get( peekCurrentBean() ).add( peekPropertyPath() );
}
else {
- Set<Path> set = new HashSet<Path>();
+ Set<PathImpl> set = new HashSet<PathImpl>();
set.add( peekPropertyPath() );
processedPaths.put( peekCurrentBean(), set );
}
Modified: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/engine/NodeImpl.java
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/engine/NodeImpl.java 2009-06-23 12:57:02 UTC (rev 16901)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/engine/NodeImpl.java 2009-06-23 12:59:27 UTC (rev 16902)
@@ -23,6 +23,10 @@
* @author Hardy Ferentschik
*/
public class NodeImpl implements Path.Node {
+
+ private static final String INDEX_OPEN = "[";
+ private static final String INDEX_CLOSE = "]";
+
private final String name;
private boolean isInIterable;
private Integer index;
@@ -33,6 +37,13 @@
this.name = name;
}
+ NodeImpl(Path.Node node) {
+ this.name = node.getName();
+ this.isInIterable = node.isInIterable();
+ this.index = node.getIndex();
+ this.key = node.getKey();
+ }
+
public String getName() {
return name;
}
@@ -50,6 +61,7 @@
}
public void setIndex(Integer index) {
+ isInIterable = true;
this.index = index;
}
@@ -57,14 +69,25 @@
return key;
}
+ public void setKey(Object key) {
+ isInIterable = true;
+ this.key = key;
+ }
+
@Override
public String toString() {
- return "NodeImpl{" +
- "name='" + name + '\'' +
- ", isInIterable=" + isInIterable +
- ", index=" + index +
- ", key=" + key +
- '}';
+ StringBuilder builder = new StringBuilder( name );
+ if ( isInIterable ) {
+ builder.append( INDEX_OPEN );
+ if ( getIndex() != null ) {
+ builder.append( getIndex() );
+ }
+ else if ( getKey() != null ) {
+ builder.append( getKey() );
+ }
+ builder.append( INDEX_CLOSE );
+ }
+ return builder.toString();
}
@Override
Modified: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/engine/PathImpl.java
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/engine/PathImpl.java 2009-06-23 12:57:02 UTC (rev 16901)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/engine/PathImpl.java 2009-06-23 12:59:27 UTC (rev 16902)
@@ -27,30 +27,35 @@
*/
public class PathImpl implements Path {
- public static final String PROPERTY_PATH_SEPERATOR = ".";
+ private static final String PROPERTY_PATH_SEPERATOR = ".";
+ private static final String INDEX_OPEN = "[";
+ private static final String INDEX_CLOSE = "]";
+ private static final Node ROOT_NODE = new NodeImpl( ( String ) null );
+
private final List<Node> nodeList;
public PathImpl() {
nodeList = new ArrayList<Node>();
- Node root = new NodeImpl( null );
- nodeList.add( root );
+ nodeList.add( ROOT_NODE );
}
public PathImpl(PathImpl path) {
- this();
+ this.nodeList = new ArrayList<Node>();
Iterator<Node> iter = path.iterator();
- while(iter.hasNext()) {
- Node node = iter.next();
- nodeList.add(node);
+ while ( iter.hasNext() ) {
+ nodeList.add( new NodeImpl( iter.next() ) );
}
}
- public PathImpl(List<Node> nodeList) {
- this.nodeList = nodeList;
+ private PathImpl(List<Node> nodeList) {
+ this.nodeList = new ArrayList<Node>();
+ for ( Node node : nodeList ) {
+ this.nodeList.add( new NodeImpl( node ) );
+ }
}
- public Path getParentPath() {
+ public Path getPathWithoutLeafNode() {
List<Node> nodes = new ArrayList<Node>( nodeList );
if ( nodes.size() > 1 ) {
nodes.remove( nodes.size() - 1 );
@@ -62,48 +67,56 @@
nodeList.add( node );
}
- public Node removeLast() {
- if ( nodeList.size() < 1 ) {
- throw new IllegalStateException();
+ public Node removeLeafNode() {
+ if ( nodeList.size() == 0 ) {
+ throw new IllegalStateException( "No nodes in path!" );
}
+ if ( nodeList.size() == 1 ) {
+ throw new IllegalStateException( "Root node cannot be removed!" );
+ }
return nodeList.remove( nodeList.size() - 1 );
}
- public Node getLast() {
- if ( nodeList.size() < 1 ) {
- throw new IllegalStateException();
+ public NodeImpl getLeafNode() {
+ if ( nodeList.size() == 0 ) {
+ throw new IllegalStateException( "No nodes in path!" );
}
- return nodeList.get( nodeList.size() - 1 );
+ return ( NodeImpl ) nodeList.get( nodeList.size() - 1 );
}
public Iterator<Path.Node> iterator() {
return nodeList.iterator();
}
+ public boolean isSubPathOf(Path path) {
+ Iterator<Node> pathIter = path.iterator();
+ Iterator<Node> thisIter = iterator();
+ while ( pathIter.hasNext() ) {
+ Node pathNode = pathIter.next();
+ if ( !thisIter.hasNext() ) {
+ return false;
+ }
+ Node thisNode = thisIter.next();
+ if ( !thisNode.equals( pathNode ) ) {
+ return false;
+ }
+ }
+ return true;
+ }
+
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
Iterator<Path.Node> iter = iterator();
while ( iter.hasNext() ) {
Node node = iter.next();
- if ( node.getName() != null ) {
- builder.append( node.getName() );
-
- if ( node.isInIterable() ) {
- builder.append( "[" );
- if ( node.getIndex() != null ) {
- builder.append( node.getIndex() );
- }
- else if ( node.getKey() != null ) {
- builder.append( node.getKey() );
- }
- builder.append( "]" );
- }
- if ( iter.hasNext() ) {
- builder.append( PROPERTY_PATH_SEPERATOR );
-
- }
+ if ( ROOT_NODE.equals( node ) ) {
+ continue;
}
+ builder.append( node.toString() );
+ if ( iter.hasNext() ) {
+ builder.append( PROPERTY_PATH_SEPERATOR );
+ }
}
return builder.toString();
}
Modified: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/engine/ValidatorImpl.java
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/engine/ValidatorImpl.java 2009-06-23 12:57:02 UTC (rev 16901)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/engine/ValidatorImpl.java 2009-06-23 12:59:27 UTC (rev 16902)
@@ -234,7 +234,7 @@
*/
private <T> void validateConstraints(ExecutionContext<T> executionContext) {
//casting rely on the fact that root object is at the top of the stack
- @SuppressWarnings(" unchecked")
+ @SuppressWarnings("unchecked")
BeanMetaData<T> beanMetaData = getBeanMetaData( ( Class<T> ) executionContext.peekCurrentBeanType() );
if ( executionContext.getCurrentGroup().getName().equals( Default.class.getName() ) ) {
List<Class<?>> defaultGroupSequence = beanMetaData.getDefaultGroupSequence();
15 years, 5 months
Hibernate SVN: r16901 - beanvalidation/trunk/validation-api/src/main/java/javax/validation.
by hibernate-commits@lists.jboss.org
Author: hardy.ferentschik
Date: 2009-06-23 08:57:02 -0400 (Tue, 23 Jun 2009)
New Revision: 16901
Modified:
beanvalidation/trunk/validation-api/src/main/java/javax/validation/Path.java
Log:
javadoc
Modified: beanvalidation/trunk/validation-api/src/main/java/javax/validation/Path.java
===================================================================
--- beanvalidation/trunk/validation-api/src/main/java/javax/validation/Path.java 2009-06-23 12:56:46 UTC (rev 16900)
+++ beanvalidation/trunk/validation-api/src/main/java/javax/validation/Path.java 2009-06-23 12:57:02 UTC (rev 16901)
@@ -16,7 +16,7 @@
*/
interface Node {
/**
- * Property name the node represents
+ * @return Property name the node represents
* or null if the leaf node and representing an entity
* (in particular the node representing the root object
* has its name null)
@@ -24,19 +24,19 @@
String getName();
/**
- * True if the node represents an object contained in an Iterable
+ * @return True if the node represents an object contained in an Iterable
* or in a Map.
*/
boolean isInIterable();
/**
- * The index the node is placed in if contained
+ * @return The index the node is placed in if contained
* in an array or List. Null otherwise.
*/
Integer getIndex();
/**
- * The key the node is placed in if contained
+ * @return The key the node is placed in if contained
* in a Map. Null otherwise.
*/
Object getKey();
15 years, 5 months
Hibernate SVN: r16900 - in beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/validation: graphnavigation and 2 other directories.
by hibernate-commits@lists.jboss.org
Author: hardy.ferentschik
Date: 2009-06-23 08:56:46 -0400 (Tue, 23 Jun 2009)
New Revision: 16900
Modified:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/validation/ValidateTest.java
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/validation/graphnavigation/Order.java
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/validation/graphnavigation/OrderLine.java
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/validation/traversableresolver/SnifferTraversableResolver.java
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/validation/traversableresolver/TraversableResolverTest.java
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/validation/validatorcontext/ConstraintValidatorContextTest.java
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/validation/validatorcontext/DummyValidator.java
Log:
Updated the tests to make the TCK run again
Modified: beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/validation/ValidateTest.java
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/validation/ValidateTest.java 2009-06-23 10:36:55 UTC (rev 16899)
+++ beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/validation/ValidateTest.java 2009-06-23 12:56:46 UTC (rev 16900)
@@ -221,12 +221,9 @@
assertEquals( constraintViolations.size(), 1, "Wrong number of constraints" );
ConstraintViolation constraintViolation = constraintViolations.iterator().next();
assertEquals( "Everyone has a last name.", constraintViolation.getMessage(), "Wrong message" );
- org.testng.Assert.assertEquals( constraintViolation.getRootBean(), clint, "Wrong root entity" );
- org.testng.Assert.assertEquals( constraintViolation.getInvalidValue(), morgan.getLastName(), "Wrong value" );
-
- assertEquals(
- constraintViolation.getPropertyPath(), "playedWith[0].playedWith[1].lastName", "Wrong propertyName"
- );
+ assertEquals( constraintViolation.getRootBean(), clint, "Wrong root entity" );
+ assertEquals( constraintViolation.getInvalidValue(), morgan.getLastName(), "Wrong value" );
+ assertCorrectPropertyPaths( constraintViolations, "playedWith[0].playedWith[1].lastName");
}
@Test(expectedExceptions = IllegalArgumentException.class)
Modified: beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/validation/graphnavigation/Order.java
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/validation/graphnavigation/Order.java 2009-06-23 10:36:55 UTC (rev 16899)
+++ beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/validation/graphnavigation/Order.java 2009-06-23 12:56:46 UTC (rev 16900)
@@ -77,4 +77,15 @@
public void setBillingAddress(Address billingAddress) {
this.billingAddress = billingAddress;
}
+
+ @Override
+ public String toString() {
+ return "Order{" +
+ "orderId=" + orderId +
+ ", orderLines=" + orderLines +
+ ", customer=" + customer +
+ ", shippingAddress=" + shippingAddress +
+ ", billingAddress=" + billingAddress +
+ '}';
+ }
}
\ No newline at end of file
Modified: beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/validation/graphnavigation/OrderLine.java
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/validation/graphnavigation/OrderLine.java 2009-06-23 10:36:55 UTC (rev 16899)
+++ beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/validation/graphnavigation/OrderLine.java 2009-06-23 12:56:46 UTC (rev 16900)
@@ -42,4 +42,11 @@
public void setArticleNumber(Integer articleNumber) {
this.articleNumber = articleNumber;
}
+
+ @Override
+ public String toString() {
+ return "OrderLine{" +
+ "articleNumber=" + articleNumber +
+ '}';
+ }
}
\ No newline at end of file
Modified: beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/validation/traversableresolver/SnifferTraversableResolver.java
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/validation/traversableresolver/SnifferTraversableResolver.java 2009-06-23 10:36:55 UTC (rev 16899)
+++ beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/validation/traversableresolver/SnifferTraversableResolver.java 2009-06-23 12:56:46 UTC (rev 16900)
@@ -20,8 +20,8 @@
import java.lang.annotation.ElementType;
import java.util.HashSet;
import java.util.Set;
-import javax.validation.TraversableResolver;
import javax.validation.Path;
+import javax.validation.TraversableResolver;
/**
* @author Emmanuel Bernard
@@ -60,48 +60,35 @@
traversableObject, traversableProperty, rootBeanType, pathToTraversableObject, elementType
);
if ( !calls.contains( call ) ) {
-
throw new IllegalStateException( "Unexpected " + call.toString() );
}
return true;
}
-
-
-
-
- public boolean isReachable(Object traversableObject, String traversableProperty, Class<?> rootBeanType, String pathToTraversableObject, ElementType elementType) {
+ public boolean isReachable(Object traversableObject, Path.Node traversableProperty, Class<?> rootBeanType, Path pathToTraversableObject, ElementType elementType) {
return isTraversable(
reachCalls,
reachPaths,
traversableObject,
- traversableProperty,
+ traversableProperty.toString(),
rootBeanType,
- pathToTraversableObject,
+ pathToTraversableObject.toString(),
elementType
);
}
- public boolean isCascadable(Object traversableObject, String traversableProperty, Class<?> rootBeanType, String pathToTraversableObject, ElementType elementType) {
+ public boolean isCascadable(Object traversableObject, Path.Node traversableProperty, Class<?> rootBeanType, Path pathToTraversableObject, ElementType elementType) {
return isTraversable(
cascadeCalls,
cascadePaths,
traversableObject,
- traversableProperty,
+ traversableProperty.toString(),
rootBeanType,
- pathToTraversableObject,
+ pathToTraversableObject.toString(),
elementType
);
}
- public boolean isReachable(Object traversableObject, Path.Node traversableProperty, Class<?> rootBeanType, Path pathToTraversableObject, ElementType elementType) {
- return false; //To change body of implemented methods use File | Settings | File Templates.
- }
-
- public boolean isCascadable(Object traversableObject, Path.Node traversableProperty, Class<?> rootBeanType, Path pathToTraversableObject, ElementType elementType) {
- return false; //To change body of implemented methods use File | Settings | File Templates.
- }
-
private static final class Call {
private Object traversableObject;
private String traversableProperty;
Modified: beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/validation/traversableresolver/TraversableResolverTest.java
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/validation/traversableresolver/TraversableResolverTest.java 2009-06-23 10:36:55 UTC (rev 16899)
+++ beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/validation/traversableresolver/TraversableResolverTest.java 2009-06-23 12:56:46 UTC (rev 16900)
@@ -23,12 +23,12 @@
import javax.validation.ValidatorFactory;
import javax.validation.groups.Default;
-import static org.testng.Assert.assertEquals;
-import org.testng.annotations.Test;
+import org.jboss.testharness.AbstractTest;
import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.testharness.impl.packaging.ArtifactType;
import org.jboss.testharness.impl.packaging.Classes;
-import org.jboss.testharness.AbstractTest;
+import static org.testng.Assert.assertEquals;
+import org.testng.annotations.Test;
import org.hibernate.jsr303.tck.util.TestUtil;
@@ -50,7 +50,9 @@
SnifferTraversableResolver resolver = new SnifferTraversableResolver( suit );
// TODO - Investigate why this cast is needed with Java 5. In Java 6 there is no problem.
- Configuration<?> config = (Configuration<?>) Validation.byDefaultProvider().configure().traversableResolver( resolver );
+ Configuration<?> config = ( Configuration<?> ) Validation.byDefaultProvider()
+ .configure()
+ .traversableResolver( resolver );
ValidatorFactory factory = config.buildValidatorFactory();
Validator v = factory.getValidator();
@@ -58,7 +60,7 @@
//Raises an IllegalStateException if something goes wrong
v.validate( suit, Default.class, Cloth.class );
- assertEquals( 5, resolver.getReachPaths().size() );
- assertEquals( 2, resolver.getCascadePaths().size() );
+ assertEquals( resolver.getReachPaths().size(), 5 );
+ assertEquals( resolver.getCascadePaths().size(), 2 );
}
}
\ No newline at end of file
Modified: beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/validation/validatorcontext/ConstraintValidatorContextTest.java
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/validation/validatorcontext/ConstraintValidatorContextTest.java 2009-06-23 10:36:55 UTC (rev 16899)
+++ beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/validation/validatorcontext/ConstraintValidatorContextTest.java 2009-06-23 12:56:46 UTC (rev 16900)
@@ -23,16 +23,17 @@
import javax.validation.ConstraintViolation;
import javax.validation.Validator;
+import org.jboss.testharness.AbstractTest;
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.ArtifactType;
+import org.jboss.testharness.impl.packaging.Classes;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertTrue;
import static org.testng.Assert.fail;
import org.testng.annotations.Test;
-import org.jboss.testharness.AbstractTest;
-import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.testharness.impl.packaging.ArtifactType;
-import org.jboss.testharness.impl.packaging.Classes;
import org.hibernate.jsr303.tck.util.TestUtil;
+import static org.hibernate.jsr303.tck.util.TestUtil.assertCorrectPropertyPaths;
/**
* @author Hardy Ferentschik
@@ -87,8 +88,8 @@
Set<ConstraintViolation<DummyBean>> constraintViolations = validator.validate( bean );
assertEquals( constraintViolations.size(), 1, "Wrong number of constraints" );
ConstraintViolation constraintViolation = constraintViolations.iterator().next();
- assertEquals( "message1", constraintViolation.getMessage(), "Wrong message" );
- assertEquals( "property1", constraintViolation.getPropertyPath(), "Wrong property" );
+ assertEquals( constraintViolation.getMessage(), "message1", "Wrong message" );
+ assertCorrectPropertyPaths( constraintViolations, "property1" );
}
@Test
Modified: beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/validation/validatorcontext/DummyValidator.java
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/validation/validatorcontext/DummyValidator.java 2009-06-23 10:36:55 UTC (rev 16899)
+++ beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/validation/validatorcontext/DummyValidator.java 2009-06-23 12:56:46 UTC (rev 16900)
@@ -42,7 +42,7 @@
if ( errorMessages != null ) {
for ( Map.Entry<String, String> entry : errorMessages.entrySet() ) {
constraintValidatorContext.buildErrorWithMessageTemplate( entry.getKey() )
- .inSubNode( entry.getValue() );
+ .inSubNode( entry.getValue() ).addError();
}
}
15 years, 5 months
Hibernate SVN: r16899 - in beanvalidation/trunk/validation-tck/src/main: resources and 1 other directory.
by hibernate-commits@lists.jboss.org
Author: hardy.ferentschik
Date: 2009-06-23 06:36:55 -0400 (Tue, 23 Jun 2009)
New Revision: 16899
Modified:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/validation/ValidateTest.java
beanvalidation/trunk/validation-tck/src/main/resources/tck-audit.xml
Log:
Mapping some tests
Modified: beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/validation/ValidateTest.java
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/validation/ValidateTest.java 2009-06-23 10:32:46 UTC (rev 16898)
+++ beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/validation/ValidateTest.java 2009-06-23 10:36:55 UTC (rev 16899)
@@ -68,8 +68,19 @@
}
+ @SpecAssertion(section = "4.1.1", id = "b")
+ @Test(expectedExceptions = IllegalArgumentException.class)
+ public void testValidateWithNull() {
+ Validator validator = TestUtil.getDefaultValidator();
+ validator.validate( null );
+ }
+
@Test
- @SpecAssertion(section = "4.1.1", id = "c")
+ @SpecAssertions({
+ @SpecAssertion(section = "4.1.1", id = "a"),
+ @SpecAssertion(section = "4.1.1", id = "c")
+ })
+
public void testMultipleViolationOfTheSameType() {
Validator validator = TestUtil.getDefaultValidator();
@@ -135,7 +146,7 @@
violation.getConstraintDescriptor().getAnnotation().annotationType(),
Pattern.class, "Wrong annotation type"
);
- assertCorrectPropertyPaths(constraintViolations, "serialNumber");
+ assertCorrectPropertyPaths( constraintViolations, "serialNumber" );
engine.setSerialNumber( "ABCD-EFGH-1234" );
constraintViolations = validator.validate( engine );
@@ -161,7 +172,7 @@
assertEquals( constraintViolations.size(), 1, "Wrong number of constraints" );
assertEquals( constraintViolation.getRootBean(), customer, "Wrong root entity" );
assertEquals( constraintViolation.getInvalidValue(), order.getOrderNumber(), "Wrong value" );
- assertCorrectPropertyPaths(constraintViolations, "orders[].orderNumber");
+ assertCorrectPropertyPaths( constraintViolations, "orders[].orderNumber" );
}
@Test
@@ -187,7 +198,7 @@
assertEquals( "Everyone has a last name.", constraintViolation.getMessage(), "Wrong message" );
org.testng.Assert.assertEquals( constraintViolation.getRootBean(), clint, "Wrong root entity" );
org.testng.Assert.assertEquals( constraintViolation.getInvalidValue(), morgan.getLastName(), "Wrong value" );
- assertCorrectPropertyPaths(constraintViolations, "playedWith[0].playedWith[1].lastName");
+ assertCorrectPropertyPaths( constraintViolations, "playedWith[0].playedWith[1].lastName" );
}
@Test
@@ -223,12 +234,6 @@
TestUtil.getDefaultValidator().getConstraintsForClass( null );
}
- @Test(expectedExceptions = IllegalArgumentException.class)
- public void testValidateWithNull() {
- Validator validator = TestUtil.getDefaultValidator();
- validator.validate( null );
- }
-
@Test
@SuppressWarnings("NullArgumentToVariableArgMethod")
public void testPassingNullAsGroup() {
Modified: beanvalidation/trunk/validation-tck/src/main/resources/tck-audit.xml
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/resources/tck-audit.xml 2009-06-23 10:32:46 UTC (rev 16898)
+++ beanvalidation/trunk/validation-tck/src/main/resources/tck-audit.xml 2009-06-23 10:36:55 UTC (rev 16899)
@@ -394,7 +394,7 @@
</assertion>
</section>
<section id="3.5" title="Validation routine">
- <assertion id="a">
+ <assertion id="a" testable="false">
<text>For a given group to validate, the validation routine applied on a given bean
instance is expected to execute the constraint validations in no particular
order</text>
15 years, 5 months
Hibernate SVN: r16898 - beanvalidation/trunk/validation-tck/src/main/resources.
by hibernate-commits@lists.jboss.org
Author: hardy.ferentschik
Date: 2009-06-23 06:32:46 -0400 (Tue, 23 Jun 2009)
New Revision: 16898
Modified:
beanvalidation/trunk/validation-tck/src/main/resources/tck-audit.xml
Log:
Added empty chapter section to fix the audit report.
Modified: beanvalidation/trunk/validation-tck/src/main/resources/tck-audit.xml
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/resources/tck-audit.xml 2009-06-23 08:29:55 UTC (rev 16897)
+++ beanvalidation/trunk/validation-tck/src/main/resources/tck-audit.xml 2009-06-23 10:32:46 UTC (rev 16898)
@@ -3,7 +3,8 @@
xsi:schemaLocation="http://jboss.com/products/webbeans/tck/audit http://snapshots.jboss.org/maven2/org/hibernate/tck-utils-api/0.9-SNAPSHO..."
name="JSR-303: Bean Validation" version="Revised Public Review Draft">
- <section id="2.1" title="Constraint Definition">
+ <section id="2" title="Constraint Definition"/>
+ <section id="2.1" title="Constraint Annotation">
<assertion id="a" testable="false">
<text>An annotation is considered a constraint definition if its retention policy
contains RUNTIME and if the annotation itself is annotated with
@@ -206,6 +207,8 @@
raised</text>
</assertion>
</section>
+
+ <section id="3" title="Constraint declaration and validation process"/>
<section id="3.1" title="Requirements on classes to be validated">
<assertion id="a">
<text>Properties to be validated must follow the method signature conventions for
@@ -479,6 +482,8 @@
UnexpectedTypeException is raised</text>
</assertion>
</section>
+
+ <section id="4" title="Validation APIs"/>
<section id="4.1" title="Validator API ">
<assertion id="a" testable="false">
<text>Validator implementations are thread-safe</text>
@@ -858,6 +863,8 @@
<text>Validator is thread-safe too and should be considered a lightweight object</text>
</assertion>
</section>
+
+ <section id="5" title="Constraint metadata request APIs"/>
<section id="5.1" title="Validator">
<assertion id="a">
<text>If a constraint definition or declaration hosted by the requested class (or any of
@@ -908,6 +915,7 @@
constraint</text>
</assertion>
</section>
+
<section id="6" title="Built-in Constraint definitions">
<assertion id="a">
<text>Each Bean Validation provider must recognize built-in constraint annotations as
@@ -958,6 +966,8 @@
<text>@Pattern constraint</text>
</assertion>
</section>
+
+ <section id="7" title="XML deployment descriptor"/>
<section id="7.1" title="Constraint definition and declaration">
<assertion id="a">
<text>Specifically when exploring metadata, the Bean Validation provider must ensure
@@ -1145,6 +1155,7 @@
ConstraintDescriptor.getConstraintValidatorClasses()</text>
</assertion>
</section>
+
<section id="8" title="Exception model">
<assertion id="a">
<text>Every (runtime) exception raised either at initialization time or execution time
15 years, 5 months
Hibernate SVN: r16897 - in core/trunk/core: src/main/java/org/hibernate and 1 other directory.
by hibernate-commits@lists.jboss.org
Author: steve.ebersole(a)jboss.com
Date: 2009-06-23 04:29:55 -0400 (Tue, 23 Jun 2009)
New Revision: 16897
Modified:
core/trunk/core/pom.xml
core/trunk/core/src/main/java/org/hibernate/Version.java
Log:
HHH-3982 - Apply build version to org.hibernate.Version
Modified: core/trunk/core/pom.xml
===================================================================
--- core/trunk/core/pom.xml 2009-06-23 08:29:31 UTC (rev 16896)
+++ core/trunk/core/pom.xml 2009-06-23 08:29:55 UTC (rev 16897)
@@ -86,6 +86,32 @@
</executions>
</plugin>
<plugin>
+ <groupId>org.jboss.maven.plugins</groupId>
+ <artifactId>maven-injection-plugin</artifactId>
+ <version>1.0.0</version>
+ <executions>
+ <execution>
+ <phase>compile</phase>
+ <goals>
+ <goal>bytecode</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <bytecodeInjections>
+ <bytecodeInjection>
+ <expression>${pom.version}</expression>
+ <targetMembers>
+ <methodBodyReturn>
+ <className>org.hibernate.Version</className>
+ <methodName>getVersionString</methodName>>
+ </methodBodyReturn>
+ </targetMembers>
+ </bytecodeInjection>
+ </bytecodeInjections>
+ </configuration>
+ </plugin>
+ <plugin>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
Modified: core/trunk/core/src/main/java/org/hibernate/Version.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/Version.java 2009-06-23 08:29:31 UTC (rev 16896)
+++ core/trunk/core/src/main/java/org/hibernate/Version.java 2009-06-23 08:29:55 UTC (rev 16897)
@@ -30,7 +30,7 @@
*/
public class Version {
public static String getVersionString() {
- return "3.5.0-SNAPSHOT";
+ return "[WORKING]";
}
public static void main(String[] args) {
15 years, 5 months
Hibernate SVN: r16896 - in core/branches/Branch_3_3/core: src/main/java/org/hibernate and 1 other directory.
by hibernate-commits@lists.jboss.org
Author: steve.ebersole(a)jboss.com
Date: 2009-06-23 04:29:31 -0400 (Tue, 23 Jun 2009)
New Revision: 16896
Modified:
core/branches/Branch_3_3/core/pom.xml
core/branches/Branch_3_3/core/src/main/java/org/hibernate/Version.java
Log:
HHH-3982 - Apply build version to org.hibernate.Version
Modified: core/branches/Branch_3_3/core/pom.xml
===================================================================
--- core/branches/Branch_3_3/core/pom.xml 2009-06-23 07:23:22 UTC (rev 16895)
+++ core/branches/Branch_3_3/core/pom.xml 2009-06-23 08:29:31 UTC (rev 16896)
@@ -87,6 +87,32 @@
</executions>
</plugin>
<plugin>
+ <groupId>org.jboss.maven.plugins</groupId>
+ <artifactId>maven-injection-plugin</artifactId>
+ <version>1.0.0</version>
+ <executions>
+ <execution>
+ <phase>compile</phase>
+ <goals>
+ <goal>bytecode</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <bytecodeInjections>
+ <bytecodeInjection>
+ <expression>${pom.version}</expression>
+ <targetMembers>
+ <methodBodyReturn>
+ <className>org.hibernate.Version</className>
+ <methodName>getVersionString</methodName>>
+ </methodBodyReturn>
+ </targetMembers>
+ </bytecodeInjection>
+ </bytecodeInjections>
+ </configuration>
+ </plugin>
+ <plugin>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
Modified: core/branches/Branch_3_3/core/src/main/java/org/hibernate/Version.java
===================================================================
--- core/branches/Branch_3_3/core/src/main/java/org/hibernate/Version.java 2009-06-23 07:23:22 UTC (rev 16895)
+++ core/branches/Branch_3_3/core/src/main/java/org/hibernate/Version.java 2009-06-23 08:29:31 UTC (rev 16896)
@@ -30,7 +30,7 @@
*/
public class Version {
public static String getVersionString() {
- return "3.3.2-SNAPSHOT";
+ return "[WORKING]";
}
public static void main(String[] args) {
15 years, 5 months
Hibernate SVN: r16895 - in core/branches/Branch_3_3: jmx and 2 other directories.
by hibernate-commits@lists.jboss.org
Author: steve.ebersole(a)jboss.com
Date: 2009-06-23 03:23:22 -0400 (Tue, 23 Jun 2009)
New Revision: 16895
Modified:
core/branches/Branch_3_3/cache-jbosscache/pom.xml
core/branches/Branch_3_3/jmx/pom.xml
core/branches/Branch_3_3/parent/pom.xml
core/branches/Branch_3_3/tutorials/pom.xml
Log:
HHH-3753 - Upgrade to SLF4J version 1.5.8
Modified: core/branches/Branch_3_3/cache-jbosscache/pom.xml
===================================================================
--- core/branches/Branch_3_3/cache-jbosscache/pom.xml 2009-06-23 07:22:55 UTC (rev 16894)
+++ core/branches/Branch_3_3/cache-jbosscache/pom.xml 2009-06-23 07:23:22 UTC (rev 16895)
@@ -72,12 +72,6 @@
<version>1.8.0.2</version>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- <version>${slf4jVersion}</version>
- <scope>test</scope>
- </dependency>
<!-- these are optional on core... :( -->
<dependency>
<groupId>javassist</groupId>
Modified: core/branches/Branch_3_3/jmx/pom.xml
===================================================================
--- core/branches/Branch_3_3/jmx/pom.xml 2009-06-23 07:22:55 UTC (rev 16894)
+++ core/branches/Branch_3_3/jmx/pom.xml 2009-06-23 07:23:22 UTC (rev 16895)
@@ -22,16 +22,5 @@
<artifactId>hibernate-core</artifactId>
<version>${version}</version>
</dependency>
- <!-- logging setup for the test suite -->
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- <version>1.4.2</version>
- </dependency>
- <dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- <version>1.2.14</version>
- </dependency>
</dependencies>
</project>
\ No newline at end of file
Modified: core/branches/Branch_3_3/parent/pom.xml
===================================================================
--- core/branches/Branch_3_3/parent/pom.xml 2009-06-23 07:22:55 UTC (rev 16894)
+++ core/branches/Branch_3_3/parent/pom.xml 2009-06-23 07:23:22 UTC (rev 16895)
@@ -365,6 +365,6 @@
</distributionManagement>
<properties>
- <slf4jVersion>1.5.6</slf4jVersion>
+ <slf4jVersion>1.5.8</slf4jVersion>
</properties>
</project>
Modified: core/branches/Branch_3_3/tutorials/pom.xml
===================================================================
--- core/branches/Branch_3_3/tutorials/pom.xml 2009-06-23 07:22:55 UTC (rev 16894)
+++ core/branches/Branch_3_3/tutorials/pom.xml 2009-06-23 07:23:22 UTC (rev 16895)
@@ -83,19 +83,14 @@
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
- <version>1.5.2</version>
+ <version>${slf4jVersion}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
- <version>1.5.2</version>
+ <version>${slf4jVersion}</version>
</dependency>
<dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- <version>1.2.14</version>
- </dependency>
- <dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>99.0-does-not-exist</version>
15 years, 5 months