24 lines
363 B
Plaintext
24 lines
363 B
Plaintext
== Why is this an issue?
|
|
|
|
include::../description.adoc[]
|
|
|
|
|
|
=== Noncompliant code example
|
|
|
|
[source,kotlin]
|
|
----
|
|
val fos = FileOutputStream(fileName, true) // fos opened in append mode
|
|
val out = ObjectOutputStream(fos) // Noncompliant
|
|
----
|
|
|
|
|
|
=== Compliant solution
|
|
|
|
[source,kotlin]
|
|
----
|
|
val fos = FileOutputStream(fileName)
|
|
val out = ObjectOutputStream(fos)
|
|
----
|
|
|
|
|