aiten/grails-oauth-scribe — pull request #28 by bdgarret (2013-10-18 23:02:44+00:00)
Title: issue27 fix; see https://github.com/aiten/grails-oauth-scribe/issues/27

I created a fork here: https://github.com/bdgarret/grails-oauth-scribe with a branch called issue27

I've added a test to OauthResourceServiceSpec that will fail in order to reproduce the issue (without the fix I added).
| Failure: null payload should be gracefully handled to avoid NPE(uk.co.desirableobjects.oauth.scribe.OauthResourceServiceSpec)
| java.lang.NullPointerException
at org.scribe.model.Request.addPayload(Request.java:194)
at uk.co.desirableobjects.oauth.scribe.OauthResourceService.accessResource(OauthResourceService.groovy:25)
at uk.co.desirableobjects.oauth.scribe.OauthResourceServiceSpec.null payload should be gracefully handled to avoid NPE(OauthResourceServiceSpec.groovy:64)
| Completed 48 spock tests, 1 failed in 9974ms

But with the fix I created in OauthResourceService then the test above succeeds.
| Completed 48 spock tests, 0 failed in 9453ms

The two important files are: OauthResourceServiceSpec and OauthResourceService. BuildConfig.groovy has the upgrade to scribe 1.3.5 but it also has a couple other things because I am running a later version of groovy. Feel free to pick and choose what to pull.