Skip to content

Commit 3c91684

Browse files
committed
Code style changes
1 parent 04410e4 commit 3c91684

2 files changed

Lines changed: 11 additions & 8 deletions

File tree

rxjava2debug/src/main/java/com/akaita/java/rxjava2debug/ExceptionUtils.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ static Throwable setRootCause(@NonNull Throwable throwable, @NonNull Throwable r
3030
return collapseCauses(causes);
3131
}
3232

33-
private static @NonNull
34-
List<Throwable> listCauses(@NonNull Throwable throwable) {
33+
@NonNull
34+
private static List<Throwable> listCauses(@NonNull Throwable throwable) {
3535
LinkedList<Throwable> causes = new LinkedList<Throwable>();
3636
Throwable cause = throwable.getCause();
3737
while (cause != null && !causes.contains(cause)) {
@@ -41,14 +41,14 @@ List<Throwable> listCauses(@NonNull Throwable throwable) {
4141
return causes;
4242
}
4343

44-
private static @NonNull
45-
Throwable collapseCauses(@NonNull List<Throwable> causes) {
44+
@NonNull
45+
private static Throwable collapseCauses(@NonNull List<Throwable> causes) {
4646
if (causes.size() == 0) {
4747
return new RuntimeException("Empty list of causes");
4848
}
4949

5050
Throwable topThrowable = null;
51-
for (int i=causes.size()-1 ; i>=0 ; i--) {
51+
for (int i = causes.size() - 1; i >= 0; i--) {
5252
topThrowable = new Throwable(causes.get(i).getMessage(), topThrowable);
5353
if (causes.get(i).getStackTrace() != null) {
5454
// This array should never be null, if everybody follows the Java spec

rxjava2debug/src/main/java/com/akaita/java/rxjava2debug/RxJava2Debug.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
import static com.akaita.java.rxjava2debug.StackTraceUtils.parseStackTrace;
2626

2727
public class RxJava2Debug {
28-
private @Nullable
29-
static String[] basePackages;
28+
@Nullable
29+
private static String[] basePackages;
3030

3131
/**
3232
* Start collecting information about RxJava's execution to provide a more meaningful StackTrace in case of crash<br/>
@@ -39,6 +39,7 @@ public static void enableRxJava2AssemblyTracking() {
3939
/**
4040
* Start collecting filtered information about RxJava's execution to provide a more meaningful StackTrace in case of crash<br/>
4141
* <b>Beware:</b> Any crash-reporting handler should be set up <i>before</i> calling this method
42+
*
4243
* @param basePackageNames List of base package names of your code, so the created stacktrace will have one of those on its top<br/>
4344
* <i>null</i> to disable any filtering
4445
*/
@@ -58,10 +59,12 @@ public static void disableRxJava2AssemblyTracking() {
5859

5960
/**
6061
* Obtain a copy of the original Throwable with an extended StackTrace
62+
*
6163
* @param original Original Throwable
6264
* @return new Throwable with enhanced StackTrace if information was found. <i>Original Throwable</i> otherwise
6365
*/
64-
public static @NonNull Throwable getEnhancedStackTrace(@NonNull Throwable original) {
66+
@NonNull
67+
public static Throwable getEnhancedStackTrace(@NonNull Throwable original) {
6568
Throwable enhanced = original;
6669

6770
RxJavaAssemblyException assembledException = RxJavaAssemblyException.find(original);

0 commit comments

Comments
 (0)