Spot-fix for a potentially buggier root cause (I'll blame GWT's hosted mode bytecode caching for no particular reason). In my Constants-derived interface, going from having some metadata on a method to no metadata triggers a NPE. This is a stopgap to avoid the NPE, which would otherwise occur during normal work. Review by: scottb (postmortem) git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@1114 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/dev/core/src/com/google/gwt/dev/jdt/TypeOracleBuilder.java b/dev/core/src/com/google/gwt/dev/jdt/TypeOracleBuilder.java index 0ed9896..a01f886 100644 --- a/dev/core/src/com/google/gwt/dev/jdt/TypeOracleBuilder.java +++ b/dev/core/src/com/google/gwt/dev/jdt/TypeOracleBuilder.java
@@ -1,5 +1,5 @@ /* - * Copyright 2006 Google Inc. + * Copyright 2007 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 @@ -100,6 +100,9 @@ int start = javadoc.sourceStart; int end = javadoc.sourceEnd; char[] comment = CharOperation.subarray(unitSource, start, end + 1); + if (comment == null) { + comment = new char[0]; + } BufferedReader reader = new BufferedReader(new CharArrayReader(comment)); String activeTag = null; final List tagValues = new ArrayList();