Skip to content
This repository was archived by the owner on Feb 12, 2022. It is now read-only.
This repository was archived by the owner on Feb 12, 2022. It is now read-only.

Invalid Arguments detected (NullPointerException) #56

Description

@jdcrensh

Executing the program breaks with NullPointerException in ClassModel#compare. Paths given are relative to apexdoc.jar, which is in my project root (also tried absolute paths). The two html paths given in the parameters do exist.

The same error occurs when providing only the -s and -t flags (and only the -s flag), except that it shows nine lines of Error: null instead of two.

System: OS X El Capitan 10.11.3

$ java -version
java version "1.8.0_31"
Java(TM) SE Runtime Environment (build 1.8.0_31-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.31-b07, mixed mode)
$ java -jar apexdoc.jar -s ./src/classes \
    -t ./docs \
    -p 'global;public;private;testmethod;webService' \
    -g https://example.com/repo/src/classes \
    -h ./homepage.html \
    -a ./projectheader.html
Error: null
Error: null
java.lang.NullPointerException
    at org.salesforce.apexdoc.ClassModel$1.compare(ClassModel.java:55)
    at org.salesforce.apexdoc.ClassModel$1.compare(ClassModel.java:1)
    at java.util.TimSort.binarySort(TimSort.java:292)
    at java.util.TimSort.sort(TimSort.java:217)
    at java.util.Arrays.sort(Arrays.java:1512)
    at java.util.ArrayList.sort(ArrayList.java:1454)
    at java.util.Collections.sort(Collections.java:175)
    at org.salesforce.apexdoc.ClassModel.getMethodsSorted(ClassModel.java:48)
    at org.salesforce.apexdoc.FileManager.htmlForClassModel(FileManager.java:217)
    at org.salesforce.apexdoc.FileManager.makeFile(FileManager.java:143)
    at org.salesforce.apexdoc.FileManager.createDoc(FileManager.java:429)
    at org.salesforce.apexdoc.ApexDoc.RunApexDoc(ApexDoc.java:128)
    at org.salesforce.apexdoc.ApexDoc.main(ApexDoc.java:36)
null
ApexDoc - a tool for generating documentation from Salesforce Apex code class files.

    Invalid Arguments detected.  The correct syntax is:

apexdoc -s <source_directory> [-t <target_directory>] [-g <source_url>] [-h <homefile>] [-a <authorfile>] [-p <scope>]

<source_directory> - The folder location which contains your apex .cls classes
<target_directory> - Optional. Specifies your target folder where documentation will be generated.
<source_url> - Optional. Specifies a URL where the source is hosted (so ApexDoc can provide links to your source).
<homefile> - Optional. Specifies the html file that contains the contents for the home page's content area.
<authorfile> - Optional. Specifies the text file that contains project information for the documentation header.
<scope> - Optional. Semicolon seperated list of scopes to document.  Defaults to 'global;public'.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions