Mpdreamz/NEST — pull request #57 by VersoLaMorte (2012-07-03 12:17:02+00:00)
Title: GetMapping<T> crashes with infinite loop

Currently, the code for retrieving the mapping for a class is this:

```
public TypeMapping GetMapping() where T : class
{
var index = this.Settings.GetIndexForType();
return this.GetMapping();
}
```

The `index` variable is unused, so this method keeps calling itself, which results into a StackOverflowException.

This pull request fixes that and uses the `index` variable to call the `GetMapping( string index )` overload.
I've not included any tests, since a test for this method is already present in `IndicesTest.PutMapping()`. It crashed before, but now it passes.

You have the honour of receiving my very first pull request, so if I did things wrong or you want me to add change anything, just let me know.