ReactiveX/RxJava

View on GitHub

Showing 657 of 1,068 total issues

Completable has 191 methods (exceeds 20 allowed). Consider refactoring.
Open

public class Completable {
    /** The actual subscription action. */
    private final OnSubscribe onSubscribe;

    /**
Severity: Major
Found in src/main/java/rx/Completable.java - About 3 days to fix

    File Completable.java has 1377 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /**
     * Copyright 2014 Netflix, Inc.
     *
     * Licensed under the Apache License, Version 2.0 (the "License");
     * you may not use this file except in compliance with the License.
    Severity: Major
    Found in src/main/java/rx/Completable.java - About 3 days to fix

      Method emitLoop has a Cognitive Complexity of 165 (exceeds 5 allowed). Consider refactoring.
      Open

              void emitLoop() {
                  boolean skipFinal = false;
                  try {
                      final Subscriber<? super T> child = this.child;
                      for (;;) {
      Severity: Minor
      Found in src/main/java/rx/internal/operators/OperatorMerge.java - About 3 days to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Single has 123 methods (exceeds 20 allowed). Consider refactoring.
      Open

      public class Single<T> {
      
          final OnSubscribe<T> onSubscribe;
      
          /**
      Severity: Major
      Found in src/main/java/rx/Single.java - About 2 days to fix

        File OperatorReplay.java has 874 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        /**
         * Copyright 2014 Netflix, Inc.
         *
         * Licensed under the Apache License, Version 2.0 (the "License");
         * you may not use this file except in compliance with the License.
        Severity: Major
        Found in src/main/java/rx/internal/operators/OperatorReplay.java - About 2 days to fix

          File ReplaySubject.java has 795 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          /**
           * Copyright 2014 Netflix, Inc.
           *
           * Licensed under the Apache License, Version 2.0 (the "License");
           * you may not use this file except in compliance with the License.
          Severity: Major
          Found in src/main/java/rx/subjects/ReplaySubject.java - About 1 day to fix

            RxJavaHooks has 88 methods (exceeds 20 allowed). Consider refactoring.
            Open

            public final class RxJavaHooks {
                /**
                 * Prevents changing the hook callbacks when set to true.
                 */
                /* test */ static volatile boolean lockdown;
            Severity: Major
            Found in src/main/java/rx/plugins/RxJavaHooks.java - About 1 day to fix

              File OperatorMerge.java has 654 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              /**
               * Copyright 2014 Netflix, Inc.
               *
               * Licensed under the Apache License, Version 2.0 (the "License");
               * you may not use this file except in compliance with the License.
              Severity: Major
              Found in src/main/java/rx/internal/operators/OperatorMerge.java - About 1 day to fix

                File Single.java has 642 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                /**
                 * Copyright 2015 Netflix, Inc.
                 *
                 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
                 * compliance with the License. You may obtain a copy of the License at
                Severity: Major
                Found in src/main/java/rx/Single.java - About 1 day to fix

                  Method emitLoop has a Cognitive Complexity of 69 (exceeds 5 allowed). Consider refactoring.
                  Open

                      void emitLoop() {
                          final Subscriber<? super T> c = child;
                  
                          long toRequest = 0L;
                          Producer requestFrom = null;
                  Severity: Minor
                  Found in src/main/java/rx/internal/producers/ProducerObserverArbiter.java - About 1 day to fix

                  Cognitive Complexity

                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                  A method's cognitive complexity is based on a few simple rules:

                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                  • Code is considered more complex for each "break in the linear flow of the code"
                  • Code is considered more complex when "flow breaking structures are nested"

                  Further reading

                  Method drain has a Cognitive Complexity of 68 (exceeds 5 allowed). Consider refactoring.
                  Open

                          void drain() {
                              if (wip.getAndIncrement() != 0) {
                                  return;
                              }
                  
                  
                  Severity: Minor
                  Found in src/main/java/rx/internal/operators/OnSubscribeFlatMapSingle.java - About 1 day to fix

                  Cognitive Complexity

                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                  A method's cognitive complexity is based on a few simple rules:

                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                  • Code is considered more complex for each "break in the linear flow of the code"
                  • Code is considered more complex when "flow breaking structures are nested"

                  Further reading

                  Method drain has a Cognitive Complexity of 63 (exceeds 5 allowed). Consider refactoring.
                  Open

                          void drain() {
                              if (wip.getAndIncrement() != 0) {
                                  return;
                              }
                  
                  
                  Severity: Minor
                  Found in src/main/java/rx/internal/operators/OnSubscribeFlattenIterable.java - About 1 day to fix

                  Cognitive Complexity

                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                  A method's cognitive complexity is based on a few simple rules:

                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                  • Code is considered more complex for each "break in the linear flow of the code"
                  • Code is considered more complex when "flow breaking structures are nested"

                  Further reading

                  File RxJavaHooks.java has 574 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  /**
                   * Copyright 2016 Netflix, Inc.
                   *
                   * Licensed under the Apache License, Version 2.0 (the "License");
                   * you may not use this file except in compliance with the License.
                  Severity: Major
                  Found in src/main/java/rx/plugins/RxJavaHooks.java - About 1 day to fix

                    Method drain has a Cognitive Complexity of 58 (exceeds 5 allowed). Consider refactoring.
                    Open

                            void drain() {
                                if (wip.getAndIncrement() != 0) {
                                    return;
                                }
                    
                    
                    Severity: Minor
                    Found in src/main/java/rx/internal/operators/OnSubscribeConcatMap.java - About 1 day to fix

                    Cognitive Complexity

                    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                    A method's cognitive complexity is based on a few simple rules:

                    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                    • Code is considered more complex for each "break in the linear flow of the code"
                    • Code is considered more complex when "flow breaking structures are nested"

                    Further reading

                    Method dispatch has a Cognitive Complexity of 57 (exceeds 5 allowed). Consider refactoring.
                    Open

                            void dispatch() {
                                // standard construct of emitter loop (blocking)
                                // if there is an emission going on, indicate that more work needs to be done
                                // the exact nature of this work needs to be determined from other data structures
                                synchronized (this) {
                    Severity: Minor
                    Found in src/main/java/rx/internal/operators/OperatorPublish.java - About 1 day to fix

                    Cognitive Complexity

                    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                    A method's cognitive complexity is based on a few simple rules:

                    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                    • Code is considered more complex for each "break in the linear flow of the code"
                    • Code is considered more complex when "flow breaking structures are nested"

                    Further reading

                    Method replay has a Cognitive Complexity of 57 (exceeds 5 allowed). Consider refactoring.
                    Open

                            public void replay() {
                                // make sure there is only a single thread emitting
                                synchronized (this) {
                                    if (emitting) {
                                        missed = true;
                    Severity: Minor
                    Found in src/main/java/rx/internal/operators/CachedObservable.java - About 1 day to fix

                    Cognitive Complexity

                    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                    A method's cognitive complexity is based on a few simple rules:

                    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                    • Code is considered more complex for each "break in the linear flow of the code"
                    • Code is considered more complex when "flow breaking structures are nested"

                    Further reading

                    Method tick has a Cognitive Complexity of 55 (exceeds 5 allowed). Consider refactoring.
                    Open

                            @SuppressWarnings("unchecked")
                            void tick() {
                                final Object[] subscribers = this.subscribers;
                                if (subscribers == null) {
                                    // nothing yet to do (initial request from Producer)
                    Severity: Minor
                    Found in src/main/java/rx/internal/operators/OperatorZip.java - About 1 day to fix

                    Cognitive Complexity

                    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                    A method's cognitive complexity is based on a few simple rules:

                    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                    • Code is considered more complex for each "break in the linear flow of the code"
                    • Code is considered more complex when "flow breaking structures are nested"

                    Further reading

                    Method drain has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring.
                    Open

                            void drain() {
                                if (wip.getAndIncrement() != 0) {
                                    return;
                                }
                                int missed = 1;
                    Severity: Minor
                    Found in src/main/java/rx/internal/operators/OperatorEagerConcatMap.java - About 1 day to fix

                    Cognitive Complexity

                    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                    A method's cognitive complexity is based on a few simple rules:

                    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                    • Code is considered more complex for each "break in the linear flow of the code"
                    • Code is considered more complex when "flow breaking structures are nested"

                    Further reading

                    Method emitLoop has 186 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            void emitLoop() {
                                boolean skipFinal = false;
                                try {
                                    final Subscriber<? super T> child = this.child;
                                    for (;;) {
                    Severity: Major
                    Found in src/main/java/rx/internal/operators/OperatorMerge.java - About 7 hrs to fix

                      File OperatorGroupBy.java has 476 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      /**
                       * Copyright 2014 Netflix, Inc.
                       *
                       * Licensed under the Apache License, Version 2.0 (the "License");
                       * you may not use this file except in compliance with the License.
                      Severity: Minor
                      Found in src/main/java/rx/internal/operators/OperatorGroupBy.java - About 7 hrs to fix
                        Severity
                        Category
                        Status
                        Source
                        Language