Reduce warnings in Eclipse: o Use <?> instead of raw types o Add some @SuppressWarnings annotations o Document or remove unused method parameters Review at http://gwt-code-reviews.appspot.com/219803 Review by: jat@google.com git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@7749 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/dev/core/src/com/google/gwt/core/ext/Linker.java b/dev/core/src/com/google/gwt/core/ext/Linker.java index 55e49d5..5c95b6e 100644 --- a/dev/core/src/com/google/gwt/core/ext/Linker.java +++ b/dev/core/src/com/google/gwt/core/ext/Linker.java
@@ -102,6 +102,7 @@ * @param logger the TreeLogger to record to * @param context provides access to the Linker's environment * @param artifacts an unmodifiable view of the artifacts to link + * @param onePermutation true for a one-permutation call * @return the artifacts that should be propagated through the linker chain * @throws UnableToCompleteException if compilation violates assumptions made * by the Linker or for errors encountered by the Linker @@ -129,7 +130,6 @@ * @throws UnableToCompleteException if compilation violates assumptions made * by the Linker or for errors encountered by the Linker */ - @SuppressWarnings("unused") public ArtifactSet relink(TreeLogger logger, LinkerContext context, ArtifactSet newArtifacts) throws UnableToCompleteException { return newArtifacts;
diff --git a/dev/core/src/com/google/gwt/core/ext/soyc/impl/MemberFactory.java b/dev/core/src/com/google/gwt/core/ext/soyc/impl/MemberFactory.java index 4e8dbf3..d3e1620 100644 --- a/dev/core/src/com/google/gwt/core/ext/soyc/impl/MemberFactory.java +++ b/dev/core/src/com/google/gwt/core/ext/soyc/impl/MemberFactory.java
@@ -51,7 +51,7 @@ } @SuppressWarnings("unchecked") - private <K, V extends Member> Map<K, V> getElementMap(K key, Class<V> clazz) { + private <K, V extends Member> Map<K, V> getElementMap(Class<V> clazz) { Map<K, V> elementMap = (Map<K, V>) map.get(clazz); if (elementMap == null) { elementMap = new IdentityHashMap<K, V>(); @@ -74,7 +74,7 @@ */ private <K, V extends Member> V getOrCreate(K key, Class<V> implClazz, Class<? super K> constructorParam) { - Map<K, V> elementMap = getElementMap(key, implClazz); + Map<K, V> elementMap = getElementMap(implClazz); V toReturn = elementMap.get(key); if (toReturn == null) {
diff --git a/dev/core/src/com/google/gwt/core/ext/typeinfo/DelegateMembers.java b/dev/core/src/com/google/gwt/core/ext/typeinfo/DelegateMembers.java index dec80e4..5cf5e74 100644 --- a/dev/core/src/com/google/gwt/core/ext/typeinfo/DelegateMembers.java +++ b/dev/core/src/com/google/gwt/core/ext/typeinfo/DelegateMembers.java
@@ -70,7 +70,6 @@ return methods.length == 0 ? methods : methods.clone(); } - @SuppressWarnings("unchecked") @Override public JMethod[] getOverloads(String name) { initMethods();
diff --git a/dev/core/src/com/google/gwt/core/linker/SoycReportLinker.java b/dev/core/src/com/google/gwt/core/linker/SoycReportLinker.java index 7b85d26..af0816c 100644 --- a/dev/core/src/com/google/gwt/core/linker/SoycReportLinker.java +++ b/dev/core/src/com/google/gwt/core/linker/SoycReportLinker.java
@@ -115,9 +115,9 @@ } if (onePermutation) { - return emitPermutationDescriptions(logger, context, artifacts); + return emitPermutationDescriptions(artifacts); } else { - return buildTopLevelFiles(logger, context, artifacts); + return buildTopLevelFiles(logger, artifacts); } } @@ -133,7 +133,7 @@ } private ArtifactSet buildTopLevelFiles(TreeLogger logger, - LinkerContext context, ArtifactSet artifacts) { + ArtifactSet artifacts) { artifacts = new ArtifactSet(artifacts); ArtifactsOutputDirectory out = new ArtifactsOutputDirectory(); @@ -149,8 +149,7 @@ return artifacts; } - private ArtifactSet emitPermutationDescriptions(TreeLogger logger, - LinkerContext context, ArtifactSet artifacts) { + private ArtifactSet emitPermutationDescriptions(ArtifactSet artifacts) { artifacts = new ArtifactSet(artifacts); for (CompilationResult res : artifacts.find(CompilationResult.class)) {
diff --git a/dev/core/src/com/google/gwt/dev/js/EvalFunctionsAtTopScope.java b/dev/core/src/com/google/gwt/dev/js/EvalFunctionsAtTopScope.java index 7352d05..39e76d7 100644 --- a/dev/core/src/com/google/gwt/dev/js/EvalFunctionsAtTopScope.java +++ b/dev/core/src/com/google/gwt/dev/js/EvalFunctionsAtTopScope.java
@@ -40,7 +40,6 @@ */ public class EvalFunctionsAtTopScope extends JsModVisitor { - public static void exec(JsProgram jsProgram, JavaToJavaScriptMap map) { EvalFunctionsAtTopScope fev = new EvalFunctionsAtTopScope(map); fev.accept(jsProgram); @@ -56,8 +55,6 @@ private final Stack<JsBlock> scopeStack = new Stack<JsBlock>(); - - public EvalFunctionsAtTopScope(JavaToJavaScriptMap java2jsMap) { this.java2jsMap = java2jsMap; } @@ -116,7 +113,7 @@ @Override public boolean visit(JsFunction x, JsContext<JsExpression> ctx) { - JsFunction func = JsStaticEval.isFunctionDecl(currentStatement); + JsStaticEval.isFunctionDecl(currentStatement); /* * We do this during visit() to preserve first-to-last evaluation order. @@ -145,7 +142,6 @@ return true; } - @Override public boolean visit(JsProgram x, JsContext<JsProgram> ctx) { scopeStack.push(x.getGlobalBlock());
diff --git a/dev/core/src/com/google/gwt/dev/js/ast/JsVisitor.java b/dev/core/src/com/google/gwt/dev/js/ast/JsVisitor.java index ade9877..3292713 100644 --- a/dev/core/src/com/google/gwt/dev/js/ast/JsVisitor.java +++ b/dev/core/src/com/google/gwt/dev/js/ast/JsVisitor.java
@@ -59,6 +59,7 @@ } }; + @SuppressWarnings("unchecked") protected static final JsContext UNMODIFIABLE_CONTEXT = new JsContext() { public boolean canInsert() { @@ -90,7 +91,7 @@ } }; - @SuppressWarnings("cast") + @SuppressWarnings("unchecked") public final <T extends JsVisitable> T accept(T node) { // The following cast to T is needed for javac 1.5.0_13 // as shipped on OS X @@ -417,11 +418,13 @@ return true; } + @SuppressWarnings({"unchecked", "cast"}) protected <T extends JsVisitable<T>> T doAccept(T node) { doTraverse(node, (JsContext<T>) UNMODIFIABLE_CONTEXT); return node; } + @SuppressWarnings({"unchecked", "cast"}) protected <T extends JsVisitable<T>> void doAcceptList(List<T> collection) { for (Iterator<T> it = collection.iterator(); it.hasNext();) { doTraverse(it.next(), (JsContext<T>) UNMODIFIABLE_CONTEXT); @@ -433,6 +436,7 @@ return expr; } + @SuppressWarnings({"unchecked", "cast"}) protected <T extends JsVisitable<T>> void doAcceptWithInsertRemove( List<T> collection) { for (Iterator<T> it = collection.iterator(); it.hasNext();) {
diff --git a/dev/core/src/com/google/gwt/dev/shell/CompilingClassLoader.java b/dev/core/src/com/google/gwt/dev/shell/CompilingClassLoader.java index 69c47cf..a789ac0 100644 --- a/dev/core/src/com/google/gwt/dev/shell/CompilingClassLoader.java +++ b/dev/core/src/com/google/gwt/dev/shell/CompilingClassLoader.java
@@ -1077,6 +1077,7 @@ return lookupClassName; } + @SuppressWarnings("deprecation") private byte[] findClassBytes(String className) { if (JavaScriptHost.class.getName().equals(className)) { // No need to rewrite.
diff --git a/dev/core/src/com/google/gwt/dev/shell/ServerMethods.java b/dev/core/src/com/google/gwt/dev/shell/ServerMethods.java index d342874..9d71953 100644 --- a/dev/core/src/com/google/gwt/dev/shell/ServerMethods.java +++ b/dev/core/src/com/google/gwt/dev/shell/ServerMethods.java
@@ -32,11 +32,10 @@ * Tell the server that the client no longer has any references to the * specified Java object. * - * @param ids ID of object to free + * @param ids IDs of objects to free * @return false if an error occurred */ - static boolean freeJava(BrowserChannelClient channel, - SessionHandlerClient handler, int ids[]) { + static boolean freeJava(BrowserChannelClient channel, int ids[]) { if (!channel.isConnected()) { // ignoring freeJava after disconnect. return true;
diff --git a/dev/core/src/com/google/gwt/dev/shell/SyntheticClassMember.java b/dev/core/src/com/google/gwt/dev/shell/SyntheticClassMember.java index a12ae94..24d82af 100644 --- a/dev/core/src/com/google/gwt/dev/shell/SyntheticClassMember.java +++ b/dev/core/src/com/google/gwt/dev/shell/SyntheticClassMember.java
@@ -28,7 +28,7 @@ this.clazz = clazz; } - public Class getDeclaringClass() { + public Class<?> getDeclaringClass() { return clazz; }
diff --git a/dev/core/src/com/google/gwt/dev/util/Empty.java b/dev/core/src/com/google/gwt/dev/util/Empty.java index 8798ee0..969221f 100644 --- a/dev/core/src/com/google/gwt/dev/util/Empty.java +++ b/dev/core/src/com/google/gwt/dev/util/Empty.java
@@ -21,7 +21,7 @@ public class Empty { public static final String[] STRINGS = new String[0]; - public static final Class[] CLASSES = new Class[0]; + public static final Class<?>[] CLASSES = new Class<?>[0]; public static final Object[] OBJECTS = new Object[0]; }
diff --git a/dev/core/src/com/google/gwt/dev/util/TypeInfo.java b/dev/core/src/com/google/gwt/dev/util/TypeInfo.java index 0b9f4a4..a121a24 100644 --- a/dev/core/src/com/google/gwt/dev/util/TypeInfo.java +++ b/dev/core/src/com/google/gwt/dev/util/TypeInfo.java
@@ -51,7 +51,7 @@ // types below public static final int TYPE_WRAP_STRING = 0x000001; - public static int classifyType(Class type) { + public static int classifyType(Class<?> type) { int ret = isPrimitiveType(type); if (ret != 0) { return ret; @@ -69,8 +69,8 @@ return TYPE_USER; } - public static Method getInterfaceMethod(Class intf, String methodName, - Class[] paramTypes, boolean includeInherited) { + public static Method getInterfaceMethod(Class<?> intf, String methodName, + Class<?>[] paramTypes, boolean includeInherited) { try { return intf.getDeclaredMethod(methodName, paramTypes); } catch (NoSuchMethodException e) { @@ -111,7 +111,7 @@ return after.toString(); } - public static String getSourceRepresentation(Class type) { + public static String getSourceRepresentation(Class<?> type) { // Primitives // if (type.equals(Integer.TYPE)) { @@ -144,7 +144,7 @@ return type.getName().replace('$', '.'); } - public static int isPrimitiveType(Class type) { + public static int isPrimitiveType(Class<?> type) { if (type.equals(Integer.TYPE)) { return TYPE_PRIM_INT; } else if (type.equals(Long.TYPE)) { @@ -168,7 +168,7 @@ } } - public static int isPrimitiveWrapperType(Class type) { + public static int isPrimitiveWrapperType(Class<?> type) { if (type.equals(String.class)) { return TYPE_WRAP_STRING; } else if (type.equals(Integer.class)) {
diff --git a/dev/core/src/com/google/gwt/dev/util/msg/Message.java b/dev/core/src/com/google/gwt/dev/util/msg/Message.java index 23e0cd8..29675f8 100644 --- a/dev/core/src/com/google/gwt/dev/util/msg/Message.java +++ b/dev/core/src/com/google/gwt/dev/util/msg/Message.java
@@ -88,7 +88,7 @@ * @param c a Class * @return a suitable Formatter */ - protected final Formatter getFormatter(Class c) { + protected final Formatter getFormatter(Class<?> c) { return FMT_CLASS; }
diff --git a/dev/core/src/com/google/gwt/dev/util/msg/Message2ClassClass.java b/dev/core/src/com/google/gwt/dev/util/msg/Message2ClassClass.java index 7b917d8..706bf9c 100644 --- a/dev/core/src/com/google/gwt/dev/util/msg/Message2ClassClass.java +++ b/dev/core/src/com/google/gwt/dev/util/msg/Message2ClassClass.java
@@ -27,12 +27,12 @@ super(type, fmt); } - public TreeLogger branch(TreeLogger logger, Class c1, Class c2, + public TreeLogger branch(TreeLogger logger, Class<?> c1, Class<?> c2, Throwable caught) { return branch2(logger, c1, c2, getFormatter(c1), getFormatter(c2), caught); } - public void log(TreeLogger logger, Class c1, Class c2, Throwable caught) { + public void log(TreeLogger logger, Class<?> c1, Class<?> c2, Throwable caught) { log2(logger, c1, c2, getFormatter(c1), getFormatter(c2), caught); } }
diff --git a/dev/core/src/com/google/gwt/dev/util/msg/Message3IntStringClass.java b/dev/core/src/com/google/gwt/dev/util/msg/Message3IntStringClass.java index 7ae640e..289db47 100644 --- a/dev/core/src/com/google/gwt/dev/util/msg/Message3IntStringClass.java +++ b/dev/core/src/com/google/gwt/dev/util/msg/Message3IntStringClass.java
@@ -27,14 +27,14 @@ super(type, fmt); } - public TreeLogger branch(TreeLogger logger, int x, String s, Class c, + public TreeLogger branch(TreeLogger logger, int x, String s, Class<?> c, Throwable caught) { Integer xi = Integer.valueOf(x); return branch3(logger, xi, s, c, getFormatter(xi), getFormatter(s), getFormatter(c), caught); } - public void log(TreeLogger logger, int x, String s, Class c, Throwable caught) { + public void log(TreeLogger logger, int x, String s, Class<?> c, Throwable caught) { Integer xi = Integer.valueOf(x); log3(logger, xi, s, c, getFormatter(xi), getFormatter(s), getFormatter(c), caught);
diff --git a/dev/core/src/com/google/gwt/dev/util/xml/DefaultSchema.java b/dev/core/src/com/google/gwt/dev/util/xml/DefaultSchema.java index ed3c887..145d451 100644 --- a/dev/core/src/com/google/gwt/dev/util/xml/DefaultSchema.java +++ b/dev/core/src/com/google/gwt/dev/util/xml/DefaultSchema.java
@@ -44,7 +44,7 @@ } public void onBadAttributeValue(int line, String elem, String attr, - String value, Class paramType) throws UnableToCompleteException { + String value, Class<?> paramType) throws UnableToCompleteException { Messages.XML_ATTRIBUTE_CONVERSION_ERROR.log(logger, line, attr, paramType, null); throw new UnableToCompleteException();
diff --git a/dev/core/src/com/google/gwt/dev/util/xml/HandlerMethod.java b/dev/core/src/com/google/gwt/dev/util/xml/HandlerMethod.java index 4e475c0..40c8082 100644 --- a/dev/core/src/com/google/gwt/dev/util/xml/HandlerMethod.java +++ b/dev/core/src/com/google/gwt/dev/util/xml/HandlerMethod.java
@@ -33,7 +33,7 @@ private static final Schema sArbitraryChildHandler = new Schema() { public void onBadAttributeValue(int lineNumber, String elemName, - String attrName, String attrValue, Class paramType) { + String attrName, String attrValue, Class<?> paramType) { // Ignore } @@ -76,6 +76,7 @@ * handler but the containing class does not have the proper parameter * metafields. */ + @SuppressWarnings("unchecked") public static HandlerMethod tryCreate(Method method) { String methodName = method.getName(); String normalizedTagName = null;
diff --git a/dev/core/src/com/google/gwt/dev/util/xml/HandlerParam.java b/dev/core/src/com/google/gwt/dev/util/xml/HandlerParam.java index f17b341..6d4f539 100644 --- a/dev/core/src/com/google/gwt/dev/util/xml/HandlerParam.java +++ b/dev/core/src/com/google/gwt/dev/util/xml/HandlerParam.java
@@ -113,7 +113,7 @@ return normalizedAttrName; } - public Class getParamType() { + public Class<?> getParamType() { return paramType; } }
diff --git a/dev/core/src/com/google/gwt/dev/util/xml/Schema.java b/dev/core/src/com/google/gwt/dev/util/xml/Schema.java index f245a4c..aff56e9 100644 --- a/dev/core/src/com/google/gwt/dev/util/xml/Schema.java +++ b/dev/core/src/com/google/gwt/dev/util/xml/Schema.java
@@ -37,7 +37,7 @@ * Finds the most recent converter in the schema chain that can convert the * specified type. */ - public AttributeConverter getAttributeConverter(Class type) { + public AttributeConverter getAttributeConverter(Class<?> type) { AttributeConverter converter = convertersByType.get(type); if (converter != null) { return converter; @@ -54,7 +54,7 @@ } public void onBadAttributeValue(int line, String elem, String attr, - String value, Class paramType) throws UnableToCompleteException { + String value, Class<?> paramType) throws UnableToCompleteException { if (parent != null) { parent.onBadAttributeValue(line, elem, attr, value, paramType); } @@ -95,7 +95,7 @@ } } - public void registerAttributeConverter(Class type, + public void registerAttributeConverter(Class<?> type, AttributeConverter converter) { convertersByType.put(type, converter); }
diff --git a/dev/core/src/com/google/gwt/soyc/MakeTopLevelHtmlForPerm.java b/dev/core/src/com/google/gwt/soyc/MakeTopLevelHtmlForPerm.java index 46115b5..58ae8cf 100644 --- a/dev/core/src/com/google/gwt/soyc/MakeTopLevelHtmlForPerm.java +++ b/dev/core/src/com/google/gwt/soyc/MakeTopLevelHtmlForPerm.java
@@ -317,8 +317,10 @@ outFile.println("<td>" + className + "</a></td>"); outFile.println("<td>"); outFile.println("<div class=\"soyc-bar-graph goog-inline-block\">"); + // CHECKSTYLE_OFF outFile.println("<div style=\"width:" + perc + "%;\" class=\"soyc-bar-graph-fill goog-inline-block\"></div>"); + // CHECKSTYLE_ON outFile.println("</div>"); outFile.println(size + " (" + formatNumber(perc) + "%)"); outFile.println("</td>"); @@ -421,8 +423,10 @@ } outFile.println("<td>"); outFile.println("<div class=\"soyc-bar-graph goog-inline-block\">"); + // CHECKSTYLE_OFF outFile.println("<div style=\"width:" + perc + "%;\" class=\"soyc-bar-graph-fill goog-inline-block\"></div>"); + // CHECKSTYLE_ON outFile.println("</div>"); outFile.println(size + " (" + formatNumber(perc) + "%)"); outFile.println("</td>"); @@ -527,8 +531,10 @@ + splitPointDescription + "</a></td>"); outFile.println("<td>"); outFile.println("<div class=\"soyc-bar-graph goog-inline-block\">"); + // CHECKSTYLE_OFF outFile.println("<div style=\"width:" + ratio + "%;\" class=\"soyc-bar-graph-fill goog-inline-block\"></div>"); + // CHECKSTYLE_ON outFile.println("</div>"); outFile.println((int) size + " Bytes (" + formatNumber(ratio) + "%)"); outFile.println("</td>"); @@ -693,8 +699,10 @@ + "\" target=\"_top\">" + codeType + "</a></td>"); outFile.println("<td>"); outFile.println("<div class=\"soyc-bar-graph goog-inline-block\">"); + // CHECKSTYLE_OFF outFile.println("<div style=\"width:" + perc + "%;\" class=\"soyc-bar-graph-fill goog-inline-block\"></div>"); + // CHECKSTYLE_ON outFile.println("</div>"); outFile.println(size + " (" + formatNumber(perc) + "%)"); outFile.println("</td>"); @@ -858,8 +866,10 @@ + "\" target=\"_top\">" + packageName + "</a></td>"); outFile.println("<td>"); outFile.println("<div class=\"soyc-bar-graph goog-inline-block\">"); + // CHECKSTYLE_OFF outFile.println("<div style=\"width:" + perc + "%;\" class=\"soyc-bar-graph-fill goog-inline-block\"></div>"); + // CHECKSTYLE_ON outFile.println("</div>"); outFile.println(size + " (" + formatNumber(perc) + "%)"); outFile.println("</td>");
diff --git a/user/src/com/google/gwt/core/client/GWT.java b/user/src/com/google/gwt/core/client/GWT.java index 215e4c4..71a70ec 100644 --- a/user/src/com/google/gwt/core/client/GWT.java +++ b/user/src/com/google/gwt/core/client/GWT.java
@@ -82,7 +82,6 @@ * instantiated * @return the new instance, which must be typecast to the requested class. */ - @SuppressWarnings("unused") public static <T> T create(Class<?> classLiteral) { if (sGWTBridge == null) { /*
diff --git a/user/src/com/google/gwt/core/client/impl/StringBuilderImpl.java b/user/src/com/google/gwt/core/client/impl/StringBuilderImpl.java index 068da48..d2f39fa 100644 --- a/user/src/com/google/gwt/core/client/impl/StringBuilderImpl.java +++ b/user/src/com/google/gwt/core/client/impl/StringBuilderImpl.java
@@ -45,7 +45,6 @@ array.explicitLength = length; }-*/; - @SuppressWarnings("unused") private String[] array = new String[0]; public ImplArray() {
diff --git a/user/src/com/google/gwt/core/client/prefetch/RunAsyncCode.java b/user/src/com/google/gwt/core/client/prefetch/RunAsyncCode.java index 7290d96..7d9c4be 100644 --- a/user/src/com/google/gwt/core/client/prefetch/RunAsyncCode.java +++ b/user/src/com/google/gwt/core/client/prefetch/RunAsyncCode.java
@@ -27,6 +27,8 @@ /** * Create an instance for the split point named with the given class. The * provided class must be a class literal. + * + * @param splitPoint a Class literal used to name the split point */ public static RunAsyncCode runAsyncCode(Class<?> splitPoint) { // This is a place holder for development mode.
diff --git a/user/src/com/google/gwt/dom/client/StyleInjector.java b/user/src/com/google/gwt/dom/client/StyleInjector.java index 673d6ac..74db618 100644 --- a/user/src/com/google/gwt/dom/client/StyleInjector.java +++ b/user/src/com/google/gwt/dom/client/StyleInjector.java
@@ -106,7 +106,6 @@ return $doc.styleSheets[index].cssText.length; }-*/; - public native void appendContents(StyleElement style, String contents) /*-{ style.cssText += contents; }-*/;
diff --git a/user/src/com/google/gwt/event/shared/DefaultHandlerRegistration.java b/user/src/com/google/gwt/event/shared/DefaultHandlerRegistration.java index 7e79319..91fb67c 100644 --- a/user/src/com/google/gwt/event/shared/DefaultHandlerRegistration.java +++ b/user/src/com/google/gwt/event/shared/DefaultHandlerRegistration.java
@@ -45,7 +45,7 @@ /** * Removes the given handler from its manager. */ - @SuppressWarnings({"unchecked", "deprecation"}) + @SuppressWarnings("unchecked") // This is safe because when the elements were passed in they conformed to // Type<H>,H. public void removeHandler() {
diff --git a/user/src/com/google/gwt/i18n/rebind/LocaleUtils.java b/user/src/com/google/gwt/i18n/rebind/LocaleUtils.java index 8ea340b..bb80c73 100644 --- a/user/src/com/google/gwt/i18n/rebind/LocaleUtils.java +++ b/user/src/com/google/gwt/i18n/rebind/LocaleUtils.java
@@ -130,7 +130,7 @@ } LocaleUtils localeUtils = cache.get(key); if (localeUtils == null) { - localeUtils = createInstance(logger, localeProp, runtimeLocaleProp); + localeUtils = createInstance(localeProp, runtimeLocaleProp); cache.put(key, localeUtils); } return localeUtils; @@ -156,8 +156,8 @@ return factory; } - private static LocaleUtils createInstance(TreeLogger logger, - SelectionProperty localeProp, ConfigurationProperty prop) { + private static LocaleUtils createInstance(SelectionProperty localeProp, + ConfigurationProperty prop) { GwtLocale compileLocale = null; Set<GwtLocale> allLocales = new HashSet<GwtLocale>(); Set<GwtLocale> allCompileLocales = new HashSet<GwtLocale>();
diff --git a/user/src/com/google/gwt/junit/RunStyleHtmlUnit.java b/user/src/com/google/gwt/junit/RunStyleHtmlUnit.java index f5519e3..3edb41a 100644 --- a/user/src/com/google/gwt/junit/RunStyleHtmlUnit.java +++ b/user/src/com/google/gwt/junit/RunStyleHtmlUnit.java
@@ -173,8 +173,8 @@ private static Map<String, BrowserVersion> createBrowserMap() { Map<String, BrowserVersion> browserMap = new HashMap<String, BrowserVersion>(); for (BrowserVersion browser : new BrowserVersion[] { - BrowserVersion.FIREFOX_2, BrowserVersion.FIREFOX_3, - BrowserVersion.INTERNET_EXPLORER_6, BrowserVersion.INTERNET_EXPLORER_7}) { + BrowserVersion.FIREFOX_3, BrowserVersion.INTERNET_EXPLORER_6, + BrowserVersion.INTERNET_EXPLORER_7}) { browserMap.put(browser.getNickname(), browser); } return Collections.unmodifiableMap(browserMap);
diff --git a/user/src/com/google/gwt/resources/css/GenerateCssAst.java b/user/src/com/google/gwt/resources/css/GenerateCssAst.java index bec0fb7..5e6e955 100644 --- a/user/src/com/google/gwt/resources/css/GenerateCssAst.java +++ b/user/src/com/google/gwt/resources/css/GenerateCssAst.java
@@ -89,6 +89,7 @@ /** * Generates a CssStylesheet from the contents of a URL. */ +@SuppressWarnings("unused") public class GenerateCssAst { /**
diff --git a/user/src/com/google/gwt/resources/rebind/context/AbstractClientBundleGenerator.java b/user/src/com/google/gwt/resources/rebind/context/AbstractClientBundleGenerator.java index 573216e..7a933f5 100644 --- a/user/src/com/google/gwt/resources/rebind/context/AbstractClientBundleGenerator.java +++ b/user/src/com/google/gwt/resources/rebind/context/AbstractClientBundleGenerator.java
@@ -278,6 +278,11 @@ * Provides a hook for subtypes to add additional fields or requirements to * the bundle. * + * @param logger a TreeLogger + * @param context the GeneratorContext + * @param fields ClentBundle fields + * @param requirements ClientBundleRequirements + * * @throws UnableToCompleteException if an error occurs. */ protected void doAddFieldsAndRequirements(TreeLogger logger, @@ -289,6 +294,11 @@ * This method is called after the ClientBundleRequirements have been * evaluated and a new ClientBundle implementation is being created. * + * @param logger a TreeLogger + * @param generatorContext the GeneratoContext + * @param fields ClientBundle fields + * @param generatedSimpleSourceName a String + * * @throws UnableToCompleteException if an error occurs. */ protected void doCreateBundleForPermutation(TreeLogger logger, @@ -299,6 +309,8 @@ /** * Provides a hook for finalizing generated resources. * + * @param logger a TreeLogger + * * @throws UnableToCompleteException if an error occurs. */ protected void doFinish(TreeLogger logger) throws UnableToCompleteException {
diff --git a/user/src/com/google/gwt/resources/rebind/context/InlineResourceContext.java b/user/src/com/google/gwt/resources/rebind/context/InlineResourceContext.java index 02856ca..dfb2e29 100644 --- a/user/src/com/google/gwt/resources/rebind/context/InlineResourceContext.java +++ b/user/src/com/google/gwt/resources/rebind/context/InlineResourceContext.java
@@ -42,8 +42,10 @@ String base64Contents = toBase64(data); + // CHECKSTYLE_OFF String encoded = "\"data:" + mimeType + ";base64," + base64Contents + "\""; + // CHECKSTYLE_ON /* * We know that the encoded format will be one byte per character, since
diff --git a/user/src/com/google/gwt/resources/rebind/context/MhtmlClientBundleGenerator.java b/user/src/com/google/gwt/resources/rebind/context/MhtmlClientBundleGenerator.java index 1ea1f5a..25587c4 100644 --- a/user/src/com/google/gwt/resources/rebind/context/MhtmlClientBundleGenerator.java +++ b/user/src/com/google/gwt/resources/rebind/context/MhtmlClientBundleGenerator.java
@@ -62,7 +62,9 @@ "GWT.getModuleBaseURL().startsWith(\"https\")", true, true); resourceContext.setIsHttpsIdent(isHttpsIdent); + // CHECKSTYLE_OFF // "mhtml:" + GWT.getModuleBaseURL() + "partialPath!cid:" + // CHECKSTYLE_ON bundleBaseIdent = fields.define(stringType, "bundleBase", null, true, true); resourceContext.setBundleBaseIdent(bundleBaseIdent); }
diff --git a/user/src/com/google/gwt/resources/rebind/context/MhtmlResourceContext.java b/user/src/com/google/gwt/resources/rebind/context/MhtmlResourceContext.java index 2bb175c..95cd917 100644 --- a/user/src/com/google/gwt/resources/rebind/context/MhtmlResourceContext.java +++ b/user/src/com/google/gwt/resources/rebind/context/MhtmlResourceContext.java
@@ -103,7 +103,9 @@ pw.println("--" + BOUNDARY); pw.println("Content-Id:<" + location + ">"); + // CHECKSTYLE_OFF pw.println("Content-Type:" + mimeType); + // CHECKSTYLE_ON pw.println("Content-Transfer-Encoding:base64"); pw.println(); pw.println(base64);
diff --git a/user/src/com/google/gwt/resources/rg/ImageResourceGenerator.java b/user/src/com/google/gwt/resources/rg/ImageResourceGenerator.java index 312f1ce..e207676 100644 --- a/user/src/com/google/gwt/resources/rg/ImageResourceGenerator.java +++ b/user/src/com/google/gwt/resources/rg/ImageResourceGenerator.java
@@ -157,7 +157,7 @@ public void createFields(TreeLogger logger, ResourceContext context, ClientBundleFields fields) throws UnableToCompleteException { if (!prepared) { - finalizeArrangements(logger, context); + finalizeArrangements(logger); } for (ImageRect rect : shared.imageRectsByName.values()) { @@ -262,7 +262,7 @@ } } - private void finalizeArrangements(TreeLogger logger, ResourceContext context) + private void finalizeArrangements(TreeLogger logger) throws UnableToCompleteException { for (Map.Entry<RepeatStyle, ImageBundleBuilder> entry : shared.buildersByRepeatStyle.entrySet()) { RepeatStyle repeatStyle = entry.getKey();
diff --git a/user/src/com/google/gwt/uibinder/rebind/XMLElementProviderImpl.java b/user/src/com/google/gwt/uibinder/rebind/XMLElementProviderImpl.java index 2a459ae..63bade2 100644 --- a/user/src/com/google/gwt/uibinder/rebind/XMLElementProviderImpl.java +++ b/user/src/com/google/gwt/uibinder/rebind/XMLElementProviderImpl.java
@@ -24,15 +24,14 @@ /** * The default implemenatation of {@link XMLElementProvider}. */ +@SuppressWarnings("deprecation") public class XMLElementProviderImpl implements XMLElementProvider { private final AttributeParsers attributeParsers; - @SuppressWarnings("deprecation") // bundleParsers for legacy templates private final BundleAttributeParsers bundleParsers; private final MortalLogger logger; private final TypeOracle oracle; - @SuppressWarnings("deprecation") // bundleParsers for legacy templates public XMLElementProviderImpl(AttributeParsers attributeParsers, BundleAttributeParsers bundleParsers, TypeOracle oracle, @@ -47,4 +46,4 @@ return new XMLElement(e, attributeParsers, bundleParsers, oracle, logger, this); } -} \ No newline at end of file +}
diff --git a/user/src/com/google/gwt/user/client/DOM.java b/user/src/com/google/gwt/user/client/DOM.java index a1ff3c4..3bacabb 100644 --- a/user/src/com/google/gwt/user/client/DOM.java +++ b/user/src/com/google/gwt/user/client/DOM.java
@@ -98,6 +98,7 @@ * * @return the newly-created element */ + @SuppressWarnings("deprecation") public static Element createButton() { return Document.get().createButtonElement().cast(); } @@ -456,7 +457,7 @@ * @see DOM#eventGetTarget(Event) */ public static Element eventGetCurrentTarget(Event evt) { - return evt.getCurrentTarget().cast(); + return evt.getCurrentEventTarget().cast(); } /** @@ -566,7 +567,7 @@ * @return the target element */ public static Element eventGetTarget(Event evt) { - return (Element) evt.getTarget(); + return evt.getEventTarget().cast(); } /**
diff --git a/user/src/com/google/gwt/user/client/impl/DOMImplStandard.java b/user/src/com/google/gwt/user/client/impl/DOMImplStandard.java index 61a6ea9..b01707a 100644 --- a/user/src/com/google/gwt/user/client/impl/DOMImplStandard.java +++ b/user/src/com/google/gwt/user/client/impl/DOMImplStandard.java
@@ -44,11 +44,11 @@ @Override public Element eventGetFromElement(Event evt) { if (evt.getType().equals("mouseover")) { - return evt.getRelatedTarget().cast(); + return evt.getRelatedEventTarget().cast(); } if (evt.getType().equals("mouseout")) { - return evt.getTarget().cast(); + return evt.getEventTarget().cast(); } return null; @@ -57,11 +57,11 @@ @Override public Element eventGetToElement(Event evt) { if (evt.getType().equals("mouseover")) { - return evt.getTarget().cast(); + return evt.getEventTarget().cast(); } if (evt.getType().equals("mouseout")) { - return evt.getRelatedTarget().cast(); + return evt.getRelatedEventTarget().cast(); } return null;
diff --git a/user/src/com/google/gwt/user/client/rpc/core/java/math/BigDecimal_CustomFieldSerializer.java b/user/src/com/google/gwt/user/client/rpc/core/java/math/BigDecimal_CustomFieldSerializer.java index 8bd01ee..40cb643 100644 --- a/user/src/com/google/gwt/user/client/rpc/core/java/math/BigDecimal_CustomFieldSerializer.java +++ b/user/src/com/google/gwt/user/client/rpc/core/java/math/BigDecimal_CustomFieldSerializer.java
@@ -29,6 +29,10 @@ */ public class BigDecimal_CustomFieldSerializer { + /** + * @param streamReader a SerializationStreamReader instance + * @param instance the instance to be deserialized + */ public static void deserialize(SerializationStreamReader streamReader, BigDecimal instance) { }
diff --git a/user/src/com/google/gwt/user/client/rpc/core/java/math/BigInteger_CustomFieldSerializer.java b/user/src/com/google/gwt/user/client/rpc/core/java/math/BigInteger_CustomFieldSerializer.java index 57ed4ba..a69d51f 100644 --- a/user/src/com/google/gwt/user/client/rpc/core/java/math/BigInteger_CustomFieldSerializer.java +++ b/user/src/com/google/gwt/user/client/rpc/core/java/math/BigInteger_CustomFieldSerializer.java
@@ -29,6 +29,10 @@ */ public class BigInteger_CustomFieldSerializer { + /** + * @param streamReader a SerializationStreamReader instance + * @param instance the instance to be deserialized + */ public static void deserialize(SerializationStreamReader streamReader, BigInteger instance) { }
diff --git a/user/src/com/google/gwt/user/client/rpc/core/java/math/MathContext_CustomFieldSerializer.java b/user/src/com/google/gwt/user/client/rpc/core/java/math/MathContext_CustomFieldSerializer.java index a9b3277..3221a4c 100644 --- a/user/src/com/google/gwt/user/client/rpc/core/java/math/MathContext_CustomFieldSerializer.java +++ b/user/src/com/google/gwt/user/client/rpc/core/java/math/MathContext_CustomFieldSerializer.java
@@ -30,6 +30,10 @@ */ public class MathContext_CustomFieldSerializer { + /** + * @param streamReader a SerializationStreamReader instance + * @param instance the instance to be deserialized + */ public static void deserialize(SerializationStreamReader streamReader, MathContext instance) { }
diff --git a/user/src/com/google/gwt/user/client/rpc/core/java/util/ArrayList_CustomFieldSerializer.java b/user/src/com/google/gwt/user/client/rpc/core/java/util/ArrayList_CustomFieldSerializer.java index 999b788..abfe265 100644 --- a/user/src/com/google/gwt/user/client/rpc/core/java/util/ArrayList_CustomFieldSerializer.java +++ b/user/src/com/google/gwt/user/client/rpc/core/java/util/ArrayList_CustomFieldSerializer.java
@@ -26,11 +26,13 @@ */ public final class ArrayList_CustomFieldSerializer { + @SuppressWarnings("unchecked") public static void deserialize(SerializationStreamReader streamReader, ArrayList instance) throws SerializationException { Collection_CustomFieldSerializerBase.deserialize(streamReader, instance); } + @SuppressWarnings("unchecked") public static void serialize(SerializationStreamWriter streamWriter, ArrayList instance) throws SerializationException { Collection_CustomFieldSerializerBase.serialize(streamWriter, instance);
diff --git a/user/src/com/google/gwt/user/client/rpc/core/java/util/Arrays.java b/user/src/com/google/gwt/user/client/rpc/core/java/util/Arrays.java index 12f1d17..a5145ea 100644 --- a/user/src/com/google/gwt/user/client/rpc/core/java/util/Arrays.java +++ b/user/src/com/google/gwt/user/client/rpc/core/java/util/Arrays.java
@@ -40,18 +40,18 @@ */ @SuppressWarnings("unused") public static void deserialize(SerializationStreamReader streamReader, - List instance) throws SerializationException { + List<?> instance) throws SerializationException { // Handled in instantiate. } - public static List instantiate(SerializationStreamReader streamReader) + public static List<?> instantiate(SerializationStreamReader streamReader) throws SerializationException { Object[] array = (Object[]) streamReader.readObject(); return java.util.Arrays.asList(array); } public static void serialize(SerializationStreamWriter streamWriter, - List instance) throws SerializationException { + List<?> instance) throws SerializationException { Object[] array; if (GWT.isScript()) { // Violator pattern. @@ -63,7 +63,7 @@ streamWriter.writeObject(array); } - private static native Object[] getArray0(List instance) /*-{ + private static native Object[] getArray0(List<?> instance) /*-{ return instance.@java.util.Arrays$ArrayList::array; }-*/; }
diff --git a/user/src/com/google/gwt/user/client/rpc/core/java/util/Collection_CustomFieldSerializerBase.java b/user/src/com/google/gwt/user/client/rpc/core/java/util/Collection_CustomFieldSerializerBase.java index da0dbd7..71dfc73 100644 --- a/user/src/com/google/gwt/user/client/rpc/core/java/util/Collection_CustomFieldSerializerBase.java +++ b/user/src/com/google/gwt/user/client/rpc/core/java/util/Collection_CustomFieldSerializerBase.java
@@ -26,6 +26,7 @@ */ public final class Collection_CustomFieldSerializerBase { + @SuppressWarnings("unchecked") public static void deserialize(SerializationStreamReader streamReader, Collection instance) throws SerializationException { int size = streamReader.readInt(); @@ -35,6 +36,7 @@ } } + @SuppressWarnings("unchecked") public static void serialize(SerializationStreamWriter streamWriter, Collection instance) throws SerializationException { int size = instance.size();
diff --git a/user/src/com/google/gwt/user/client/rpc/core/java/util/Date_CustomFieldSerializer.java b/user/src/com/google/gwt/user/client/rpc/core/java/util/Date_CustomFieldSerializer.java index fd4949f..3470b3f 100644 --- a/user/src/com/google/gwt/user/client/rpc/core/java/util/Date_CustomFieldSerializer.java +++ b/user/src/com/google/gwt/user/client/rpc/core/java/util/Date_CustomFieldSerializer.java
@@ -26,7 +26,10 @@ */ public final class Date_CustomFieldSerializer { - @SuppressWarnings("unused") + /** + * @param streamReader a SerializationStreamReader instance + * @param instance the instance to be deserialized + */ public static void deserialize(SerializationStreamReader streamReader, Date instance) { // No fields @@ -41,4 +44,4 @@ Date instance) throws SerializationException { streamWriter.writeLong(instance.getTime()); } -} \ No newline at end of file +}
diff --git a/user/src/com/google/gwt/user/client/rpc/core/java/util/HashMap_CustomFieldSerializer.java b/user/src/com/google/gwt/user/client/rpc/core/java/util/HashMap_CustomFieldSerializer.java index 34cab03..94c51f6 100644 --- a/user/src/com/google/gwt/user/client/rpc/core/java/util/HashMap_CustomFieldSerializer.java +++ b/user/src/com/google/gwt/user/client/rpc/core/java/util/HashMap_CustomFieldSerializer.java
@@ -26,11 +26,13 @@ */ public final class HashMap_CustomFieldSerializer { + @SuppressWarnings("unchecked") public static void deserialize(SerializationStreamReader streamReader, HashMap instance) throws SerializationException { Map_CustomFieldSerializerBase.deserialize(streamReader, instance); } + @SuppressWarnings("unchecked") public static void serialize(SerializationStreamWriter streamWriter, HashMap instance) throws SerializationException { Map_CustomFieldSerializerBase.serialize(streamWriter, instance);
diff --git a/user/src/com/google/gwt/user/client/rpc/core/java/util/HashSet_CustomFieldSerializer.java b/user/src/com/google/gwt/user/client/rpc/core/java/util/HashSet_CustomFieldSerializer.java index 7a99148..15d62d1 100644 --- a/user/src/com/google/gwt/user/client/rpc/core/java/util/HashSet_CustomFieldSerializer.java +++ b/user/src/com/google/gwt/user/client/rpc/core/java/util/HashSet_CustomFieldSerializer.java
@@ -26,11 +26,13 @@ */ public final class HashSet_CustomFieldSerializer { + @SuppressWarnings("unchecked") public static void deserialize(SerializationStreamReader streamReader, HashSet instance) throws SerializationException { Collection_CustomFieldSerializerBase.deserialize(streamReader, instance); } + @SuppressWarnings("unchecked") public static void serialize(SerializationStreamWriter streamWriter, HashSet instance) throws SerializationException { Collection_CustomFieldSerializerBase.serialize(streamWriter, instance);
diff --git a/user/src/com/google/gwt/user/client/rpc/core/java/util/IdentityHashMap_CustomFieldSerializer.java b/user/src/com/google/gwt/user/client/rpc/core/java/util/IdentityHashMap_CustomFieldSerializer.java index 0f70860..59f3342 100644 --- a/user/src/com/google/gwt/user/client/rpc/core/java/util/IdentityHashMap_CustomFieldSerializer.java +++ b/user/src/com/google/gwt/user/client/rpc/core/java/util/IdentityHashMap_CustomFieldSerializer.java
@@ -26,14 +26,15 @@ */ public final class IdentityHashMap_CustomFieldSerializer { + @SuppressWarnings("unchecked") public static void deserialize(SerializationStreamReader streamReader, IdentityHashMap instance) throws SerializationException { Map_CustomFieldSerializerBase.deserialize(streamReader, instance); } + @SuppressWarnings("unchecked") public static void serialize(SerializationStreamWriter streamWriter, IdentityHashMap instance) throws SerializationException { Map_CustomFieldSerializerBase.serialize(streamWriter, instance); } - -} \ No newline at end of file +}
diff --git a/user/src/com/google/gwt/user/client/rpc/core/java/util/LinkedList_CustomFieldSerializer.java b/user/src/com/google/gwt/user/client/rpc/core/java/util/LinkedList_CustomFieldSerializer.java index 47ef316..c1388a3 100644 --- a/user/src/com/google/gwt/user/client/rpc/core/java/util/LinkedList_CustomFieldSerializer.java +++ b/user/src/com/google/gwt/user/client/rpc/core/java/util/LinkedList_CustomFieldSerializer.java
@@ -26,11 +26,13 @@ */ public final class LinkedList_CustomFieldSerializer { + @SuppressWarnings("unchecked") public static void deserialize(SerializationStreamReader streamReader, LinkedList instance) throws SerializationException { Collection_CustomFieldSerializerBase.deserialize(streamReader, instance); } + @SuppressWarnings("unchecked") public static void serialize(SerializationStreamWriter streamWriter, LinkedList instance) throws SerializationException { Collection_CustomFieldSerializerBase.serialize(streamWriter, instance);
diff --git a/user/src/com/google/gwt/user/client/rpc/core/java/util/Map_CustomFieldSerializerBase.java b/user/src/com/google/gwt/user/client/rpc/core/java/util/Map_CustomFieldSerializerBase.java index eea66e2..6f88c33 100644 --- a/user/src/com/google/gwt/user/client/rpc/core/java/util/Map_CustomFieldSerializerBase.java +++ b/user/src/com/google/gwt/user/client/rpc/core/java/util/Map_CustomFieldSerializerBase.java
@@ -28,6 +28,7 @@ */ public final class Map_CustomFieldSerializerBase { + @SuppressWarnings("unchecked") public static void deserialize(SerializationStreamReader streamReader, Map instance) throws SerializationException { int size = streamReader.readInt(); @@ -40,6 +41,7 @@ } } + @SuppressWarnings("unchecked") public static void serialize(SerializationStreamWriter streamWriter, Map instance) throws SerializationException { int size = instance.size();
diff --git a/user/src/com/google/gwt/user/client/rpc/core/java/util/Vector_CustomFieldSerializer.java b/user/src/com/google/gwt/user/client/rpc/core/java/util/Vector_CustomFieldSerializer.java index 61b1eff..9e91bef 100644 --- a/user/src/com/google/gwt/user/client/rpc/core/java/util/Vector_CustomFieldSerializer.java +++ b/user/src/com/google/gwt/user/client/rpc/core/java/util/Vector_CustomFieldSerializer.java
@@ -26,11 +26,13 @@ */ public final class Vector_CustomFieldSerializer { + @SuppressWarnings("unchecked") public static void deserialize(SerializationStreamReader streamReader, Vector instance) throws SerializationException { Collection_CustomFieldSerializerBase.deserialize(streamReader, instance); } + @SuppressWarnings("unchecked") public static void serialize(SerializationStreamWriter streamWriter, Vector instance) throws SerializationException { Collection_CustomFieldSerializerBase.serialize(streamWriter, instance);
diff --git a/user/src/com/google/gwt/user/client/rpc/impl/AbstractSerializationStreamReader.java b/user/src/com/google/gwt/user/client/rpc/impl/AbstractSerializationStreamReader.java index 76ed13b..2ed7015 100644 --- a/user/src/com/google/gwt/user/client/rpc/impl/AbstractSerializationStreamReader.java +++ b/user/src/com/google/gwt/user/client/rpc/impl/AbstractSerializationStreamReader.java
@@ -22,7 +22,7 @@ /** * Base class for the client and server serialization streams. This class - * handles the basic serialization and desirialization formatting for primitive + * handles the basic serialization and deserialization formatting for primitive * types since these are common between the client and the server. */ public abstract class AbstractSerializationStreamReader extends @@ -30,6 +30,11 @@ private ArrayList<Object> seenArray = new ArrayList<Object>(); + /** + * Prepare to read the stream. + * + * @param encoded unused true if the stream is encoded + */ public void prepareToRead(String encoded) throws SerializationException { seenArray.clear();
diff --git a/user/src/com/google/gwt/user/client/ui/HTMLPanel.java b/user/src/com/google/gwt/user/client/ui/HTMLPanel.java index c40b91f..f904987 100644 --- a/user/src/com/google/gwt/user/client/ui/HTMLPanel.java +++ b/user/src/com/google/gwt/user/client/ui/HTMLPanel.java
@@ -123,7 +123,6 @@ * @param widget the widget to be added * @param toReplace the element to be replaced by the widget */ - @SuppressWarnings("deprecation") public final void addAndReplaceElement(Widget widget, Element toReplace) { com.google.gwt.user.client.Element clientElem = toReplace.cast(); addAndReplaceElement(widget, clientElem);
diff --git a/user/src/com/google/gwt/user/client/ui/ImageBundle.java b/user/src/com/google/gwt/user/client/ui/ImageBundle.java index 82b1f46..163be1d 100644 --- a/user/src/com/google/gwt/user/client/ui/ImageBundle.java +++ b/user/src/com/google/gwt/user/client/ui/ImageBundle.java
@@ -183,7 +183,7 @@ * * <p> * This can lead to performance problems when using image bundles, because the - * large composite image will be re-requested unecessarily. In addition, + * large composite image will be re-requested unnecessarily. In addition, * <code>clear.cache.gif</code>, which is a blank image used by the image * bundle implementation, will be re-requested as well. While some browsers will * only re-request these images for each page load, others will re-request them
diff --git a/user/src/com/google/gwt/user/client/ui/RichTextArea.java b/user/src/com/google/gwt/user/client/ui/RichTextArea.java index dd750c1..8e6f7b4 100644 --- a/user/src/com/google/gwt/user/client/ui/RichTextArea.java +++ b/user/src/com/google/gwt/user/client/ui/RichTextArea.java
@@ -42,7 +42,6 @@ * <dd>Applied to the rich text element.</dd> * </dl> */ -@SuppressWarnings("deprecation") public class RichTextArea extends FocusWidget implements HasHTML, HasInitializeHandlers {
diff --git a/user/src/com/google/gwt/user/client/ui/StackLayoutPanel.java b/user/src/com/google/gwt/user/client/ui/StackLayoutPanel.java index 2ed52a0..aa2d1d8 100644 --- a/user/src/com/google/gwt/user/client/ui/StackLayoutPanel.java +++ b/user/src/com/google/gwt/user/client/ui/StackLayoutPanel.java
@@ -94,7 +94,7 @@ * </pre> */ public class StackLayoutPanel extends ResizeComposite implements HasWidgets, - RequiresResize, ProvidesResize, IndexedPanel, + ProvidesResize, IndexedPanel, HasBeforeSelectionHandlers<Integer>, HasSelectionHandlers<Integer> { private class Header extends Composite implements HasClickHandlers { @@ -159,7 +159,7 @@ * stack header. * * @param widget the child widget to be added - * @param text the text to be shown on its header + * @param header the text to be shown on its header * @param asHtml <code>true</code> to treat the specified text as HTML * @param headerSize the size of the header widget */ @@ -172,7 +172,7 @@ * stack header. * * @param widget the child widget to be added - * @param text the text to be shown on its header + * @param header the text to be shown on its header * @param headerSize the size of the header widget */ public void add(final Widget widget, String header, double headerSize) { @@ -416,7 +416,7 @@ /** * Shows the widget at the specified index. * - * @param widget the child widget to be shown. + * @param index the index of the child widget to be shown. */ public void showWidget(int index) { checkIndex(index);
diff --git a/user/src/com/google/gwt/user/client/ui/SuggestBox.java b/user/src/com/google/gwt/user/client/ui/SuggestBox.java index 6668d48..4ac452e 100644 --- a/user/src/com/google/gwt/user/client/ui/SuggestBox.java +++ b/user/src/com/google/gwt/user/client/ui/SuggestBox.java
@@ -189,6 +189,8 @@ /** * This is here for legacy reasons. It is intentionally not visible. * + * @param enable true to enable animation + * * @deprecated implemented in DefaultSuggestionDisplay */ @Deprecated @@ -199,6 +201,8 @@ /** * This is here for legacy reasons. It is intentionally not visible. * + * @param style the style name + * * @deprecated implemented in DefaultSuggestionDisplay */ @Deprecated
diff --git a/user/src/com/google/gwt/user/client/ui/Widget.java b/user/src/com/google/gwt/user/client/ui/Widget.java index 735bbd5..1cce9af 100644 --- a/user/src/com/google/gwt/user/client/ui/Widget.java +++ b/user/src/com/google/gwt/user/client/ui/Widget.java
@@ -91,7 +91,7 @@ case Event.ONMOUSEOUT: // Only fire the mouse out event if it's leaving this // widget. - Element related = event.getRelatedTarget(); + Element related = event.getRelatedEventTarget().cast(); if (related != null && getElement().isOrHasChild(related)) { return; }
diff --git a/user/src/com/google/gwt/user/linker/rpc/RpcLogArtifact.java b/user/src/com/google/gwt/user/linker/rpc/RpcLogArtifact.java index 052a6f53..95e90bf 100644 --- a/user/src/com/google/gwt/user/linker/rpc/RpcLogArtifact.java +++ b/user/src/com/google/gwt/user/linker/rpc/RpcLogArtifact.java
@@ -51,6 +51,9 @@ diskCacheToken = diskCache.writeString(rpcLog); } + /** + * @param logger a TreeLogger + */ public InputStream getContents(TreeLogger logger) { return new ByteArrayInputStream(diskCache.readByteArray(diskCacheToken)); }
diff --git a/user/src/com/google/gwt/user/rebind/rpc/SerializableTypeOracleBuilder.java b/user/src/com/google/gwt/user/rebind/rpc/SerializableTypeOracleBuilder.java index e97a099..8cad14d 100644 --- a/user/src/com/google/gwt/user/rebind/rpc/SerializableTypeOracleBuilder.java +++ b/user/src/com/google/gwt/user/rebind/rpc/SerializableTypeOracleBuilder.java
@@ -322,7 +322,7 @@ return "Default"; } - public boolean isAllowed(@SuppressWarnings("unused") JClassType type) { + public boolean isAllowed(JClassType type) { return true; } }; @@ -803,7 +803,6 @@ * Builds a {@link SerializableTypeOracle} for a given set of root types. * * @param logger - * * @return a {@link SerializableTypeOracle} for the specified set of root * types *
diff --git a/user/src/com/google/gwt/user/rebind/rpc/SerializationUtils.java b/user/src/com/google/gwt/user/rebind/rpc/SerializationUtils.java index e296a4c..a46e5fc 100644 --- a/user/src/com/google/gwt/user/rebind/rpc/SerializationUtils.java +++ b/user/src/com/google/gwt/user/rebind/rpc/SerializationUtils.java
@@ -93,7 +93,6 @@ * field serializer. If the type is not serializable then it can return null. * * @param type the type that is going to be serialized - * * @return the fully qualified name of the field serializer for the given type */ static String getFieldSerializerName(TypeOracle typeOracle, JType type) { @@ -175,8 +174,7 @@ * @param serviceIntf service interface * @return the simple name of the type serializer class */ - static String getTypeSerializerSimpleName(TypeOracle typeOracle, - JClassType serviceIntf) throws IllegalArgumentException { + static String getTypeSerializerSimpleName(JClassType serviceIntf) throws IllegalArgumentException { if (serviceIntf.isInterface() == null) { throw new IllegalArgumentException(serviceIntf.getQualifiedSourceName() + " is not a service interface");
diff --git a/user/src/com/google/gwt/user/rebind/ui/ImageBundleGenerator.java b/user/src/com/google/gwt/user/rebind/ui/ImageBundleGenerator.java index 211cfd4..bf4c0d7 100644 --- a/user/src/com/google/gwt/user/rebind/ui/ImageBundleGenerator.java +++ b/user/src/com/google/gwt/user/rebind/ui/ImageBundleGenerator.java
@@ -52,6 +52,7 @@ */ interface JMethodOracle { + @SuppressWarnings("deprecation") Resource getAnnotation(Class<Resource> clazz); String getName(); @@ -80,6 +81,7 @@ this.delegate = delegate; } + @SuppressWarnings("deprecation") public Resource getAnnotation(Class<Resource> clazz) { return delegate.getAnnotation(clazz); } @@ -392,6 +394,7 @@ * @return the string specified in in the {@link ImageBundle.Resource} * annotation, or <code>null</code> */ + @SuppressWarnings("deprecation") private String tryGetImageNameFromAnnotation(JMethodOracle method) { ImageBundle.Resource imgResAnn = method.getAnnotation(ImageBundle.Resource.class); String imgName = null; @@ -442,5 +445,4 @@ // Success. return imgFileName; } - }