ReactiveX/RxJava

View on GitHub

Showing 1,068 of 1,068 total issues

File OperatorGroupByEvicting.java has 470 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**
 * Copyright 2018 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/OperatorGroupByEvicting.java - About 7 hrs to fix

    Method call has a Cognitive Complexity of 47 (exceeds 5 allowed). Consider refactoring.
    Open

        @Override
        public void call(final CompletableSubscriber s) {
            final CompositeSubscription set = new CompositeSubscription();
    
            s.onSubscribe(set);

    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

    BlockingObservable has 50 methods (exceeds 20 allowed). Consider refactoring.
    Open

    public final class BlockingObservable<T> {
    
        private final Observable<? extends T> o;
    
        /** Constant to indicate the onStart method should be called. */
    Severity: Minor
    Found in src/main/java/rx/observables/BlockingObservable.java - About 7 hrs to fix

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

              @Override
              public void drain(ReplayProducer<T> rp) {
                  if (rp.getAndIncrement() != 0) {
                      return;
                  }
      Severity: Minor
      Found in src/main/java/rx/subjects/ReplaySubject.java - About 6 hrs 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 42 (exceeds 5 allowed). Consider refactoring.
      Open

              @Override
              public void drain(ReplayProducer<T> rp) {
                  if (rp.getAndIncrement() != 0) {
                      return;
                  }
      Severity: Minor
      Found in src/main/java/rx/subjects/ReplaySubject.java - About 6 hrs 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 42 (exceeds 5 allowed). Consider refactoring.
      Open

              @Override
              public void drain(ReplayProducer<T> rp) {
                  if (rp.getAndIncrement() != 0) {
                      return;
                  }
      Severity: Minor
      Found in src/main/java/rx/subjects/ReplaySubject.java - About 6 hrs 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 41 (exceeds 5 allowed). Consider refactoring.
      Open

          void drain() {
              if (getAndIncrement() != 0) {
                  return;
              }
      
      
      Severity: Minor
      Found in src/main/java/rx/internal/operators/OnSubscribePublishMulticast.java - About 6 hrs 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 OperatorWindowWithTime.java has 427 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. You may obtain a copy of
      Severity: Minor
      Found in src/main/java/rx/internal/operators/OperatorWindowWithTime.java - About 6 hrs to fix

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

                @Override
                public final void replay(InnerProducer<T> output) {
                    synchronized (output) {
                        if (output.emitting) {
                            output.missed = true;
        Severity: Minor
        Found in src/main/java/rx/internal/operators/OperatorReplay.java - About 6 hrs 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 AsyncOnSubscribe.java has 418 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.
        Severity: Minor
        Found in src/main/java/rx/observables/AsyncOnSubscribe.java - About 6 hrs to fix

          File OperatorPublish.java has 408 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. You may obtain a copy of
          Severity: Minor
          Found in src/main/java/rx/internal/operators/OperatorPublish.java - About 5 hrs to fix

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

                public void drain() {
                    boolean term;
                    synchronized (this) {
                        if (emitting) {
                            return;
            Severity: Minor
            Found in src/main/java/rx/internal/util/BackpressureDrainManager.java - About 5 hrs 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 37 (exceeds 5 allowed). Consider refactoring.
            Open

                    void drain() {
                        if (wip.getAndIncrement() != 0) {
                            return;
                        }
            
            
            Severity: Minor
            Found in src/main/java/rx/internal/operators/OnSubscribeCreate.java - About 5 hrs 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 37 (exceeds 5 allowed). Consider refactoring.
            Open

                    void drain() {
                        if (wip.getAndIncrement() != 0) {
                            return;
                        }
            
            
            Severity: Minor
            Found in src/main/java/rx/internal/operators/OnSubscribeCreate.java - About 5 hrs 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 OnSubscribeCreate.java has 393 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: Minor
            Found in src/main/java/rx/internal/operators/OnSubscribeCreate.java - About 5 hrs to fix

              Method createStacktrace has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring.
              Open

                  static String createStacktrace() {
                      StackTraceElement[] stacktraceElements = Thread.currentThread().getStackTrace();
              
                      StringBuilder sb = new StringBuilder("Assembly trace:");
              
              
              Severity: Minor
              Found in src/main/java/rx/internal/operators/OnSubscribeOnAssembly.java - About 5 hrs 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 call has 134 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  @Override
                  public void call(final Subscriber<? super T> child) {
              
                      // when true is a marker to say we are ready to resubscribe to source
                      final AtomicBoolean resumeBoundary = new AtomicBoolean(true);
              Severity: Major
              Found in src/main/java/rx/internal/operators/OnSubscribeRedo.java - About 5 hrs to fix

                Method manageRequests has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring.
                Open

                        void manageRequests(InnerProducer<T> inner) {
                            // if the upstream has completed, no more requesting is possible
                            if (isUnsubscribed()) {
                                return;
                            }
                Severity: Minor
                Found in src/main/java/rx/internal/operators/OperatorReplay.java - About 5 hrs 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 checkTerminated has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring.
                Open

                    boolean checkTerminated(boolean d, boolean empty) {
                        if (d) {
                            if (delayError) {
                                if (empty) {
                                    PublishProducer<T>[] a = terminate();
                Severity: Minor
                Found in src/main/java/rx/internal/operators/OnSubscribePublishMulticast.java - About 5 hrs 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

                TestSubscriber has 38 methods (exceeds 20 allowed). Consider refactoring.
                Open

                public class TestSubscriber<T> extends Subscriber<T> {
                
                    private final Observer<T> delegate;
                
                    private final List<T> values;
                Severity: Minor
                Found in src/main/java/rx/observers/TestSubscriber.java - About 5 hrs to fix
                  Severity
                  Category
                  Status
                  Source
                  Language