Skip to content

Commit

Permalink
[ISSUE #558]Optimize SpecVersion attribute name
Browse files Browse the repository at this point in the history
Signed-off-by: mxsm <[email protected]>
  • Loading branch information
mxsm committed Apr 29, 2023
1 parent 4ebeab0 commit fe82dae
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions api/src/main/java/io/cloudevents/SpecVersion.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ public enum SpecVersion {
Arrays.asList("datacontenttype", "dataschema", "subject", "time")
);

private final String stringValue;
private final String version;
private final Set<String> mandatoryAttributes;
private final Set<String> optionalAttributes;
private final Set<String> allAttributes;

SpecVersion(String stringValue, Collection<String> mandatoryAttributes, Collection<String> optionalAttributes) {
this.stringValue = stringValue;
SpecVersion(String version, Collection<String> mandatoryAttributes, Collection<String> optionalAttributes) {
this.version = version;
this.mandatoryAttributes = Collections.unmodifiableSet(new HashSet<>(mandatoryAttributes));
this.optionalAttributes = Collections.unmodifiableSet(new HashSet<>(optionalAttributes));
this.allAttributes = Collections.unmodifiableSet(
Expand All @@ -62,7 +62,7 @@ public enum SpecVersion {

@Override
public String toString() {
return this.stringValue;
return this.version;
}

/**
Expand Down

0 comments on commit fe82dae

Please sign in to comment.