releng: Don't use Guava references that will be removed in Guava 21.0
authorBernd Hufmann <Bernd.Hufmann@ericsson.com>
Thu, 13 Apr 2017 13:55:18 +0000 (09:55 -0400)
committerBernd Hufmann <bernd.hufmann@ericsson.com>
Thu, 20 Apr 2017 15:20:59 +0000 (11:20 -0400)
By doing that, it will be possible to use the same master build on
Neon and Oxygen.

com.google.common.base.Objects.ToStringHelper will be removed and
is replaced by apache.commons.lang3.builder.ToStringBuilder.

Change-Id: I646f6ae904c0541e2ebc15aa4276f7af9f99fbdd
Signed-off-by: Bernd Hufmann <Bernd.Hufmann@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/95008
Reviewed-by: Hudson CI
Reviewed-by: Jean-Christian Kouame <jean-christian.kouame@ericsson.com>
Tested-by: Jean-Christian Kouame <jean-christian.kouame@ericsson.com>
common/org.eclipse.tracecompass.common.core/annotations/com/google/common/base/Objects$ToStringHelper.eea [deleted file]
common/org.eclipse.tracecompass.common.core/annotations/org/apache/commons/lang3/builder/ToStringBuilder.eea [new file with mode: 0644]
lttng/org.eclipse.tracecompass.lttng2.ust.core/META-INF/MANIFEST.MF
lttng/org.eclipse.tracecompass.lttng2.ust.core/src/org/eclipse/tracecompass/internal/lttng2/ust/core/analysis/debuginfo/FileOffsetMapper.java
lttng/org.eclipse.tracecompass.lttng2.ust.core/src/org/eclipse/tracecompass/lttng2/ust/core/analysis/debuginfo/UstDebugInfoBinaryFile.java
statesystem/org.eclipse.tracecompass.statesystem.core/META-INF/MANIFEST.MF
statesystem/org.eclipse.tracecompass.statesystem.core/src/org/eclipse/tracecompass/statesystem/core/interval/TmfStateInterval.java

diff --git a/common/org.eclipse.tracecompass.common.core/annotations/com/google/common/base/Objects$ToStringHelper.eea b/common/org.eclipse.tracecompass.common.core/annotations/com/google/common/base/Objects$ToStringHelper.eea
deleted file mode 100644 (file)
index ae974a0..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-class com/google/common/base/Objects$ToStringHelper
-toString
- ()Ljava/lang/String;
- ()L1java/lang/String;
diff --git a/common/org.eclipse.tracecompass.common.core/annotations/org/apache/commons/lang3/builder/ToStringBuilder.eea b/common/org.eclipse.tracecompass.common.core/annotations/org/apache/commons/lang3/builder/ToStringBuilder.eea
new file mode 100644 (file)
index 0000000..70d4f15
--- /dev/null
@@ -0,0 +1,4 @@
+class org/apache/commons/lang3/builder/ToStringBuilder
+toString
+ ()Ljava/lang/String;
+ ()L1java/lang/String;
index a108e18fd1bf358f177523958a990faf4eb228c8..c931a83fbb6991c26318ef0aa7f63e17213ca001 100644 (file)
@@ -25,8 +25,8 @@ Require-Bundle: org.eclipse.core.runtime,
  org.eclipse.tracecompass.lttng2.control.core,
  org.eclipse.tracecompass.ctf.core
 Import-Package: com.google.common.annotations;version="15.0.0",
- com.google.common.base,
  com.google.common.cache,
  com.google.common.collect,
  com.google.common.io,
- org.apache.commons.lang3;version="3.1.0"
+ org.apache.commons.lang3;version="3.1.0",
+ org.apache.commons.lang3.builder;version="3.1.0"
index 8b5b9396827c84227f98615d1345cf86bfb68a5b..fb3eba439d71abc179fb47da9ecaa0a4f78e7e46 100644 (file)
@@ -17,15 +17,16 @@ import java.util.Arrays;
 import java.util.Collections;
 import java.util.LinkedList;
 import java.util.List;
+import java.util.Objects;
 import java.util.logging.Logger;
 
+import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.eclipse.jdt.annotation.NonNull;
 import org.eclipse.jdt.annotation.Nullable;
 import org.eclipse.tracecompass.common.core.log.TraceCompassLog;
 import org.eclipse.tracecompass.common.core.process.ProcessUtils;
 import org.eclipse.tracecompass.tmf.core.event.lookup.TmfCallsite;
 
-import com.google.common.base.Objects;
 import com.google.common.cache.CacheBuilder;
 import com.google.common.cache.CacheLoader;
 import com.google.common.cache.LoadingCache;
@@ -65,7 +66,7 @@ public final class FileOffsetMapper {
 
         @Override
         public int hashCode() {
-            return Objects.hashCode(fFilePath, fBuildId, fOffset);
+            return Objects.hash(fFilePath, fBuildId, fOffset);
         }
 
         @Override
@@ -80,17 +81,17 @@ public final class FileOffsetMapper {
                 return false;
             }
             FileOffset other = (FileOffset) obj;
-            return Objects.equal(fFilePath, other.fFilePath) &&
-                    Objects.equal(fBuildId, other.fBuildId) &&
-                    Objects.equal(fOffset, other.fOffset);
+            return Objects.equals(fFilePath, other.fFilePath) &&
+                    Objects.equals(fBuildId, other.fBuildId) &&
+                    Objects.equals(fOffset, other.fOffset);
         }
 
         @Override
         public String toString() {
-            return Objects.toStringHelper(this)
-                    .add("fFilePath", fFilePath) //$NON-NLS-1$
-                    .add("fBuildId", fBuildId) //$NON-NLS-1$
-                    .add("fOffset", String.format("0x%h", fOffset)) //$NON-NLS-1$ //$NON-NLS-2$
+            return new ToStringBuilder(this)
+                    .append("fFilePath", fFilePath) //$NON-NLS-1$
+                    .append("fBuildId", fBuildId) //$NON-NLS-1$
+                    .append("fOffset", String.format("0x%h", fOffset)) //$NON-NLS-1$ //$NON-NLS-2$
                     .toString();
         }
     }
@@ -200,10 +201,10 @@ public final class FileOffsetMapper {
 
         @Override
         public String toString() {
-            return Objects.toStringHelper(this)
-                    .add("fSourceFileName", fSourceFileName) //$NON-NLS-1$
-                    .add("fSourceLineNumber", fSourceLineNumber) //$NON-NLS-1$
-                    .add("fFunctionName", fFunctionName) //$NON-NLS-1$
+            return new ToStringBuilder(this)
+                    .append("fSourceFileName", fSourceFileName) //$NON-NLS-1$
+                    .append("fSourceLineNumber", fSourceLineNumber) //$NON-NLS-1$
+                    .append("fFunctionName", fFunctionName) //$NON-NLS-1$
                     .toString();
         }
     }
index 3a189c56dff4d1ffb39b2ea33df6d9e49888292e..0a72264ca2dd65936d00e234c558ea30881e4df9 100644 (file)
@@ -11,6 +11,7 @@ package org.eclipse.tracecompass.lttng2.ust.core.analysis.debuginfo;
 
 import java.util.Objects;
 
+import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.eclipse.jdt.annotation.Nullable;
 
 /**
@@ -95,11 +96,11 @@ public class UstDebugInfoBinaryFile implements Comparable<UstDebugInfoBinaryFile
 
     @Override
     public String toString() {
-        return com.google.common.base.Objects.toStringHelper(this)
-            .add("path", fFilePath) //$NON-NLS-1$
-            .add("build_id", fBuildId) //$NON-NLS-1$
-            .add("debug_link", fDebugLink) //$NON-NLS-1$
-            .add("is_pic", fIsPic) //$NON-NLS-1$
+        return new ToStringBuilder(this)
+            .append("path", fFilePath) //$NON-NLS-1$
+            .append("build_id", fBuildId) //$NON-NLS-1$
+            .append("debug_link", fDebugLink) //$NON-NLS-1$
+            .append("is_pic", fIsPic) //$NON-NLS-1$
             .toString();
     }
 
index 81f3d3cb3f8c92793f25e4a179750e0902aeb6ae..f8c99811c956a4ac762aeafc6a26f2ff3e4671d4 100644 (file)
@@ -23,6 +23,6 @@ Export-Package: org.eclipse.tracecompass.internal.provisional.statesystem.core.s
  org.eclipse.tracecompass.statesystem.core.interval,
  org.eclipse.tracecompass.statesystem.core.statevalue
 Import-Package: com.google.common.annotations;version="15.0.0",
- com.google.common.base,
  com.google.common.cache,
- com.google.common.collect;version="12.0.0"
+ com.google.common.collect;version="12.0.0",
+ org.apache.commons.lang3.builder;version="3.1.0"
index 81c6ce46a9267be53bb4cd49ea2d3518f55e183c..fc80b190464bdfe50393baad7b023a27f5bbc9f9 100644 (file)
 
 package org.eclipse.tracecompass.statesystem.core.interval;
 
+import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.eclipse.jdt.annotation.NonNull;
 import org.eclipse.tracecompass.statesystem.core.statevalue.ITmfStateValue;
 
-import com.google.common.base.Objects;
-
 /**
  * The StateInterval represents the "state" a particular attribute was in, at a
  * given time. It is the main object being returned from queries to the state
@@ -84,11 +83,11 @@ public final class TmfStateInterval implements ITmfStateInterval {
     @Override
     public String toString() {
         /* Only used for debugging */
-        return Objects.toStringHelper(this)
-            .add("start", start) //$NON-NLS-1$
-            .add("end", end) //$NON-NLS-1$
-            .add("key", attribute) //$NON-NLS-1$
-            .add("value", sv.toString()) //$NON-NLS-1$
+        return new ToStringBuilder(this)
+            .append("start", start) //$NON-NLS-1$
+            .append("end", end) //$NON-NLS-1$
+            .append("key", attribute) //$NON-NLS-1$
+            .append("value", sv.toString()) //$NON-NLS-1$
             .toString();
     }
 
This page took 0.032517 seconds and 5 git commands to generate.