Skip to content

Commit d31aaab

Browse files
committed
Fix spelling
1 parent ca634e6 commit d31aaab

17 files changed

+104
-106
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ public static Stream<?> getSpdxObjects(IModelStore store, @Nullable IModelCopyMa
217217
@Nullable String typeFilter, @Nullable String objectUriPrefixFilter, @Nullable String idPrefix) throws InvalidSPDXAnalysisException {
218218
Objects.requireNonNull(store, "Store must not be null");
219219
return store.getAllItems(objectUriPrefixFilter, typeFilter).map(tv -> {
220-
//TODO: Change this a null namespace and filtering on anonomous or startswith document URI - this will catch the anon. types
220+
//TODO: Change this a null namespace and filtering on anonymous or startswith document URI - this will catch the anon. types
221221
try {
222222
return inflateModelObject(store, tv.getObjectUri(), tv.getType(), copyManager, tv.getSpecVersion(), false, idPrefix);
223223
} catch (InvalidSPDXAnalysisException e) {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ public List<PropertyDescriptor> getPropertyValueDescriptors() {
101101
* @param value Value to set
102102
* @throws InvalidSpdxPropertyException on SPDX parsing errors
103103
*/
104-
public void setPrimativeValue(PropertyDescriptor propertyDescriptor, Object value) throws InvalidSpdxPropertyException {
104+
public void setPrimitiveValue(PropertyDescriptor propertyDescriptor, Object value) throws InvalidSpdxPropertyException {
105105
switch (propertyDescriptor.getName()) {
106106
case "match": if (!(value instanceof String)) {
107107
throw new InvalidSpdxPropertyException("Expected string type for "+propertyDescriptor);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ public void setTypedProperty(String propertyName, String valueId, String type) t
150150
* @param value value to set
151151
* @throws InvalidSpdxPropertyException on invalid property
152152
*/
153-
public void setPrimativeValue(PropertyDescriptor propertyDescriptor, Object value) throws InvalidSpdxPropertyException {
153+
public void setPrimitiveValue(PropertyDescriptor propertyDescriptor, Object value) throws InvalidSpdxPropertyException {
154154
String propertyName = PROPERTY_DESCRIPTOR_TO_VALUE_NAME.get(propertyDescriptor);
155155
if (Objects.isNull(propertyName)) {
156156
throw new InvalidSpdxPropertyException("Invalid property for SPDX listed exception:"+propertyDescriptor.getName());

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ public void setTypedProperty(String propertyName, String valueId, String type) t
140140
throw new InvalidSpdxPropertyException("Invalid type for Listed License SPDX Property: "+type);
141141
}
142142

143-
public void setPrimativeValue(PropertyDescriptor propertyDescriptor, Object value) throws InvalidSpdxPropertyException {
143+
public void setPrimitiveValue(PropertyDescriptor propertyDescriptor, Object value) throws InvalidSpdxPropertyException {
144144
String propertyName = PROPERTY_DESCRIPTOR_TO_VALUE_NAME.get(propertyDescriptor);
145145
if (Objects.isNull(propertyName)) {
146146
throw new InvalidSpdxPropertyException("Invalid property for SPDX listed license:"+propertyDescriptor.getName());

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -489,12 +489,12 @@ public void setValue(String objectUri, PropertyDescriptor propertyDescriptor, Ob
489489
}
490490
if (isLicenseId) {
491491
LicenseJson license = fetchLicenseJson(id);
492-
license.setPrimativeValue(propertyDescriptor, value);
492+
license.setPrimitiveValue(propertyDescriptor, value);
493493
} else if (isExceptionId) {
494494
ExceptionJson exc = fetchExceptionJson(id);
495-
exc.setPrimativeValue(propertyDescriptor, value);
495+
exc.setPrimitiveValue(propertyDescriptor, value);
496496
} else if (Objects.nonNull(crossRef)) {
497-
crossRef.setPrimativeValue(propertyDescriptor, value);
497+
crossRef.setPrimitiveValue(propertyDescriptor, value);
498498
} else {
499499
logger.error("ID {} is not a listed license ID, crossRef ID nor a listed exception ID", id);
500500
throw new SpdxIdNotFoundException("ID "+id+" is not a listed license ID, crossRef ID nor a listed exception ID");

src/main/java/org/spdx/utility/compare/SpdxComparer.java

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public class SpdxComparer {
9595
*/
9696
private final Map<SpdxDocument, Map<SpdxDocument, List<ExtractedLicenseInfo>>> uniqueExtractedLicenses = new HashMap<>();
9797
/**
98-
* Map of any SPDX documents that have extraced license infos with equivalent text but different comments, objectUri's or other fields
98+
* Map of any SPDX documents that have extracted license infos with equivalent text but different comments, objectUri's or other fields
9999
*/
100100
private final Map<SpdxDocument, Map<SpdxDocument, List<SpdxLicenseDifference>>> licenseDifferences = new HashMap<>();
101101
/**
@@ -359,7 +359,7 @@ private void compareExternalDocumentRefs() throws InvalidSPDXAnalysisException {
359359
this.uniqueExternalDocumentRefs.put(spdxDocs.get(i), uniqueAMap);
360360
}
361361
}
362-
if (!this._isExternalDcoumentRefsEqualsNoCheck()) {
362+
if (!this._isExternalDocumentRefsEqualsNoCheck()) {
363363
this.differenceFound = true;
364364
}
365365
}
@@ -579,7 +579,7 @@ static List<SpdxFileDifference> findFileDifferences(SpdxDocument docA, SpdxDocum
579579
* same if they have the same package name and the same package version.
580580
* NOTE: The arrays must be sorted by file name
581581
* @param pkgsA source packages
582-
* @param pkgsB packages to compaer
582+
* @param pkgsB packages to compare
583583
* @return any packages in A that are not in B
584584
*/
585585
static List<SpdxPackage> findUniquePackages(List<SpdxPackage> pkgsA, List<SpdxPackage> pkgsB) {
@@ -786,7 +786,7 @@ private void comparePackages() throws SpdxCompareException {
786786

787787
/**
788788
* add all the document packages to the multi-comparer
789-
* @param spdxDocument document containing the packges
789+
* @param spdxDocument document containing the packages
790790
* @param pkgs package to add
791791
* @param extractedLicenseIdMap map of documents to extracted licenses and ids
792792
* @throws SpdxCompareException on compare errors
@@ -823,8 +823,8 @@ private void addPackageComparers(SpdxDocument spdxDocument,
823823

824824
/**
825825
* Compares two licenses from two different SPDX documents taking into account
826-
* the extracted license infos who's ID's may be different between the two documents
827-
* Note: The ExtracedLicenseIDMap must be initialized before this method is invoked
826+
* the extracted license infos whose ID's may be different between the two documents
827+
* Note: The ExtractedLicenseIDMap must be initialized before this method is invoked
828828
* @param doc1 Index of the SPDX document for license1
829829
* @param license1 license to compare
830830
* @param doc2 Index of the SPDX document for license2
@@ -882,7 +882,7 @@ static boolean compareVerificationCodes(
882882
private void compareDocumentFields() throws SpdxCompareException {
883883
compareDataLicense();
884884
compareDocumentComments();
885-
compareSpdxVerions();
885+
compareSpdxVersions();
886886
compareDocumentContents();
887887
if (!this.dataLicenseEqual || !this.spdxVersionsEqual || !this.documentCommentsEqual) {
888888
this.differenceFound = true;
@@ -912,7 +912,7 @@ private void compareDocumentContents() throws SpdxCompareException {
912912
* @throws SpdxCompareException on compare errors
913913
*
914914
*/
915-
private void compareSpdxVerions() throws SpdxCompareException {
915+
private void compareSpdxVersions() throws SpdxCompareException {
916916
try {
917917
String docVer1;
918918
docVer1 = spdxDocs.get(0).getSpecVersion();
@@ -1377,7 +1377,7 @@ private void checkInProgress() throws SpdxCompareException {
13771377
}
13781378

13791379
/**
1380-
* Validates that the spdx dcouments field has been initialized
1380+
* Validates that the spdx documents field has been initialized
13811381
* @throws SpdxCompareException on compare errors
13821382
*/
13831383
private void checkDocsField() throws SpdxCompareException {
@@ -1440,7 +1440,7 @@ public boolean isDocumentCommentsEqual() throws SpdxCompareException {
14401440
return this.documentCommentsEqual;
14411441
}
14421442

1443-
private boolean _isExternalDcoumentRefsEqualsNoCheck() {
1443+
private boolean _isExternalDocumentRefsEqualsNoCheck() {
14441444
for (Entry<SpdxDocument, Map<SpdxDocument, List<ExternalDocumentRef>>> spdxDocumentMapEntry : this.uniqueExternalDocumentRefs.entrySet()) {
14451445
for (List<ExternalDocumentRef> externalDocumentRefs : spdxDocumentMapEntry.getValue().values()) {
14461446
if (!externalDocumentRefs.isEmpty()) {
@@ -1456,10 +1456,10 @@ private boolean _isExternalDcoumentRefsEqualsNoCheck() {
14561456
* @return true if the external document refs are equal
14571457
* @throws SpdxCompareException on compare errors
14581458
*/
1459-
public boolean isExternalDcoumentRefsEquals() throws SpdxCompareException {
1459+
public boolean isExternalDocumentRefsEquals() throws SpdxCompareException {
14601460
checkInProgress();
14611461
checkDocsField();
1462-
return _isExternalDcoumentRefsEqualsNoCheck();
1462+
return _isExternalDocumentRefsEqualsNoCheck();
14631463
}
14641464

14651465
/**
@@ -1476,7 +1476,7 @@ public boolean isExtractedLicensingInfosEqual() throws SpdxCompareException {
14761476
* @return true if the extracted licensing infos are equal
14771477
*/
14781478
private boolean _isExtractedLicensingInfoEqualsNoCheck() {
1479-
// check for unique extraced license infos
1479+
// check for unique extracted license infos
14801480
for (Entry<SpdxDocument, Map<SpdxDocument, List<ExtractedLicenseInfo>>> entry : this.uniqueExtractedLicenses.entrySet()) {
14811481
for (Entry<SpdxDocument, List<ExtractedLicenseInfo>> spdxDocumentListEntry : entry.getValue().entrySet()) {
14821482
List<ExtractedLicenseInfo> licenses = spdxDocumentListEntry.getValue();
@@ -1498,7 +1498,7 @@ private boolean _isExtractedLicensingInfoEqualsNoCheck() {
14981498
}
14991499

15001500
/**
1501-
* Retrieves any unique extracted licenses fromt the first SPDX document index
1501+
* Retrieves any unique extracted licenses from the first SPDX document index
15021502
* relative to the second - unique is determined by the license text matching
15031503
* @param docIndexA source document index
15041504
* @param docIndexB index of the compare document
@@ -1605,7 +1605,7 @@ public List<String> getUniqueCreators(int doc1index, int doc2index) throws SpdxC
16051605
* @return true if the files are equal
16061606
* @throws SpdxCompareException on compare errors
16071607
*/
1608-
public boolean isfilesEquals() throws SpdxCompareException {
1608+
public boolean isFilesEquals() throws SpdxCompareException {
16091609
this.checkDocsField();
16101610
this.checkInProgress();
16111611
return this._isFilesEqualsNoCheck();
@@ -1870,7 +1870,7 @@ public int getNumSpdxDocs() {
18701870
}
18711871

18721872
/**
1873-
* @return true if the licens list version is equal
1873+
* @return true if the license list version is equal
18741874
* @throws SpdxCompareException On error in comparison
18751875
*/
18761876
public boolean isLicenseListVersionEqual() throws SpdxCompareException {
@@ -1914,7 +1914,7 @@ public static List<Checksum> findUniqueChecksums(Collection<Checksum> checksumsA
19141914
/**
19151915
* Find any SPDX annotations which are in annotationsA but not in annotationsB
19161916
* @param annotationsA source annotations
1917-
* @param annotationsB annotations to be compared agains
1917+
* @param annotationsB annotations to be compared against
19181918
* @return list of unique annotations in annotationsB
19191919
* @throws InvalidSPDXAnalysisException On SPDX parsing errors
19201920
*/

src/main/java/org/spdx/utility/compare/SpdxItemComparer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -340,9 +340,9 @@ public boolean isCopyrightsEquals() throws SpdxCompareException {
340340
}
341341

342342
/**
343-
* @return the licenseCommmentsEquals
343+
* @return the licenseCommentsEquals
344344
*/
345-
public boolean isLicenseCommmentsEquals() throws SpdxCompareException {
345+
public boolean isLicenseCommentsEquals() throws SpdxCompareException {
346346
checkInProgress();
347347
checkCompareMade();
348348
return licenseCommentsEquals;

src/test/java/org/spdx/library/ListedLicensesTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
import junit.framework.TestCase;
1414

15-
/**
15+
/*
1616
* Copyright (c) 2019 Source Auditor Inc.
1717
*
1818
* SPDX-License-Identifier: Apache-2.0
@@ -116,7 +116,7 @@ public void testGetListedExceptionByIdReturnsNull() throws InvalidSPDXAnalysisEx
116116
assertNull(result);
117117
}
118118

119-
public void testGetExceptionbyIdLocal() throws InvalidSPDXAnalysisException {
119+
public void testGetExceptionByIdLocal() throws InvalidSPDXAnalysisException {
120120
System.setProperty("SPDXParser.OnlyUseLocalLicenses", "true");
121121
ListedLicenses.resetListedLicenses();
122122
try {

src/test/java/org/spdx/library/ModelSpecConverterTest.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
*/
1818
package org.spdx.library;
1919

20-
import static org.junit.Assert.*;
21-
2220
import java.util.Arrays;
2321
import java.util.HashSet;
2422

0 commit comments

Comments
 (0)