Skip to content

Commit a57524d

Browse files
committed
Fixed SQ issues
1 parent 9055ebb commit a57524d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/main/kotlin/ConfigurationParser.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,19 @@ class ConfigurationParser {
2525
try {
2626
val context = JAXBContext.newInstance(Device::class.java, Set::class.java, Random::class.java, Delay::class.java, Linear::class.java, Add::class.java, Sub::class.java, Csv::class.java, IfEqual::class.java, Parameters::class.java, Parameter::class.java)
2727
val unmarshaller = context.createUnmarshaller()
28-
if(fileName.isEmpty() ) {
28+
return if(fileName.isEmpty() ) {
2929
val reader = StringReader(this::class.java.classLoader.getResource("configuration.xml")!!.readText())
3030
val device = unmarshaller.unmarshal(reader) as Device
31-
return device
31+
device
3232
}else {
3333
if(readFromResources) {
3434
val reader = StringReader(this::class.java.classLoader.getResource(fileName)!!.readText())
3535
val device = unmarshaller.unmarshal(reader) as Device
36-
return device
36+
device
3737
}else {
3838
val bufferedReader: BufferedReader = File(fileName).bufferedReader()
3939
val device = unmarshaller.unmarshal(bufferedReader) as Device
40-
return device
40+
device
4141
}
4242
}
4343
} catch (e: JAXBException) {

0 commit comments

Comments
 (0)