Skip to content

Commit

Permalink
GH-1097 - Upgrade to ArchUnit 1.4.
Browse files Browse the repository at this point in the history
  • Loading branch information
odrotbohm committed Feb 26, 2025
1 parent f0016c8 commit 423f54d
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

<properties>

<archunit.version>1.3.0</archunit.version>
<archunit.version>1.4.0</archunit.version>
<artifactory-maven-plugin.version>3.6.2</artifactory-maven-plugin.version>
<flapdoodle-mongodb.version>4.16.1</flapdoodle-mongodb.version>
<jgit.version>7.0.0.202409031743-r</jgit.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ public void onApplicationEvent(ApplicationEvent event) {
return;
}

var object = payloadEvent.getPayload();
var payloadType = object.getClass();
var payload = payloadEvent.getPayload();
var payloadType = payload.getClass();

if (!runtime.isApplicationClass(payloadType)) {
return;
Expand All @@ -98,7 +98,7 @@ public void onApplicationEvent(ApplicationEvent event) {
.tags(ModulithMetrics.LowKeys.MODULE_NAME.name().toLowerCase(), moduleByType.getDisplayName()) //
.register(registry).increment();

factory.createCounterBuilder(event).register(registry).increment();
factory.createCounterBuilder(payload).register(registry).increment();
}

var observation = observationRegistry.get().getCurrentObservation();
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
* Copyright 2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.modulith.observability.support;

/**
*
* @author Oliver Drotbohm
*/
public class ModuleEventListenerUnitTests {

}

0 comments on commit 423f54d

Please sign in to comment.