Record Class SnapshotScanner.Violation

java.lang.Object
java.lang.Record
network.ike.plugin.SnapshotScanner.Violation
Record Components:
pomFile - the POM file containing the reference
location - descriptor of the element location (e.g. "properties/ike-tooling.version" or "pluginManagement/plugin[ike-maven-plugin]")
value - the SNAPSHOT-ending value found
Enclosing class:
SnapshotScanner

public static record SnapshotScanner.Violation(File pomFile, String location, String value) extends Record
A single SNAPSHOT reference that would leak into a released POM.
  • Constructor Details

    • Violation

      public Violation(File pomFile, String location, String value)
      Creates an instance of a Violation record class.
      Parameters:
      pomFile - the value for the pomFile record component
      location - the value for the location record component
      value - the value for the value record component
  • Method Details

    • toBullet

      public String toBullet(File gitRoot)
      Format this violation as a single indented bullet for an aggregated error message.
      Parameters:
      gitRoot - the repository root used to relativize the POM path; may be null for absolute paths
      Returns:
      a single-line bullet formatted for log output
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • pomFile

      public File pomFile()
      Returns the value of the pomFile record component.
      Returns:
      the value of the pomFile record component
    • location

      public String location()
      Returns the value of the location record component.
      Returns:
      the value of the location record component
    • value

      public String value()
      Returns the value of the value record component.
      Returns:
      the value of the value record component