[patch] use the classpath version for gjdoc as well

Matthias Klose doko@ubuntu.com
Sun Jun 14 16:31:00 GMT 2009


Mark Wielaard schrieb:
> Hi Matthias,
> 
> On Sat, 2009-06-13 at 10:12 -0400, Matthias Klose wrote:
>> $ gjdoc-4.4 --version
>> java.lang.NullPointerException
>>    at java.io.InputStreamReader.read(InputStreamReader.java:244)
>>    at java.io.BufferedReader.fill(BufferedReader.java:370)
>>    at java.io.BufferedReader.readLine(BufferedReader.java:469)
>>    at java.util.Properties.load(Properties.java:203)
>>    at java.util.Properties.load(Properties.java:380)
>>    at gnu.classpath.tools.gjdoc.Main.getGjdocVersion(Main.java:1830)
>>    at gnu.classpath.tools.gjdoc.Main.start(Main.java:1131)
>>    at gnu.classpath.tools.gjdoc.Main.main(Main.java:883)
>>
>> I don't see any version properties file in the tools.jar.
> 
> In GNU Classpath this comes from
> tools/resource/gnu/classpath/tools/gjdoc/version.properties.in
> Which is just one line:
> gjdoc.version=@VERSION@

I don't see this in libgcj.

>>  The following patch
>> does use the same method to get the version number as every other tool in
>> classpath. Ok for the trunk and the branch?
>>
>> 2009-06-13  Alexander Sack  <asac@jwsdot.com>
>>
>>         * tools/gnu/classpath/tools/gjdoc/Main.java (start): Use
>>         gnu.classpath.Configuration.CLASSPATH_VERSION as version number.
>>         * tools/classes/gnu/classpath/tools/gjdoc/Main.class: Regenerate.
>>
>> --- tools/gnu/classpath/tools/gjdoc/Main.java	(revision 148452)
>> +++ tools/gnu/classpath/tools/gjdoc/Main.java	(working copy)
>> @@ -1128,7 +1128,7 @@
>>        //--- Show version and exit if requested by user
>>
>>        if (option_showVersion) {
>> -        System.out.println("gjdoc " + getGjdocVersion());
>> +        System.out.println("gjdoc " +
>> gnu.classpath.Configuration.CLASSPATH_VERSION);
>>          System.exit(0);
>>        }
> 
> The idea is fine. But then please do also submit a patch to GNU
> Classpath that just removes the whole getGjdocVersion() method.
> Note that there is another variant called getDocletVersion() in
> HtmlDoclet.java that you also want to change in this case.

attached.

I didn't remove the methods yet, so that the patch can be applied to the gcc-4.4
branch as well. This should be done in classpath only, and then imported into
libgcj.

ok for the attached patch on the libgcj branch and trunk?


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: gjdoc.diff
URL: <http://gcc.gnu.org/pipermail/java-patches/attachments/20090614/ec5f0b63/attachment.ksh>


More information about the Java-patches mailing list