Skip to content

Commit

Permalink
Clean up formatting
Browse files Browse the repository at this point in the history
Cleaning up formatting - my IDE now has the Maven coding style added for
this project, so it should be a bit cleaner going forward.
  • Loading branch information
goneall committed Jan 22, 2025
1 parent 7f17183 commit 5bfa29f
Show file tree
Hide file tree
Showing 11 changed files with 99 additions and 78 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ private void logDependencies( List<DependencyNode> dependencies )
Artifact dependency = node.getArtifact();
String filePath = dependency.getFile() != null ? dependency.getFile().getAbsolutePath() : "[NONE]";
String scope = dependency.getScope() != null ? dependency.getScope() : "[NONE]";
LOG.debug("ArtifactId: {}, file path: {}, Scope: {}", dependency.getArtifactId(), filePath, scope);
LOG.debug( "ArtifactId: {}, file path: {}, Scope: {}", dependency.getArtifactId(), filePath, scope );
}
}

Expand Down
6 changes: 3 additions & 3 deletions src/main/java/org/spdx/maven/utils/AbstractFileCollector.java
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,16 @@ private static void loadFileExtensionConstants()
for (Entry<Object, Object> entry : prop.entrySet()) {
String fileTypeStr = (String) entry.getKey();
FileType fileType = FileType.valueOf(fileTypeStr);
String[] extensions = ((String) entry.getValue()).split(",");
String[] extensions = ((String) entry.getValue()).split( "," );
for (String extension : extensions) {
try {
String trimmedExtension = extension.toUpperCase().trim();
if (EXT_TO_FILE_TYPE.containsKey(trimmedExtension)) {
LOG.warn("Duplicate file extension: {}", trimmedExtension);
LOG.warn( "Duplicate file extension: {}", trimmedExtension );
}
EXT_TO_FILE_TYPE.put(trimmedExtension, fileType);
} catch (Exception ex) {
LOG.error("Error adding file extensions to filetype map", ex);
LOG.error( "Error adding file extensions to filetype map", ex );
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,17 +139,17 @@ public void setSnippets( List<SnippetInfo> snippets )
*/
public void logInfo()
{
LOG.debug("Default File Comment: {}", getComment());
LOG.debug("Default File Copyright: {}", getCopyright());
LOG.debug("Default File License Comment: {}", getLicenseComment());
LOG.debug("Default File Notice: {}", getNotice());
LOG.debug("Default File Concluded License: {}", getConcludedLicense());
LOG.debug("Default File Declared License: {}", getDeclaredLicense());
LOG.debug( "Default File Comment: {}", getComment() );
LOG.debug( "Default File Copyright: {}", getCopyright() );
LOG.debug( "Default File License Comment: {}", getLicenseComment() );
LOG.debug( "Default File Notice: {}", getNotice() );
LOG.debug( "Default File Concluded License: {}", getConcludedLicense() );
LOG.debug( "Default File Declared License: {}", getDeclaredLicense() );
if ( contributors != null )
{
for ( String contributor : contributors )
{
LOG.debug("Default File Contributors: {}", contributor);
LOG.debug( "Default File Contributors: {}", contributor );
}
}
if ( this.snippets != null )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ private static ExternalRef generatePurlV2ExternalRef( SpdxDocument spdxDoc,
try
{
return spdxDoc.createExternalRef( ReferenceCategory.PACKAGE_MANAGER,
new ReferenceType("http://spdx.org/rdf/references/purl"),
new ReferenceType( "http://spdx.org/rdf/references/purl" ),
generatePurl( project ), null );
}
catch ( InvalidSPDXAnalysisException e )
Expand Down
37 changes: 19 additions & 18 deletions src/main/java/org/spdx/maven/utils/SpdxProjectInformation.java
Original file line number Diff line number Diff line change
Expand Up @@ -338,21 +338,21 @@ public void logInfo()
if ( !LOG.isDebugEnabled() ) {
return;
}
LOG.debug("SPDX Project Name: {}", this.getName());
LOG.debug("SPDX Document comment: {}", this.getDocumentComment());
LOG.debug("SPDX Creator comment: {}", this.getCreatorComment());
LOG.debug("SPDX Description: {}", this.getDescription());
LOG.debug("SPDX License comment: {}", this.getLicenseComment());
LOG.debug("SPDX Originator: {}", this.getOriginator());
LOG.debug("SPDX PackageArchiveFileName: {}", this.getPackageArchiveFileName());
LOG.debug("SPDX Short description: {}", this.getShortDescription());
LOG.debug("SPDX Supplier: {}", this.getSupplier());
LOG.debug("SPDX Source Info: {}", this.getSourceInfo());
LOG.debug("SPDX Version info: {}", this.getVersionInfo());
LOG.debug("SPDX Concluded license: {}", this.getConcludedLicense());
LOG.debug("SPDX Declared license: {}", this.getDeclaredLicense());
LOG.debug("SPDX Download URL: {}", this.getDownloadUrl());
LOG.debug("SPDX Home page: {}", this.getHomePage());
LOG.debug( "SPDX Project Name: {}", this.getName() );
LOG.debug( "SPDX Document comment: {}", this.getDocumentComment() );
LOG.debug( "SPDX Creator comment: {}", this.getCreatorComment() );
LOG.debug( "SPDX Description: {}", this.getDescription() );
LOG.debug( "SPDX License comment: {}", this.getLicenseComment() );
LOG.debug( "SPDX Originator: {}", this.getOriginator() );
LOG.debug( "SPDX PackageArchiveFileName: {}", this.getPackageArchiveFileName() );
LOG.debug( "SPDX Short description: {}", this.getShortDescription() );
LOG.debug( "SPDX Supplier: {}", this.getSupplier() );
LOG.debug( "SPDX Source Info: {}", this.getSourceInfo() );
LOG.debug( "SPDX Version info: {}", this.getVersionInfo() );
LOG.debug( "SPDX Concluded license: {}", this.getConcludedLicense() );
LOG.debug( "SPDX Declared license: {}", this.getDeclaredLicense() );
LOG.debug( "SPDX Download URL: {}", this.getDownloadUrl() );
LOG.debug( "SPDX Home page: {}", this.getHomePage() );
if ( this.documentAnnotations != null && this.documentAnnotations.length > 0 )
{
LOG.debug( "Document annotations: " );
Expand All @@ -373,21 +373,22 @@ public void logInfo()
{
for ( String creator : creators )
{
LOG.debug("SPDX Creator: {}", creator);
LOG.debug( "SPDX Creator: {}", creator );
}
}
if ( this.externalRefs != null )
{
for ( ExternalReference externalReference : externalRefs )
{
LOG.debug("External Ref: {} {} {}", externalReference.getCategory(), externalReference.getType(), externalReference.getLocator());
LOG.debug( "External Ref: {} {} {}", externalReference.getCategory(),
externalReference.getType(), externalReference.getLocator() );
}
}
if ( checksums != null && !checksums.isEmpty())
{
for ( Checksum checksum : checksums )
{
LOG.debug("SPDX {}: {}", checksum.getAlgorithm(), checksum.getValue());
LOG.debug( "SPDX {}: {}", checksum.getAlgorithm(), checksum.getValue() );
}
}
}
Expand Down
Loading

0 comments on commit 5bfa29f

Please sign in to comment.