You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by mp...@apache.org on 2018/01/12 13:49:49 UTC

[ambari] 03/03: AMBARI-22763. Fix checkstyle failure after merging trunk to branch-3.0-perf. Fix getters/annotations usage. (mpapirkovskyy)

This is an automated email from the ASF dual-hosted git repository.

mpapirkovskyy pushed a commit to branch branch-3.0-perf
in repository https://gitbox.apache.org/repos/asf/ambari.git

commit f8327e30daeac4e59d29af2cdf275ee8f8b49224
Author: Myroslav Papirkovskyi <mp...@apache.org>
AuthorDate: Fri Jan 12 14:45:11 2018 +0200

    AMBARI-22763. Fix checkstyle failure after merging trunk to branch-3.0-perf. Fix getters/annotations usage. (mpapirkovskyy)
---
 .../ambari/server/agent/CommandRepository.java     | 43 ++++------------------
 1 file changed, 7 insertions(+), 36 deletions(-)

diff --git a/ambari-server/src/main/java/org/apache/ambari/server/agent/CommandRepository.java b/ambari-server/src/main/java/org/apache/ambari/server/agent/CommandRepository.java
index 4222895..02c2951 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/agent/CommandRepository.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/agent/CommandRepository.java
@@ -53,9 +53,11 @@ public class CommandRepository {
   private String m_stackName;
 
   @SerializedName("repoFileName")
+  @JsonProperty("repoFileName")
   private String m_repoFileName;
 
   @SerializedName("feature")
+  @JsonProperty("feature")
   private final CommandRepositoryFeature feature = new CommandRepositoryFeature();
 
   /**
@@ -72,6 +74,7 @@ public class CommandRepository {
    * version after distribution.
    */
   @SerializedName("resolved")
+  @JsonProperty("resolved")
   private boolean m_resolved;
 
   /**
@@ -152,17 +155,6 @@ public class CommandRepository {
   }
 
   /**
-   * Gets whether this repository has been marked as having its version
-   * resolved.
-   *
-   * @return {@code true} if this repository has been confirmed to have the
-   *         right version.
-   */
-  public boolean isResolved() {
-    return m_resolved;
-  }
-
-  /**
    * Gets whether this repository has had its version resolved.
    *
    * @param resolved
@@ -216,6 +208,7 @@ public class CommandRepository {
      * Repository is pre-installed on the host
      */
     @SerializedName("preInstalled")
+    @JsonProperty("preInstalled")
     private Boolean m_isPreInstalled = false;
 
     /**
@@ -224,6 +217,7 @@ public class CommandRepository {
      * Currently affecting: getting available packages from the repository
      */
     @SerializedName("scoped")
+    @JsonProperty("scoped")
     private boolean m_isScoped = true;
 
     public void setIsScoped(boolean isScoped){
@@ -233,14 +227,6 @@ public class CommandRepository {
     public void setPreInstalled(String isPreInstalled) {
       this.m_isPreInstalled = isPreInstalled.equalsIgnoreCase("true");
     }
-
-    public Boolean getPreInstalled() {
-      return m_isPreInstalled;
-    }
-
-    public boolean isScoped() {
-      return m_isScoped;
-    }
   }
 
   /**
@@ -261,15 +247,16 @@ public class CommandRepository {
     @JsonProperty("ambariManaged")
     private boolean m_ambariManaged = true;
 
-
     @SerializedName("repoName")
     @JsonProperty("repoName")
     private final String m_repoName;
 
     @SerializedName("distribution")
+    @JsonProperty("distribution")
     private final String m_distribution;
 
     @SerializedName("components")
+    @JsonProperty("components")
     private final String m_components;
 
     @SerializedName("mirrorsList")
@@ -306,26 +293,10 @@ public class CommandRepository {
       m_baseUrl = url;
     }
 
-    public String getOsType() {
-      return m_osType;
-    }
-
-    public String getRepoId() {
-      return m_repoId;
-    }
-
     public String getRepoName() {
       return m_repoName;
     }
 
-    public String getDistribution() {
-      return m_distribution;
-    }
-
-    public String getComponents() {
-      return m_components;
-    }
-
     public String getBaseUrl() {
       return m_baseUrl;
     }

-- 
To stop receiving notification emails like this one, please contact
"commits@ambari.apache.org" <co...@ambari.apache.org>.