Goktug Gokdogan has posted comments on this change.

Change subject: Adds the remaining (and more complex) Java 7 new language features.
......................................................................


Patch Set 1:

(9 comments)

....................................................
File user/src/com/google/gwt/core/shared/SerializableThrowable.java
Line 34: * NOTE: Does not serialize suppressed exceptions to remain compatible with Java 6 and below.
Don't forget to create a thread on this issue =)


....................................................
File user/super/com/google/gwt/emul/java/lang/AutoCloseable.java
Line 3:  *
nit: spaces here


Line 19: * Indicates that a class implements <code>close()</code> and can be used in a try-with-resources Can you just refer to jdk documentation like the other classes in this package?


Line 26:    * @throws Exception
remove empty @throws


....................................................
File user/super/com/google/gwt/emul/java/lang/Exception.java
Line 38:   }
I guess this class is not intended to be here :)


....................................................
File user/super/com/google/gwt/emul/java/lang/Throwable.java
Line 40: * SerializabilityUtil.fieldQualifiesForSerialization(Field) method.
can you put a todo item for missing stuff related to suppressed exceptions?
Also can you create an issue to follow up on this?


Line 44:   private transient Throwable[] suppressed = new Throwable[0];
it is better to instantiate this lazily.


Line 74:
asserts are just like javadocs, nothing more. In this kind of scenarios we want guaranteed checks. (see go/java-practices/assertions).


Line 78:     }
you don't need the whole array copy. This will only run in script mode. just set the array. The whole method can look something like:

 public final void addSuppressed(Throwable exception) {
   if (exception == null) {
     throw new NPE();
   }

   if (exception == this) {
     throw new IllegalArgumentException("Self-suppress not permitted");
   }

   if (suppressed == null ) {
     suppressed = new Throwable[] { exception };
   } else {
     suppressed[suppressed.length] = exception;
   }
 }


--
To view, visit https://gwt-review.googlesource.com/2681
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: If973b8c847d1202aca794221f32ae4b33b616f9c
Gerrit-PatchSet: 1
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Roberto Lublinerman <[email protected]>
Gerrit-Reviewer: Brian Slesinsky <[email protected]>
Gerrit-Reviewer: Goktug Gokdogan <[email protected]>
Gerrit-Reviewer: John Stalcup <[email protected]>
Gerrit-Reviewer: Matthew Dempsky <[email protected]>
Gerrit-Reviewer: Matthew Dempsky <[email protected]>
Gerrit-Reviewer: Ray Cromwell <[email protected]>
Gerrit-Reviewer: Thomas Broyer <[email protected]>
Gerrit-HasComments: Yes

--
--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- You received this message because you are subscribed to the Google Groups "Google Web Toolkit 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.


Reply via email to