Skip to content

Commit

Permalink
Polish DynamicSharedResourcesDemo.
Browse files Browse the repository at this point in the history
Issue: #2677
  • Loading branch information
VladimirDmitrienko committed Sep 27, 2024
1 parent 249ab3e commit 67e7dc5
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,16 @@ void canSetCustomPropertyToBanana() {
assertEquals("banana", System.getProperty("my.prop"));
}

static final class Provider implements ResourceLocksProvider {
static class Provider implements ResourceLocksProvider {

@Override
public Set<Lock> provideForMethod(Class<?> testClass, Method testMethod) {
ResourceAccessMode mode;
if (testMethod.getName().equals("customPropertyIsNotSetByDefault")) {
mode = READ;
if (testMethod.getName().startsWith("canSet")) {
mode = READ_WRITE;
}
else {
mode = READ_WRITE;
mode = READ;
}
Set<Lock> locks = new HashSet<>();
locks.add(new Lock(SYSTEM_PROPERTIES, mode));
Expand Down

0 comments on commit 67e7dc5

Please sign in to comment.