ReactiveX/RxJava

View on GitHub
src/main/java/rx/internal/operators/OnSubscribeAmb.java

Summary

Maintainability
C
7 hrs
Test Coverage

Method call has 47 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    @Override
    public void call(final Subscriber<? super T> subscriber) {
        final Selection<T> selection = new Selection<T>();

        //setup unsubscription of all the subscribers to the sources
Severity: Minor
Found in src/main/java/rx/internal/operators/OnSubscribeAmb.java - About 1 hr to fix

    Method amb has 9 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        public static <T> OnSubscribe<T> amb(Observable<? extends T> o1, Observable<? extends T> o2, Observable<? extends T> o3, Observable<? extends T> o4, Observable<? extends T> o5, Observable<? extends T> o6, Observable<? extends T> o7, Observable<? extends T> o8, Observable<? extends T> o9) {
    Severity: Major
    Found in src/main/java/rx/internal/operators/OnSubscribeAmb.java - About 1 hr to fix

      Method amb has 8 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          public static <T> OnSubscribe<T> amb(Observable<? extends T> o1, Observable<? extends T> o2, Observable<? extends T> o3, Observable<? extends T> o4, Observable<? extends T> o5, Observable<? extends T> o6, Observable<? extends T> o7, Observable<? extends T> o8) {
      Severity: Major
      Found in src/main/java/rx/internal/operators/OnSubscribeAmb.java - About 1 hr to fix

        Method amb has 7 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            public static <T> OnSubscribe<T> amb(Observable<? extends T> o1, Observable<? extends T> o2, Observable<? extends T> o3, Observable<? extends T> o4, Observable<? extends T> o5, Observable<? extends T> o6, Observable<? extends T> o7) {
        Severity: Major
        Found in src/main/java/rx/internal/operators/OnSubscribeAmb.java - About 50 mins to fix

          Method amb has 6 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              public static <T> OnSubscribe<T> amb(Observable<? extends T> o1, Observable<? extends T> o2, Observable<? extends T> o3, Observable<? extends T> o4, Observable<? extends T> o5, Observable<? extends T> o6) {
          Severity: Minor
          Found in src/main/java/rx/internal/operators/OnSubscribeAmb.java - About 45 mins to fix

            Method amb has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                public static <T> OnSubscribe<T> amb(Observable<? extends T> o1, Observable<? extends T> o2, Observable<? extends T> o3, Observable<? extends T> o4, Observable<? extends T> o5) {
            Severity: Minor
            Found in src/main/java/rx/internal/operators/OnSubscribeAmb.java - About 35 mins to fix

              Method isSelected has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

                      private boolean isSelected() {
                          if (chosen) {
                              return true;
                          }
                          if (selection.get() == this) {
              Severity: Minor
              Found in src/main/java/rx/internal/operators/OnSubscribeAmb.java - About 25 mins 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 a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

                  @Override
                  public void call(final Subscriber<? super T> subscriber) {
                      final Selection<T> selection = new Selection<T>();
              
                      //setup unsubscription of all the subscribers to the sources
              Severity: Minor
              Found in src/main/java/rx/internal/operators/OnSubscribeAmb.java - About 25 mins 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

              There are no issues that match your filters.

              Category
              Status