Skip to content

Commit

Permalink
- Fixed compilation error in book examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Jerome Louvel committed Apr 17, 2012
1 parent 22d9d9f commit 8e2454d
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@

package org.restlet.example.book.restlet.ch04.sec5.sub2;

import java.io.IOException;

import org.restlet.data.MediaType;
import org.restlet.data.Reference;
import org.restlet.ext.jackson.JacksonRepresentation;
Expand Down Expand Up @@ -90,8 +88,7 @@ protected Representation put(Representation representation, Variant variant)
if (MediaType.APPLICATION_XML.isCompatible(representation
.getMediaType())) {
// Parse the XML representation to get the mail bean
mail = new XstreamRepresentation<Mail>(representation,
Mail.class).getObject();
mail = new XstreamRepresentation<Mail>(representation).getObject();
System.out.println("XML representation received");
} else if (MediaType.APPLICATION_JSON.isCompatible(representation
.getMediaType())) {
Expand All @@ -109,7 +106,7 @@ protected Representation put(Representation representation, Variant variant)
System.out.println("Account URI: " + mail.getAccountRef());
System.out.println();
}
} catch (IOException e) {
} catch (Exception e) {
throw new ResourceException(e);
}

Expand Down

0 comments on commit 8e2454d

Please sign in to comment.