[gwt-contrib] typo in documentation?

2011-01-13 Thread Arthur Kalmenson
Hey everyone,

Just a quick question, I was looking through the MVP docs:
http://code.google.com/webtoolkit/doc/latest/DevGuideMvpActivitiesAndPlaces.html#Places
and in the Place section there is a paragraph that eludes to a
BasicPlace class. It says:

"Many Places in your app might not save any state to the URL, so they
could just extend a BasicPlace which declares a PlaceTokenizer that
returns a null token."

But BasicPlace doesn't seem to exist. Is this a typo? I guess we can
just declare our own BasicPlace?

All the best,
--
Arthur Kalmenson

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] [google-web-toolkit] r9542 committed - Fixes a bug in JavaScriptObject support in DevMode that prevents dispa...

2011-01-13 Thread codesite-noreply

Revision: 9542
Author: knor...@google.com
Date: Thu Jan 13 15:08:15 2011
Log: Fixes a bug in JavaScriptObject support in DevMode that prevents  
dispatching

through an interface to a method defined in a super-interface. The change
also includes a new test to serve as a regression test.

Review at http://gwt-code-reviews.appspot.com/1287801
Review by: bobv, scottb, cromwellian

http://code.google.com/p/google-web-toolkit/source/detail?r=9542

Modified:
  
/trunk/dev/core/src/com/google/gwt/dev/shell/rewrite/RewriteSingleJsoImplDispatches.java
  
/trunk/user/test/com/google/gwt/dev/jjs/test/singlejso/TypeHierarchyTest.java


===
---  
/trunk/dev/core/src/com/google/gwt/dev/shell/rewrite/RewriteSingleJsoImplDispatches.java	 
Wed Dec  1 12:10:45 2010
+++  
/trunk/dev/core/src/com/google/gwt/dev/shell/rewrite/RewriteSingleJsoImplDispatches.java	 
Thu Jan 13 15:08:15 2011

@@ -34,8 +34,8 @@
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
-import java.util.SortedMap;
-import java.util.TreeMap;
+import java.util.SortedSet;
+import java.util.TreeSet;

 /**
  * Effects the renaming of {@code @SingleJsoImpl} methods from their  
original

@@ -181,9 +181,9 @@
  * may be referenced via a more specific interface.
  */
 if (inSingleJsoImplInterfaceType) {
-  for (Map.Entry> entry :  
toImplement(currentTypeName).entrySet()) {

-for (Method method : entry.getValue()) {
-  writeEmptyMethod(entry.getKey(), method);
+  for (String mangledName : toImplement(currentTypeName)) {
+for (Method method : jsoData.getDeclarations(mangledName)) {
+  writeEmptyMethod(mangledName, method);
 }
   }
 }
@@ -265,29 +265,23 @@
* Given a resource name of a class, find all mangled method names that  
must

* be implemented.
*/
-  private SortedMap> toImplement(String typeName) {
+  private SortedSet toImplement(String typeName) {
 String name = typeName.replace('/', '_');
 String prefix = name + "_";
 String suffix = name + "`";
-SortedMap> toReturn = new TreeMapList>();

-
+SortedSet toReturn = new TreeSet();
 for (String mangledName : jsoData.getMangledNames().subSet(prefix,  
suffix)) {

-  toReturn.put(mangledName, jsoData.getImplementations(mangledName));
-}
-toReturn.keySet().removeAll(implementedMethods);
+  if (!implementedMethods.contains(mangledName)) {
+toReturn.add(mangledName);
+  }
+}
 return toReturn;
   }
-
-  private void writeEmptyMethod(String mangledMethodName, Method method) {
-assert method.getArgumentTypes().length > 0;
-// Remove the first argument, which would be the implementing JSO type
-String descriptor = "("
-+ method.getDescriptor().substring(
-1 + method.getArgumentTypes()[0].getDescriptor().length());
-
-// Create the stub method entry in the interface
+
+  private void writeEmptyMethod(String mangledMethodName, Method  
declMethod) {

 MethodVisitor mv = super.visitMethod(Opcodes.ACC_PUBLIC
-| Opcodes.ACC_ABSTRACT, mangledMethodName, descriptor, null, null);
+| Opcodes.ACC_ABSTRACT, mangledMethodName,  
declMethod.getDescriptor(),

+null, null);
 mv.visitEnd();
   }

@@ -303,20 +297,14 @@
  * semantics of the dispatches that would make a common implementation  
far

  * more awkward than the duplication of code.
  */
-for (Map.Entry> entry :  
toImplement(stubIntr).entrySet()) {

-  for (Method method : entry.getValue()) {
-String mangledName = entry.getKey();
-
-String descriptor = "("
-+ method.getDescriptor().substring(
-1 + method.getArgumentTypes()[0].getDescriptor().length());
-String localName = method.getName().substring(0,
-method.getName().length() - 1);
-Method toCall = new Method(localName, descriptor);
+for (String mangledName : toImplement(stubIntr)) {
+  for (Method method : jsoData.getDeclarations(mangledName)) {
+
+Method toCall = new Method(method.getName(),  
method.getDescriptor());


 // Must not be final
 MethodVisitor mv = super.visitMethod(Opcodes.ACC_PUBLIC
-| Opcodes.ACC_SYNTHETIC, mangledName, descriptor, null, null);
+| Opcodes.ACC_SYNTHETIC, mangledName, method.getDescriptor(),  
null, null);

 if (mv != null) {
   mv.visitCode();

===
---  
/trunk/user/test/com/google/gwt/dev/jjs/test/singlejso/TypeHierarchyTest.java	 
Sun Oct 18 11:48:45 2009
+++  
/trunk/user/test/com/google/gwt/dev/jjs/test/singlejso/TypeHierarchyTest.java	 
Thu Jan 13 15:08:15 2011

@@ -122,6 +122,45 @@
*/
   static class Wide {
   }
+
+  private interface Element extends Node {
+  }
+
+  private static class JvmNode implements Node {
+@Override
+public JvmNode appendChild(Node node) {
+  return (JvmNode)node;
+}
+  }
+
+  private 

[gwt-contrib] Re: Fix a generics compile error on OSX java 1.6 (issue1289801)

2011-01-13 Thread rchandia

LGTM
On 2011/01/14 01:17:55, Nick Chalko wrote:




http://gwt-code-reviews.appspot.com/1289801/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] [google-web-toolkit] r9541 committed - Cherry picking r9540 into releases/2.2, Adds a hook to invalidate a re...

2011-01-13 Thread codesite-noreply

Revision: 9541
Author: gwt.mirror...@gmail.com
Date: Thu Jan 13 13:57:26 2011
Log: Cherry picking r9540 into releases/2.2, Adds a hook to invalidate a  
rebind within dev mode


http://code.google.com/p/google-web-toolkit/source/detail?r=9541

Modified:
  
/releases/2.2/dev/core/src/com/google/gwt/dev/shell/ShellModuleSpaceHost.java
  
/releases/2.2/dev/core/src/com/google/gwt/dev/shell/StandardRebindOracle.java


===
---  
/releases/2.2/dev/core/src/com/google/gwt/dev/shell/ShellModuleSpaceHost.java	 
Mon Dec 20 10:49:11 2010
+++  
/releases/2.2/dev/core/src/com/google/gwt/dev/shell/ShellModuleSpaceHost.java	 
Thu Jan 13 13:57:26 2011

@@ -83,6 +83,15 @@
   public TreeLogger getLogger() {
 return logger;
   }
+
+  /**
+   * Invalidates the given source type name, so the next rebind request  
will

+   * generate a type again.
+   */
+  public void invalidateRebind(String sourceTypeName) {
+checkForModuleSpace();
+rebindOracle.invalidateRebind(sourceTypeName);
+  }

   public void onModuleReady(ModuleSpace readySpace)
   throws UnableToCompleteException {
===
---  
/releases/2.2/dev/core/src/com/google/gwt/dev/shell/StandardRebindOracle.java	 
Thu Dec 23 06:00:26 2010
+++  
/releases/2.2/dev/core/src/com/google/gwt/dev/shell/StandardRebindOracle.java	 
Thu Jan 13 13:57:26 2011

@@ -234,6 +234,14 @@
 this.rules = rules;
 this.genCtx = genCtx;
   }
+
+  /**
+   * Invalidates the given source type name, so the next rebind request  
will

+   * generate type again.
+   */
+  public void invalidateRebind(String sourceTypeName) {
+typeNameBindingMap.remove(sourceTypeName);
+  }

   public String rebind(TreeLogger logger, String typeName)
   throws UnableToCompleteException {

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Fixes a bug in JavaScriptObject support in DevMode that prevents dispatching (issue1287801)

2011-01-13 Thread cromwellian


LGTM


http://gwt-code-reviews.appspot.com/1287801/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Fixes a bug in JavaScriptObject support in DevMode that prevents dispatching (issue1287801)

2011-01-13 Thread knorton

Thanks Ray,

I didn't actually change the logic in writeTrampoline in the last patch,
but I realized that an identical change there actually fixes this
problem for the Java objects as well. Can you give it another quick
look?


http://gwt-code-reviews.appspot.com/1287801/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Fix a generics compile error on OSX java 1.6 (issue1289801)

2011-01-13 Thread nchalko

Reviewers: rchandia,

Description:
Fix a generics compile error on OSX java 1.6


Please review this at http://gwt-code-reviews.appspot.com/1289801/show

Affected files:
  M  
user/test/com/google/gwt/requestfactory/client/RequestFactoryTestBase.java



Index:  
user/test/com/google/gwt/requestfactory/client/RequestFactoryTestBase.java

===
---  
user/test/com/google/gwt/requestfactory/client/RequestFactoryTestBase.java	 
(revision 9538)
+++  
user/test/com/google/gwt/requestfactory/client/RequestFactoryTestBase.java	 
(working copy)

@@ -1,12 +1,12 @@
 /*
  * Copyright 2010 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
@@ -36,7 +36,7 @@
  * A base class for anything that makes use of the SimpleRequestFactory.
  * Subclasses must always use {@link #finishTestAndReset()} in order to  
allow

  * calls to the reset methods to complete before the next test starts.
- *
+ *
  */
 public abstract class RequestFactoryTestBase extends GWTTestCase {

@@ -102,7 +102,7 @@
 store = new DefaultProxyStore(store.encode());
 s = req.getSerializer(store);
 T restored = s.deserialize(id.getProxyClass(), key);
-AutoBean restoredBean = AutoBeanUtils.getAutoBean(restored);
+AutoBean restoredBean =  
AutoBeanUtils.getAutoBean(restored);

 assertNotSame(proxy, restored);
 /*
  * Performing a regular assertEquals() or even an AutoBeanUtils.diff()  
here



--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Fixes a bug in JavaScriptObject support in DevMode that prevents dispatching (issue1287801)

2011-01-13 Thread knorton

http://gwt-code-reviews.appspot.com/1287801/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] [google-web-toolkit] r9540 committed - Adds a hook to invalidate a rebind within dev mode (from Alexander...

2011-01-13 Thread codesite-noreply

Revision: 9540
Author: gwt.mirror...@gmail.com
Date: Thu Jan 13 13:31:09 2011
Log: Adds a hook to invalidate a rebind within dev mode (from Alexander
Mitin)

Review at http://gwt-code-reviews.appspot.com/1275801

Review by: rj...@google.com
http://code.google.com/p/google-web-toolkit/source/detail?r=9540

Modified:
 /trunk/dev/core/src/com/google/gwt/dev/shell/ShellModuleSpaceHost.java
 /trunk/dev/core/src/com/google/gwt/dev/shell/StandardRebindOracle.java

===
--- /trunk/dev/core/src/com/google/gwt/dev/shell/ShellModuleSpaceHost.java	 
Mon Dec 20 10:49:11 2010
+++ /trunk/dev/core/src/com/google/gwt/dev/shell/ShellModuleSpaceHost.java	 
Thu Jan 13 13:31:09 2011

@@ -83,6 +83,15 @@
   public TreeLogger getLogger() {
 return logger;
   }
+
+  /**
+   * Invalidates the given source type name, so the next rebind request  
will

+   * generate a type again.
+   */
+  public void invalidateRebind(String sourceTypeName) {
+checkForModuleSpace();
+rebindOracle.invalidateRebind(sourceTypeName);
+  }

   public void onModuleReady(ModuleSpace readySpace)
   throws UnableToCompleteException {
===
--- /trunk/dev/core/src/com/google/gwt/dev/shell/StandardRebindOracle.java	 
Thu Dec 23 06:00:26 2010
+++ /trunk/dev/core/src/com/google/gwt/dev/shell/StandardRebindOracle.java	 
Thu Jan 13 13:31:09 2011

@@ -234,6 +234,14 @@
 this.rules = rules;
 this.genCtx = genCtx;
   }
+
+  /**
+   * Invalidates the given source type name, so the next rebind request  
will

+   * generate type again.
+   */
+  public void invalidateRebind(String sourceTypeName) {
+typeNameBindingMap.remove(sourceTypeName);
+  }

   public String rebind(TreeLogger logger, String typeName)
   throws UnableToCompleteException {

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Move the TCK report task to user/build.xml and (issue1288801)

2011-01-13 Thread nchalko

Reviewers: rchandia,

Description:
Move the TCK report task to user/build.xml and
delete samples/validationtck


Please review this at http://gwt-code-reviews.appspot.com/1288801/show

Affected files:
  D samples/validationtck/README.txt
  D samples/validationtck/build.xml
  D samples/validationtck/countMarkedTests.sh
  D  
samples/validationtck/src/com/google/gwt/sample/validationtck/SampleValidationTck.gwt.xml

  D samples/validationtck/src/com/google/gwt/sample/validationtck/Tck.java
  D samples/validationtck/style/html/junit-noframes.xsl
  D samples/validationtck/style/text/junit-noframes.xsl
  M user/build.xml
  A user/countMarkedTests.sh
  A user/style/html/junit-noframes.xsl
  A user/style/text/junit-noframes.xsl


--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: This change adds couple of things: (issue1251801)

2011-01-13 Thread meder

http://gwt-code-reviews.appspot.com/1251801/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: This change adds couple of things: (issue1251801)

2011-01-13 Thread meder


http://gwt-code-reviews.appspot.com/1251801/diff/44001/45010
File user/src/com/google/gwt/user/server/Util.java (right):

http://gwt-code-reviews.appspot.com/1251801/diff/44001/45010#newcode76
user/src/com/google/gwt/user/server/Util.java:76: * @throws
IllegalStateException if duplicate cookies are detected.
On 2011/01/13 18:53:45, jat wrote:

I think either IllegalStateException or IllegalArgumentException is

fine -- the

state of the request is in error, and that request was passed as an

argument.  I

agree it isn't worth creating a custom exception for it.


I've changed to IllegalArgumentException

http://gwt-code-reviews.appspot.com/1251801/diff/44001/45014
File
user/src/com/google/gwt/user/server/rpc/XsrfProtectedServiceServlet.java
(right):

http://gwt-code-reviews.appspot.com/1251801/diff/44001/45014#newcode37
user/src/com/google/gwt/user/server/rpc/XsrfProtectedServiceServlet.java:37:
* XSRF token validation is performed by generating MD5 hash of the
session
On 2011/01/13 18:31:42, xtof wrote:

Actually, why MD5 and not future proof things and use SHA-1 or SHA-2?

I'm not c

ryptographer enough to know if it really matters (and my guess is

collision resi

stance is not important in this application), but better err on the

safe side?


I don't feel strongly about the algorithm used here, since I think we
don't really care about collisions here. It seems like the attack would
be for two session cookies to hash to the same xsrf token, in which case
attacker would have to find second person logged in with the same
cookie.

Overwriting session cookie to result in collision will hopefully be
detected by the web app and hindered by the browsers restrictions on
allowed characters, etc.

http://gwt-code-reviews.appspot.com/1251801/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Add optimizations for redundant and trivial 'switch' statements (issue1286801)

2011-01-13 Thread scottb

Mostly LG.


http://gwt-code-reviews.appspot.com/1286801/diff/1/3
File dev/core/src/com/google/gwt/dev/js/JsDuplicateCaseFolder.java
(right):

http://gwt-code-reviews.appspot.com/1286801/diff/1/3#newcode130
dev/core/src/com/google/gwt/dev/js/JsDuplicateCaseFolder.java:130:
String body = stmts.toString();
This is problematic, you need to ultimately call JsNode.toSource()
rather than toString().

http://gwt-code-reviews.appspot.com/1286801/diff/1/3#newcode140
dev/core/src/com/google/gwt/dev/js/JsDuplicateCaseFolder.java:140: int
index = newCases.indexOf(previousCase);
Comment this as a known linear search.

http://gwt-code-reviews.appspot.com/1286801/diff/1/3#newcode168
dev/core/src/com/google/gwt/dev/js/JsDuplicateCaseFolder.java:168:
private boolean cannotFallThrough(JsStatement stmt) {
Did you look at JsStatement.unconditionalControlBreak()?  In fact, if
you implement JsBlock.unconditionalControlBreak() correctly, you could
probably get rid of all this code.

http://gwt-code-reviews.appspot.com/1286801/diff/1/4
File dev/core/test/com/google/gwt/dev/js/JsDuplicateCaseFolderTest.java
(right):

http://gwt-code-reviews.appspot.com/1286801/diff/1/4#newcode76
dev/core/test/com/google/gwt/dev/js/JsDuplicateCaseFolderTest.java:76:
assertEquals(expected, output);
You can be a lot looser on the syntax if you parse "expected".  Easiest
way to do that would be to call super.optimize(expected) or use a
helper.

http://gwt-code-reviews.appspot.com/1286801/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: At application startup, assert that the specified user.agent selection property value indeed mat... (issue1278801)

2011-01-13 Thread fredsa

http://gwt-code-reviews.appspot.com/1278801/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Fixes a bug in JavaScriptObject support in DevMode that prevents dispatching (issue1287801)

2011-01-13 Thread knorton

http://gwt-code-reviews.appspot.com/1287801/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Fixes a bug in JavaScriptObject support in DevMode that prevents dispatching (issue1287801)

2011-01-13 Thread knorton

No, it's a good point. I'm realizing we probably need some more tests
covering a lot fo the patterns that are possible after Joel's change to
loosen some of the interface restrictions.


On 2011/01/13 22:32:43, cromwellian wrote:

On Thu, Jan 13, 2011 at 2:24 PM,   wrote:



> To be honest, I don't know what our JSO tests currently cover. My

intent

> was to put my case in as a regression and try to follow up with some
> more robust testing strategies. Do you anticipate a problem that is

not

> covered with our current tests?



Well, the reason I suggested it is because you changed the
writeTrampoline() function which appears to affect non-JSO Java
implementations, but your test case only tests the change you made to
the one that lives on JavaScriptObject$



-Ray
\



> http://gwt-code-reviews.appspot.com/1287801/show
>
> --
> http://groups.google.com/group/Google-Web-Toolkit-Contributors
>





http://gwt-code-reviews.appspot.com/1287801/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


Re: [gwt-contrib] Re: Fixes a bug in JavaScriptObject support in DevMode that prevents dispatching (issue1287801)

2011-01-13 Thread Ray Cromwell
On Thu, Jan 13, 2011 at 2:24 PM,   wrote:

> To be honest, I don't know what our JSO tests currently cover. My intent
> was to put my case in as a regression and try to follow up with some
> more robust testing strategies. Do you anticipate a problem that is not
> covered with our current tests?

Well, the reason I suggested it is because you changed the
writeTrampoline() function which appears to affect non-JSO Java
implementations, but your test case only tests the change you made to
the one that lives on JavaScriptObject$

-Ray
\

> http://gwt-code-reviews.appspot.com/1287801/show
>
> --
> http://groups.google.com/group/Google-Web-Toolkit-Contributors
>

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Fixes a bug in JavaScriptObject support in DevMode that prevents dispatching (issue1287801)

2011-01-13 Thread knorton


http://gwt-code-reviews.appspot.com/1287801/diff/1/3
File
user/test/com/google/gwt/dev/jjs/test/singlejso/TypeHierarchyTest.java
(right):

http://gwt-code-reviews.appspot.com/1287801/diff/1/3#newcode205
user/test/com/google/gwt/dev/jjs/test/singlejso/TypeHierarchyTest.java:205:
Element element = JsElement.create();
On 2011/01/13 22:04:29, cromwellian wrote:

Should you also test this in conjunction with non-JSO implementers,

e.g.

PureJavaElement implements Element?


To be honest, I don't know what our JSO tests currently cover. My intent
was to put my case in as a regression and try to follow up with some
more robust testing strategies. Do you anticipate a problem that is not
covered with our current tests?

http://gwt-code-reviews.appspot.com/1287801/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] [google-web-toolkit] r9539 committed - Cherry picking r9538 into releases/2.2

2011-01-13 Thread codesite-noreply

Revision: 9539
Author: rj...@google.com
Date: Thu Jan 13 10:46:47 2011
Log: Cherry picking r9538 into releases/2.2

http://code.google.com/p/google-web-toolkit/source/detail?r=9539

Modified:
 /releases/2.2/dev/core/src/com/google/gwt/dev/cfg/ModuleDefLoader.java

===
--- /releases/2.2/dev/core/src/com/google/gwt/dev/cfg/ModuleDefLoader.java	 
Fri Jan  7 11:13:03 2011
+++ /releases/2.2/dev/core/src/com/google/gwt/dev/cfg/ModuleDefLoader.java	 
Thu Jan 13 10:46:47 2011

@@ -40,6 +40,9 @@
  * The top-level API for loading module XML.
  */
 public final class ModuleDefLoader {
+  /*
+   * TODO(scottb,tobyr,zundel): synchronization
+   */

   /**
* Interface to provide a load strategy to the load process.
@@ -64,11 +67,12 @@

   /**
* Keep soft references to loaded modules so the VM can gc them when  
memory is

-   * tight.  The module's physical name is used as a key.
+   * tight. The current context class loader used as a key for modules  
cache.

+   * The module's physical name is used as a key inside the cache.
*/
   @SuppressWarnings("unchecked")
-  private static final Map loadedModules = new  
ReferenceMap(

-  AbstractReferenceMap.HARD, AbstractReferenceMap.SOFT);
+  private static final Map>  
loadedModulesCaches = new ReferenceMap(

+  AbstractReferenceMap.WEAK, AbstractReferenceMap.HARD);

   /**
* A mapping from effective to physical module names.
@@ -150,8 +154,19 @@
 }
   }

+  @SuppressWarnings("unchecked")
+  private static Map getModulesCache() {
+ClassLoader keyClassLoader =  
Thread.currentThread().getContextClassLoader();

+Map cache = loadedModulesCaches.get(keyClassLoader);
+if (cache == null) {
+  cache = new ReferenceMap(AbstractReferenceMap.HARD,  
AbstractReferenceMap.SOFT);

+  loadedModulesCaches.put(keyClassLoader, cache);
+}
+return cache;
+  }
+
   private static ModuleDef tryGetLoadedModule(String moduleName, boolean  
refresh) {

-ModuleDef moduleDef = loadedModules.get(moduleName);
+ModuleDef moduleDef = getModulesCache().get(moduleName);
 if (moduleDef == null || moduleDef.isGwtXmlFileStale()) {
   return null;
 } else if (refresh) {
@@ -301,7 +316,7 @@
 moduleNormalizeEvent.end();

 // Add the "physical" module name: com.google.Module
-loadedModules.put(moduleName, moduleDef);
+getModulesCache().put(moduleName, moduleDef);

 // Add a mapping from the module's effective name to its physical name
 moduleEffectiveNameToPhysicalName.put(moduleDef.getName(), moduleName);

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Fixes a bug in JavaScriptObject support in DevMode that prevents dispatching (issue1287801)

2011-01-13 Thread cromwellian


http://gwt-code-reviews.appspot.com/1287801/diff/1/3
File
user/test/com/google/gwt/dev/jjs/test/singlejso/TypeHierarchyTest.java
(right):

http://gwt-code-reviews.appspot.com/1287801/diff/1/3#newcode205
user/test/com/google/gwt/dev/jjs/test/singlejso/TypeHierarchyTest.java:205:
Element element = JsElement.create();
Should you also test this in conjunction with non-JSO implementers, e.g.
PureJavaElement implements Element?

http://gwt-code-reviews.appspot.com/1287801/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Fixes a bug in JavaScriptObject support in DevMode that prevents dispatching (issue1287801)

2011-01-13 Thread bobv

LGTM


http://gwt-code-reviews.appspot.com/1287801/diff/1/2
File
dev/core/src/com/google/gwt/dev/shell/rewrite/RewriteSingleJsoImplDispatches.java
(right):

http://gwt-code-reviews.appspot.com/1287801/diff/1/2#newcode272
dev/core/src/com/google/gwt/dev/shell/rewrite/RewriteSingleJsoImplDispatches.java:272:
final SortedSet toReturn = new TreeSet();
final modifier.

http://gwt-code-reviews.appspot.com/1287801/diff/1/3
File
user/test/com/google/gwt/dev/jjs/test/singlejso/TypeHierarchyTest.java
(right):

http://gwt-code-reviews.appspot.com/1287801/diff/1/3#newcode189
user/test/com/google/gwt/dev/jjs/test/singlejso/TypeHierarchyTest.java:189:

Whitespace.

http://gwt-code-reviews.appspot.com/1287801/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Fixes a bug in JavaScriptObject support in DevMode that prevents dispatching (issue1287801)

2011-01-13 Thread knorton

Reviewers: bobv, scottb,

Description:
Fixes a bug in JavaScriptObject support in DevMode that prevents
dispatching
through an interface to a method defined in a super-interface. The
change
also includes a new test to serve as a regression test.


Please review this at http://gwt-code-reviews.appspot.com/1287801/show

Affected files:
  M  
dev/core/src/com/google/gwt/dev/shell/rewrite/RewriteSingleJsoImplDispatches.java

  M user/test/com/google/gwt/dev/jjs/test/singlejso/TypeHierarchyTest.java


--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] [google-web-toolkit] r9538 committed - Cache ModuleDefs by context ClassLoader....

2011-01-13 Thread codesite-noreply

Revision: 9538
Author: sco...@google.com
Date: Thu Jan 13 09:40:26 2011
Log: Cache ModuleDefs by context ClassLoader.

GWT Designer need separated class loader for every open project.

http://gwt-code-reviews.appspot.com/1274801/show
Patch by: amitin
Review by: me,zundel

http://code.google.com/p/google-web-toolkit/source/detail?r=9538

Modified:
 /trunk/dev/core/src/com/google/gwt/dev/cfg/ModuleDefLoader.java

===
--- /trunk/dev/core/src/com/google/gwt/dev/cfg/ModuleDefLoader.java	Fri  
Jan  7 11:13:03 2011
+++ /trunk/dev/core/src/com/google/gwt/dev/cfg/ModuleDefLoader.java	Thu Jan  
13 09:40:26 2011

@@ -40,6 +40,9 @@
  * The top-level API for loading module XML.
  */
 public final class ModuleDefLoader {
+  /*
+   * TODO(scottb,tobyr,zundel): synchronization
+   */

   /**
* Interface to provide a load strategy to the load process.
@@ -64,11 +67,12 @@

   /**
* Keep soft references to loaded modules so the VM can gc them when  
memory is

-   * tight.  The module's physical name is used as a key.
+   * tight. The current context class loader used as a key for modules  
cache.

+   * The module's physical name is used as a key inside the cache.
*/
   @SuppressWarnings("unchecked")
-  private static final Map loadedModules = new  
ReferenceMap(

-  AbstractReferenceMap.HARD, AbstractReferenceMap.SOFT);
+  private static final Map>  
loadedModulesCaches = new ReferenceMap(

+  AbstractReferenceMap.WEAK, AbstractReferenceMap.HARD);

   /**
* A mapping from effective to physical module names.
@@ -150,8 +154,19 @@
 }
   }

+  @SuppressWarnings("unchecked")
+  private static Map getModulesCache() {
+ClassLoader keyClassLoader =  
Thread.currentThread().getContextClassLoader();

+Map cache = loadedModulesCaches.get(keyClassLoader);
+if (cache == null) {
+  cache = new ReferenceMap(AbstractReferenceMap.HARD,  
AbstractReferenceMap.SOFT);

+  loadedModulesCaches.put(keyClassLoader, cache);
+}
+return cache;
+  }
+
   private static ModuleDef tryGetLoadedModule(String moduleName, boolean  
refresh) {

-ModuleDef moduleDef = loadedModules.get(moduleName);
+ModuleDef moduleDef = getModulesCache().get(moduleName);
 if (moduleDef == null || moduleDef.isGwtXmlFileStale()) {
   return null;
 } else if (refresh) {
@@ -301,7 +316,7 @@
 moduleNormalizeEvent.end();

 // Add the "physical" module name: com.google.Module
-loadedModules.put(moduleName, moduleDef);
+getModulesCache().put(moduleName, moduleDef);

 // Add a mapping from the module's effective name to its physical name
 moduleEffectiveNameToPhysicalName.put(moduleDef.getName(), moduleName);

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] [google-web-toolkit] r9537 committed - Cherry picking r9536 releases/[rel_#] for issue 4781

2011-01-13 Thread codesite-noreply

Revision: 9537
Author: rj...@google.com
Date: Thu Jan 13 09:40:51 2011
Log: Cherry picking r9536 releases/[rel_#] for issue 4781

http://code.google.com/p/google-web-toolkit/source/detail?r=9537

Modified:
  
/releases/2.2/user/src/com/google/gwt/uibinder/rebind/model/OwnerFieldClass.java
  
/releases/2.2/user/test/com/google/gwt/uibinder/rebind/model/OwnerFieldClassTest.java


===
---  
/releases/2.2/user/src/com/google/gwt/uibinder/rebind/model/OwnerFieldClass.java	 
Tue Nov  2 04:47:58 2010
+++  
/releases/2.2/user/src/com/google/gwt/uibinder/rebind/model/OwnerFieldClass.java	 
Thu Jan 13 09:40:51 2011

@@ -28,6 +28,7 @@
 import com.google.gwt.uibinder.rebind.MortalLogger;
 import com.google.gwt.uibinder.rebind.UiBinderContext;

+import java.beans.Introspector;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
@@ -44,8 +45,8 @@
  */
 public class OwnerFieldClass {

-  private static final int defaultCost = 4;
-  private static final Map typeRank;
+  private static final int DEFAULT_COST = 4;
+  private static final Map TYPE_RANK;
   static {
 HashMap tmpTypeRank = new HashMap();
 tmpTypeRank.put("java.lang.String", 1);
@@ -65,7 +66,7 @@
 tmpTypeRank.put("java.lang.Integer", 3);
 tmpTypeRank.put("java.lang.Long", 3);
 tmpTypeRank.put("java.lang.Short", 3);
-typeRank = Collections.unmodifiableMap(tmpTypeRank);
+TYPE_RANK = Collections.unmodifiableMap(tmpTypeRank);
   }

   /**
@@ -156,6 +157,24 @@
   public JConstructor getUiConstructor() {
 return uiConstructor;
   }
+
+  /**
+   * Adds a setter for a given property to the given map of setters.
+   *
+   * @param allSetters the map of setters (keyed by property name)
+   * @param propertyName the property name to use
+   * @param method the setter to use
+   */
+  private void addSetter(Map> allSetters,
+  String propertyName, JMethod method) {
+Collection propertyMethods = allSetters.get(propertyName);
+if (propertyMethods == null) {
+  propertyMethods = new ArrayList();
+  allSetters.put(propertyName, propertyMethods);
+}
+
+propertyMethods.add(method);
+  }

   /**
* Given a collection of setters for the same property, picks which one  
to

@@ -230,16 +249,15 @@
   String propertyName = method.getName().substring(3);

   // turn "PropertyName" into "propertyName"
-  propertyName = propertyName.substring(0, 1).toLowerCase()
-  + propertyName.substring(1);
-
-  Collection propertyMethods = allSetters.get(propertyName);
-  if (propertyMethods == null) {
-propertyMethods = new ArrayList();
-allSetters.put(propertyName, propertyMethods);
-  }
-
-  propertyMethods.add(method);
+  String beanPropertyName = Introspector.decapitalize(propertyName);
+  addSetter(allSetters, beanPropertyName, method);
+
+  // keep backwards compatibility (i.e. hTML instead of HTML for  
setHTML)
+  String legacyPropertyName = propertyName.substring(0,  
1).toLowerCase()

+  + propertyName.substring(1);
+  if (!legacyPropertyName.equals(beanPropertyName)) {
+addSetter(allSetters, legacyPropertyName, method);
+  }
 }

 return allSetters;
@@ -349,7 +367,7 @@
* types, it will not be considered ambiguous.
*
* The cost mapping is defined in
-   * {@link #typeRank typeRank }
+   * {@link #TYPE_RANK typeRank }
* @param method.
* @return the rank of the method.
*/
@@ -358,9 +376,9 @@
 int rank = 0;
 for (int i = 0; i < Math.min(params.length, 10); i++) {
   JType paramType = params[i].getType();
-  int cost = defaultCost;
-  if (typeRank.containsKey(paramType.getQualifiedSourceName())) {
-cost = typeRank.get(paramType.getQualifiedSourceName());
+  int cost = DEFAULT_COST;
+  if (TYPE_RANK.containsKey(paramType.getQualifiedSourceName())) {
+cost = TYPE_RANK.get(paramType.getQualifiedSourceName());
   }
   assert (cost >= 0 && cost <= 0x07);
   rank = rank | (cost << (3 * i));
===
---  
/releases/2.2/user/test/com/google/gwt/uibinder/rebind/model/OwnerFieldClassTest.java	 
Tue Nov  2 04:47:58 2010
+++  
/releases/2.2/user/test/com/google/gwt/uibinder/rebind/model/OwnerFieldClassTest.java	 
Thu Jan 13 09:40:51 2011

@@ -29,7 +29,7 @@
 import com.google.gwt.uibinder.rebind.MortalLogger;
 import com.google.gwt.uibinder.rebind.UiBinderContext;
 import com.google.gwt.user.client.ui.CheckBox;
-import com.google.gwt.user.client.ui.Label;
+import com.google.gwt.user.client.ui.HTML;

 import junit.framework.TestCase;

@@ -51,23 +51,35 @@
   }

   public void testOwnerFieldClass() throws Exception {
-// Get the JType for a Label
-JClassType labelType = gwtTypeAdapter.adaptJavaClass(Label.class);
+// Get the JType for an HTML
+JClassType htmlType = gwtTypeAdapter.adaptJavaClass(HTML.class);

 // Now get its field class model
-

[gwt-contrib] [google-web-toolkit] r9536 committed - Public (t.bro...@gmail.com):...

2011-01-13 Thread codesite-noreply

Revision: 9536
Author: rj...@google.com
Date: Thu Jan 13 12:25:22 2011
Log: Public (t.bro...@gmail.com):
Uses the java.beans.Introspector#decapitalize instead of "manual
decapitalization" of setter-method names to attribute names.  This
means setHTML() can be set using an all-caps HTML="" attribute,
instead of hTML="". This applies to all all-caps setters (actually,
decapitalize won't lowercase the first char if it is followed by
another upper-case char, which means an hypothetical setIFrameName
setter for instance wouldn't be changed to iFrameName but kept as
IFrameName). Backward compatible change, so hTML="" still works.

Also fixes some compiler warnings and style errors

Review by rj...@google.com
http://gwt-code-reviews.appspot.com/642801

Review by: r...@google.com
http://code.google.com/p/google-web-toolkit/source/detail?r=9536

Modified:
 /trunk/user/src/com/google/gwt/uibinder/rebind/model/OwnerFieldClass.java
  
/trunk/user/test/com/google/gwt/uibinder/rebind/model/OwnerFieldClassTest.java


===
---  
/trunk/user/src/com/google/gwt/uibinder/rebind/model/OwnerFieldClass.java	 
Tue Nov  2 04:47:58 2010
+++  
/trunk/user/src/com/google/gwt/uibinder/rebind/model/OwnerFieldClass.java	 
Thu Jan 13 12:25:22 2011

@@ -28,6 +28,7 @@
 import com.google.gwt.uibinder.rebind.MortalLogger;
 import com.google.gwt.uibinder.rebind.UiBinderContext;

+import java.beans.Introspector;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
@@ -44,8 +45,8 @@
  */
 public class OwnerFieldClass {

-  private static final int defaultCost = 4;
-  private static final Map typeRank;
+  private static final int DEFAULT_COST = 4;
+  private static final Map TYPE_RANK;
   static {
 HashMap tmpTypeRank = new HashMap();
 tmpTypeRank.put("java.lang.String", 1);
@@ -65,7 +66,7 @@
 tmpTypeRank.put("java.lang.Integer", 3);
 tmpTypeRank.put("java.lang.Long", 3);
 tmpTypeRank.put("java.lang.Short", 3);
-typeRank = Collections.unmodifiableMap(tmpTypeRank);
+TYPE_RANK = Collections.unmodifiableMap(tmpTypeRank);
   }

   /**
@@ -156,6 +157,24 @@
   public JConstructor getUiConstructor() {
 return uiConstructor;
   }
+
+  /**
+   * Adds a setter for a given property to the given map of setters.
+   *
+   * @param allSetters the map of setters (keyed by property name)
+   * @param propertyName the property name to use
+   * @param method the setter to use
+   */
+  private void addSetter(Map> allSetters,
+  String propertyName, JMethod method) {
+Collection propertyMethods = allSetters.get(propertyName);
+if (propertyMethods == null) {
+  propertyMethods = new ArrayList();
+  allSetters.put(propertyName, propertyMethods);
+}
+
+propertyMethods.add(method);
+  }

   /**
* Given a collection of setters for the same property, picks which one  
to

@@ -230,16 +249,15 @@
   String propertyName = method.getName().substring(3);

   // turn "PropertyName" into "propertyName"
-  propertyName = propertyName.substring(0, 1).toLowerCase()
-  + propertyName.substring(1);
-
-  Collection propertyMethods = allSetters.get(propertyName);
-  if (propertyMethods == null) {
-propertyMethods = new ArrayList();
-allSetters.put(propertyName, propertyMethods);
-  }
-
-  propertyMethods.add(method);
+  String beanPropertyName = Introspector.decapitalize(propertyName);
+  addSetter(allSetters, beanPropertyName, method);
+
+  // keep backwards compatibility (i.e. hTML instead of HTML for  
setHTML)
+  String legacyPropertyName = propertyName.substring(0,  
1).toLowerCase()

+  + propertyName.substring(1);
+  if (!legacyPropertyName.equals(beanPropertyName)) {
+addSetter(allSetters, legacyPropertyName, method);
+  }
 }

 return allSetters;
@@ -349,7 +367,7 @@
* types, it will not be considered ambiguous.
*
* The cost mapping is defined in
-   * {@link #typeRank typeRank }
+   * {@link #TYPE_RANK typeRank }
* @param method.
* @return the rank of the method.
*/
@@ -358,9 +376,9 @@
 int rank = 0;
 for (int i = 0; i < Math.min(params.length, 10); i++) {
   JType paramType = params[i].getType();
-  int cost = defaultCost;
-  if (typeRank.containsKey(paramType.getQualifiedSourceName())) {
-cost = typeRank.get(paramType.getQualifiedSourceName());
+  int cost = DEFAULT_COST;
+  if (TYPE_RANK.containsKey(paramType.getQualifiedSourceName())) {
+cost = TYPE_RANK.get(paramType.getQualifiedSourceName());
   }
   assert (cost >= 0 && cost <= 0x07);
   rank = rank | (cost << (3 * i));
===
---  
/trunk/user/test/com/google/gwt/uibinder/rebind/model/OwnerFieldClassTest.java	 
Tue Nov  2 04:47:58 2010
+++  
/trunk/user/test/com/google/gwt/uibinder/rebind/model/OwnerFieldClassTest.java	 
Thu Jan 13 12:25:22 2011

@@ -29,7 +29,7 @@
 import c

[gwt-contrib] [google-web-toolkit] r9535 committed - Change the gecko 2.0 dynamic linux libs to be stripped so that codesit...

2011-01-13 Thread codesite-noreply

Revision: 9535
Author: gwt.mirror...@gmail.com
Date: Thu Jan 13 12:31:52 2011
Log: Change the gecko 2.0 dynamic linux libs to be stripped so that  
codesite doesn't barf on them and to save space)

http://code.google.com/p/google-web-toolkit/source/detail?r=9535

Added:
 /plugin-sdks/gecko-sdks/gecko-2.0.0/Linux_x86-gcc3/lib/libmozalloc.so
 /plugin-sdks/gecko-sdks/gecko-2.0.0/Linux_x86-gcc3/lib/libnspr4.so
 /plugin-sdks/gecko-sdks/gecko-2.0.0/Linux_x86-gcc3/lib/libplc4.so
 /plugin-sdks/gecko-sdks/gecko-2.0.0/Linux_x86-gcc3/lib/libplds4.so
 /plugin-sdks/gecko-sdks/gecko-2.0.0/Linux_x86-gcc3/lib/libxpcom.so
 /plugin-sdks/gecko-sdks/gecko-2.0.0/Linux_x86-gcc3/lib/libxpcomglue_s.a
 /plugin-sdks/gecko-sdks/gecko-2.0.0/Linux_x86-gcc3/lib/libxul.so
 /plugin-sdks/gecko-sdks/gecko-2.0.0/Linux_x86_64-gcc3/lib/libmozalloc.so
 /plugin-sdks/gecko-sdks/gecko-2.0.0/Linux_x86_64-gcc3/lib/libnspr4.so
 /plugin-sdks/gecko-sdks/gecko-2.0.0/Linux_x86_64-gcc3/lib/libplc4.so
 /plugin-sdks/gecko-sdks/gecko-2.0.0/Linux_x86_64-gcc3/lib/libplds4.so
 /plugin-sdks/gecko-sdks/gecko-2.0.0/Linux_x86_64-gcc3/lib/libxpcom.so
 /plugin-sdks/gecko-sdks/gecko-2.0.0/Linux_x86_64-gcc3/lib/libxpcomglue_s.a
 /plugin-sdks/gecko-sdks/gecko-2.0.0/Linux_x86_64-gcc3/lib/libxul.so
Modified:
 /plugin-sdks/gecko-sdks/gecko-2.0.0/README.txt

===
--- /dev/null   
+++ /plugin-sdks/gecko-sdks/gecko-2.0.0/Linux_x86-gcc3/lib/libmozalloc.so	 
Thu Jan 13 12:31:52 2011

Binary file, no diff available.
===
--- /dev/null   
+++ /plugin-sdks/gecko-sdks/gecko-2.0.0/Linux_x86-gcc3/lib/libnspr4.so	Thu  
Jan 13 12:31:52 2011

Binary file, no diff available.
===
--- /dev/null   
+++ /plugin-sdks/gecko-sdks/gecko-2.0.0/Linux_x86-gcc3/lib/libplc4.so	Thu  
Jan 13 12:31:52 2011

Binary file, no diff available.
===
--- /dev/null   
+++ /plugin-sdks/gecko-sdks/gecko-2.0.0/Linux_x86-gcc3/lib/libplds4.so	Thu  
Jan 13 12:31:52 2011

Binary file, no diff available.
===
--- /dev/null   
+++ /plugin-sdks/gecko-sdks/gecko-2.0.0/Linux_x86-gcc3/lib/libxpcom.so	Thu  
Jan 13 12:31:52 2011

Binary file, no diff available.
===
--- /dev/null   
+++ /plugin-sdks/gecko-sdks/gecko-2.0.0/Linux_x86-gcc3/lib/libxpcomglue_s.a	 
Thu Jan 13 12:31:52 2011

File is too large to display a diff.
===
--- /dev/null   
+++ /plugin-sdks/gecko-sdks/gecko-2.0.0/Linux_x86-gcc3/lib/libxul.so	Thu  
Jan 13 12:31:52 2011

File is too large to display a diff.
===
--- /dev/null   
+++  
/plugin-sdks/gecko-sdks/gecko-2.0.0/Linux_x86_64-gcc3/lib/libmozalloc.so	 
Thu Jan 13 12:31:52 2011

Binary file, no diff available.
===
--- /dev/null   
+++ /plugin-sdks/gecko-sdks/gecko-2.0.0/Linux_x86_64-gcc3/lib/libnspr4.so	 
Thu Jan 13 12:31:52 2011

Binary file, no diff available.
===
--- /dev/null   
+++ /plugin-sdks/gecko-sdks/gecko-2.0.0/Linux_x86_64-gcc3/lib/libplc4.so	 
Thu Jan 13 12:31:52 2011

Binary file, no diff available.
===
--- /dev/null   
+++ /plugin-sdks/gecko-sdks/gecko-2.0.0/Linux_x86_64-gcc3/lib/libplds4.so	 
Thu Jan 13 12:31:52 2011

Binary file, no diff available.
===
--- /dev/null   
+++ /plugin-sdks/gecko-sdks/gecko-2.0.0/Linux_x86_64-gcc3/lib/libxpcom.so	 
Thu Jan 13 12:31:52 2011

Binary file, no diff available.
===
--- /dev/null   
+++  
/plugin-sdks/gecko-sdks/gecko-2.0.0/Linux_x86_64-gcc3/lib/libxpcomglue_s.a	 
Thu Jan 13 12:31:52 2011

File is too large to display a diff.
===
--- /dev/null   
+++ /plugin-sdks/gecko-sdks/gecko-2.0.0/Linux_x86_64-gcc3/lib/libxul.so	Thu  
Jan 13 12:31:52 2011

File is too large to display a diff.
===
--- /plugin-sdks/gecko-sdks/gecko-2.0.0/README.txt  Thu Jan  6 15:37:19 2011
+++ /plugin-sdks/gecko-sdks/gecko-2.0.0/README.txt  Thu Jan 13 12:31:52 2011
@@ -4,4 +4,10 @@
  
http://ftp.mozilla.org/pub/mozilla.org/xulrunner/nightly/2010-12-17-03-mozilla-central/xulrunner-2.0b9pre.en-US.linux-x86_64.sdk.tar.bz2
  
http://ftp.mozilla.org/pub/mozilla.org/xulrunner/nightly/2010-12-17-03-mozilla-central/xulrunner-2.0b9pre.en-US.win32.sdk.zip


+
+To conserve space, stripped dynamic libraries were obtained from:
+http://ftp.mozilla.org/pub/mozilla.org/xulrunner/nightly/2010-12-17-03-mozilla-central/xulrunner-2.0b9pre.en-US.linux-i686.tar.bz2
+http://ftp.mozilla.org/pub/mozilla.org/xulrunner/nightly/2010-12-17-03-mozilla-central/xulrunner-2.0b9pre.en-US.linux-x86_64.tar.bz2
+http://ftp.mozilla.org/pub/mozilla.org/xulrunner/nightly/2010-12-17-03-mozilla-central/xulrunner-2.0b9pre.en-US.win32.zip
+
 NOTE: mac xulrunner sdks are not currently bein

[gwt-contrib] Add optimizations for redundant and trivial 'switch' statements (issue1286801)

2011-01-13 Thread rice

Reviewers: scottb, robertvawter,

Description:
Add optimizations for redundant and trivial 'switch' statements


Please review this at http://gwt-code-reviews.appspot.com/1286801/show

Affected files:
  M dev/core/src/com/google/gwt/dev/jjs/JavaToJavaScriptCompiler.java
  A dev/core/src/com/google/gwt/dev/js/JsDuplicateCaseFolder.java
  A dev/core/test/com/google/gwt/dev/js/JsDuplicateCaseFolderTest.java


--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: This change adds couple of things: (issue1251801)

2011-01-13 Thread Christoph Kern
On Thu, Jan 13, 2011 at 10:53,  wrote:

>
> http://gwt-code-reviews.appspot.com/1251801/diff/44001/45010
> File user/src/com/google/gwt/user/server/Util.java (right):
>
> http://gwt-code-reviews.appspot.com/1251801/diff/44001/45010#newcode76
> user/src/com/google/gwt/user/server/Util.java:76: * @throws
> IllegalStateException if duplicate cookies are detected.
> I think either IllegalStateException or IllegalArgumentException is fine
> -- the state of the request is in error, and that request was passed as
> an argument.  I agree it isn't worth creating a custom exception for it.
>
>
> http://gwt-code-reviews.appspot.com/1251801/diff/44001/45014
> File
> user/src/com/google/gwt/user/server/rpc/XsrfProtectedServiceServlet.java
> (right):
>
> http://gwt-code-reviews.appspot.com/1251801/diff/44001/45014#newcode37
>
> user/src/com/google/gwt/user/server/rpc/XsrfProtectedServiceServlet.java:37:
> * XSRF token validation is performed by generating MD5 hash of the
> session
> I am not a cryptographer either, but my understanding is that SHA1 is
> just as broken as MD5, especially if used unsalted.
>
> I don't think these are long-lived enough or protect something important
> enough to matter.  As you suggested earlier, I think most apps caring
> about this will have authentication anyway and then that will be used
> instead.
>
> I don't feel too strongly about this, and leaving it as MD5 is probably ok.

So, LGTM.

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors

[gwt-contrib] Re: This change adds couple of things: (issue1251801)

2011-01-13 Thread jat


http://gwt-code-reviews.appspot.com/1251801/diff/44001/45010
File user/src/com/google/gwt/user/server/Util.java (right):

http://gwt-code-reviews.appspot.com/1251801/diff/44001/45010#newcode76
user/src/com/google/gwt/user/server/Util.java:76: * @throws
IllegalStateException if duplicate cookies are detected.
I think either IllegalStateException or IllegalArgumentException is fine
-- the state of the request is in error, and that request was passed as
an argument.  I agree it isn't worth creating a custom exception for it.

http://gwt-code-reviews.appspot.com/1251801/diff/44001/45014
File
user/src/com/google/gwt/user/server/rpc/XsrfProtectedServiceServlet.java
(right):

http://gwt-code-reviews.appspot.com/1251801/diff/44001/45014#newcode37
user/src/com/google/gwt/user/server/rpc/XsrfProtectedServiceServlet.java:37:
* XSRF token validation is performed by generating MD5 hash of the
session
I am not a cryptographer either, but my understanding is that SHA1 is
just as broken as MD5, especially if used unsalted.

I don't think these are long-lived enough or protect something important
enough to matter.  As you suggested earlier, I think most apps caring
about this will have authentication anyway and then that will be used
instead.

http://gwt-code-reviews.appspot.com/1251801/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] [google-web-toolkit] r9534 committed - Cherry picking r9528 into the release branch

2011-01-13 Thread codesite-noreply

Revision: 9534
Author: p...@google.com
Date: Thu Jan 13 07:07:25 2011
Log: Cherry picking r9528 into the release branch

http://code.google.com/p/google-web-toolkit/source/detail?r=9534

Modified:
 /releases/2.2/user/src/com/google/gwt/canvas/client/Canvas.java
 /releases/2.2/user/src/com/google/gwt/canvas/dom/client/CanvasGradient.java
 /releases/2.2/user/src/com/google/gwt/canvas/dom/client/CanvasPattern.java
  
/releases/2.2/user/src/com/google/gwt/canvas/dom/client/CanvasPixelArray.java

 /releases/2.2/user/src/com/google/gwt/canvas/dom/client/Context.java
 /releases/2.2/user/src/com/google/gwt/canvas/dom/client/Context2d.java
 /releases/2.2/user/src/com/google/gwt/canvas/dom/client/CssColor.java
  
/releases/2.2/user/src/com/google/gwt/canvas/dom/client/FillStrokeStyle.java

 /releases/2.2/user/src/com/google/gwt/canvas/dom/client/ImageData.java
 /releases/2.2/user/src/com/google/gwt/canvas/dom/client/TextMetrics.java
 /releases/2.2/user/src/com/google/gwt/dom/client/CanvasElement.java
 /releases/2.2/user/src/com/google/gwt/user/client/IsSupported.java

===
--- /releases/2.2/user/src/com/google/gwt/canvas/client/Canvas.java	Thu  
Dec  2 06:15:06 2010
+++ /releases/2.2/user/src/com/google/gwt/canvas/client/Canvas.java	Thu Jan  
13 07:07:25 2011

@@ -26,8 +26,8 @@
  * A widget representing a  element.
  *
  * 
- * Experimental API: This class is still under  
rapid

- * development, and is very likely to be deleted. Use it at your own risk.
+ * Experimental API: This API is still under  
development

+ * and is subject to change.
  * 
  * 
  *
===
---  
/releases/2.2/user/src/com/google/gwt/canvas/dom/client/CanvasGradient.java	 
Tue Dec  7 11:12:47 2010
+++  
/releases/2.2/user/src/com/google/gwt/canvas/dom/client/CanvasGradient.java	 
Thu Jan 13 07:07:25 2011

@@ -19,8 +19,8 @@
  * Gradient object used with {@link Context2d}.
  *
  * 
- * Experimental API: This class is still under  
rapid

- * development, and is very likely to be deleted. Use it at your own risk.
+ * Experimental API: This API is still under  
development

+ * and is subject to change.
  * 
  * 
  *
===
---  
/releases/2.2/user/src/com/google/gwt/canvas/dom/client/CanvasPattern.java	 
Thu Dec  2 06:15:06 2010
+++  
/releases/2.2/user/src/com/google/gwt/canvas/dom/client/CanvasPattern.java	 
Thu Jan 13 07:07:25 2011

@@ -19,8 +19,8 @@
  * Pattern object used with {@link Context2d}.
  *
  * 
- * Experimental API: This class is still under  
rapid

- * development, and is very likely to be deleted. Use it at your own risk.
+ * Experimental API: This API is still under  
development

+ * and is subject to change.
  * 
  * 
  *
===
---  
/releases/2.2/user/src/com/google/gwt/canvas/dom/client/CanvasPixelArray.java	 
Thu Dec  2 06:15:06 2010
+++  
/releases/2.2/user/src/com/google/gwt/canvas/dom/client/CanvasPixelArray.java	 
Thu Jan 13 07:07:25 2011

@@ -24,10 +24,12 @@
  * bytes being signed in Java.
  *
  * 
- * Experimental API: This class is still under  
rapid

- * development, and is very likely to be deleted. Use it at your own risk.
+ * Experimental API: This API is still under  
development

+ * and is subject to change.
  * 
+ * 
  *
+ * 
  * @see http://www.w3.org/TR/2dcontext/#canvaspixelarray";>HTML  
Canvas 2D CanvasPixelArray

  * 
  */
===
--- /releases/2.2/user/src/com/google/gwt/canvas/dom/client/Context.java	 
Thu Dec  2 06:15:06 2010
+++ /releases/2.2/user/src/com/google/gwt/canvas/dom/client/Context.java	 
Thu Jan 13 07:07:25 2011

@@ -20,8 +20,8 @@
  * {@link com.google.gwt.dom.client.CanvasElement}.
  *
  * 
- * Experimental API: This class is still under  
rapid

- * development, and is very likely to be deleted. Use it at your own risk.
+ * Experimental API: This API is still under  
development

+ * and is subject to change.
  * 
  * 
  */
===
--- /releases/2.2/user/src/com/google/gwt/canvas/dom/client/Context2d.java	 
Thu Dec 16 11:33:51 2010
+++ /releases/2.2/user/src/com/google/gwt/canvas/dom/client/Context2d.java	 
Thu Jan 13 07:07:25 2011

@@ -24,8 +24,8 @@
  * Rendering interface used to draw on a {@link CanvasElement}.
  *
  * 
- * Experimental API: This class is still under  
rapid

- * development, and is very likely to be deleted. Use it at your own risk.
+ * Experimental API: This API is still under  
development

+ * and is subject to change.
  * 
  * 
  *
===
--- /releases/2.2/user/src/com/google/gwt/canvas/dom/client/CssColor.java	 
Thu Dec 16 11:33:51 2010
+++ /releases/2.2/user/src/com/google/gwt/canvas/dom/client/CssColor.java	 
Thu Jan 13 07:07:25 2011

@@ -19,8 +19,8 @@
  * CSS Color object.
  *
  * 
- * Experimental API: This class is still under  
rapid

- * development, and is very likely to be deleted. Use it at your own risk.
+ * Ex

[gwt-contrib] Re: Issue 5752: ListEditor.setValue fails once the underlying AutoBean has been frozen (issue1284801)

2011-01-13 Thread BobV
Attached to http://code.google.com/p/google-web-toolkit/issues/detail?id=5873

-- 
Bob Vawter
Google Web Toolkit Team

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: This change adds couple of things: (issue1251801)

2011-01-13 Thread xtof


http://gwt-code-reviews.appspot.com/1251801/diff/44001/45010
File user/src/com/google/gwt/user/server/Util.java (right):

http://gwt-code-reviews.appspot.com/1251801/diff/44001/45010#newcode76
user/src/com/google/gwt/user/server/Util.java:76: * @throws
IllegalStateException if duplicate cookies are detected.
IllegalStateException is probably not quite the right one here; from its
javadoc:
"Signals that a method has been invoked at an illegal or inappropriate
time. In other words, the Java environment or Java application is not in
an appropriate state for the requested operation."

I can't really think of a standard java exception that really fits here;
IllegalArgumentException maybe?  I'm not sure it's worth declaring a
custom exception here either though. jat - any opinions?

http://gwt-code-reviews.appspot.com/1251801/diff/44001/45014
File
user/src/com/google/gwt/user/server/rpc/XsrfProtectedServiceServlet.java
(right):

http://gwt-code-reviews.appspot.com/1251801/diff/44001/45014#newcode37
user/src/com/google/gwt/user/server/rpc/XsrfProtectedServiceServlet.java:37:
* XSRF token validation is performed by generating MD5 hash of the
session
Actually, why MD5 and not future proof things and use SHA-1 or SHA-2?
I'm not c
ryptographer enough to know if it really matters (and my guess is
collision resi
stance is not important in this application), but better err on the safe
side?

[sorry I meant to make this comment in the last round, but somehow it
got dropped, guess I didn't hit save :/

http://gwt-code-reviews.appspot.com/1251801/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] [google-web-toolkit] r9533 committed - Add TCK jars to user .classpath...

2011-01-13 Thread codesite-noreply

Revision: 9533
Author: ncha...@google.com
Date: Thu Jan 13 05:39:51 2011
Log: Add TCK jars to user .classpath

Review by: knor...@google.com
http://code.google.com/p/google-web-toolkit/source/detail?r=9533

Modified:
 /trunk/eclipse/user/.classpath

===
--- /trunk/eclipse/user/.classpath  Tue Nov  2 13:33:36 2010
+++ /trunk/eclipse/user/.classpath  Thu Jan 13 05:39:51 2011
@@ -46,5 +46,17 @@
 	path="GWT_TOOLS/lib/guava/guava-r06/guava-r06-rebased.jar"/>
 	path="GWT_TOOLS/lib/streamhtmlparser/streamhtmlparser-jsilver-r10/streamhtmlparser-jsilver-r10-1.5-rebased.jar"/>


+	path="GWT_TOOLS/lib/javax/activation/activation-1.1.jar"/>
+	path="GWT_TOOLS/lib/javax/xml/bind/jaxb-api-2.1.jar"/>
+	path="GWT_TOOLS/lib/hibernate/validator/tck/jsr303-tck-1.0.3.GA-sources.jar"/>
+	path="GWT_TOOLS/lib/hibernate/validator/tck/jsr303-tck-1.0.3.GA.jar"  
sourcepath="/GWT_TOOLS/lib/hibernate/validator/tck/jsr303-tck-1.0.3.GA-sources.jar"/>
+	path="GWT_TOOLS/lib/jboss/test-audit/jboss-test-audit-api-1.0.0-sources.jar"/>
+	path="GWT_TOOLS/lib/jboss/test-audit/jboss-test-audit-api-1.0.0.jar"/>
+	path="GWT_TOOLS/lib/jboss/test-harness/jboss-test-harness-1.0.0-sources.jar"/>
+	path="GWT_TOOLS/lib/jboss/test-harness/jboss-test-harness-1.0.0.jar"  
sourcepath="/GWT_TOOLS/lib/jboss/test-harness/jboss-test-harness-1.0.0-sources.jar"/>
+	path="GWT_TOOLS/lib/jboss/test-harness/jboss-test-harness-api-1.0.0-sources.jar"/>
+	path="GWT_TOOLS/lib/jboss/test-harness/jboss-test-harness-api-1.0.0.jar"  
sourcepath="/GWT_TOOLS/lib/jboss/test-harness/jboss-test-harness-api-1.0.0-sources.jar"/>
+	path="GWT_TOOLS/lib/testng/testng-5.14.1-sources.jar"/>
+	sourcepath="/GWT_TOOLS/lib/testng/testng-5.14.1-sources.jar"/>


 

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] [google-web-toolkit] r9531 committed - Removing client-side validation from GWT 2.2 as it is not yet in a wor...

2011-01-13 Thread codesite-noreply

Revision: 9531
Author: rchan...@google.com
Date: Thu Jan 13 04:56:44 2011
Log: Removing client-side validation from GWT 2.2 as it is not yet in a  
working state.


http://code.google.com/p/google-web-toolkit/source/detail?r=9531

Deleted:
 /releases/2.2/samples/validation
 /releases/2.2/samples/validationtck
 /releases/2.2/user/src/com/google/gwt/validation
 /releases/2.2/user/src/javax
 /releases/2.2/user/src/org
 /releases/2.2/user/test/com/google/gwt/validation
Modified:
 /releases/2.2/samples/build.xml

===
--- /releases/2.2/samples/build.xml Mon Nov 15 10:52:58 2010
+++ /releases/2.2/samples/build.xml Thu Jan 13 04:56:44 2011
@@ -38,14 +38,6 @@
 
   

-  
-
-  
-
-  
-
-  
-
   
 
 
@@ -55,7 +47,6 @@
 
 
 
-
 
   

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] [google-web-toolkit] r9532 committed - Tone down the experimental api warning....

2011-01-13 Thread codesite-noreply

Revision: 9532
Author: gwt.mirror...@gmail.com
Date: Thu Jan 13 05:38:38 2011
Log: Tone down the experimental api warning.

Review at http://gwt-code-reviews.appspot.com/1285801

http://code.google.com/p/google-web-toolkit/source/detail?r=9532

Modified:
 /trunk/user/src/com/google/gwt/canvas/client/Canvas.java
 /trunk/user/src/com/google/gwt/canvas/dom/client/CanvasGradient.java
 /trunk/user/src/com/google/gwt/canvas/dom/client/CanvasPattern.java
 /trunk/user/src/com/google/gwt/canvas/dom/client/CanvasPixelArray.java
 /trunk/user/src/com/google/gwt/canvas/dom/client/Context.java
 /trunk/user/src/com/google/gwt/canvas/dom/client/Context2d.java
 /trunk/user/src/com/google/gwt/canvas/dom/client/CssColor.java
 /trunk/user/src/com/google/gwt/canvas/dom/client/FillStrokeStyle.java
 /trunk/user/src/com/google/gwt/canvas/dom/client/ImageData.java
 /trunk/user/src/com/google/gwt/canvas/dom/client/TextMetrics.java
 /trunk/user/src/com/google/gwt/dom/client/CanvasElement.java
 /trunk/user/src/com/google/gwt/user/client/IsSupported.java

===
--- /trunk/user/src/com/google/gwt/canvas/client/Canvas.java	Thu Dec  2  
06:15:06 2010
+++ /trunk/user/src/com/google/gwt/canvas/client/Canvas.java	Thu Jan 13  
05:38:38 2011

@@ -26,8 +26,8 @@
  * A widget representing a  element.
  *
  * 
- * Experimental API: This class is still under  
rapid

- * development, and is very likely to be deleted. Use it at your own risk.
+ * Experimental API: This API is still under  
development

+ * and is subject to change.
  * 
  * 
  *
===
--- /trunk/user/src/com/google/gwt/canvas/dom/client/CanvasGradient.java	 
Tue Dec  7 11:12:47 2010
+++ /trunk/user/src/com/google/gwt/canvas/dom/client/CanvasGradient.java	 
Thu Jan 13 05:38:38 2011

@@ -19,8 +19,8 @@
  * Gradient object used with {@link Context2d}.
  *
  * 
- * Experimental API: This class is still under  
rapid

- * development, and is very likely to be deleted. Use it at your own risk.
+ * Experimental API: This API is still under  
development

+ * and is subject to change.
  * 
  * 
  *
===
--- /trunk/user/src/com/google/gwt/canvas/dom/client/CanvasPattern.java	Thu  
Dec  2 06:15:06 2010
+++ /trunk/user/src/com/google/gwt/canvas/dom/client/CanvasPattern.java	Thu  
Jan 13 05:38:38 2011

@@ -19,8 +19,8 @@
  * Pattern object used with {@link Context2d}.
  *
  * 
- * Experimental API: This class is still under  
rapid

- * development, and is very likely to be deleted. Use it at your own risk.
+ * Experimental API: This API is still under  
development

+ * and is subject to change.
  * 
  * 
  *
===
--- /trunk/user/src/com/google/gwt/canvas/dom/client/CanvasPixelArray.java	 
Thu Dec  2 06:15:06 2010
+++ /trunk/user/src/com/google/gwt/canvas/dom/client/CanvasPixelArray.java	 
Thu Jan 13 05:38:38 2011

@@ -24,10 +24,12 @@
  * bytes being signed in Java.
  *
  * 
- * Experimental API: This class is still under  
rapid

- * development, and is very likely to be deleted. Use it at your own risk.
+ * Experimental API: This API is still under  
development

+ * and is subject to change.
  * 
+ * 
  *
+ * 
  * @see http://www.w3.org/TR/2dcontext/#canvaspixelarray";>HTML  
Canvas 2D CanvasPixelArray

  * 
  */
===
--- /trunk/user/src/com/google/gwt/canvas/dom/client/Context.java	Thu Dec   
2 06:15:06 2010
+++ /trunk/user/src/com/google/gwt/canvas/dom/client/Context.java	Thu Jan  
13 05:38:38 2011

@@ -20,8 +20,8 @@
  * {@link com.google.gwt.dom.client.CanvasElement}.
  *
  * 
- * Experimental API: This class is still under  
rapid

- * development, and is very likely to be deleted. Use it at your own risk.
+ * Experimental API: This API is still under  
development

+ * and is subject to change.
  * 
  * 
  */
===
--- /trunk/user/src/com/google/gwt/canvas/dom/client/Context2d.java	Thu Dec  
16 11:33:51 2010
+++ /trunk/user/src/com/google/gwt/canvas/dom/client/Context2d.java	Thu Jan  
13 05:38:38 2011

@@ -24,8 +24,8 @@
  * Rendering interface used to draw on a {@link CanvasElement}.
  *
  * 
- * Experimental API: This class is still under  
rapid

- * development, and is very likely to be deleted. Use it at your own risk.
+ * Experimental API: This API is still under  
development

+ * and is subject to change.
  * 
  * 
  *
===
--- /trunk/user/src/com/google/gwt/canvas/dom/client/CssColor.java	Thu Dec  
16 11:33:51 2010
+++ /trunk/user/src/com/google/gwt/canvas/dom/client/CssColor.java	Thu Jan  
13 05:38:38 2011

@@ -19,8 +19,8 @@
  * CSS Color object.
  *
  * 
- * Experimental API: This class is still under  
rapid

- * development, and is very likely to be deleted. Use it at your own risk.
+ * Experimental API: This API is still under  
development

+ * and is subject to change.
  * 
  * 
  *
===
---

[gwt-contrib] [google-web-toolkit] r9530 committed - Cherry picking r9527 into releases/2.2 branch for http://code.google....

2011-01-13 Thread codesite-noreply

Revision: 9530
Author: gwt.mirror...@gmail.com
Date: Thu Jan 13 09:45:23 2011
Log: Cherry picking r9527 into releases/2.2  branch for  
http://code.google.com/p/google-web-toolkit/issues/detail?id=5869


http://code.google.com/p/google-web-toolkit/source/detail?r=9530

Modified:
  
/releases/2.2/user/src/com/google/gwt/user/cellview/client/ColumnSortEvent.java
  
/releases/2.2/user/test/com/google/gwt/user/cellview/client/ColumnSortEventTest.java


===
---  
/releases/2.2/user/src/com/google/gwt/user/cellview/client/ColumnSortEvent.java	 
Thu Jan  6 05:35:04 2011
+++  
/releases/2.2/user/src/com/google/gwt/user/cellview/client/ColumnSortEvent.java	 
Thu Jan 13 09:45:23 2011

@@ -103,7 +103,7 @@
   }

   // Sort using the comparator.
-  if (event.isSortAcsending()) {
+  if (event.isSortAscending()) {
 Collections.sort(list, comparator);
   } else {
 Collections.sort(list, new Comparator() {
@@ -199,7 +199,7 @@
*
* @return true if ascending, false if descending or not sorted
*/
-  public boolean isSortAcsending() {
+  public boolean isSortAscending() {
 return (sortList == null || sortList.size() == 0) ? false
 : sortList.get(0).isAscending();
   }
===
---  
/releases/2.2/user/test/com/google/gwt/user/cellview/client/ColumnSortEventTest.java	 
Thu Jan  6 05:35:04 2011
+++  
/releases/2.2/user/test/com/google/gwt/user/cellview/client/ColumnSortEventTest.java	 
Thu Jan 13 09:45:23 2011

@@ -44,7 +44,7 @@
 ColumnSortEvent event = new ColumnSortEvent(sortList);
 assertEquals(sortList, event.getColumnSortList());
 assertEquals(col1, event.getColumn());
-assertFalse(event.isSortAcsending());
+assertFalse(event.isSortAscending());
   }

   public void testAsyncHandler() {

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Tone down the experimental api warning. (issue1285801)

2011-01-13 Thread jlabanca

LGTM

http://gwt-code-reviews.appspot.com/1285801/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] [google-web-toolkit] r9529 committed - Spelling

2011-01-13 Thread codesite-noreply

Revision: 9529
Author: ncha...@google.com
Date: Thu Jan 13 08:23:15 2011
Log: Spelling
http://code.google.com/p/google-web-toolkit/source/detail?r=9529

Modified:
 /wiki/BeanValidation.wiki

===
--- /wiki/BeanValidation.wiki   Mon Jan  3 14:43:03 2011
+++ /wiki/BeanValidation.wiki   Thu Jan 13 08:23:15 2011
@@ -78,7 +78,7 @@
   * Object Graph Validation can recurse forever

 == Other Issues ==
-  * Calling the correct !ConstraintValidotor based on bean type (class)  
per the spec.
+  * Calling the correct !ConstraintValidator based on bean type (class)  
per the spec.

   * Many errors that would happen at runtime instead fail to compile.
   * !ReportAsSingleViolation has no effect.
   * Message Localization  
[http://code.google.com/p/google-web-toolkit/issues/detail?id=5763 Issue  
5763]


--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Tone down the experimental api warning. (issue1285801)

2011-01-13 Thread pdr

Reviewers: rjrjr,

Description:
Tone down the experimental api warning.


Please review this at http://gwt-code-reviews.appspot.com/1285801/show

Affected files:
  M user/src/com/google/gwt/canvas/client/Canvas.java
  M user/src/com/google/gwt/canvas/dom/client/CanvasGradient.java
  M user/src/com/google/gwt/canvas/dom/client/CanvasPattern.java
  M user/src/com/google/gwt/canvas/dom/client/CanvasPixelArray.java
  M user/src/com/google/gwt/canvas/dom/client/Context.java
  M user/src/com/google/gwt/canvas/dom/client/Context2d.java
  M user/src/com/google/gwt/canvas/dom/client/CssColor.java
  M user/src/com/google/gwt/canvas/dom/client/FillStrokeStyle.java
  M user/src/com/google/gwt/canvas/dom/client/ImageData.java
  M user/src/com/google/gwt/canvas/dom/client/TextMetrics.java
  M user/src/com/google/gwt/dom/client/CanvasElement.java
  M user/src/com/google/gwt/user/client/IsSupported.java


--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: ColumnSortEvent#isAscending was misspelled. Fixes (issue1283801)

2011-01-13 Thread jlabanca

LGTM

http://gwt-code-reviews.appspot.com/1283801/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] GWT 2.2 ?

2011-01-13 Thread Thomas Broyer
Hi G-men,

You seem to be working actively on preparing a 2.2 release very soon, and 
I'm hoping that some issues (some of which I've provided a patch for) will 
be resolved in this release. One issue that's a blocker for us is related to 
ListEditor when used with 
RequestFactoryEditorDriver.
 
It's a blocker because I don't think there can ever be a workaround for it, 
but I believe this patch 
fixes it.

Other issues I'm hoping will be fixed in the 2.2 release include:

   - Issue 
5872: 
RequestFactory: 
   onFailure or onViolations on one invocation prevents following Receivers 
   from being called (I'll be working on a patch this afternoon (UTC+1))
   - Issue 
5795: 
   Editor framework does not descend into an OptionalFieldEditor's sub-editor 
   (blocker, I have provided 
patch
   )
   - Fix issue 
4781: 
   allow HTML="" in UiBinder for setHTML() (I don't think we actually need it, 
   but the patch  is lying 
   around for months now, and it's really a simple fix)
   

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors

[gwt-contrib] Issue 5752: ListEditor.setValue fails once the underlying AutoBean has been frozen (issue1284801)

2011-01-13 Thread t . broyer

Reviewers: bobv, rjrjr,

Description:
Copied from the issue tracker:

The real issue seems to be in how
com.google.gwt.requestfactory.client.impl.RequestFactoryEditorDelegate
determines whether it shouldFlush() or not: it only deals with "am I in
'read-only' mode or not" (if request==null, edited proxies cannot have
been made mutable, so we're in the "display" case). It looks to me like
it should also check whether 'request' is "locked" (which can only be
done if 'request' is an AbstractRequestContext –it should be, unless
someone gave his own implementation, in which case he would have to
handle the case himself–, so we can use
AbstractRequestContext#isLocked()).

FYI: the tests run fine in isolation in Eclipse, but if I run the whole
EditorTest class, sometimes testReuse() makes test() fail; I suspect
this has to do with the implementation of SimpleFoo service methods; and
trying to run the tests through Ant fails when compiling the tests (not
finding the jsr303 TCK classes).
However, because the tests run fine in isolation, I believe this fixes
the issue with ListEditor. One possible "fix" for my issues launching
the tests would be to merge test() and testReuse()...

Please review this at http://gwt-code-reviews.appspot.com/1284801/show

Affected files:
   
user/src/com/google/gwt/requestfactory/client/impl/RequestFactoryEditorDelegate.java

  user/test/com/google/gwt/requestfactory/client/ui/EditorTest.java


Index:  
user/src/com/google/gwt/requestfactory/client/impl/RequestFactoryEditorDelegate.java

===
---  
user/src/com/google/gwt/requestfactory/client/impl/RequestFactoryEditorDelegate.java	 
(revision 9528)
+++  
user/src/com/google/gwt/requestfactory/client/impl/RequestFactoryEditorDelegate.java	 
(working copy)

@@ -28,6 +28,7 @@
 import com.google.gwt.requestfactory.shared.RequestContext;
 import com.google.gwt.requestfactory.shared.RequestFactory;
 import com.google.gwt.requestfactory.shared.WriteOperation;
+import com.google.gwt.requestfactory.shared.impl.AbstractRequestContext;

 import java.util.ArrayList;
 import java.util.List;
@@ -136,6 +137,9 @@

   @Override
   protected boolean shouldFlush() {
+if (request instanceof AbstractRequestContext) {
+  return !((AbstractRequestContext) request).isLocked();
+}
 return request != null;
   }
 }
Index: user/test/com/google/gwt/requestfactory/client/ui/EditorTest.java
===
--- user/test/com/google/gwt/requestfactory/client/ui/EditorTest.java	 
(revision 9528)
+++ user/test/com/google/gwt/requestfactory/client/ui/EditorTest.java	 
(working copy)

@@ -263,4 +263,39 @@
   }
 });
   }
+
+  /**
+   * Tests the editor can be re-used while the initial context is locked  
and

+   * therefore its attached proxies are frozen..
+   *
+   * @see http://code.google.com/p/google-web-toolkit/issues/detail?id=5752
+   */
+  public void testReuse() {
+delayTestFinish(TEST_TIMEOUT);
+final SimpleFooEditor editor = new SimpleFooEditor();
+
+final SimpleFooDriver driver = GWT.create(SimpleFooDriver.class);
+driver.initialize(req, editor);
+
+ 
req.simpleFooRequest().findSimpleFooById(1L).with(driver.getPaths()).fire(

+new Receiver() {
+  @Override
+  public void onSuccess(SimpleFooProxy response) {
+
+SimpleFooRequest context = req.simpleFooRequest();
+driver.edit(response, context);
+context.persistAndReturnSelf().using(response).with(
+driver.getPaths()).to(new Receiver() {
+  @Override
+  public void onSuccess(SimpleFooProxy response) {
+// just testing that it doesn't throw (see issue 5752)
+driver.edit(response, req.simpleFooRequest());
+finishTestAndReset();
+  }
+});
+// The fire() will freeze the proxies and lock the context
+driver.flush().fire();
+  }
+});
+  }
 }


--
http://groups.google.com/group/Google-Web-Toolkit-Contributors