This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
com.fasterxml.jackson.databind.JsonMappingException: (was java.lang.NullPointerException) (through reference chain: com.github.tomakehurst.wiremock.http.ResponseDefinition["originalRequest"]->com.github.tomakehurst.wiremock.jetty9.JettyHttpServletRequestAdapter["method"]) | |
at com.fasterxml.jackson.databind.JsonMappingException.wrapWithPath(JsonMappingException.java:378) | |
at com.fasterxml.jackson.databind.JsonMappingException.wrapWithPath(JsonMappingException.java:338) | |
at com.fasterxml.jackson.databind.ser.std.StdSerializer.wrapAndThrow(StdSerializer.java:342) | |
at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:686) | |
at com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(BeanSerializer.java:157) | |
at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:672) | |
at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:678) | |
at com.fasterxml.jackson.databind.ser.BeanSeriali |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.specs.Specification | |
import org.specs.runner.{Runner, JUnit} | |
class ExtractJSONTest extends Runner(ExtractJSON) with JUnit | |
object ExtractJSON extends Specification { | |
import net.liftweb.json._ | |
import JsonParser._ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* <p>A suggested usage pattern (actually a util class) for a map that:</p> | |
* | |
* <ul> | |
* <li>is accessed by many threads</li> | |
* <li>should construct new values lazily as keys are requested</li> | |
* <li>should construct each value once and only once</li> | |
* </ul> | |
* | |
* <p>I think it works. Comments welcome.</p> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// A simple trait: | |
trait CascadingActions { | |
implicit def tToActioneerT[T](t: T) = Actioneer(t) | |
case class Actioneer[T](tee: T) { | |
def withAction(action: (T => Unit)): T = | |
withActions(action) | |
def withActions(actions: (T => Unit)*): T = { |