Fix a race condition in the GWTTestCase runner.

If a web browser was quick to report its first results to the GWTTestCase
servlet, RunStyle.launchModule() was sometimes called twice. This caused
an unexpected page reload, so there were more clients than expected
but the first one was gone, resulting in the test timing out.

The race is most likely when the first test block is small, for example
when the first test class is in a different module than the rest and
has few test methods.

The race was in notDone() where the code would check the number of clients
and then later check if it got enough test results back. If the first check
failed but the second one succeeded, notDone() could return false without
setting firstLaunch to false.

Fixed by replacing the firstLaunch variable with two variables that have
clearer purposes.

Change-Id: Id75762a714fd489f624734308017ac53cddf886f
Review-Link: https://gwt-review.googlesource.com/#/c/2150/

Review by: mdempsky@google.com

git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@11547 8db76d5a-ed1c-0410-87a9-c151d255dfc7
Add missing delayTestFinish() to GwtServletBaseTest.

Change-Id: I9e47d29e9ea6903f45fc8e786f143c09b0a1e683
Review-Link: https://gwt-review.googlesource.com/#/c/2180/

Review by: skybrian@google.com

git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@11548 8db76d5a-ed1c-0410-87a9-c151d255dfc7
Adds stack traces to printStackTrace in java/lang/Throwable emulation.

Fixes issue 2469

Change-Id: I2a5a05d8574c1e6d86b004de4ab7d90ad96d587a
Review-Link: https://gwt-review.googlesource.com/#/c/2130/

Review by: skybrian@google.com

git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@11549 8db76d5a-ed1c-0410-87a9-c151d255dfc7
Make ConsoleLogHandler use console.error/warn/info.

Deprecate FirebugLogHandler, but keep it there for backwards compatibility.

Fixes issue 6916 and issue 8040

Change-Id: I65c26c010d2e5e2fa96a4fbbffd1229c7a09f5fe
Review-Link: https://gwt-review.googlesource.com/#/c/2060/

Review by: skybrian@google.com

git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@11550 8db76d5a-ed1c-0410-87a9-c151d255dfc7
Allow LogConfiguration to be used with GWTMockUtilities.disarm()

Also fixes a small error in HtmlLogFormatter.

Fixes issue 8050 and issue 5447

Change-Id: Ia52e4ce2dcd2f4c750534d53bcb17cd842b87e69
Review-Link: https://gwt-review.googlesource.com/#/c/2111/

Review by: mdempsky@google.com

git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@11551 8db76d5a-ed1c-0410-87a9-c151d255dfc7
Introduces a common SerializableThrowable as public API.

Change-Id: I98ae52858d87b6ac4a0c844464b25540be454942
Review-Link: https://gwt-review.googlesource.com/#/c/2160/

Review by: skybrian@google.com

git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@11552 8db76d5a-ed1c-0410-87a9-c151d255dfc7
Refactors StackTraceDeobfuscator to gwt.core.impl with some clean-ups.

This is going to be used from gwt.junit.

Change-Id: I97eafa571fcc597a8a03b8dae4bfc17ea0462e85
Review-Link: https://gwt-review.googlesource.com/#/c/2131/


git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@11553 8db76d5a-ed1c-0410-87a9-c151d255dfc7
set target and source level to 1.6 for JSP compilation

Using JSP pages with syntax features > java 1.4
running in dev mode (embedded jetty) caused compilation
errors. This patch sets the default level to java 1.6
while still allowing the user to set a custom compiler
level.

fixes issue 3557

Change-Id: Idd3d751c5eb2008a7a1e51536580d56a0fb3603f
Review-Link: https://gwt-review.googlesource.com/#/c/2201/

Review by: skybrian@google.com

git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@11554 8db76d5a-ed1c-0410-87a9-c151d255dfc7
Add a /policies/ directory to Super Dev Mode code server.

GWT-RPC serialization policy files are now published as URL's like this:

/policies/{strong name}.gwt.rpc

For human consumption, a bare-bones index page at "/policies/" lists all GWT-RPC policies currently available from the code server, with a link to the source of
each service interface and the policy file.

(The plan is to add an option to RemoteServiceServlet to allow policy files
to be loaded from a code server using HTTP.)

Change-Id: I06b8ab651ee1a5fde20b534eb60294bcfc72d10e
Review-Link: https://gwt-review.googlesource.com/#/c/2200/

Review by: mdempsky@google.com

git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@11555 8db76d5a-ed1c-0410-87a9-c151d255dfc7
Reject GWT-RPC requests where the serialization policy name contains special characters.

This is to avoid potential security issues in subtypes of SerializationPolicyProvider that use the strongName to do I/O without checking it.

(This is unlikely to be a real problem because serialization policy providers typically append ".gwt.rpc" to create the filename and the names of serialization policy files are hard to guess.)

Review by: mdempsky@google.com

git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@11557 8db76d5a-ed1c-0410-87a9-c151d255dfc7
Fix NullPointerException when the filename of a JDT Problem is null.

Review by: mdempsky@google.com

git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@11558 8db76d5a-ed1c-0410-87a9-c151d255dfc7
Skip strong name validation when no serialization policy provider is set.

Review by: mdempsky@google.com

git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@11559 8db76d5a-ed1c-0410-87a9-c151d255dfc7
Check the result of mkdir when creating a directory.

Review by: mdempsky@google.com

git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@11560 8db76d5a-ed1c-0410-87a9-c151d255dfc7
Avoid running JsInliner on the full JavaScript tree.

JsInliner is the single most time consuming java script optimization pass,
amounting for 85% of time spent optimizing JavaScript. Additionally
JavaScript inlining might also lead to code size bloat.

Probably most of the productive inlining is already done in the Java
inlining pass, so we only try to inline methods and call sites that were
not considered by the Java inliner because they where JSNI and
functions that only have one call site.

Change-Id: Iba3cedf4f001f216509f2c3d003ed7fe25725708
Review-Link: https://gwt-review.googlesource.com/#/c/1930/

Review by: skybrian@google.com

git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@11561 8db76d5a-ed1c-0410-87a9-c151d255dfc7
Adds two new optional configuration properties to allow the JsNamer passes
to exclude a set of predefined symbols or symbol suffixes in the output.
This is to enable better integration with closure compiler which has
optimization passes that trigger off of certain magic symbols.

Change-Id: I0eb0535cd2c7693aae162e246332dc7bca87d241
Review-Link: https://gwt-review.googlesource.com/#/c/2230/


git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@11562 8db76d5a-ed1c-0410-87a9-c151d255dfc7
Javadoc fixes.

Review by: skybrian@google.com

git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@11563 8db76d5a-ed1c-0410-87a9-c151d255dfc7
On line 68 in the CalendarUtil.java file, the calculation for
determining the resulting year after adding a number of months to a date
has an error.

Because the Gregorian calendar (used by the java.util.Date library)
represents the year 1900 as 0, a problem occurs when the resulting date
should be earlier than Jan 1900. The issue lies in integer division:

int resultYear = resultMonthCount / 12;

For example, if resultMonthCount is -1, then the resulting year will be
0 (1900) instead of -1 (1899) like it should be. I am submitting a patch
file which changes this line to the following:

int resultYear = (int) Math.floor(resultMonthCount / 12.0);

This will ensure that the number will result in the correct quotient for
both positive, zero and negative values of resultMonthCount.

Review-Link: http://gwt-code-reviews.appspot.com/1898803/

Review by: skybrian@google.com

git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@11564 8db76d5a-ed1c-0410-87a9-c151d255dfc7
Changes StackTraceDeobfuscator to abstract and provide various factory methods.

This change will remove the need for extending StackTraceObfusctor most of the
time as in almost all scenarios it is extended to get the symbol map from jar
through the class loader (which makes sense).
Also a factory is provided to get the symbol map from the file system. For all
other cases, developers can construct the deobfuscator with a URL path or extend
the class to override openInputStream method.

Change-Id: I562e052caef8da7f3434319cf11b8984bc347fe5
Review-Link: https://gwt-review.googlesource.com/#/c/2270/

Review by: skybrian@google.com

git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@11565 8db76d5a-ed1c-0410-87a9-c151d255dfc7
Attempt to continue after the JDT compiler aborts.

This could occasionally work, but in my test case it just causes a
RuntimeException later due to violating an internal JDT invariant. Still, it
lets us print the names of a few more source files of death before dying.

Change-Id: Ia94d998c6b4e56d880570c726aa09f004a4f552c
Review-Link: https://gwt-review.googlesource.com/#/c/2271/

Review by: mdempsky@google.com

git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@11566 8db76d5a-ed1c-0410-87a9-c151d255dfc7
Add README