Daniel Kurka has uploaded a new change for review.
https://gwt-review.googlesource.com/3616
Change subject: Add Object.clone as throwing implementation
......................................................................
Add Object.clone as throwing implementation
fixes issue 5068
Change-Id: Ie89b7874953e1d6378fa2a5cb19beb3c34689218
---
A user/super/com/google/gwt/emul/java/lang/CloneNotSupportedException.java
M user/super/com/google/gwt/emul/java/lang/Object.java
2 files changed, 35 insertions(+), 0 deletions(-)
diff --git
a/user/super/com/google/gwt/emul/java/lang/CloneNotSupportedException.java
b/user/super/com/google/gwt/emul/java/lang/CloneNotSupportedException.java
new file mode 100644
index 0000000..3acfa8c
--- /dev/null
+++
b/user/super/com/google/gwt/emul/java/lang/CloneNotSupportedException.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright 2013 Google Inc.
+ *
+ * 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 java.lang;
+
+/**
+ * See <a
+ *
href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/CloneNotSupportedException.html">the
+ * official Java API doc</a> for details.
+ */
+public class CloneNotSupportedException extends Exception {
+
+ public CloneNotSupportedException() {
+ }
+
+ public CloneNotSupportedException(String message) {
+ super(message);
+ }
+}
diff --git a/user/super/com/google/gwt/emul/java/lang/Object.java
b/user/super/com/google/gwt/emul/java/lang/Object.java
index 63717d2..0e4c659 100644
--- a/user/super/com/google/gwt/emul/java/lang/Object.java
+++ b/user/super/com/google/gwt/emul/java/lang/Object.java
@@ -83,6 +83,10 @@
return getClass().getName() + '@' + Integer.toHexString(hashCode());
}
+ protected Object clone() {
+ throw new CloneNotSupportedException("GWT does not implement
Object.clone()");
+ }
+
/**
* Never called; here for JRE compatibility.
*
--
To view, visit https://gwt-review.googlesource.com/3616
To unsubscribe, visit https://gwt-review.googlesource.com/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie89b7874953e1d6378fa2a5cb19beb3c34689218
Gerrit-PatchSet: 1
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Daniel Kurka <[email protected]>
--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
---
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.