Skip to content

Commit 851ebdb

Browse files
committed
Revert "Remove incorrect dependency"
This reverts commit 080f899. The commit accidentally included a change which should be in a pull request
1 parent 080f899 commit 851ebdb

2 files changed

Lines changed: 2 additions & 25 deletions

File tree

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
<dependency>
9292
<groupId>org.spdx</groupId>
9393
<artifactId>java-spdx-library</artifactId>
94-
<version>1.1.0</version>
94+
<version>1.1.1-SNAPSHOT</version>
9595
</dependency>
9696
<dependency>
9797
<groupId>org.apache.jena</groupId>

src/main/java/org/spdx/spdxRdfStore/RdfSpdxDocumentModelManager.java

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -665,12 +665,7 @@ public Optional<Object> getPropertyValue(String id, String propertyName) throws
665665
Property property = model.createProperty(SpdxResourceFactory.propertyNameToUri(propertyName));
666666
NodeIterator iter = model.listObjectsOfProperty(idResource, property);
667667
if (!iter.hasNext()) {
668-
if (isListedLicenseOrException(idResource)) {
669-
return ListedLicenses.getListedLicenses().getLicenseModelStore()
670-
.getValue(HTTPS_LISTED_LICENSE_NAMESPACE_PREFIX, id, propertyName);
671-
} else {
672-
return Optional.empty();
673-
}
668+
return Optional.empty();
674669
}
675670
Optional<Object> result = valueNodeToObject(iter.next(), property);
676671
if (iter.hasNext()) {
@@ -683,24 +678,6 @@ public Optional<Object> getPropertyValue(String id, String propertyName) throws
683678
}
684679
}
685680

686-
/**
687-
* @param idResource Resource for the ID
688-
* @return true if the type of the ID is a ListedLicenseException or a Listed License
689-
*/
690-
private boolean isListedLicenseOrException(Resource idResource) {
691-
Resource valueType = idResource.getPropertyResourceValue(RDF.type);
692-
if (Objects.isNull(valueType)) {
693-
return false;
694-
}
695-
Optional<String> sValueType = SpdxResourceFactory.resourceToSpdxType(valueType);
696-
if (sValueType.isEmpty()) {
697-
return false;
698-
}
699-
String sValueTypeStr = sValueType.get();
700-
return SpdxConstants.CLASS_SPDX_LISTED_LICENSE.equals(sValueTypeStr) ||
701-
SpdxConstants.CLASS_SPDX_LISTED_LICENSE_EXCEPTION.equals(sValueTypeStr);
702-
}
703-
704681
/**
705682
* Convert a node in the RDF graph to a Java object
706683
* @param propertyValue node containing the value

0 commit comments

Comments
 (0)