Skip to content

Commit 5a5ef2d

Browse files
committed
Configuration.getObservedState(): check for ConfigurationInternal.InternalState.UNRESOLVED only
1 parent 623bbbc commit 5a5ef2d

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/main/kotlin/nebula/plugin/resolutionrules/configurations.kt

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,7 @@ fun Configuration.getObservedState(): Configuration.State {
5959
val f: Field = this::class.java.findDeclaredField("observedState")
6060
f.isAccessible = true
6161
val resolvedState = f.get(this) as ConfigurationInternal.InternalState
62-
if (resolvedState != ConfigurationInternal.InternalState.ARTIFACTS_RESOLVED && resolvedState != ConfigurationInternal.InternalState.GRAPH_RESOLVED) {
63-
return Configuration.State.UNRESOLVED
64-
} else
65-
//whether resolution contained error is not handled
66-
return Configuration.State.RESOLVED
62+
return if(resolvedState != ConfigurationInternal.InternalState.UNRESOLVED)
63+
Configuration.State.RESOLVED else Configuration.State.UNRESOLVED
6764
}
6865

0 commit comments

Comments
 (0)