mlaccetti/JavaPNS

View on GitHub
src/main/java/javapns/Push.java

Summary

Maintainability
C
7 hrs
Test Coverage

Method sendPayloads has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  private static PushedNotifications sendPayloads(final Object keystore, final String password, final boolean production, final Object payloadDevicePairs) throws CommunicationException, KeystoreException {
    final PushedNotifications notifications = new PushedNotifications();
    if (payloadDevicePairs == null) {
      return notifications;
    }
Severity: Minor
Found in src/main/java/javapns/Push.java - About 1 hr to fix

    Method sendPayload has 27 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      private static PushedNotifications sendPayload(final Payload payload, final Object keystore, final String password, final boolean production, final Object devices) throws CommunicationException, KeystoreException {
        final PushedNotifications notifications = new PushedNotifications();
        if (payload == null) {
          return notifications;
        }
    Severity: Minor
    Found in src/main/java/javapns/Push.java - About 1 hr to fix

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

        public static PushedNotifications combined(final String message, final int badge, final String sound, final Object keystore, final String password, final boolean production, final Object devices) throws CommunicationException, KeystoreException {
      Severity: Major
      Found in src/main/java/javapns/Push.java - About 50 mins to fix

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

          public static PushedNotifications payload(final Payload payload, final Object keystore, final String password, final boolean production, final int numberOfThreads, final Object devices) throws Exception {
        Severity: Minor
        Found in src/main/java/javapns/Push.java - About 45 mins to fix

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

            public static PushedNotifications payload(final Payload payload, final Object keystore, final String password, final boolean production, final Object devices) throws CommunicationException, KeystoreException {
          Severity: Minor
          Found in src/main/java/javapns/Push.java - About 35 mins to fix

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

              private static PushedNotifications sendPayload(final Payload payload, final Object keystore, final String password, final boolean production, final Object devices) throws CommunicationException, KeystoreException {
            Severity: Minor
            Found in src/main/java/javapns/Push.java - About 35 mins to fix

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

                public static PushedNotifications payloads(final Object keystore, final String password, final boolean production, final int numberOfThreads, final Object payloadDevicePairs) throws Exception {
              Severity: Minor
              Found in src/main/java/javapns/Push.java - About 35 mins to fix

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

                  public static PushedNotifications badge(final int badge, final Object keystore, final String password, final boolean production, final Object devices) throws CommunicationException, KeystoreException {
                Severity: Minor
                Found in src/main/java/javapns/Push.java - About 35 mins to fix

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

                    public static PushedNotifications sound(final String sound, final Object keystore, final String password, final boolean production, final Object devices) throws CommunicationException, KeystoreException {
                  Severity: Minor
                  Found in src/main/java/javapns/Push.java - About 35 mins to fix

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

                      public static PushedNotifications alert(final String message, final Object keystore, final String password, final boolean production, final Object devices) throws CommunicationException, KeystoreException {
                    Severity: Minor
                    Found in src/main/java/javapns/Push.java - About 35 mins to fix

                      There are no issues that match your filters.

                      Category
                      Status