Skip to content

Commit

Permalink
Throw when name node is missing for accessible class
Browse files Browse the repository at this point in the history
  • Loading branch information
jpenilla committed Oct 26, 2023
1 parent 97f4ffc commit cc594da
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

package io.papermc.paperweight.tasks

import io.papermc.paperweight.PaperweightException
import io.papermc.paperweight.util.*
import io.papermc.paperweight.util.constants.*
import java.nio.file.Files
Expand Down Expand Up @@ -382,7 +383,7 @@ abstract class RemapSources : JavaLauncherTask() {

if (!accessibleTargetCls.isCastCompatible(accessible[0])) {
val name = getNameNode(accessibleTargetCls)
?: return@also
?: throw PaperweightException("Could not find name node for ${accessibleTargetCls.qualifiedName}")
thisExpr.qualifier = rewrite.createCopyTarget(name) as Name
}
}
Expand Down

0 comments on commit cc594da

Please sign in to comment.