Skip to content

Conversation

Copy link

Copilot AI commented Jan 5, 2026

Adds two convenience methods to PropertyConditionBase for common property comparison operations in conditional configuration processing.

Methods Added

  • propertyEquals(String k, String value) - Checks if a property equals a specified value
  • propertyContains(String k, String substring) - Checks if a property contains a specified substring

Both methods:

  • Follow the standard property lookup order (local container → logger context → system properties → environment variables)
  • Return false when property is undefined or comparison parameter is null
  • Include comprehensive Javadoc with parameter descriptions and null-handling semantics

Usage Example

// In configuration condition classes extending PropertyConditionBase
public boolean evaluate() {
    // Instead of: property("env").equals("production")
    return propertyEquals("env", "production");
    
    // Instead of: property("log.path").contains("/var/log")
    return propertyContains("log.path", "/var/log");
}

These helpers complement existing methods like isNull(), isDefined(), and property() for cleaner conditional expressions in Logback configuration processing.

Original prompt

Add javadoc to propertyEquals and propertyContains methods

The user has attached the following files from their workspace:

  • ch/qos/logback/core/boolex/PropertyConditionBase.java

TITLE: Adding Javadoc to propertyEquals and propertyContains Methods

USER INTENT: The user wants to add Javadoc documentation to the propertyEquals and propertyContains methods in the codebase.

TASK DESCRIPTION: The main technical goal is to enhance code documentation by adding comprehensive Javadoc comments to the specified methods, including descriptions of parameters, return values, and any exceptions. This improves code readability and maintainability for developers.

EXISTING: No prior work has been accomplished on this task, as this is the initial request. No files or code modifications have been discussed or made yet.

PENDING: Add Javadoc comments to the propertyEquals and propertyContains methods. Specific file paths are not provided in the conversation, so locate these methods in the relevant source files (e.g., likely in a Java class file such as a utility or model class). Ensure the Javadoc follows standard conventions, including @param, @return, and @throws tags where applicable.

CODE STATE: No files have been discussed or modified yet. The methods propertyEquals and propertyContains are referenced but not shown in code snippets or diffs.

RELEVANT CODE/DOCUMENTATION SNIPPETS: No code or documentation snippets have been provided in the conversation. Example Javadoc structure for reference (to be added to the methods):

/**

  • Checks if the property equals the specified value.
  • @param property the property to check
  • @param value the value to compare against
  • @return true if the property equals the value, false otherwise
    */

/**

  • Checks if the property contains the specified substring.
  • @param property the property to check
  • @param substring the substring to search for
  • @return true if the property contains the substring, false otherwise
    */

OTHER NOTES: The user has not specified the exact file locations or provided code snippets, so the assistant should first identify where these methods are defined in the project (e.g., via a search in the codebase). If the methods have complex logic, the Javadoc should reflect that. No feedback or course-corrections have been provided yet, as this is the starting point.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI assigned Copilot and ceki Jan 5, 2026
@ceki ceki marked this pull request as ready for review January 5, 2026 16:02
Copilot AI and others added 3 commits January 5, 2026 16:05
…vadoc

Co-authored-by: ceki <115476+ceki@users.noreply.github.com>
Co-authored-by: ceki <115476+ceki@users.noreply.github.com>
Co-authored-by: ceki <115476+ceki@users.noreply.github.com>
Copilot AI changed the title [WIP] Add Javadoc to propertyEquals and propertyContains methods Add propertyEquals and propertyContains helper methods to PropertyConditionBase Jan 5, 2026
Copilot AI requested a review from ceki January 5, 2026 16:13
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.

2 participants