Skip to content

Commit

Permalink
Fixed #409 - setEndlessScrollListener crashes when logging is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
davideas committed Jul 12, 2017
1 parent 0f5839c commit 5a7aa1d
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
* @author Davide Steduto
* @since 27/01/2016 Created
*/
@SuppressWarnings({"WeakerAccess", "unused", "ConstantConditions"})
public final class FlexibleUtils {

public static final int INVALID_COLOR = -1;
Expand Down Expand Up @@ -101,8 +102,9 @@ public static String getModeName(@Mode int mode) {
* @return the SimpleClassName of the provided object
* @since 5.0.0-rc1
*/
@NonNull
public static String getClassName(@NonNull Object o) {
return o.getClass().getSimpleName();
return o == null ? "null" : o.getClass().getSimpleName();
}

/**
Expand Down

1 comment on commit 5a7aa1d

@wankey
Copy link

@wankey wankey commented on 5a7aa1d Jul 12, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

public static String getClassName(@NonNull Object o)

I think @nonnull may can be replaced with @nullable

Please sign in to comment.