Skip to content
Browse files

Cleanup

  • Loading branch information...
1 parent 5d7c09c commit d2f40a1bf6bfee6b6ae65ec8f14c598996f4efc0 @trecloux committed Feb 5, 2012
View
34 pom.xml
@@ -111,23 +111,23 @@
</dependency>
<!-- Servlet -->
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- <version>2.5</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>javax.servlet.jsp</groupId>
- <artifactId>jsp-api</artifactId>
- <version>2.1</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>jstl</artifactId>
- <version>1.2</version>
- </dependency>
+<!-- <dependency>-->
+<!-- <groupId>javax.servlet</groupId>-->
+<!-- <artifactId>servlet-api</artifactId>-->
+<!-- <version>2.5</version>-->
+<!-- <scope>provided</scope>-->
+<!-- </dependency>-->
+<!-- <dependency>-->
+<!-- <groupId>javax.servlet.jsp</groupId>-->
+<!-- <artifactId>jsp-api</artifactId>-->
+<!-- <version>2.1</version>-->
+<!-- <scope>provided</scope>-->
+<!-- </dependency>-->
+<!-- <dependency>-->
+<!-- <groupId>javax.servlet</groupId>-->
+<!-- <artifactId>jstl</artifactId>-->
+<!-- <version>1.2</version>-->
+<!-- </dependency>-->
</dependencies>
View
21 src/main/java/com/github/trecloux/flashcookie/web/CookieFlashMapManager.java
@@ -1,8 +1,6 @@
package com.github.trecloux.flashcookie.web;
import java.io.IOException;
-import java.io.InputStream;
-import java.io.StringWriter;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@@ -13,17 +11,12 @@
import javax.servlet.http.HttpServletResponse;
import org.codehaus.jackson.JsonGenerator;
-import org.codehaus.jackson.JsonParser;
import org.codehaus.jackson.JsonProcessingException;
-import org.codehaus.jackson.JsonToken;
import org.codehaus.jackson.Version;
-import org.codehaus.jackson.map.DeserializationContext;
-import org.codehaus.jackson.map.JsonDeserializer;
import org.codehaus.jackson.map.JsonSerializer;
import org.codehaus.jackson.map.ObjectMapper;
import org.codehaus.jackson.map.SerializerProvider;
import org.codehaus.jackson.map.module.SimpleModule;
-import org.springframework.core.serializer.Deserializer;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.FlashMap;
import org.springframework.web.servlet.support.AbstractFlashMapManager;
@@ -38,7 +31,6 @@
public CookieFlashMapManager() {
SimpleModule module = new SimpleModule("FlahsMapSerializerModule", new Version(1, 0, 0, null));
module.addSerializer(new FlashMapSerializer());
- module.addDeserializer(FlashMap.class, new FlashMapDeserializer());
objectMapper.registerModule(module);
}
@@ -111,18 +103,5 @@ public void serialize(FlashMap flashMap, JsonGenerator jgen, SerializerProvider
return FlashMap.class;
}
- }
-
- public class FlashMapDeserializer extends JsonDeserializer<FlashMap> {
-
- @Override
- public FlashMap deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException,
- JsonProcessingException {
- JsonToken nextToken = jp.nextValue();
- return null;
- }
-
-
-
}
}
View
10 src/test/java/com/github/trecloux/flashcookie/web/IntegrationTest.java
@@ -1,8 +1,8 @@
package com.github.trecloux.flashcookie.web;
import net.sourceforge.jwebunit.junit.WebTester;
-import net.sourceforge.jwebunit.util.TestingEngineRegistry;
+import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.mortbay.jetty.Connector;
@@ -14,6 +14,7 @@
private static final String WEBAPP = "src/main/webapp/";
private static final String CONTEXTPATH = "/";
+ private Server server;
@Test
@@ -38,7 +39,7 @@ public void shouldShowFlashAttributeAfterRedirectAndDeleteAfterRefresh() throws
@Before
public void startSever() throws Exception {
- Server server = new Server();
+ server = new Server();
Connector connector = new SelectChannelConnector();
connector.setPort(8080);
connector.setHost("0.0.0.0");
@@ -53,5 +54,10 @@ public void startSever() throws Exception {
server.start();
}
+
+ @After
+ public void stopServer() throws Exception {
+ server.stop();
+ }
}

0 comments on commit d2f40a1

Please sign in to comment.
Something went wrong with that request. Please try again.