SHORT SUMMARY: RemoveCommentReader will not parse "/** ... **/" comments correctly. INDICATORS: proxy.pac files that contain "/** ... **/" comments correctly may not function as expected. COUNTER INDICATORS: none TRIGGERS: none KNOWN WORKAROUND: Replace all instances of "**/" with "*/" in proxy.pac file PRESENT SINCE: 6u34 HOW TO VERIFY: Testcase: === CommentParseFail.java // compile and run with <JRE_HOME>/lib/deploy.jar in CLASSPATH import java.io.BufferedReader; import java.io.FileReader; import com.sun.deploy.net.proxy.RemoveCommentReader; public class CommentParseFail { public static void main(String[] args) throws Exception { BufferedReader in = new BufferedReader(new RemoveCommentReader(new FileReader("CommentParseFail.java"))); String line, lastLine = null; while ((line = in.readLine()) != null) { lastLine = line; } if (lastLine.indexOf(Dummy.token) == -1) { throw new Exception("Dummy class missing after comments removed"); } in.close(); } } /** this is a comment **/ class Dummy { static String token = "TokenString"; } === NOTES FOR SE: None REGRESSION: Yes }
|