calabash/calabash-android — pull request #450 by krukow (2014-08-13 20:46:55+00:00)
Title: Don't force Class init by querying

The call to Class.forName(step.getText()) can cause side effects because of static initializers of unloaded classes:

https://github.com/calabash/calabash-android/blob/67abb9cd43bb6fdf8f91cb76c64ac3eb96ca2c4b/ruby-gem/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/query/Query.java#L120

I think we can solve the issue by using
Class.forName(step.getText(), false, this.getClass().getClassLoader())
If not we should be able to ask the current classloader and short circuit if class is not yet loaded

cc @kasperlanger @TobiasRoikjer