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
14 changes: 7 additions & 7 deletions core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ dependencies {
api group: 'io.monix', name: 'monix_3', version: '3.4.1'
api group: 'eu.timepit', name: 'refined_3', version: '0.11.3'
api group: 'org.reflections', name: 'reflections', version: '0.9.11'
api group: 'org.mozilla', name: 'rhino', version: '1.7.14'
api group: 'org.mozilla', name: 'rhino', version: '1.8.1'
api group: 'com.github.ben-manes.caffeine', name: 'caffeine', version: '3.1.8'
api group: 'com.github.tototoshi', name: 'scala-csv_3', version: '1.4.1'
api group: 'org.scala-lang.modules', name: 'scala-parallel-collections_3', version: '1.0.4'
Expand All @@ -104,12 +104,12 @@ dependencies {
testImplementation group: 'com.dimafeng', name: 'testcontainers-scala-core_3', version: '0.44.0'

constraints {
api group: 'io.netty', name: 'netty-codec-http2', version: '4.1.126.Final'
api group: 'io.netty', name: 'netty-handler-proxy', version: '4.1.126.Final'
api group: 'io.netty', name: 'netty-resolver-dns', version: '4.1.126.Final'
api group: 'io.netty', name: 'netty-transport-native-unix-common', version: '4.1.126.Final'
api group: 'io.netty', name: 'netty-transport-native-epoll', version: '4.1.126.Final'
api group: 'io.netty', name: 'netty-transport-native-kqueue', version: '4.1.126.Final'
api group: 'io.netty', name: 'netty-codec-http2', version: '4.1.130.Final'
api group: 'io.netty', name: 'netty-handler-proxy', version: '4.1.130.Final'
api group: 'io.netty', name: 'netty-resolver-dns', version: '4.1.130.Final'
api group: 'io.netty', name: 'netty-transport-native-unix-common', version: '4.1.130.Final'
api group: 'io.netty', name: 'netty-transport-native-epoll', version: '4.1.130.Final'
api group: 'io.netty', name: 'netty-transport-native-kqueue', version: '4.1.130.Final'
api group: 'com.google.guava', name: 'guava', version: '32.0.1-jre'
api group: 'io.spray', name: 'spray-json_3', version: '1.3.6'
api group: 'org.asynchttpclient', name: 'async-http-client', version: '3.0.1'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ object MozillaJsCompiler
// - maybe the empty SecurityManager created by ES <8.0,8.18) somehow confuses Rhino permission checks and interferes with permissions we add through patching
// - or some combination of all those factors
//
// In order to omit using ClassLoader's we need to set optimization level to `-1` (a bit worse performance, but it concerns only reading few values from config)
context.setOptimizationLevel(-1)
// In order to omit using ClassLoader's we need to set interpreted mod (a bit worse performance, but it concerns only reading few values from config)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Fix typo in comment.

The comment contains a typo: "interpreted mod" should be "interpreted mode".

🔎 Proposed fix
-          // In order to omit using ClassLoader's we need to set interpreted mod (a bit worse performance, but it concerns only reading few values from config)
+          // In order to omit using ClassLoader's we need to set interpreted mode (a bit worse performance, but it concerns only reading few values from config)
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// In order to omit using ClassLoader's we need to set interpreted mod (a bit worse performance, but it concerns only reading few values from config)
// In order to omit using ClassLoader's we need to set interpreted mode (a bit worse performance, but it concerns only reading few values from config)
🤖 Prompt for AI Agents
In core/src/main/scala/tech/beshu/ror/utils/js/MozillaJsCompiler.scala around
line 72, the inline comment contains a typo: replace "interpreted mod" with
"interpreted mode" so the comment reads correctly; update the comment text
preserving original meaning and punctuation.

context.setInterpretedMode(true)
context
}
)(
Expand Down
Loading