Merge "Fix build on Gerrit master"
diff --git a/src/main/java/com/googlesource/gerrit/plugins/its/base/util/PropertyAttributeExtractor.java b/src/main/java/com/googlesource/gerrit/plugins/its/base/util/PropertyAttributeExtractor.java
index f928f02..720ab87 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/its/base/util/PropertyAttributeExtractor.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/its/base/util/PropertyAttributeExtractor.java
@@ -60,7 +60,8 @@
     properties.add(propertyFactory.create("subject", changeAttribute.subject));
     properties.add(propertyFactory.create("commit-message", changeAttribute.commitMessage));
     properties.add(propertyFactory.create("change-id", changeAttribute.id));
-    properties.add(propertyFactory.create("change-number", changeAttribute.number));
+    properties.add(propertyFactory.create("change-number",
+        String.valueOf(changeAttribute.number)));
     properties.add(propertyFactory.create("change-url", changeAttribute.url));
     String status = null;
     if (changeAttribute.status != null) {
@@ -76,7 +77,7 @@
     properties.add(propertyFactory.create("revision",
         patchSetAttribute.revision));
     properties.add(propertyFactory.create("patch-set-number",
-        patchSetAttribute.number));
+        String.valueOf(patchSetAttribute.number)));
     properties.add(propertyFactory.create("ref", patchSetAttribute.ref));
     properties.add(propertyFactory.create("created-on",
         patchSetAttribute.createdOn.toString()));
diff --git a/src/main/java/com/googlesource/gerrit/plugins/its/base/util/PropertyExtractor.java b/src/main/java/com/googlesource/gerrit/plugins/its/base/util/PropertyExtractor.java
index 03bff09..e3d5686 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/its/base/util/PropertyExtractor.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/its/base/util/PropertyExtractor.java
@@ -82,7 +82,9 @@
     PatchSetAttribute patchSet = event.patchSet.get();
     common.addAll(propertyAttributeExtractor.extractFrom(change));
     common.addAll(propertyAttributeExtractor.extractFrom(patchSet));
-    PatchSet.Id patchSetId = newPatchSetId(change.number, patchSet.number);
+    PatchSet.Id patchSetId =
+        newPatchSetId(Integer.toString(change.number),
+            Integer.toString(patchSet.number));
     return issueExtractor.getIssueIds(change.project,
         patchSet.revision, patchSetId);
   }
diff --git a/src/test/java/com/googlesource/gerrit/plugins/its/base/util/PropertyAttributeExtractorTest.java b/src/test/java/com/googlesource/gerrit/plugins/its/base/util/PropertyAttributeExtractorTest.java
index 52e9155..6a97129 100644
--- a/src/test/java/com/googlesource/gerrit/plugins/its/base/util/PropertyAttributeExtractorTest.java
+++ b/src/test/java/com/googlesource/gerrit/plugins/its/base/util/PropertyAttributeExtractorTest.java
@@ -94,7 +94,7 @@
     changeAttribute.topic = "testTopic";
     changeAttribute.subject = "testSubject";
     changeAttribute.id = "testId";
-    changeAttribute.number = "4711";
+    changeAttribute.number = 4711;
     changeAttribute.url = "http://www.example.org/test";
     changeAttribute.owner = owner;
     changeAttribute.commitMessage = "Commit Message";
@@ -183,7 +183,7 @@
     changeAttribute.topic = "testTopic";
     changeAttribute.subject = "testSubject";
     changeAttribute.id = "testId";
-    changeAttribute.number = "4711";
+    changeAttribute.number = 4711;
     changeAttribute.url = "http://www.example.org/test";
     changeAttribute.status = Status.ABANDONED;
     changeAttribute.owner = owner;
@@ -274,7 +274,7 @@
 
     PatchSetAttribute patchSetAttribute = new PatchSetAttribute();
     patchSetAttribute.revision = "1234567891123456789212345678931234567894";
-    patchSetAttribute.number = "42";
+    patchSetAttribute.number = 42;
     patchSetAttribute.ref = "testRef";
     patchSetAttribute.createdOn = 1234567890L;
     patchSetAttribute.parents = Lists.newArrayList("parent1", "parent2");
diff --git a/src/test/java/com/googlesource/gerrit/plugins/its/base/util/PropertyExtractorTest.java b/src/test/java/com/googlesource/gerrit/plugins/its/base/util/PropertyExtractorTest.java
index e62cd1d..4561b42 100644
--- a/src/test/java/com/googlesource/gerrit/plugins/its/base/util/PropertyExtractorTest.java
+++ b/src/test/java/com/googlesource/gerrit/plugins/its/base/util/PropertyExtractorTest.java
@@ -97,9 +97,9 @@
         .andReturn(propertyReason);
 
     changeAttribute.project = "testProject";
-    changeAttribute.number = "176";
+    changeAttribute.number = 176;
     patchSetAttribute.revision = "testRevision";
-    patchSetAttribute.number = "3";
+    patchSetAttribute.number = 3;
 
     Set<Property> common = Sets.newHashSet();
     common.add(propertyChange);
@@ -134,9 +134,9 @@
         .andReturn(Sets.newHashSet(propertyPatchSet));
 
     changeAttribute.project = "testProject";
-    changeAttribute.number = "176";
+    changeAttribute.number = 176;
     patchSetAttribute.revision = "testRevision";
-    patchSetAttribute.number = "3";
+    patchSetAttribute.number = 3;
 
     Set<Property> common = Sets.newHashSet();
     common.add(propertyChange);
@@ -174,9 +174,9 @@
         .andReturn(propertyReason);
 
     changeAttribute.project = "testProject";
-    changeAttribute.number = "176";
+    changeAttribute.number = 176;
     patchSetAttribute.revision = "testRevision";
-    patchSetAttribute.number = "3";
+    patchSetAttribute.number = 3;
 
     Set<Property> common = Sets.newHashSet();
     common.add(propertyChange);
@@ -215,9 +215,9 @@
         .andReturn(propertyComment);
 
     changeAttribute.project = "testProject";
-    changeAttribute.number = "176";
+    changeAttribute.number = 176;
     patchSetAttribute.revision = "testRevision";
-    patchSetAttribute.number = "3";
+    patchSetAttribute.number = 3;
 
     Set<Property> common = Sets.newHashSet();
     common.add(propertyChange);
@@ -268,9 +268,9 @@
         .andReturn(propertyComment);
 
     changeAttribute.project = "testProject";
-    changeAttribute.number = "176";
+    changeAttribute.number = 176;
     patchSetAttribute.revision = "testRevision";
-    patchSetAttribute.number = "3";
+    patchSetAttribute.number = 3;
 
     Set<Property> common = Sets.newHashSet();
     common.add(propertyChange);
@@ -306,9 +306,9 @@
         .andReturn(Sets.newHashSet(propertyPatchSet));
 
     changeAttribute.project = "testProject";
-    changeAttribute.number = "176";
+    changeAttribute.number = 176;
     patchSetAttribute.revision = "testRevision";
-    patchSetAttribute.number = "3";
+    patchSetAttribute.number = 3;
 
     Set<Property> common = Sets.newHashSet();
     common.add(propertyChange);
@@ -342,9 +342,9 @@
         .andReturn(Sets.newHashSet(propertyPatchSet));
 
     changeAttribute.project = "testProject";
-    changeAttribute.number = "176";
+    changeAttribute.number = 176;
     patchSetAttribute.revision = "testRevision";
-    patchSetAttribute.number = "3";
+    patchSetAttribute.number = 3;
 
     Set<Property> common = Sets.newHashSet();
     common.add(propertyChange);