Skip to content

Commit

Permalink
Merge pull request #19547 from paulrobinson/conscious_language
Browse files Browse the repository at this point in the history
Conscious Language Updates
  • Loading branch information
gastaldi authored Aug 24, 2021
2 parents 03b6258 + 5483df8 commit 6bae936
Show file tree
Hide file tree
Showing 15 changed files with 19 additions and 46 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ public static class DefaultIgnoreTypePredicate implements Predicate<DotName> {
"org.reactivestreams.", "org.slf4j.", "javax.json.", "com.fasterxml.jackson.databind.",
"io.vertx.core.json.");
// if this gets more complicated we will need to move to some tree like structure
static final Set<String> WHITELISTED_FROM_IGNORED_PACKAGES = new HashSet<>(
static final Set<String> ALLOWED_FROM_IGNORED_PACKAGES = new HashSet<>(
Arrays.asList("java.math.BigDecimal", "java.math.BigInteger"));

static final List<String> PRIMITIVE = Arrays.asList("boolean", "byte",
Expand All @@ -225,21 +225,21 @@ public boolean test(DotName dotName) {
}
for (String containerPackageName : DEFAULT_IGNORED_PACKAGES) {
if (name.startsWith(containerPackageName)) {
return !WHITELISTED_FROM_IGNORED_PACKAGES.contains(name);
return !ALLOWED_FROM_IGNORED_PACKAGES.contains(name);
}
}
return false;
}

}

public static class IgnoreWhiteListedPredicate implements Predicate<DotName> {
public static class IgnoreAllowListedPredicate implements Predicate<DotName> {

public static IgnoreWhiteListedPredicate INSTANCE = new IgnoreWhiteListedPredicate();
public static IgnoreAllowListedPredicate INSTANCE = new IgnoreAllowListedPredicate();

@Override
public boolean test(DotName dotName) {
return DefaultIgnoreTypePredicate.WHITELISTED_FROM_IGNORED_PACKAGES.contains(dotName.toString());
return DefaultIgnoreTypePredicate.ALLOWED_FROM_IGNORED_PACKAGES.contains(dotName.toString());
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ private interface ReflectiveHierarchyVisitor {

@BuildStep
public ReflectiveHierarchyIgnoreWarningBuildItem ignoreJavaClassWarnings() {
return new ReflectiveHierarchyIgnoreWarningBuildItem(ReflectiveHierarchyBuildItem.IgnoreWhiteListedPredicate.INSTANCE);
return new ReflectiveHierarchyIgnoreWarningBuildItem(ReflectiveHierarchyBuildItem.IgnoreAllowListedPredicate.INSTANCE);
}

@BuildStep
Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/asciidoc/cassandra.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ We recommend that you follow the instructions in the next sections and create th
by step. However, you can go right to the completed example.

The solution is located in the
link:https://github.com/datastax/cassandra-quarkus/tree/master/quickstart[quickstart directory] of
link:https://github.com/datastax/cassandra-quarkus/tree/main/quickstart[quickstart directory] of
the Cassandra Quarkus extension GitHub repository.

== Creating a Blank Maven Project
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
////
This guide is maintained in the main Quarkus repository
and pull requests should be submitted there:
https://github.com/quarkusio/quarkus/tree/master/docs/src/main/asciidoc
https://github.com/quarkusio/quarkus/tree/main/docs/src/main/asciidoc
////
= Conditional Extension Dependencies

Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/asciidoc/deploying-to-heroku.adoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
////
This guide is maintained in the main Quarkus repository
and pull requests should be submitted there:
https://github.com/quarkusio/quarkus/tree/master/docs/src/main/asciidoc
https://github.com/quarkusio/quarkus/tree/main/docs/src/main/asciidoc
////
= Deploying to Heroku
include::./attributes.adoc[]
Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/asciidoc/ide-tooling.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The following IDEs have support for the community developed Quarkus Tools:
* https://marketplace.visualstudio.com/items?itemName=redhat.vscode-quarkus[Quarkus Tools for Visual Studio Code]
* https://marketplace.eclipse.org/content/quarkus-tools[Quarkus Tools for Eclipse]
* https://plugins.jetbrains.com/plugin/13234-quarkus/versions[Quarkus Tools for IntelliJ]
* https://github.com/eclipse/che-devfile-registry/blob/master/devfiles/quarkus/devfile.yaml[Quarkus Tools for Eclipse Che]
* https://github.com/eclipse/che-devfile-registry/blob/main/devfiles/quarkus/devfile.yaml[Quarkus Tools for Eclipse Che]
In addition IntelliJ has additional support for Quarkus in their Ultimate non-open source version.

Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/asciidoc/lra.adoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
////
This guide is maintained in the main Quarkus repository
and pull requests should be submitted there:
https://github.com/quarkusio/quarkus/tree/master/docs/src/main/asciidoc
https://github.com/quarkusio/quarkus/tree/main/docs/src/main/asciidoc
////
= Narayana LRA Participant Support

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*
* The accepted platform format is: <os>|<arch>[/variant]|<os>/<arch>[/variant]
* The default OS is linux and the default Architecture is amd64 (as in Jib lib)
* Valid values for OS and Arch are define by OCI. See <a href="https://github.com/opencontainers/image-spec/blob/master/image-index.md">image-index</a>
* Valid values for OS and Arch are define by OCI. See <a href="https://github.com/opencontainers/image-spec/blob/main/image-index.md">image-index</a>
*
*/
final class PlatformHelper {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class JdbcSecurityRealmRuntimeConfig {
*/
@ConfigItem(name = "principal-query")
public PrincipalQueriesConfig principalQueries;
// https://github.com/wildfly/wildfly-core/blob/master/elytron/src/test/resources/org/wildfly/extension/elytron/security-realms.xml#L18
// https://github.com/wildfly/wildfly-core/blob/main/elytron/src/test/resources/org/wildfly/extension/elytron/security-realms.xml#L18

@Override
public String toString() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class TestAnalogs {
private fun KClass<*>.bytes() =
java.classLoader.getResourceAsStream(qualifiedName.toString().replace(".", "/") + ".class")

private fun compare(javaClass: AnalogVisitor, kotlinClass: AnalogVisitor, whiteList: List<String> = listOf()) {
private fun compare(javaClass: AnalogVisitor, kotlinClass: AnalogVisitor, allowList: List<String> = listOf()) {
val javaMethods = javaClass.methods
val kotlinMethods = kotlinClass.methods
val implemented = mutableListOf<Method>()
Expand All @@ -97,7 +97,7 @@ class TestAnalogs {

javaMethods.removeIf {
it.name.endsWith("Optional") ||
it.name in whiteList ||
it.name in allowList ||
it in implemented
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ class TestAnalogs {
private fun KClass<*>.bytes() =
java.classLoader.getResourceAsStream(qualifiedName.toString().replace(".", "/") + ".class")

private fun compare(javaClass: AnalogVisitor, kotlinClass: AnalogVisitor, whiteList: List<String> = listOf()) {
private fun compare(javaClass: AnalogVisitor, kotlinClass: AnalogVisitor, allowList: List<String> = listOf()) {
val javaMethods = javaClass.methods
val kotlinMethods = kotlinClass.methods
val implemented = mutableListOf<Method>()
Expand All @@ -132,7 +132,7 @@ class TestAnalogs {
}

javaMethods.removeIf {
it.name in whiteList ||
it.name in allowList ||
it in implemented
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -731,7 +731,7 @@ public long getCount() {
/**
* Mimics Uptime metrics from Micrometer. Most of the logic here is basically copied from
* {@link <a href=
* "https://github.com/micrometer-metrics/micrometer/blob/master/micrometer-core/src/main/java/io/micrometer/core/instrument/binder/system/UptimeMetrics.java">Micrometer
* "https://github.com/micrometer-metrics/micrometer/blob/main/micrometer-core/src/main/java/io/micrometer/core/instrument/binder/system/UptimeMetrics.java">Micrometer
* Uptime metrics</a>}.
*
* @param registry
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,13 +247,6 @@ public void registerUndertowHandlersConf(BuildProducer<ServletExtensionBuildItem
}
}

@BuildStep
List<IgnoredServletContainerInitializerBuildItem> translateDeprecated(
List<BlacklistedServletContainerInitializerBuildItem> old) {
return old.stream().map(BlacklistedServletContainerInitializerBuildItem::getSciClass)
.map(IgnoredServletContainerInitializerBuildItem::new).collect(Collectors.toList());
}

/*
* look for Servlet container initializers
*
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

// This code was Heavily influenced from spring forward header parser
// https://github.com/spring-projects/spring-framework/blob/master/spring-web/src/main/java/org/springframework/web/util/UriComponentsBuilder.java#L849
// https://github.com/spring-projects/spring-framework/blob/main/spring-web/src/main/java/org/springframework/web/util/UriComponentsBuilder.java#L849

package io.quarkus.vertx.http.runtime;

Expand Down

0 comments on commit 6bae936

Please sign in to comment.