DeploymentInfo deploymentInfo = (DeploymentInfo) di;
Container container = deploymentInfo.getContainer();
if (!(container instanceof CmpContainer)) {
throw new FinderException("Deployment is not connected to a CmpContainer " + deploymentInfo.getDeploymentID());
}
CmpContainer cmpContainer = (CmpContainer) container;
Object result = cmpContainer.select(deploymentInfo, methodSignature, returnType, args);
if (result instanceof Number) {
Number number = (Number) result;
if ("char".equals(returnType) || Character.class.getName().equals(returnType)) {
result = new Character((char) number.intValue());
} else if ("byte".equals(returnType) || Byte.class.getName().equals(returnType)) {