This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 46515 - CLIHandlerTest compilation error
Summary: CLIHandlerTest compilation error
Status: CLOSED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 4.x
Hardware: PC Linux
: P2 blocker (vote)
Assignee: Jaroslav Tulach
URL:
Keywords: REGRESSION, TEST
Depends on:
Blocks:
 
Reported: 2004-07-23 23:59 UTC by Jesse Glick
Modified: 2008-12-22 18:34 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2004-07-23 23:59:54 UTC
After your change:

2004-07-23 16:04  jtulach

	* core/: bootstrap/src/org/netbeans/CLIHandler.java,
	bootstrap/src/org/netbeans/JarClassLoader.java,
	bootstrap/src/org/netbeans/Main.java,
	test/unit/src/org/netbeans/MainCLITest.java:
	 #44709: CLIHandlers can reside in
${netbeans.user}/core as well

CLIHandlerTest.java fails to compile:

    [javac] Compiling 51 source files to
/tmp/netbeans/dev/nb_all/core/build/test/unit/classes
    [xtest]
/tmp/netbeans/dev/nb_all/core/test/unit/src/org/netbeans/CLIHandlerTest.java:121:
cannot resolve symbol
    [xtest] symbol  : method initialize
(org.netbeans.CLIHandler.Args,<nulltype>,java.util.List,boolean,boolean)
    [xtest] location: class org.netbeans.CLIHandler
    [xtest]         CLIHandler.Status res =
CLIHandler.initialize(
    [xtest]                                      
    ^
    [xtest]
/tmp/netbeans/dev/nb_all/core/test/unit/src/org/netbeans/CLIHandlerTest.java:478:
cannot resolve symbol
    [xtest] symbol  : method initialize
(org.netbeans.CLIHandler.Args,java.lang.Integer,java.util.List,boolean,boolean)
    [xtest] location: class org.netbeans.CLIHandler
    [xtest]         return
CLIHandler.initialize(new CLIHandler.Args(args,
is, os, currentDir), lock, coll, false, true);
    [xtest]                          ^
    [xtest]
/tmp/netbeans/dev/nb_all/core/test/unit/src/org/netbeans/CLIHandlerTest.java:507:
cannot resolve symbol
    [xtest] symbol  : method initialize
(org.netbeans.CLIHandler.Args,java.lang.Integer,java.util.List,boolean,boolean)
    [xtest] location: class org.netbeans.CLIHandler
    [xtest]                 result =
CLIHandler.initialize(
    [xtest]                                    ^

I am provisionally just deleting the test. Please
revert that and fix properly. (I don't know enough
about how this works any more to fix it myself.)
Comment 1 Jesse Glick 2004-07-24 00:01:44 UTC
Removing core/test/unit/src/org/netbeans/CLIHandlerTest.java;
/cvs/core/test/unit/src/org/netbeans/CLIHandlerTest.java,v  <-- 
CLIHandlerTest.java
new revision: delete; previous revision: 1.7
done
Comment 2 Jaroslav Tulach 2004-07-24 11:20:41 UTC
cvs ci -m "#46515: I have modified the CLIHandlerTest by adding new
test and then I decided that the test is more or less independent and
I renamed the fiel to MainCLITest.java and checked it in. As a result
the necessary changes in CLIHandlerTest were not commited and Jesse
had to temporarily remove the test. I am resuscitating the original
version with the three line change necessary for it to compile with
new version of CLIHandler"

CLIHandlerTest.java,v  <--  CLIHandlerTest.java
new revision: 1.9
Comment 3 Jaroslav Tulach 2004-07-24 11:22:05 UTC
cvs diff -r 1.7 -r 1.9 unit/src/org/netbeans/CLIHandlerTest.java
Index: unit/src/org/netbeans/CLIHandlerTest.java
===================================================================
RCS file: /cvs/core/test/unit/src/org/netbeans/CLIHandlerTest.java,v
retrieving revision 1.7
retrieving revision 1.9
diff -u -r1.7 -r1.9
--- unit/src/org/netbeans/CLIHandlerTest.java   21 Jul 2004 09:46:00
-0000      1.7
+++ unit/src/org/netbeans/CLIHandlerTest.java   24 Jul 2004 10:19:49
-0000      1.9
@@ -120,7 +120,7 @@

         CLIHandler.Status res = CLIHandler.initialize(
             new CLIHandler.Args(new String[0], nullInput, nullOutput,
""),
-            null, Collections.EMPTY_LIST, false, false
+            null, Collections.EMPTY_LIST, false, false, null
         );

         assertEquals ("Cannot connect",
CLIHandler.Status.CANNOT_CONNECT, res.getExitCode());
@@ -475,7 +475,7 @@
         return cliInitialize (args, coll, is, os, lock,
System.getProperty ("user.dir"));
     }
     private static CLIHandler.Status cliInitialize(String[] args,
List coll, InputStream is, OutputStream os, Integer lock, String
currentDir) {
-        return CLIHandler.initialize(new CLIHandler.Args(args, is,
os, currentDir), lock, coll, false, true);
+        return CLIHandler.initialize(new CLIHandler.Args(args, is,
os, currentDir), lock, coll, false, true, null);
     }

     private static final class InitializeRunner extends Object
implements Runnable {
@@ -509,7 +509,9 @@
                     block,
                     handler == null ?
java.util.Collections.EMPTY_LIST : java.util.Collections.nCopies(1,
handler),
                     false,
-                    true);
+                    true,
+                    null
+                );
                 // we are finished, wake up guys in next() if any
                 block.notifyAll();
             }
Comment 4 Tomas Danek 2005-07-27 12:38:51 UTC
closing.