Skip to content

Commit

Permalink
Fixed TableSwitchStmt child orderings (#208)
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidBakerEffendi authored Sep 14, 2021
1 parent c65168d commit a53d074
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

### Fixed

- `TableSwitchStmt` jump targets now have the correct order

## [0.5.14] - 2021-09-08

### Added
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
*/
package io.github.plume.oss.passes.graph

import io.github.plume.oss.domain.mappers.ListMapper
import io.github.plume.oss.domain.model.DeltaGraph
import io.github.plume.oss.store.LocalCache
import io.github.plume.oss.store.PlumeStorage
Expand Down Expand Up @@ -472,7 +471,7 @@ class BaseCPGPass(private val g: BriefUnitGraph) {
.argumentIndex(i)
.lineNumber(Option.apply(tgt.javaSourceStartLineNumber))
.columnNumber(Option.apply(tgt.javaSourceStartColumnNumber))
.order(childIdx)
.order(i)
builder.addEdge(switchVertex, tgtV, AST)
addToStore(unit, tgtV)
}
Expand Down Expand Up @@ -507,7 +506,7 @@ class BaseCPGPass(private val g: BriefUnitGraph) {
.argumentIndex(lookupValue)
.lineNumber(Option.apply(tgt.javaSourceStartLineNumber))
.columnNumber(Option.apply(tgt.javaSourceStartColumnNumber))
.order(childIdx)
.order(lookupValue)
builder.addEdge(switchVertex, tgtV, AST)
addToStore(unit, tgtV)
}
Expand Down

0 comments on commit a53d074

Please sign in to comment.