Use NativeString from Gerrit core

In 2.11.2 NativeString in Gerrit core was fixed by [1]. Now we can
just use this class and get rid of the MyNativeString class.

[1] https://gerrit-review.googlesource.com/69180

Change-Id: I6dcd1b6fd49104c7ff19da862f05642be64299ea
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
diff --git a/VERSION b/VERSION
index 8026f1e..982b7be 100644
--- a/VERSION
+++ b/VERSION
@@ -1,4 +1,4 @@
 # Used by BUCK to include "Implementation-Version" in plugin Manifest.
 # If this file doesn't exist the output of 'git describe' is used
 # instead.
-PLUGIN_VERSION = '2.11.1'
+PLUGIN_VERSION = '2.11.2'
diff --git a/lib/gerrit/BUCK b/lib/gerrit/BUCK
index 9f6abff..27ae82c 100644
--- a/lib/gerrit/BUCK
+++ b/lib/gerrit/BUCK
@@ -1,11 +1,12 @@
 include_defs('//bucklets/maven_jar.bucklet')
 
-VER = '2.11.1'
+VER = '2.11.2'
 REPO = MAVEN_CENTRAL
 
 maven_jar(
   name = 'plugin-api',
   id = 'com.google.gerrit:gerrit-plugin-api:' + VER,
+  sha1 = '1d45b5fd8d3f436e34e1a11d3adc07d61717d427',
   attach_source = False,
   repository = REPO,
   license = 'Apache2.0',
@@ -14,6 +15,7 @@
 maven_jar(
   name = 'gwtui-api',
   id = 'com.google.gerrit:gerrit-plugin-gwtui:' + VER,
+  sha1 = 'a2262a4d3d12fe4ea1e67d849d4112f222a1b2b0',
   attach_source = False,
   repository = REPO,
   license = 'Apache2.0',
diff --git a/pom.xml b/pom.xml
index c5f8b82..6bfdc43 100644
--- a/pom.xml
+++ b/pom.xml
@@ -21,7 +21,7 @@
   <groupId>com.googlesource.gerrit.plugins.serviceuser</groupId>
   <artifactId>serviceuser</artifactId>
   <packaging>jar</packaging>
-  <version>2.11.1</version>
+  <version>2.11.2</version>
   <name>service-user</name>
 
   <properties>
diff --git a/src/main/java/com/googlesource/gerrit/plugins/serviceuser/client/MyNativeString.java b/src/main/java/com/googlesource/gerrit/plugins/serviceuser/client/MyNativeString.java
deleted file mode 100644
index 266e1d9..0000000
--- a/src/main/java/com/googlesource/gerrit/plugins/serviceuser/client/MyNativeString.java
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright (C) 2015 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package com.googlesource.gerrit.plugins.serviceuser.client;
-
-import com.google.gwt.core.client.JavaScriptObject;
-
-public class MyNativeString extends JavaScriptObject {
-  final native String asString() /*-{ return this; }-*/;
-
-  protected MyNativeString() {
-  }
-}
diff --git a/src/main/java/com/googlesource/gerrit/plugins/serviceuser/client/ServiceUserScreen.java b/src/main/java/com/googlesource/gerrit/plugins/serviceuser/client/ServiceUserScreen.java
index f374ba3..11d39c5 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/serviceuser/client/ServiceUserScreen.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/serviceuser/client/ServiceUserScreen.java
@@ -51,9 +51,9 @@
             @Override
             public void onSuccess(final ServiceUserInfo serviceUserInfo) {
               new RestApi("config").id("server").view(Plugin.get().getPluginName(), "serviceusers")
-                  .id(serviceUser).view("password.http").get(new AsyncCallback<MyNativeString>() {
+                  .id(serviceUser).view("password.http").get(new AsyncCallback<NativeString>() {
                       @Override
-                      public void onSuccess(final MyNativeString httpPassword) {
+                      public void onSuccess(final NativeString httpPassword) {
                         new RestApi("config").id("server")
                             .view(Plugin.get().getPluginName(), "config")
                             .get(new AsyncCallback<ConfigInfo>() {
@@ -247,9 +247,9 @@
           HttpPasswordInput in = HttpPasswordInput.create();
           in.generate(true);
           new RestApi("config").id("server").view(Plugin.get().getPluginName(), "serviceusers")
-              .id(serviceUser).view("password.http").put(in, new AsyncCallback<MyNativeString>() {
+              .id(serviceUser).view("password.http").put(in, new AsyncCallback<NativeString>() {
                   @Override
-                  public void onSuccess(MyNativeString newPassword) {
+                  public void onSuccess(NativeString newPassword) {
                     label.setText(newPassword.asString());
                     label.setVisible(true);
                     delete.setVisible(true);