Skip to content

Commit 7dcec9b

Browse files
committed
Disable missing javadocs errors
After attempting to fix - fixed several, but many missing remain Signed-off-by: Gary O'Neall <gary@sourceauditor.com>
1 parent 56196da commit 7dcec9b

18 files changed

Lines changed: 286 additions & 107 deletions

pom.xml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,6 @@
6767
</dependency>
6868
</dependencies>
6969
</profile>
70-
<profile>
71-
<id>doclint-java8-disable</id>
72-
<activation>
73-
<jdk>[1.8,)</jdk>
74-
</activation>
75-
<properties>
76-
<javadoc.opts>-Xdoclint:none</javadoc.opts>
77-
</properties>
78-
</profile>
7970
<profile>
8071
<id>release</id>
8172
<build>
@@ -237,7 +228,7 @@
237228
<configuration>
238229
<quiet>true</quiet>
239230
<notimestamp>true</notimestamp>
240-
<additionalparam>-Xdoclint:none</additionalparam>
231+
<doclint>all,-missing</doclint>
241232
</configuration>
242233
<executions>
243234
<execution>

src/main/java/org/spdx/library/LicenseInfoFactory.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public class LicenseInfoFactory {
5353
/**
5454
* @param licenseId SPDX Listed License ID
5555
* @return SPDX listed license or null if the ID is not in the SPDX license list
56-
* @throws InvalidSPDXAnalysisException
56+
* @throws InvalidSPDXAnalysisException on errors getting license data
5757
*/
5858
public static ListedLicense getListedLicenseById(String licenseId)throws InvalidSPDXAnalysisException {
5959
return ListedLicenses.getListedLicenses().getListedLicenseById(licenseId);
@@ -62,7 +62,7 @@ public static ListedLicense getListedLicenseById(String licenseId)throws Invalid
6262
/**
6363
* @param licenseId SPDX Listed License ID
6464
* @return SPDX listed license in SPDX spec version 2.X format or null if the ID is not in the SPDX license list
65-
* @throws InvalidSPDXAnalysisException
65+
* @throws InvalidSPDXAnalysisException on errors getting license data
6666
*/
6767
public static SpdxListedLicense getListedLicenseByIdCompatV2(String licenseId)throws InvalidSPDXAnalysisException {
6868
return ListedLicenses.getListedLicenses().getListedLicenseByIdCompatV2(licenseId);
@@ -87,8 +87,8 @@ public static SpdxListedLicense getListedLicenseByIdCompatV2(String licenseId)th
8787
* none exist for an ID, they will be added. If null, the default model document URI will be used.
8888
* @param copyManager if non-null, allows for copying of any properties set which use other model stores or document URI's
8989
* @return an SPDXLicenseInfo created from the string
90-
* @throws InvalidLicenseStringException
91-
* @throws DefaultStoreNotInitialized
90+
* @throws InvalidLicenseStringException if the license string is not valid
91+
* @throws DefaultStoreNotInitialized if the default model store is not initialized
9292
*/
9393
public static org.spdx.library.model.v2.license.AnyLicenseInfo parseSPDXLicenseStringCompatV2(String licenseString, @Nullable IModelStore store,
9494
@Nullable String documentUri, @Nullable IModelCopyManager copyManager) throws InvalidLicenseStringException, DefaultStoreNotInitialized {
@@ -131,8 +131,8 @@ public static org.spdx.library.model.v2.license.AnyLicenseInfo parseSPDXLicenseS
131131
* @param copyManager if non-null, allows for copying of any properties set which use other model stores or document URI's
132132
* @param customIdToUri Mapping of the id prefixes used in the license expression to the namespace preceding the external ID
133133
* @return an SPDXLicenseInfo created from the string
134-
* @throws InvalidLicenseStringException
135-
* @throws DefaultStoreNotInitialized
134+
* @throws InvalidLicenseStringException if the license string is not valid
135+
* @throws DefaultStoreNotInitialized if the default model store is not initialized
136136
*/
137137
public static AnyLicenseInfo parseSPDXLicenseString(String licenseString, @Nullable IModelStore store,
138138
@Nullable String customLicensePrefix, @Nullable IModelCopyManager copyManager,
@@ -170,8 +170,8 @@ public static AnyLicenseInfo parseSPDXLicenseString(String licenseString, @Nulla
170170
* A licenseID must NOT be "AND" or "OR"
171171
* @param licenseString String conforming to the syntax
172172
* @return an SPDXLicenseInfo created from the string
173-
* @throws InvalidLicenseStringException
174-
* @throws DefaultStoreNotInitialized
173+
* @throws InvalidLicenseStringException if the license string is not valid
174+
* @throws DefaultStoreNotInitialized if the default model store is not initialized
175175
*/
176176
public static AnyLicenseInfo parseSPDXLicenseString(String licenseString) throws InvalidLicenseStringException, DefaultStoreNotInitialized {
177177
return parseSPDXLicenseString(licenseString, null, null, null, null);
@@ -223,15 +223,15 @@ public static String getLicenseListVersion() {
223223
}
224224

225225
/**
226-
* @param objectUri exception ID
226+
* @param id exception ID
227227
* @return true if the exception ID is a supported SPDX listed exception
228228
*/
229229
public static boolean isSpdxListedExceptionId(String id) {
230230
return ListedLicenses.getListedLicenses().isSpdxListedExceptionId(id);
231231
}
232232

233233
/**
234-
* @param objectUri
234+
* @param id ID for the listed exception
235235
* @return the standard SPDX license exception or null if the ID is not in the SPDX license list
236236
* @throws InvalidSPDXAnalysisException
237237
*/
@@ -240,7 +240,7 @@ public static ListedLicenseException getListedExceptionById(String id) throws In
240240
}
241241

242242
/**
243-
* @param objectUri
243+
* @param id ID for the listed exception
244244
* @return the standard SPDX license exception in SPDX Spec V2.X format or null if the ID is not in the SPDX license list
245245
* @throws InvalidSPDXAnalysisException
246246
*/

src/main/java/org/spdx/library/conversion/Spdx2to3Converter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@ public Relationship convertAndStore(org.spdx.library.model.v2.Relationship fromR
529529
/**
530530
* Converts an SPDX spec version 2 annotation to an SPDX spec version 3 annotation
531531
* @param fromAnnotation annotation to convert from
532-
* @param containingElement Element which contains the property referring to the fromAnnotation
532+
* @param toElement Element which contains the property referring to the fromAnnotation
533533
* @throws InvalidSPDXAnalysisException on any error in conversion
534534
*/
535535
public Annotation convertAndStore(org.spdx.library.model.v2.Annotation fromAnnotation, Element toElement) throws InvalidSPDXAnalysisException {

src/main/java/org/spdx/storage/listedlicense/ExceptionJson.java

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,19 @@
4545
*/
4646
public class ExceptionJson {
4747

48+
/**
49+
* All property descriptors for Exceptions
50+
*/
4851
public static final List<PropertyDescriptor> ALL_PROPERTY_DESCRIPTORS;
52+
53+
/**
54+
* Map of property descriptors to the value name
55+
*/
4956
public static final Map<PropertyDescriptor, String> PROPERTY_DESCRIPTOR_TO_VALUE_NAME;
57+
58+
/**
59+
* Properties which are collections
60+
*/
5061
static final Set<PropertyDescriptor> COLLECTION_PROPERTIES;
5162

5263
static {
@@ -110,18 +121,36 @@ public class ExceptionJson {
110121
String obsoletedBy;
111122
String listVersionAdded;
112123

124+
/**
125+
* Create an ExceptionJson
126+
* @param id license exception ID
127+
*/
113128
public ExceptionJson(String id) {
114129
this.licenseExceptionId = id;
115130
}
116131

132+
/**
133+
* Create an ExceptionJson
134+
*/
117135
public ExceptionJson() {
118136

119137
}
120138

139+
/**
140+
* @param propertyName property name
141+
* @param valueId ID for the value
142+
* @param type SPDX type
143+
* @throws InvalidSpdxPropertyException on invalid type for the SPDX property
144+
*/
121145
public void setTypedProperty(String propertyName, String valueId, String type) throws InvalidSpdxPropertyException {
122146
throw new InvalidSpdxPropertyException("Invalid type for Listed License SPDX Property: "+type);
123147
}
124148

149+
/**
150+
* @param propertyDescriptor descriptor for the property to be set
151+
* @param value value to set
152+
* @throws InvalidSpdxPropertyException on invalid property
153+
*/
125154
public void setPrimativeValue(PropertyDescriptor propertyDescriptor, Object value) throws InvalidSpdxPropertyException {
126155
String propertyName = PROPERTY_DESCRIPTOR_TO_VALUE_NAME.get(propertyDescriptor);
127156
if (Objects.isNull(propertyName)) {
@@ -206,17 +235,34 @@ public void setPrimativeValue(PropertyDescriptor propertyDescriptor, Object valu
206235
}
207236
}
208237

238+
/**
239+
* Clears a list of values for a property
240+
* @param propertyDescriptor descriptor for the property
241+
* @throws InvalidSpdxPropertyException if it is not a list type
242+
*/
209243
public void clearPropertyValueList(PropertyDescriptor propertyDescriptor) throws InvalidSpdxPropertyException {
210244
if (!"seeAlso".equals(PROPERTY_DESCRIPTOR_TO_VALUE_NAME.get(propertyDescriptor))) {
211245
throw new InvalidSpdxPropertyException(propertyDescriptor + "is not a list type");
212246
}
213247
seeAlso.clear();
214248
}
215249

250+
/**
251+
* @param propertyName Name of the property
252+
* @param valueId ID for the value
253+
* @param type SPDX type
254+
* @throws InvalidSpdxPropertyException on invalid type to add a value
255+
*/
216256
public void addValueToList(String propertyName, String valueId, String type) throws InvalidSpdxPropertyException {
217257
throw new InvalidSpdxPropertyException("Invalid type for Listed License SPDX Property: "+type);
218258
}
219259

260+
/**
261+
* @param propertyDescriptor descriptor for the property
262+
* @param value Value to set
263+
* @return true if the value was added
264+
* @throws InvalidSpdxPropertyException
265+
*/
220266
public boolean addPrimitiveValueToList(PropertyDescriptor propertyDescriptor, Object value) throws InvalidSpdxPropertyException {
221267
if (!"seeAlso".equals(PROPERTY_DESCRIPTOR_TO_VALUE_NAME.get(propertyDescriptor))) {
222268
throw new InvalidSpdxPropertyException(propertyDescriptor + "is not a list type");
@@ -227,6 +273,11 @@ public boolean addPrimitiveValueToList(PropertyDescriptor propertyDescriptor, Ob
227273
return seeAlso.add((String)value);
228274
}
229275

276+
/**
277+
* @param propertyDescriptor descriptor for the property
278+
* @return list of values associated with the property
279+
* @throws InvalidSpdxPropertyException if the propertyDescriptor is not for a list type
280+
*/
230281
public List<?> getValueList(PropertyDescriptor propertyDescriptor) throws InvalidSpdxPropertyException {
231282
if ("seeAlso".equals(PROPERTY_DESCRIPTOR_TO_VALUE_NAME.get(propertyDescriptor))) {
232283
return seeAlso;
@@ -237,6 +288,11 @@ public List<?> getValueList(PropertyDescriptor propertyDescriptor) throws Invali
237288
}
238289
}
239290

291+
/**
292+
* @param propertyDescriptor descriptor for the property
293+
* @return Value associated with the property or null if no value was set
294+
* @throws InvalidSpdxPropertyException if the property descriptor is not valid
295+
*/
240296
public Object getValue(PropertyDescriptor propertyDescriptor) throws InvalidSpdxPropertyException {
241297
String propertyName = PROPERTY_DESCRIPTOR_TO_VALUE_NAME.get(propertyDescriptor);
242298
if (Objects.isNull(propertyName)) {
@@ -262,6 +318,11 @@ public Object getValue(PropertyDescriptor propertyDescriptor) throws InvalidSpdx
262318
}
263319
}
264320

321+
/**
322+
* Removes the property
323+
* @param propertyDescriptor descriptor for the property
324+
* @throws InvalidSpdxPropertyException if the property descriptor is not valid
325+
*/
265326
public void removeProperty(PropertyDescriptor propertyDescriptor) throws InvalidSpdxPropertyException {
266327
String propertyName = PROPERTY_DESCRIPTOR_TO_VALUE_NAME.get(propertyDescriptor);
267328
if (Objects.isNull(propertyName)) {
@@ -288,6 +349,11 @@ public void removeProperty(PropertyDescriptor propertyDescriptor) throws Invalid
288349

289350
}
290351

352+
/**
353+
* Copies all properties from an exception
354+
* @param fromException exception to copy from
355+
* @throws InvalidSPDXAnalysisException on error getting values from the exception
356+
*/
291357
public void copyFrom(ListedLicenseException fromException) throws InvalidSPDXAnalysisException {
292358
Optional<String> comment = fromException.getComment();
293359
this.comment = comment.orElse(null);
@@ -303,6 +369,11 @@ public void copyFrom(ListedLicenseException fromException) throws InvalidSPDXAna
303369
this.licenseXml = fromException.getLicenseXml().orElse(null);
304370
}
305371

372+
/**
373+
* Copies from an SPDX version 2 exception
374+
* @param fromException exception to copy from
375+
* @throws InvalidSPDXAnalysisException on error getting values from the exception
376+
*/
306377
@SuppressWarnings("deprecation")
307378
public void copyFrom(org.spdx.library.model.v2.license.ListedLicenseException fromException) throws InvalidSPDXAnalysisException {
308379
this.comment = null;
@@ -339,13 +410,25 @@ public void copyFrom(org.spdx.library.model.v2.license.ListedLicenseException fr
339410
}
340411
}
341412

413+
/**
414+
* @param propertyDescriptor descriptor for the property
415+
* @param value value to remove
416+
* @return true if the collection was modified
417+
* @throws InvalidSpdxPropertyException if the propertyDescriptor is not valid
418+
*/
342419
public boolean removePrimitiveValueToList(PropertyDescriptor propertyDescriptor, Object value) throws InvalidSpdxPropertyException {
343420
if (!"seeAlso".equals(PROPERTY_DESCRIPTOR_TO_VALUE_NAME.get(propertyDescriptor))) {
344421
throw new InvalidSpdxPropertyException(propertyDescriptor + "is not a list type");
345422
}
346423
return seeAlso.remove(value);
347424
}
348425

426+
/**
427+
* @param propertyDescriptor descriptor for the property
428+
* @param clazz class to test assignability
429+
* @return true if the propertyDescriptor can be assigned a value of type clazz
430+
* @throws InvalidSpdxPropertyException if the propertyDescriptor is not valid
431+
*/
349432
public boolean isPropertyValueAssignableTo(PropertyDescriptor propertyDescriptor, Class<?> clazz) throws InvalidSpdxPropertyException {
350433
String propertyName = PROPERTY_DESCRIPTOR_TO_VALUE_NAME.get(propertyDescriptor);
351434
if (Objects.isNull(propertyName)) {
@@ -369,6 +452,11 @@ public boolean isPropertyValueAssignableTo(PropertyDescriptor propertyDescriptor
369452
}
370453
}
371454

455+
/**
456+
* @param propertyDescriptor descriptor for the property
457+
* @param clazz class to test assignability
458+
* @return true if the list associated with the propertyDescriptor have a value added of type clazz
459+
*/
372460
public boolean isCollectionMembersAssignableTo(PropertyDescriptor propertyDescriptor, Class<?> clazz) {
373461
if (SpdxConstantsCompatV2.RDFS_PROP_SEE_ALSO.equals(propertyDescriptor) ||
374462
SpdxConstantsV3.PROP_SEE_ALSO.equals(propertyDescriptor)) {
@@ -388,6 +476,10 @@ public boolean isCollectionMembersAssignableTo(PropertyDescriptor propertyDescri
388476
}
389477
}
390478

479+
/**
480+
* @param propertyDescriptor descriptor for the property
481+
* @return true if the property represents a collection
482+
*/
391483
public boolean isCollectionProperty(PropertyDescriptor propertyDescriptor) {
392484
return COLLECTION_PROPERTIES.contains(propertyDescriptor);
393485
}

src/main/java/org/spdx/storage/listedlicense/ExceptionJsonTOC.java

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -135,12 +135,20 @@ public void setSeeAlso(List<String> seeAlso) {
135135
private List<ExceptionJson> exceptions;
136136
private String releaseDate;
137137

138+
/**
139+
* Create an ExceptionJsonTOC
140+
* @param version license list version
141+
* @param releaseDate release date of the license list
142+
*/
138143
public ExceptionJsonTOC(String version, String releaseDate) {
139144
this.licenseListVersion = version;
140145
this.releaseDate = releaseDate;
141146
exceptions = new ArrayList<>();
142147
}
143148

149+
/**
150+
* Create an ExceptionJsonTOC
151+
*/
144152
public ExceptionJsonTOC() {
145153
licenseListVersion = null;
146154
exceptions = new ArrayList<>();
@@ -184,11 +192,11 @@ public Map<String, String> getExceptionIds() {
184192

185193
/**
186194
* Add a new exception to the list of exceptions
187-
* @param exception
188-
* @param exceptionHTMLReference
189-
* @param exceptionJSONReference
190-
* @param deprecated
191-
* @throws InvalidSPDXAnalysisException
195+
* @param exception exception to be added
196+
* @param exceptionHTMLReference URL of the exception HTML
197+
* @param exceptionJSONReference URL of the JSON
198+
* @param deprecated true if deprecated
199+
* @throws InvalidSPDXAnalysisException on error accessing Exception properties
192200
*/
193201
public void addException(ListedLicenseException exception, String exceptionHTMLReference,
194202
String exceptionJSONReference, boolean deprecated) throws InvalidSPDXAnalysisException {

src/main/java/org/spdx/storage/listedlicense/IListedLicenseStore.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,15 @@ public interface IListedLicenseStore extends IModelStore {
4141
String getLicenseListVersion();
4242

4343
/**
44-
* @param listedLicenseDocumentUri
45-
* @param licenseId
44+
* @param listedLicenseDocumentUri Document URI for the listed license
45+
* @param licenseId ID for the license
4646
* @return true if the licenseId belongs to an SPDX listed license
4747
*/
4848
boolean isSpdxListedLicenseId(String listedLicenseDocumentUri, String licenseId);
4949

5050
/**
51-
* @param listedLicenseDocumentUri
52-
* @param exceptionId
51+
* @param listedLicenseDocumentUri Document URI for the listed exception
52+
* @param exceptionId ID for the exception
5353
* @return true if the exceptionId belongs to an SPDX listed exception
5454
*/
5555
boolean isSpdxListedExceptionId(String listedLicenseDocumentUri, String exceptionId);

0 commit comments

Comments
 (0)