info.java: remove date and hosts fields.
authorFerry Huberts <ferry.huberts@pelagic.nl>
Tue, 30 Jan 2018 20:52:05 +0000 (21:52 +0100)
committerFerry Huberts <ferry.huberts@pelagic.nl>
Tue, 30 Jan 2018 21:11:10 +0000 (22:11 +0100)
These were removed in d781d12.

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
lib/info.java/org.olsr.v1.info.api/bnd.bnd
lib/info.java/org.olsr.v1.info.api/doc/examples/all.json
lib/info.java/org.olsr.v1.info.api/doc/examples/startup.json
lib/info.java/org.olsr.v1.info.api/doc/examples/version.json
lib/info.java/org.olsr.v1.info.api/src/org/olsr/v1/info/api/dto/JsonInfoVersionEntry.java
lib/info.java/org.olsr.v1.info.api/src/org/olsr/v1/info/api/dto/package-info.java
lib/info.java/org.olsr.v1.info.api/test/org/olsr/v1/info/api/dto/TestJsonInfoAll.java
lib/info.java/org.olsr.v1.info.api/test/org/olsr/v1/info/api/dto/TestJsonInfoStartup.java
lib/info.java/org.olsr.v1.info.api/test/org/olsr/v1/info/api/dto/TestJsonInfoVersion.java
lib/info.java/org.olsr.v1.info.api/test/org/olsr/v1/info/api/dto/TestJsonInfoVersionEntry.java

index 9fcd0b8..6e216e3 100644 (file)
@@ -6,7 +6,7 @@
        com.fasterxml.jackson.core.jackson-databind,\
        ${junit}
 Bundle-Name:OLSRd v1 Info - API
-Bundle-Version:1.1.1.${tstamp}
+Bundle-Version: 2.0.0.${tstamp}
 Export-Package: \
        org.olsr.v1.info.api.commands,\
        org.olsr.v1.info.api.contants,\
index 4cb6f14..5edc3d8 100644 (file)
   },
   "version": {
     "version": "olsr.org - pre-0.9.1-git_4e58755-hash_f013046cc98a88d68312f1e1566e865e",
-    "date": "2015-11-23 15:01:02",
-    "host": "buildhost",
     "gitDescriptor": "v0.9.0.3-157-g4e58755",
     "gitSha": "4e58755a1d3c75a656851873c7eab23c304049c6",
     "releaseVersion": "pre-0.9.1",
index 2c7f4d1..531b4c2 100644 (file)
@@ -6,8 +6,6 @@
   "uuid": "d13d7ee3-fcca-4f81-9bf5-bb5848b5d96d",
   "version": {
     "version": "olsr.org - pre-0.9.1-git_4e58755-hash_f013046cc98a88d68312f1e1566e865e",
-    "date": "2015-11-23 15:01:02",
-    "host": "buildhost",
     "gitDescriptor": "v0.9.0.3-157-g4e58755",
     "gitSha": "4e58755a1d3c75a656851873c7eab23c304049c6",
     "releaseVersion": "pre-0.9.1",
     "os": "GNU/Linux",
     "startTime": 1458307640
   }
-}
\ No newline at end of file
+}
index 3edba6f..b898768 100644 (file)
@@ -6,11 +6,9 @@
   "uuid": "d13d7ee3-fcca-4f81-9bf5-bb5848b5d96d",
   "version": {
     "version": "olsr.org - pre-0.9.1-git_4e58755-hash_f013046cc98a88d68312f1e1566e865e",
-    "date": "2015-11-23 15:01:02",
-    "host": "buildhost",
     "gitDescriptor": "v0.9.0.3-157-g4e58755",
     "gitSha": "4e58755a1d3c75a656851873c7eab23c304049c6",
     "releaseVersion": "pre-0.9.1",
     "sourceHash": "f013046cc98a88d68312f1e1566e865e"
   }
-}
\ No newline at end of file
+}
index 6314000..335ce99 100644 (file)
@@ -12,8 +12,6 @@ import com.fasterxml.jackson.annotation.JsonProperty;
 @ProviderType
 public class JsonInfoVersionEntry implements Comparable<JsonInfoVersionEntry> {
   private String version        = "";
-  private String buildDate      = "";
-  private String buildHost      = "";
   private String gitDescriptor  = "";
   private String gitSha         = "";
   private String releaseVersion = "";
@@ -39,44 +37,6 @@ public class JsonInfoVersionEntry implements Comparable<JsonInfoVersionEntry> {
   }
 
   /**
-   * @return the build date
-   */
-  public String getBuildDate() {
-    return this.buildDate;
-  }
-
-  /**
-   * @param buildDate the build date to set
-   */
-  @JsonProperty("date")
-  public void setBuildDate(final String buildDate) {
-    if (buildDate == null) {
-      this.buildDate = "";
-    } else {
-      this.buildDate = buildDate;
-    }
-  }
-
-  /**
-   * @return the build host
-   */
-  public String getBuildHost() {
-    return this.buildHost;
-  }
-
-  /**
-   * @param buildHost the build host to set
-   */
-  @JsonProperty("host")
-  public void setBuildHost(final String buildHost) {
-    if (buildHost == null) {
-      this.buildHost = "";
-    } else {
-      this.buildHost = buildHost;
-    }
-  }
-
-  /**
    * @return the git descriptor
    */
   public String getGitDescriptor() {
@@ -157,8 +117,6 @@ public class JsonInfoVersionEntry implements Comparable<JsonInfoVersionEntry> {
     final int prime = 31;
     int result = 1;
     result = (prime * result) + this.version.hashCode();
-    result = (prime * result) + this.buildDate.hashCode();
-    result = (prime * result) + this.buildHost.hashCode();
     result = (prime * result) + this.gitDescriptor.hashCode();
     result = (prime * result) + this.gitSha.hashCode();
     result = (prime * result) + this.releaseVersion.hashCode();
@@ -195,16 +153,6 @@ public class JsonInfoVersionEntry implements Comparable<JsonInfoVersionEntry> {
       return CompareUtils.clip(result);
     }
 
-    result = this.buildDate.compareTo(other.buildDate);
-    if (result != 0) {
-      return CompareUtils.clip(result);
-    }
-
-    result = this.buildHost.compareTo(other.buildHost);
-    if (result != 0) {
-      return CompareUtils.clip(result);
-    }
-
     result = this.gitDescriptor.compareTo(other.gitDescriptor);
     if (result != 0) {
       return CompareUtils.clip(result);
@@ -233,10 +181,6 @@ public class JsonInfoVersionEntry implements Comparable<JsonInfoVersionEntry> {
     final StringBuilder builder = new StringBuilder();
     builder.append("JsonInfoVersionEntry [version=");
     builder.append(this.version);
-    builder.append(", buildDate=");
-    builder.append(this.buildDate);
-    builder.append(", buildHost=");
-    builder.append(this.buildHost);
     builder.append(", gitDescriptor=");
     builder.append(this.gitDescriptor);
     builder.append(", gitSha=");
index 893f19a..e21fb63 100644 (file)
@@ -101,7 +101,7 @@ public class TestJsonInfoAll {
     pudPosition.setLatitude(1.1);
 
     final JsonInfoVersionEntry version = new JsonInfoVersionEntry();
-    version.setBuildDate("now");
+    version.setVersion("now");
 
     final List<JsonInfoPluginsEntry> plugins = new LinkedList<>();
     final JsonInfoPluginsEntry pluginsEntry = new JsonInfoPluginsEntry();
@@ -238,7 +238,7 @@ public class TestJsonInfoAll {
     pudPosition.setLatitude(1.1);
 
     final JsonInfoVersionEntry version = new JsonInfoVersionEntry();
-    version.setBuildDate("now");
+    version.setVersion("now");
 
     final List<JsonInfoPluginsEntry> plugins = new LinkedList<>();
     final JsonInfoPluginsEntry pluginsEntry = new JsonInfoPluginsEntry();
@@ -455,7 +455,7 @@ public class TestJsonInfoAll {
   public void testHashCode() {
     this.impl.setNeighbors(null);
     int r = this.impl.hashCode();
-    assertThat(Integer.valueOf(r), equalTo(Integer.valueOf(-557529111)));
+    assertThat(Integer.valueOf(r), equalTo(Integer.valueOf(1381794729)));
 
     /* set */
     final Set<JsonInfoNeighborsEntry> neighbors = new TreeSet<>();
@@ -502,7 +502,7 @@ public class TestJsonInfoAll {
     pudPosition.setLatitude(1.1);
 
     final JsonInfoVersionEntry version = new JsonInfoVersionEntry();
-    version.setBuildDate("now");
+    version.setVersion("now");
 
     final List<JsonInfoPluginsEntry> plugins = new LinkedList<>();
     final JsonInfoPluginsEntry pluginsEntry = new JsonInfoPluginsEntry();
@@ -527,7 +527,7 @@ public class TestJsonInfoAll {
     this.impl.setConfig(config);
 
     r = this.impl.hashCode();
-    assertThat(Integer.valueOf(r), equalTo(Integer.valueOf(-260548917)));
+    assertThat(Integer.valueOf(r), equalTo(Integer.valueOf(809053303)));
   }
 
   @Test(timeout = 8000)
index bc0cb22..d1d5c78 100644 (file)
@@ -37,7 +37,7 @@ public class TestJsonInfoStartup {
 
     /* set */
     final JsonInfoVersionEntry version = new JsonInfoVersionEntry();
-    version.setBuildDate("now");
+    version.setVersion("now");
 
     final List<JsonInfoPluginsEntry> plugins = new LinkedList<>();
     final JsonInfoPluginsEntry pluginsEntry = new JsonInfoPluginsEntry();
@@ -71,7 +71,7 @@ public class TestJsonInfoStartup {
   @Test(timeout = 8000)
   public void testEquals() {
     final JsonInfoVersionEntry version = new JsonInfoVersionEntry();
-    version.setBuildDate("now");
+    version.setVersion("now");
 
     final List<JsonInfoPluginsEntry> plugins = new LinkedList<>();
     final JsonInfoPluginsEntry pluginsEntry = new JsonInfoPluginsEntry();
@@ -156,11 +156,11 @@ public class TestJsonInfoStartup {
   @Test(timeout = 8000)
   public void testHashCode() {
     int r = this.impl.hashCode();
-    assertThat(Integer.valueOf(r), equalTo(Integer.valueOf(-207496464)));
+    assertThat(Integer.valueOf(r), equalTo(Integer.valueOf(1731827376)));
 
     /* set */
     final JsonInfoVersionEntry version = new JsonInfoVersionEntry();
-    version.setBuildDate("now");
+    version.setVersion("now");
 
     final List<JsonInfoPluginsEntry> plugins = new LinkedList<>();
     final JsonInfoPluginsEntry pluginsEntry = new JsonInfoPluginsEntry();
@@ -174,14 +174,14 @@ public class TestJsonInfoStartup {
     this.impl.setConfig(config);
 
     r = this.impl.hashCode();
-    assertThat(Integer.valueOf(r), equalTo(Integer.valueOf(-254958928)));
+    assertThat(Integer.valueOf(r), equalTo(Integer.valueOf(814643292)));
 
     /* set */
     this.impl.setVersion(null);
     this.impl.setPlugins(null);
     this.impl.setConfig(null);
 
-    assertThat(Integer.valueOf(r), equalTo(Integer.valueOf(-254958928)));
+    assertThat(Integer.valueOf(r), equalTo(Integer.valueOf(814643292)));
   }
 
   @Test(timeout = 8000)
index c4c5ebd..7e73eef 100644 (file)
@@ -101,7 +101,7 @@ public class TestJsonInfoVersion {
   @Test(timeout = 8000)
   public void testHashCode() {
     int r = this.impl.hashCode();
-    assertThat(Integer.valueOf(r), equalTo(Integer.valueOf(-809346626)));
+    assertThat(Integer.valueOf(r), equalTo(Integer.valueOf(1771439486)));
 
     /* set */
     final JsonInfoVersionEntry version = new JsonInfoVersionEntry();
@@ -109,7 +109,7 @@ public class TestJsonInfoVersion {
     this.impl.setVersion(version);
 
     r = this.impl.hashCode();
-    assertThat(Integer.valueOf(r), equalTo(Integer.valueOf(-922014568)));
+    assertThat(Integer.valueOf(r), equalTo(Integer.valueOf(1623836376)));
   }
 
   @Test(timeout = 8000)
index 53349ac..401ae8a 100644 (file)
@@ -25,8 +25,6 @@ public class TestJsonInfoVersionEntry {
   public void testGettersAndSetters() {
     /* initial */
     assertThat(this.impl.getVersion(), equalTo(""));
-    assertThat(this.impl.getBuildDate(), equalTo(""));
-    assertThat(this.impl.getBuildHost(), equalTo(""));
     assertThat(this.impl.getGitDescriptor(), equalTo(""));
     assertThat(this.impl.getGitSha(), equalTo(""));
     assertThat(this.impl.getReleaseVersion(), equalTo(""));
@@ -34,8 +32,6 @@ public class TestJsonInfoVersionEntry {
 
     /* set */
     this.impl.setVersion("version");
-    this.impl.setBuildDate("date");
-    this.impl.setBuildHost("host");
     this.impl.setGitDescriptor("gitDescriptor");
     this.impl.setGitSha("gitSha");
     this.impl.setReleaseVersion("releaseVersion");
@@ -43,8 +39,6 @@ public class TestJsonInfoVersionEntry {
 
     /* get */
     assertThat(this.impl.getVersion(), equalTo("version"));
-    assertThat(this.impl.getBuildDate(), equalTo("date"));
-    assertThat(this.impl.getBuildHost(), equalTo("host"));
     assertThat(this.impl.getGitDescriptor(), equalTo("gitDescriptor"));
     assertThat(this.impl.getGitSha(), equalTo("gitSha"));
     assertThat(this.impl.getReleaseVersion(), equalTo("releaseVersion"));
@@ -58,8 +52,6 @@ public class TestJsonInfoVersionEntry {
 
     final String version1 = "version1";
     final String version2 = "version2";
-    final String date1 = "date1";
-    final String date2 = "date2";
     final String host1 = "host1";
     final String host2 = "host2";
 
@@ -95,60 +87,6 @@ public class TestJsonInfoVersionEntry {
     this.impl.setVersion(versionOrg);
     other.setVersion(versionOrg);
 
-    /* date */
-
-    final String dateOrg = this.impl.getBuildDate();
-
-    this.impl.setBuildDate(null);
-    other.setBuildDate(date2);
-    r = this.impl.compareTo(other);
-    assertThat(Integer.valueOf(r), equalTo(Integer.valueOf(-1)));
-
-    this.impl.setBuildDate(date2);
-    other.setBuildDate(null);
-    r = this.impl.compareTo(other);
-    assertThat(Integer.valueOf(r), equalTo(Integer.valueOf(1)));
-
-    this.impl.setBuildDate(date1);
-    other.setBuildDate(date2);
-    r = this.impl.compareTo(other);
-    assertThat(Integer.valueOf(r), equalTo(Integer.valueOf(-1)));
-
-    this.impl.setBuildDate(date1);
-    other.setBuildDate(date1);
-    r = this.impl.compareTo(other);
-    assertThat(Integer.valueOf(r), equalTo(Integer.valueOf(0)));
-
-    this.impl.setBuildDate(dateOrg);
-    other.setBuildDate(dateOrg);
-
-    /* host */
-
-    final String hostOrg = this.impl.getBuildHost();
-
-    this.impl.setBuildHost(null);
-    other.setBuildHost(host2);
-    r = this.impl.compareTo(other);
-    assertThat(Integer.valueOf(r), equalTo(Integer.valueOf(-1)));
-
-    this.impl.setBuildHost(host2);
-    other.setBuildHost(null);
-    r = this.impl.compareTo(other);
-    assertThat(Integer.valueOf(r), equalTo(Integer.valueOf(1)));
-
-    this.impl.setBuildHost(host1);
-    other.setBuildHost(host2);
-    r = this.impl.compareTo(other);
-    assertThat(Integer.valueOf(r), equalTo(Integer.valueOf(-1)));
-
-    this.impl.setBuildHost(host1);
-    other.setBuildHost(host1);
-    r = this.impl.compareTo(other);
-    assertThat(Integer.valueOf(r), equalTo(Integer.valueOf(0)));
-
-    this.impl.setBuildHost(hostOrg);
-    other.setBuildHost(hostOrg);
-
     /* gitDescriptor */
 
     final String gitDescriptorOrg = this.impl.getGitDescriptor();
@@ -286,18 +224,16 @@ public class TestJsonInfoVersionEntry {
   @Test(timeout = 8000)
   public void testHashCode() {
     int r = this.impl.hashCode();
-    assertThat(Integer.valueOf(r), equalTo(Integer.valueOf(1742810335)));
+    assertThat(Integer.valueOf(r), equalTo(Integer.valueOf(28629151)));
 
     this.impl.setVersion("version");
-    this.impl.setBuildDate("date");
-    this.impl.setBuildHost("host");
     this.impl.setGitDescriptor("gitDescriptor");
     this.impl.setGitSha("gitSha");
     this.impl.setReleaseVersion("releaseVersion");
     this.impl.setSourceHash("sourceHash");
 
     r = this.impl.hashCode();
-    assertThat(Integer.valueOf(r), equalTo(Integer.valueOf(632880642)));
+    assertThat(Integer.valueOf(r), equalTo(Integer.valueOf(1960702216)));
   }
 
   @Test(timeout = 8000)