Sagar Khurana
Sagar Khurana
### Overview [UnnecessaryLambda](http://errorprone.info/bugpattern/UnnecessaryLambda) - Returning a lambda from a helper method or saving it in a constant is unnecessary; prefer to implement the functional interface method directly and use a...
### Overview [VariableNameSameAsType](https://errorprone.info/bugpattern/VariableNameSameAsType) - variableName and type with the same name would refer to the static field instead of the class. ### Proposed Changes Changed the variable names where it's...
### Overview [JavaLangClash](https://errorprone.info/bugpattern/JavaLangClash) - Never reuse class names from java.lang ### Proposed Changes Changed the names of the class which is similar to `java.lang` classes
### Overview [UnusedMethod](https://errorprone.info/bugpattern/UnusedMethod) - Unused. ### Proposed Changes Removed the unused methods.
### Overview [RethrowReflectiveOperationExceptionAsLinkageError](https://errorprone.info/bugpattern/RethrowReflectiveOperationExceptionAsLinkageError) - Prefer LinkageError for rethrowing ReflectiveOperationException as unchecked. ### Proposed Changes Replaced the generic assertion with LinkageError when class is not found using the exception.
### Overview [JavaUtilDate](https://errorprone.info/bugpattern/JavaUtilDate) - Date has a bad API that leads to bugs; prefer java.time.Instant or LocalDate. ### Proposed Changes Replaced the `java.util.Date` with `java.time.Instant`
### Overview [DefaultCharset](https://errorprone.info/bugpattern/DefaultCharset) - Implicit use of the platform default charset, which can result in differing behavior between JVM executions or incorrect behavior if the encoding of the data source...
### Overview This warning prefers logging or rethrowing exceptions instead of directly printing the stack trace. Altho, the exact reason is not shared why it's better I think having a...
### Overview Converted the [MavenRoboSettingsTest](https://github.com/robolectric/robolectric/blob/70ecd74e973f6927d15389979b37d12ec7431cf8/plugins/maven-dependency-resolver/src/test/java/org/robolectric/MavenRoboSettingsTest.kt) from java to kotlin. ### Proposed Changes In this, I've basically removed the java version `MavenRoboSettingsTest` and added the kotlin version.
### Overview Converted the [ZipFileROTest](https://github.com/hellosagar/robolectric/blob/c8f9b3912be1e53de04186e886414a9e9d8e0ee2/resources/src/test/java/org/robolectric/res/android/ZipFileROTest.kt) from java to kotlin. ### Proposed Changes In this, I've basically removed the java version `ZipFileROTest` and added the kotlin version.