Projects >> IRIS >>fc9a8edb706b57626d92775be902609782b3f864

Chunk
Conflicting content
	    	}	    	

			// Create hypermedia representation for this resource
<<<<<<< HEAD
	    	HateoasResponseBuilder builder = HateoasResponse.status(status);
	    	if (getHateoasContext() != null) {
	    		buildLinks(builder, id, map);
	    	} else {
				// Add links without the hateoas context
	    		RESTResource entity = (RESTResource) newResource.getEntity();
	    		entity.setLinks(getLinks(entity));
	    	}
=======
	    	ResponseBuilder builder = Response.status(status);
			/*
			 * Add links
			 */
    		RESTResource entity = (RESTResource) newResource.getEntity();
    		entity.setLinks(getLinks(null, entity));
>>>>>>> 3109cd6a0bc57d1ea214624b1b8cd49776364d61
	    	builder.entity(newResource);
			
			return HeaderHelper.allowHeader(builder, getInteractions()).build();
Solution content
	    	}	    	

			// Create hypermedia representation for this resource
	    	ResponseBuilder builder = Response.status(status);
			/*
			 * Add links
			 */
    		RESTResource entity = (RESTResource) newResource.getEntity();
    		entity.setLinks(getLinks(null, entity));
	    	builder.entity(newResource);
			
			return HeaderHelper.allowHeader(builder, getInteractions()).build();
File
AbstractHTTPResourceInteractionModel.java
Developer's decision
Version 2
Kind of conflict
Cast expression
Comment
If statement
Method invocation
Variable
Chunk
Conflicting content
		};
		CommandController cc = r.getCommandController();
		ResourcePostCommand rpc = mock(ResourcePostCommand.class);
<<<<<<< HEAD
		NestedObject no = mock(NestedObject.class);
		EntityResource er = new EntityResource(no);
		when(rpc.post(anyString(), any(EntityResource.class))).thenReturn(new RESTResponse(Response.Status.ACCEPTED, er));
=======
		when(rpc.post(anyString(), any(EntityResource.class))).thenReturn(new RESTResponse(Response.Status.ACCEPTED, new EntityResource(null)));
>>>>>>> 3109cd6a0bc57d1ea214624b1b8cd49776364d61
		when(rpc.getMethod()).thenReturn("POST");
		cc.addStateTransitionCommand(resourcePath, rpc);
		Response response = r.post(mock(HttpHeaders.class), "123", null, mock(EntityResource.class));
Solution content
		};
		CommandController cc = r.getCommandController();
		ResourcePostCommand rpc = mock(ResourcePostCommand.class);
		NestedObject no = mock(NestedObject.class);
		EntityResource er = new EntityResource(no);
		when(rpc.post(anyString(), any(EntityResource.class))).thenReturn(new RESTResponse(Response.Status.ACCEPTED, er));
		when(rpc.getMethod()).thenReturn("POST");
		cc.addStateTransitionCommand(resourcePath, rpc);
		Response response = r.post(mock(HttpHeaders.class), "123", null, mock(EntityResource.class));
File
TestAbstractHTTPResourceInteractionModel.java
Developer's decision
Version 1
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
		};
		CommandController cc = r.getCommandController();
		ResourcePostCommand rpc = mock(ResourcePostCommand.class);
<<<<<<< HEAD
		NestedObject no = mock(NestedObject.class);
		EntityResource er = new EntityResource(no);
		when(rpc.post(anyString(), any(EntityResource.class))).thenReturn(new RESTResponse(Response.Status.ACCEPTED, er));
=======
		when(rpc.post(anyString(), any(EntityResource.class))).thenReturn(new RESTResponse(Response.Status.ACCEPTED, new EntityResource(null)));
>>>>>>> 3109cd6a0bc57d1ea214624b1b8cd49776364d61
		when(rpc.getMethod()).thenReturn("POST");
		cc.addStateTransitionCommand(resourcePath, rpc);
Solution content
		};
		CommandController cc = r.getCommandController();
		ResourcePostCommand rpc = mock(ResourcePostCommand.class);
		NestedObject no = mock(NestedObject.class);
		EntityResource er = new EntityResource(no);
		when(rpc.post(anyString(), any(EntityResource.class))).thenReturn(new RESTResponse(Response.Status.ACCEPTED, er));
		when(rpc.getMethod()).thenReturn("POST");
		cc.addStateTransitionCommand(resourcePath, rpc);
File
TestAbstractHTTPResourceInteractionModel.java
Developer's decision
Version 1
Kind of conflict
Method invocation
Variable