Details

    • Type: Sub-task Sub-task
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: 1.10
    • Fix Version/s: 1.11
    • Component/s: Parser
    • Labels:
      None
    • Number of attachments :
      0

      Description

      at com.thoughtworks.qdox.parser.impl.Parser.yyerror(Parser.java:992)
      at com.thoughtworks.qdox.parser.impl.Parser.yyparse(Parser.java:1298)
      at com.thoughtworks.qdox.parser.impl.Parser.parse(Parser.java:973)
      at com.thoughtworks.qdox.JavaDocBuilder.addSource(JavaDocBuilder.java:322)
      at com.thoughtworks.qdox.JavaDocBuilder.addSource(JavaDocBuilder.java:354)
      at com.thoughtworks.qdox.JavaDocBuilder.addSource(JavaDocBuilder.java:350)
      at com.thoughtworks.qdox.JavaDocBuilder$2.visitFile(JavaDocBuilder.java:440)
      at com.thoughtworks.qdox.directorywalker.DirectoryScanner.walk(DirectoryScanner.java:43)
      at com.thoughtworks.qdox.directorywalker.DirectoryScanner.walk(DirectoryScanner.java:34)
      at com.thoughtworks.qdox.directorywalker.DirectoryScanner.walk(DirectoryScanner.java:34)
      at com.thoughtworks.qdox.directorywalker.DirectoryScanner.walk(DirectoryScanner.java:34)
      at com.thoughtworks.qdox.directorywalker.DirectoryScanner.walk(DirectoryScanner.java:34)
      at com.thoughtworks.qdox.directorywalker.DirectoryScanner.walk(DirectoryScanner.java:34)
      at com.thoughtworks.qdox.directorywalker.DirectoryScanner.scan(DirectoryScanner.java:52)
      at com.thoughtworks.qdox.JavaDocBuilder.addSourceTree(JavaDocBuilder.java:437)
      at com.thoughtworks.qdox.JavaDocBuilder.addSourceTree(JavaDocBuilder.java:426)
      at ch.fhnw.i4ds.yadoc.MainTest.main(MainTest.java:44)

        Activity

        Hide
        Marco Soldati added a comment - - edited
        /**
         * The error only occurs if both variables are present. It does not occur if you
         * either remove the connectionsThreadPool or the channelTable. 
         */
        public void testMultiGenerics() {
        	JavaDocBuilder builder = new JavaDocBuilder();		
        	String source = "public class TCPTransport extends Transport {\n" +
        	"    private static final ExecutorService connectionThreadPool =\n" +
        	"		new ThreadPoolExecutor(0, maxConnectionThreads,\n" +
        	"		    threadKeepAliveTime, TimeUnit.MILLISECONDS,\n" +
        	"		    new SynchronousQueue<Runnable>(),\n" +
        	"		    new ThreadFactory() {\n" +
        	"			public Thread newThread(Runnable runnable) {\n" +
        	"			    return AccessController.doPrivileged(new NewThreadAction(\n" +
        	"				runnable, \"TCP Connection(idle)\", true, true));\n" +
        	"			}\n" +
        	"	    });\n" +
        	"    private final Map<TCPEndpoint,Reference<TCPChannel>> channelTable =\n" +
        	"    	new WeakHashMap<TCPEndpoint,Reference<TCPChannel>>();\n" +
        	"}";
        	builder.addSource(new StringReader(source));
        }
        
        /**
         * Same problem as above.
         * Note: the problem does not occur if you remove primitiveWrappers.
         * 
         */
        public void testMultiGenerics2() {
        	JavaDocBuilder builder = new JavaDocBuilder();
        	String source = "public class Utils {\n" +
        		"    private static final Set<Class<?>> primitiveWrappers =\n" +
        		"            new HashSet<Class<?>>(Arrays.asList(new Class<?>[] {\n" +
        		"        Byte.class, Short.class, Integer.class, Long.class,\n" +
        		"        Float.class, Double.class, Character.class, Boolean.class}));\n" +
        		"    \n" +
        		"    private static final Set<Class<?>> primitives = new HashSet<Class<?>>();\n" +
        		"    \n" +
        		"    private static final Map<String, Class<?>> primitiveMap =\n" +
        		"            new HashMap<String, Class<?>>();\n" +
        		"}\n";
        	builder.addSource(new StringReader(source));
        }
        
        Show
        Marco Soldati added a comment - - edited /** * The error only occurs if both variables are present. It does not occur if you * either remove the connectionsThreadPool or the channelTable. */ public void testMultiGenerics() { JavaDocBuilder builder = new JavaDocBuilder(); String source = " public class TCPTransport extends Transport {\n" + " private static final ExecutorService connectionThreadPool =\n" + " new ThreadPoolExecutor(0, maxConnectionThreads,\n" + " threadKeepAliveTime, TimeUnit.MILLISECONDS,\n" + " new SynchronousQueue< Runnable >(),\n" + " new ThreadFactory() {\n" + " public Thread newThread( Runnable runnable) {\n" + " return AccessController.doPrivileged( new NewThreadAction(\n" + " runnable, \" TCP Connection(idle)\ ", true , true ));\n" + " }\n" + " });\n" + " private final Map<TCPEndpoint,Reference<TCPChannel>> channelTable =\n" + " new WeakHashMap<TCPEndpoint,Reference<TCPChannel>>();\n" + "}" ; builder.addSource( new StringReader(source)); } /** * Same problem as above. * Note: the problem does not occur if you remove primitiveWrappers. * */ public void testMultiGenerics2() { JavaDocBuilder builder = new JavaDocBuilder(); String source = " public class Utils {\n" + " private static final Set< Class <?>> primitiveWrappers =\n" + " new HashSet< Class <?>>(Arrays.asList( new Class <?>[] {\n" + " Byte .class, Short .class, Integer .class, Long .class,\n" + " Float .class, Double .class, Character .class, Boolean .class}));\n" + " \n" + " private static final Set< Class <?>> primitives = new HashSet< Class <?>>();\n" + " \n" + " private static final Map< String , Class <?>> primitiveMap =\n" + " new HashMap< String , Class <?>>();\n" + "}\n" ; builder.addSource( new StringReader(source)); }
        Hide
        Robert Scholte added a comment -

        Sounds like at least 2 different issues. Could you split them up, so we can fix them issue by issue?

        Show
        Robert Scholte added a comment - Sounds like at least 2 different issues. Could you split them up, so we can fix them issue by issue?
        Hide
        Marco Soldati added a comment -

        done. I seem not to be able to change the title of this issue.

        Show
        Marco Soldati added a comment - done. I seem not to be able to change the title of this issue.
        Hide
        Robert Scholte added a comment -

        I can
        But let me first figure out what really causes the problem. Probably some lethal combinations you found here.

        Show
        Robert Scholte added a comment - I can But let me first figure out what really causes the problem. Probably some lethal combinations you found here.
        Hide
        Robert Scholte added a comment -

        I was able to reproduce it with 1.10.1, but it seems like it's already fixed by one of the other issues, since now I don't see them fail anymore.

        Show
        Robert Scholte added a comment - I was able to reproduce it with 1.10.1, but it seems like it's already fixed by one of the other issues, since now I don't see them fail anymore.
        Robert Scholte made changes -
        Field Original Value New Value
        Assignee Robert Scholte [ rfscholte ]
        Resolution Cannot Reproduce [ 5 ]
        Status Open [ 1 ] Closed [ 6 ]
        Fix Version/s 1.11 [ 16104 ]

          People

          • Assignee:
            Robert Scholte
            Reporter:
            Marco Soldati
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: