cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erling Holmqvist (JIRA)" <>
Subject [jira] [Created] (CXF-4379) InjectionUtils failes to convert path-value to class annotated with XmlJavaTypeAdapter
Date Thu, 14 Jun 2012 08:53:43 GMT
Erling Holmqvist created CXF-4379:

             Summary: InjectionUtils failes to convert path-value to class annotated with
                 Key: CXF-4379
             Project: CXF
          Issue Type: Bug
          Components: JAX-RS
    Affects Versions: 2.6.1, 2.5.4
            Reporter: Erling Holmqvist

package no.nrk.panorama.serum;

import static org.fest.assertions.Assertions.assertThat;

import java.lang.annotation.Annotation;

import javax.xml.bind.annotation.adapters.XmlAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;

import org.apache.cxf.jaxrs.model.ParameterType;
import org.apache.cxf.jaxrs.utils.InjectionUtils;
import org.apache.cxf.message.MessageImpl;
import org.junit.Test;

public class CXFInjectionUtilsJUnitTest {

	public static class Adapter extends XmlAdapter<String, Id> {

		public String marshal(final Id id) throws Exception {
			return id.getId();

		public Id unmarshal(final String idStr) throws Exception {
			Id id = new DelegatingId();
			return id;

	public interface Id {
		public String getId();

		public void setId(String id);

	public static class DelegatingId implements Id {

		private String id;

		public String getId() {

		public void setId(String id) { = id;


	public void handleParameter_givenValidInput_shouldReturnIdWithCorrectValue() throws Exception
		// Arrange
		String value = "1.1";

		// Act
		Object id = InjectionUtils.handleParameter(value, true, Id.class, new Annotation[] {}, ParameterType.PATH,
		      new MessageImpl());

		// Assert



This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message