Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import org.opalj.bi.TestResources.locateTestResources
import org.opalj.br.analyses.Project
import org.opalj.br.instructions.LDCDynamic
import org.opalj.br.instructions.WIDE
import org.opalj.log.GlobalLogContext

/**
* Test that code with dynamic constants is loaded without exceptions and after rewriting is still
Expand Down Expand Up @@ -76,7 +75,7 @@ class DynamicConstantsBytecodeStructureTest extends AnyFunSpec with Matchers {
rewrite = false,
logRewrites = false
)
val project = Project(dynamicConstantsJar, GlobalLogContext, config)
val project = Project(dynamicConstantsJar, config)
info(project.statistics.toList.map(_.toString).filter(_.startsWith("(Project")).mkString(","))

it("should be able to perform abstract interpretation of rewritten dynamic constants " +
Expand All @@ -90,7 +89,7 @@ class DynamicConstantsBytecodeStructureTest extends AnyFunSpec with Matchers {
rewrite = true,
logRewrites = false
)
val project = Project(dynamicConstantsJar, GlobalLogContext, config)
val project = Project(dynamicConstantsJar, config)
info(project.statistics.toList.map(_.toString).filter(_.startsWith("(Project")).mkString(","))

it("should be able to rewrite all dynamic constants in the dynamic constants test " +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import org.opalj.br.instructions.INVOKESTATIC
import org.opalj.br.instructions.WIDE
import org.opalj.br.reader.InvokedynamicRewriting.LambdaNameRegEx
import org.opalj.br.reader.InvokedynamicRewriting.TargetMethodNameRegEx
import org.opalj.log.GlobalLogContext

/**
* Test that code with rewritten `invokedynamic` instructions is still valid bytecode.
Expand Down Expand Up @@ -116,7 +115,7 @@ class InvokedynamicRewritingBytecodeStructureTest extends AnyFunSpec with Matche
rewrite = true,
logRewrites = false
).withValue(DeleteSynthesizedClassFilesAttributesConfigKey, configValueFalse)
val lambdas = Project(lambdasJar, GlobalLogContext, config)
val lambdas = Project(lambdasJar, config)
info(lambdas.statistics.toList.map(_.toString).filter(_.startsWith("(Project")).mkString(","))

it("should be able to perform abstract interpretation of rewritten Java lambda" +
Expand All @@ -135,7 +134,7 @@ class InvokedynamicRewritingBytecodeStructureTest extends AnyFunSpec with Matche
rewrite = true,
logRewrites = false
).withValue(DeleteSynthesizedClassFilesAttributesConfigKey, configValueFalse)
val stringConcat = Project(stringConcatJar, GlobalLogContext, config)
val stringConcat = Project(stringConcatJar, config)
info(stringConcat.statistics.toList.map(_.toString).filter(_.startsWith("(Project")).mkString(","))

it("should be able to perform abstract interpretation of rewritten Java string concat" +
Expand All @@ -154,7 +153,7 @@ class InvokedynamicRewritingBytecodeStructureTest extends AnyFunSpec with Matche
rewrite = true,
logRewrites = false
).withValue(DeleteSynthesizedClassFilesAttributesConfigKey, configValueFalse)
val records = Project(recordsJar, GlobalLogContext, config)
val records = Project(recordsJar, config)
info(records.statistics.toList.map(_.toString).filter(_.startsWith("(Project")).mkString(","))

it("should be able to perform abstract interpretation of rewritten Java 16 record" +
Expand All @@ -173,7 +172,7 @@ class InvokedynamicRewritingBytecodeStructureTest extends AnyFunSpec with Matche
rewrite = true,
logRewrites = false
).withValue(DeleteSynthesizedClassFilesAttributesConfigKey, configValueFalse)
val jre = Project(jrePath, GlobalLogContext, config)
val jre = Project(jrePath, config)
info(jre.statistics.toList.map(_.toString).filter(_.startsWith("(Project")).mkString(","))
it("should be able to perform abstract interpretation of rewritten Java lambda " +
"expressions in the JRE") {
Expand Down
7 changes: 1 addition & 6 deletions OPAL/apk/src/main/scala/org/opalj/apk/parser/ApkParser.scala
Original file line number Diff line number Diff line change
Expand Up @@ -256,12 +256,7 @@ object ApkParser {

val jarDir = apkParser.parseDexCode(dexParser)._1

val project =
Project(
jarDir.toFile,
GlobalLogContext,
projectConfig
)
val project = Project(jarDir.toFile, projectConfig)

project.updateProjectInformationKeyInitializationData(ApkComponentsKey)(_ => apkParser)
project.get(ApkComponentsKey)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -602,11 +602,11 @@ trait ClassFileReader extends ClassFileReaderConfiguration with Constant_PoolAbs
/**
* Loads class files from the given file location.
* - If the file denotes a single ".class" file this class file is loaded.
* - If the file object denotes a ".jar|.war|.ear|.zip" file, all class files in the
* jar file will be loaded.
* - If the file object denotes a ".jmod|.jar|.war|.ear|.zip" file, all class files in the
* archive file will be loaded.
* - If the file object specifies a directory object, all ".class" files
* in the directory and in all subdirectories are loaded as well as all
* class files stored in ".jar" files in one of the directories. This class loads
* class files stored in archive files in one of the directories. This class loads
* all class files in parallel. However, this does not affect analyses working on the
* resulting `List`.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ abstract class InvokedynamicRewritingTest extends AnyFunSuite {

val logContext = new StandardLogContext
OPALLogger.register(logContext)
val project = Project(libraryPath, logContext, config)
val project = Project(libraryPath, config, logContext)
val proxyFactoryCalls = this.proxyFactoryCalls(project)
assert(proxyFactoryCalls.nonEmpty, "there should be calls to the proxy factories")

Expand Down
Loading