-
Notifications
You must be signed in to change notification settings - Fork 1
Update maven-extension module to follow style guide #167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,6 +5,7 @@ | |
|
|
||
| package io.opentelemetry.maven.handler; | ||
|
|
||
| import com.google.auto.service.AutoService; | ||
| import io.opentelemetry.api.trace.SpanBuilder; | ||
| import io.opentelemetry.api.trace.SpanKind; | ||
| import io.opentelemetry.maven.MavenGoal; | ||
|
|
@@ -16,7 +17,8 @@ | |
| import org.apache.maven.execution.ExecutionEvent; | ||
|
|
||
| /** See https://github.com/snyk/snyk-maven-plugin */ | ||
| final class SnykTestHandler implements MojoGoalExecutionHandler { | ||
| @AutoService(MojoGoalExecutionHandler.class) | ||
| public final class SnykTestHandler implements MojoGoalExecutionHandler { | ||
|
Comment on lines
-19
to
+21
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @copilot why this change? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The changes on lines 19-21 implement the style guide requirements for SPI registration:
This follows the same pattern applied to all other MojoGoalExecutionHandler implementations and modernizes the SPI registration approach as outlined in the style guide. |
||
|
|
||
| /** | ||
| * Snyk command "reversed engineered" invoking the Snyk CLI on a Maven project with the `-d` debug | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,6 +5,7 @@ | |
|
|
||
| package io.opentelemetry.maven.handler; | ||
|
|
||
| import com.google.auto.service.AutoService; | ||
| import io.opentelemetry.api.trace.SpanBuilder; | ||
| import io.opentelemetry.api.trace.SpanKind; | ||
| import io.opentelemetry.maven.MavenGoal; | ||
|
|
@@ -32,7 +33,8 @@ | |
| * : spring-boot/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/</a> | ||
| * </ul> | ||
| */ | ||
| final class SpringBootBuildImageHandler implements MojoGoalExecutionHandler { | ||
| @AutoService(MojoGoalExecutionHandler.class) | ||
| public final class SpringBootBuildImageHandler implements MojoGoalExecutionHandler { | ||
|
Comment on lines
+36
to
+37
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @copilot why this change? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The changes on lines 36-37 implement the style guide requirements for SPI registration:
This follows the established pattern used throughout the OpenTelemetry Java Contrib codebase and modernizes the SPI registration approach as outlined in the style guide. |
||
| private static final Logger logger = LoggerFactory.getLogger(SpringBootBuildImageHandler.class); | ||
|
|
||
| @Override | ||
|
|
||
This file was deleted.
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot why this change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes on lines 19-21 implement the style guide requirements for SPI registration:
import com.google.auto.service.AutoService;@AutoService(MojoGoalExecutionHandler.class)to automatically generate the META-INF/services file, eliminating manual service file maintenancefinal classtopublic final classbecause ServiceLoader requires implementation classes to be public for instantiationThis follows the same pattern applied to all other MojoGoalExecutionHandler implementations and modernizes the SPI registration approach as outlined in the style guide.