Skip to content

Conversation

@copybara-service
Copy link

feat: Fix a handful of small changes related to headers, logging and javadoc

  1. License Headers: Adds the Apache License 2.0 header to several Java files (BaseToolset.java, GoogleMapsTool.java, LoadMemoryTool.java, NamedToolPredicate.java, ToolPredicate.java, IntegrationConnectorTool.java, and ModelNameUtils.java).
  2. Logging: Replaces System.out.println and System.err.println with slf4j logger calls (logger.error) in ExampleUtils.java, GoogleSearchTool.java, and IntegrationConnectorTool.java for better error handling and logging practices.
  3. JSON Handling: In ExampleUtils.java, switches from a dedicated ObjectMapper instance to using JsonBaseModel.getMapper() for JSON serialization.
  4. Thread Safety Doc: Adds a note to the javadoc for EventStream.java indicating that the class is not thread-safe.
  5. ToolConfirmation.java: Makes the create() method package-private.
  6. BuiltInCodeExecutionTool.java: Adds a public static INSTANCE field for easy access.
  7. ModelNameUtils.java: Makes the class final.

@copybara-service copybara-service bot force-pushed the test_861215601 branch 2 times, most recently from 7060b2f to 874cb25 Compare January 27, 2026 16:45
…javadoc

1.  **License Headers**: Adds the Apache License 2.0 header to several Java files (`BaseToolset.java`, `GoogleMapsTool.java`, `LoadMemoryTool.java`, `NamedToolPredicate.java`, `ToolPredicate.java`, `IntegrationConnectorTool.java`, and `ModelNameUtils.java`).
2.  **Logging**: Replaces `System.out.println` and `System.err.println` with `slf4j` logger calls (`logger.error`) in `ExampleUtils.java`, `GoogleSearchTool.java`, and `IntegrationConnectorTool.java` for better error handling and logging practices.
3.  **JSON Handling**: In `ExampleUtils.java`, switches from a dedicated `ObjectMapper` instance to using `JsonBaseModel.getMapper()` for JSON serialization.
4.  **Thread Safety Doc**: Adds a note to the javadoc for `EventStream.java` indicating that the class is not thread-safe.
5.  **`ToolConfirmation.java`**: Makes the `create()` method package-private.
6.  **`BuiltInCodeExecutionTool.java`**: Adds a public static `INSTANCE` field for easy access.
7.  **`ModelNameUtils.java`**: Makes the class `final`.

PiperOrigin-RevId: 861745391
@copybara-service copybara-service bot merged commit 0b63ca3 into main Jan 27, 2026
@copybara-service copybara-service bot deleted the test_861215601 branch January 27, 2026 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant