Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8007528

Jre 1.6.0_34 or higher can not read proxy.pac normally

XMLWordPrintable

         
        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
         
        }

              dbuck David Buck
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: