Skip to content

Commit e0100b9

Browse files
authored
Merge pull request #1 from abhupadh/CI-7239
relaxing constraint for extension name validation
2 parents efe7e01 + 9785fd0 commit e0100b9

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

core/src/main/java/io/cloudevents/core/impl/BaseCloudEventBuilder.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ protected static IllegalStateException createEmptyAttributeException(String attr
224224
}
225225

226226
/**
227-
* Validates the extension name as defined in CloudEvents spec.
227+
* Validates the extension name as defined in CloudEvents spec.
228228
*
229229
* @param name the extension name
230230
* @return true if extension name is valid, false otherwise
@@ -240,7 +240,7 @@ private static boolean isValidExtensionName(String name) {
240240
}
241241

242242
private static boolean isValidChar(char c) {
243-
return (c >= 'a' && c <= 'z') || (c >= '0' && c <= '9');
243+
return (c >= 'a' && c <= 'z') || (c >= '0' && c <= '9') || c == '_';
244244
}
245245

246246
protected void requireValidAttributeWrite(String name) {

pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,11 @@
122122
<groupId>org.apache.maven.plugins</groupId>
123123
<artifactId>maven-surefire-plugin</artifactId>
124124
<version>${maven-surefire-plugin.version}</version>
125+
<configuration>
126+
<excludes>
127+
<exclude>**/*TestMicroprofile.java</exclude>
128+
</excludes>
129+
</configuration>
125130
</plugin>
126131
<plugin>
127132
<groupId>org.apache.maven.plugins</groupId>

0 commit comments

Comments
 (0)