Skip to content

Commit e88410f

Browse files
committed
Update, migrate, improve log help links
Fix #10042 See also gwtproject/gwt-site#386
1 parent 7e0a993 commit e88410f

File tree

6 files changed

+7
-25
lines changed

6 files changed

+7
-25
lines changed

build_tools/doctool/src/com/google/doctool/ResourceIncluder.java

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -40,23 +40,7 @@ private static String getFileFromClassPath(String partialPath)
4040
if (in == null) {
4141
throw new FileNotFoundException(partialPath);
4242
}
43-
ByteArrayOutputStream os = new ByteArrayOutputStream();
44-
byte[] buffer = new byte[1024];
45-
int bytesRead;
46-
while (true) {
47-
bytesRead = in.read(buffer);
48-
if (bytesRead >= 0) {
49-
// Copy the bytes out.
50-
os.write(buffer, 0, bytesRead);
51-
} else {
52-
// End of input stream.
53-
break;
54-
}
55-
}
56-
57-
return os.toString(StandardCharsets.UTF_8);
58-
} finally {
59-
close(in);
43+
return new String(in.readAllBytes(), StandardCharsets.UTF_8);
6044
}
6145
}
6246

dev/core/src/com/google/gwt/dev/DevMode.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
import com.google.gwt.dev.ui.RestartServerCallback;
3232
import com.google.gwt.dev.ui.RestartServerEvent;
3333
import com.google.gwt.dev.util.GwtprojectOrgHelpInfo;
34-
import com.google.gwt.dev.util.Util;
3534
import com.google.gwt.dev.util.arg.ArgHandlerDeployDir;
3635
import com.google.gwt.dev.util.arg.ArgHandlerExtraDir;
3736
import com.google.gwt.dev.util.arg.ArgHandlerFilterJsInteropExports;
@@ -732,7 +731,7 @@ private void validateServletTags(TreeLogger logger, ServletValidator servletVali
732731

733732
TreeLogger servletLogger =
734733
logger.branch(TreeLogger.DEBUG, "Validating <servlet> tags for module '" + module.getName()
735-
+ "'", null, new GwtprojectOrgHelpInfo("/doc/latest/gwt-dev-help/servletMappings.html"));
734+
+ "'", null, new GwtprojectOrgHelpInfo("servletMappings.html"));
736735
for (String servletPath : servletPaths) {
737736
String servletClass = module.findServletForPath(servletPath);
738737
assert (servletClass != null);

dev/core/src/com/google/gwt/dev/javac/JSORestrictionsChecker.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,14 @@
4343
* Check a compilation unit for violations of
4444
* {@link com.google.gwt.core.client.JavaScriptObject JavaScriptObject} (JSO)
4545
* restrictions. The restrictions are summarized in
46-
* @see <a href="https://www.gwtproject.org/doc/latest/DevGuideCodingBasicsJSNI.html">jsoRestrictions.html</a>.
46+
* @see <a href="https://www.gwtproject.org/doc/latest/DevGuideCodingBasicsJSNI.html#important">Important Notes</a>.
4747
* Any violations found are attached as errors on the
4848
* CompilationUnitDeclaration.
4949
*
5050
* @see <a
5151
* href="http://code.google.com/p/google-web-toolkit/wiki/OverlayTypes">Overlay
5252
* types design doc</a>
53-
* @see <a href="https://www.gwtproject.org/doc/latest/DevGuideCodingBasicsJSNI.html">jsoRestrictions.html</a>
53+
* @see <a href="https://www.gwtproject.org/doc/latest/DevGuideCodingBasicsJSNI.html#important">Important Notes</a>
5454
*/
5555
public class JSORestrictionsChecker {
5656

dev/core/src/com/google/gwt/dev/javac/JsniReferenceResolver.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -825,7 +825,7 @@ private boolean isUnsafeLongAnnotation(Annotation annot, ClassScope scope) {
825825

826826
private void longAccessError(ASTNode node, String message) {
827827
GWTProblem.recordError(node, cud, message, new GwtprojectOrgHelpInfo(
828-
"/doc/latest/gwt-dev-help/longJsniRestriction.html"));
828+
"longJsniRestriction.html"));
829829
}
830830

831831
private static void resolveJsniRef(JsniRef jsniRef, FieldBinding fieldBinding) {

dev/core/src/com/google/gwt/dev/shell/jetty/JettyLauncher.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
import com.google.gwt.core.ext.TreeLogger;
2121
import com.google.gwt.core.ext.UnableToCompleteException;
2222
import com.google.gwt.dev.util.GwtprojectOrgHelpInfo;
23-
import com.google.gwt.dev.util.Util;
2423
import com.google.gwt.thirdparty.guava.common.collect.Iterators;
2524
import com.google.gwt.thirdparty.guava.common.collect.Lists;
2625

@@ -453,7 +452,7 @@ private boolean addContainingClassPathEntry(String warnMessage,
453452
}
454453
branch = branch.branch(logLevel, "Adding classpath entry '"
455454
+ classPathURL + "' to the web app classpath for this session",
456-
null, new GwtprojectOrgHelpInfo("/doc/latest/gwt-dev-help/webAppClassPath.html"));
455+
null, new GwtprojectOrgHelpInfo("webAppClassPath.html"));
457456
try {
458457
addClassPath(classPathURL);
459458
return true;

dev/core/src/com/google/gwt/dev/util/GwtprojectOrgHelpInfo.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public class GwtprojectOrgHelpInfo extends TreeLogger.HelpInfo {
2828

2929
public GwtprojectOrgHelpInfo(String relativeUrl) {
3030
try {
31-
url = new URL("https://gwtproject.org" + relativeUrl);
31+
url = new URL("https://gwtproject.org/doc/latest/gwt-dev-help/" + relativeUrl);
3232
} catch (MalformedURLException ignored) {
3333
// ignore, url will be null
3434
}

0 commit comments

Comments
 (0)