Skip to content

Commit

Permalink
change error from 'cannot find deployment unit' to 'cannot find persi…
Browse files Browse the repository at this point in the history
…stence unit'
  • Loading branch information
scottmarlow authored and bstansberry committed Feb 9, 2012
1 parent 0a1bd89 commit aea1531
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@

package org.jboss.as.jpa.processor;

import static org.jboss.as.jpa.JpaMessages.MESSAGES;

import java.util.HashMap;
import java.util.List;
import java.util.Map;
Expand Down Expand Up @@ -61,8 +63,6 @@
import org.jboss.jandex.MethodInfo;
import org.jboss.msc.service.ServiceName;

import static org.jboss.as.jpa.JpaMessages.MESSAGES;

/**
* Handle PersistenceContext and PersistenceUnit annotations.
*
Expand Down Expand Up @@ -283,7 +283,7 @@ private PersistenceUnitMetadata getPersistenceUnit(final DeploymentUnit deployme
}
PersistenceUnitMetadata pu = PersistenceUnitSearch.resolvePersistenceUnitSupplier(deploymentUnit, searchName);
if (null == pu) {
classDescription.setInvalid(MESSAGES.deploymentUnitNotFound(searchName, deploymentUnit));
classDescription.setInvalid(MESSAGES.persistenceUnitNotFound(searchName, deploymentUnit));
return null;
}
return pu;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ private PersistenceUnitMetadata getPersistenceUnit(final DeploymentUnit deployme

PersistenceUnitMetadata pu = PersistenceUnitSearch.resolvePersistenceUnitSupplier(deploymentUnit, puName);
if (null == pu) {
throw new DeploymentUnitProcessingException(MESSAGES.deploymentUnitNotFound(puName, deploymentUnit));
throw new DeploymentUnitProcessingException(MESSAGES.persistenceUnitNotFound(puName, deploymentUnit));
}
return pu;
}
Expand Down
6 changes: 3 additions & 3 deletions jpa/spi/src/main/java/org/jboss/as/jpa/JpaMessages.java
Original file line number Diff line number Diff line change
Expand Up @@ -268,15 +268,15 @@ public interface JpaMessages {
IllegalArgumentException classLevelAnnotationParameterRequired(String annotation, String parameter);

/**
* A message indicating that the deployment unit, represented by the {@code path} parameter, could not be found at
* A message indicating that the persistence unit, represented by the {@code path} parameter, could not be found at
* the current deployment unit, represented by the {@code deploymentUnit} parameter.
*
* @param puName the persistence unit name.
* @param deploymentUnit the deployment unit.
* @return the message.
*/
@Message(id = 11440, value = "Can't find a deployment unit named %s in %s")
String deploymentUnitNotFound(String puName, DeploymentUnit deploymentUnit);
@Message(id = 11440, value = "Can't find a persistence unit named %s in %s")
String persistenceUnitNotFound(String puName, DeploymentUnit deploymentUnit);

/**
* Creates an exception indicating that the deployment unit, represented by the {@code path} and {@code puName}
Expand Down

0 comments on commit aea1531

Please sign in to comment.