Skip to content

Commit

Permalink
- bug fixes
Browse files Browse the repository at this point in the history
- when generated method was changed to non-public access modifier NullPointerException was thrown
  • Loading branch information
spolnik committed Feb 7, 2017
1 parent 0475282 commit 46749ec
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gradle/versioning.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//noinspection GroovyAssignabilityCheck
version = new ProjectVersion(
'1', '0', '26', System.env.TRAVIS_BUILD_NUMBER
'1', '0', '27', System.env.TRAVIS_BUILD_NUMBER
)

println "Version number: " + version
Expand Down
3 changes: 2 additions & 1 deletion src/main/kotlin/com/jalgoarena/compile/JvmCompiler.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package com.jalgoarena.compile
import com.jalgoarena.JudgeApplication
import org.slf4j.LoggerFactory
import java.lang.reflect.Method
import java.lang.reflect.Modifier
import java.net.URL
import java.net.URLClassLoader

Expand All @@ -16,7 +17,7 @@ interface JvmCompiler {
)

clazz.declaredMethods
.filter { it.name == methodName && it.parameterCount == parameterCount }
.filter { it.name == methodName && it.parameterCount == parameterCount && Modifier.isPublic(it.modifiers)}
.forEach {
try {
return Pair(clazz.newInstance(), it)
Expand Down
2 changes: 1 addition & 1 deletion src/test/kotlin/com/jalgoarena/web/JudgeControllerSpec.kt
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ class JudgeControllerSpec {
return 1L
""")

private val FIB_SOURCE_CODE_WITH_MEMORY_ARRAY = sourceCode("""val numbersFromOne = IntArray(100000) { it + 1 }
private val FIB_SOURCE_CODE_WITH_MEMORY_ARRAY = sourceCode("""val numbersFromOne = IntArray(200000) { it + 1 }
var a: Long = 0
var b: Long = 1
Expand Down

0 comments on commit 46749ec

Please sign in to comment.