Skip to content

Commit

Permalink
Cleanup some issues to be able to release
Browse files Browse the repository at this point in the history
  • Loading branch information
radcortez committed Aug 31, 2022
1 parent 8797480 commit c362ff4
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,9 @@ public <T> T convertValue(ConfigValue configValue, Converter<T> converter) {
configValue = configValue.noProblems();
} else {
ConfigValidationException.Problem problem = problems.get(0);
if (problem.getException().isPresent()) {
throw problem.getException().get();
Optional<RuntimeException> exception = problem.getException();
if (exception.isPresent()) {
throw exception.get();
}
}
}
Expand All @@ -276,25 +277,25 @@ public <T> T convertValue(ConfigValue configValue, Converter<T> converter) {
try {
converted = converter.convert(configValue.getValue());
} catch (IllegalArgumentException e) {
throw ConfigMessages.msg.converterException(e, configValue.getName(), configValue.getValue(),
throw ConfigMessages.msg.converterException(e, configValue.getNameProfiled(), configValue.getValue(),
e.getLocalizedMessage()); // 1
}
} else {
try {
// See if the Converter is designed to handle a missing (null) value i.e. Optional Converters
converted = converter.convert("");
} catch (IllegalArgumentException ignored) {
throw new NoSuchElementException(ConfigMessages.msg.propertyNotFound(configValue.getName())); // 2
throw new NoSuchElementException(ConfigMessages.msg.propertyNotFound(configValue.getNameProfiled())); // 2
}
}

if (converted == null) {
if (configValue.getValue() == null) {
throw new NoSuchElementException(ConfigMessages.msg.propertyNotFound(configValue.getName())); // 2
throw new NoSuchElementException(ConfigMessages.msg.propertyNotFound(configValue.getNameProfiled())); // 2
} else if (configValue.getValue().length() == 0) {
throw ConfigMessages.msg.propertyEmptyString(configValue.getName(), converter.getClass().getTypeName()); // 3
throw ConfigMessages.msg.propertyEmptyString(configValue.getNameProfiled(), converter.getClass().getTypeName()); // 3
} else {
throw ConfigMessages.msg.converterReturnedNull(configValue.getName(), configValue.getValue(),
throw ConfigMessages.msg.converterReturnedNull(configValue.getNameProfiled(), configValue.getValue(),
converter.getClass().getTypeName()); // 4
}
}
Expand Down
2 changes: 2 additions & 0 deletions testsuite/tck/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@

<properties>
<dependency.version.openwebbeans>2.0.27</dependency.version.openwebbeans>
<tck.skip.owb>false</tck.skip.owb>
</properties>

<build>
Expand Down Expand Up @@ -75,6 +76,7 @@
<goal>test</goal>
</goals>
<configuration>
<skip>${tck.skip.owb}</skip>
<classpathDependencyExcludes>
<exclude>org.jboss.weld:weld-core-impl</exclude>
<exclude>org.jboss.arquillian.container:arquillian-weld-embedded</exclude>
Expand Down
24 changes: 12 additions & 12 deletions to-jakarta.sh
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
#!/usr/bin/env bash

# move to jakarta parent
find . -type f -name 'pom.xml' -exec sed -i '' 's/smallrye-parent/smallrye-jakarta-parent/g' {} +
find . -type f -name 'pom.xml' -exec sed -i'' -e 's/smallrye-parent/smallrye-jakarta-parent/g' {} +
# java sources
find . -type f -name '*.java' -exec sed -i '' 's/javax./jakarta./g' {} +
find . -type f -name '*.java' -exec sed -i'' -e 's/javax./jakarta./g' {} +
# service loader files
find . -path "*/src/main/resources/META-INF/services/javax*" | sed -e 'p;s/javax/jakarta/g' | xargs -n2 git mv
# docs
find documentation -type f -name '*.md' -exec sed -i '' 's/javax./jakarta./g' {} +
find documentation -type f -name '*.md' -exec sed -i'' -e 's/javax./jakarta./g' {} +

mvn build-helper:parse-version versions:set -DnewVersion=\${parsedVersion.nextMajorVersion}.0.0-SNAPSHOT
find examples -depth 1 -type d | xargs -I{} mvn -pl {} build-helper:parse-version versions:set -DnewVersion=\${parsedVersion.nextMajorVersion}.0.0-SNAPSHOT
mvn -ntp build-helper:parse-version versions:set -DnewVersion=\${parsedVersion.nextMajorVersion}.0.0-SNAPSHOT
find examples -maxdepth 1 -type d | xargs -I{} mvn -ntp -pl {} build-helper:parse-version versions:set -DnewVersion=\${parsedVersion.nextMajorVersion}.0.0-SNAPSHOT

mvn versions:update-property -Dproperty=version.eclipse.microprofile.config -DnewVersion=3.0
mvn -ntp versions:update-property -Dproperty=version.eclipse.microprofile.config -DnewVersion=3.0
#https://issues.sonatype.org/browse/MVNCENTRAL-6872
#mvn versions:update-property -Dproperty=version.jakarta.validation -DnewVersion=3.0
sed -i '' 's/validation>2.0.2</validation>3.0.1</g' validator/pom.xml
mvn versions:update-property -Dproperty=version.hibernate.validator -DnewVersion=7.0.1.Final
mvn versions:update-property -Dproperty=version.jakarta.el -DnewVersion=4.0
mvn versions:update-property -Dproperty=version.smallrye.common -DnewVersion=2.0.0-RC1
mvn versions:update-property -Dproperty=version.smallrye.testing.utilities -DnewVersion=2.0.0-RC1
#mvn -ntp versions:update-property -Dproperty=version.jakarta.validation -DnewVersion=3.0
sed -i'' -e 's/validation>2.0.2</validation>3.0.1</g' validator/pom.xml
mvn -ntp versions:update-property -Dproperty=version.hibernate.validator -DnewVersion=7.0.1.Final
mvn -ntp versions:update-property -Dproperty=version.jakarta.el -DnewVersion=4.0
mvn -ntp versions:update-property -Dproperty=version.smallrye.common -DnewVersion=2.0.0-RC1
mvn -ntp versions:update-property -Dproperty=version.smallrye.testing.utilities -DnewVersion=2.0.0-RC1

0 comments on commit c362ff4

Please sign in to comment.