46 lines
1.1 KiB
Plaintext
46 lines
1.1 KiB
Plaintext
:operationName: function
|
|
:visibility: private
|
|
|
|
include::../why.adoc[]
|
|
|
|
=== Code examples
|
|
|
|
=== Noncompliant code example
|
|
|
|
[source,kotlin,diff-id=1,diff-type=noncompliant]
|
|
----
|
|
class Foo: Serializable {
|
|
private fun unusedMethod() {...}
|
|
private fun writeObject(s: ObjectOutputStream) {...} // Compliant, relates to the serialization mechanism
|
|
private fun readObject(s: ObjectOutputStream) {...} // Compliant, relates to the serialization mechanism
|
|
}
|
|
----
|
|
|
|
=== Compliant solution
|
|
|
|
[source,kotlin,diff-id=1,diff-type=compliant]
|
|
----
|
|
class Foo: Serializable {
|
|
private fun writeObject(s: ObjectOutputStream) {...} // Compliant, relates to the serialization mechanism
|
|
private fun readObject(s: ObjectOutputStream) {...} // Compliant, relates to the serialization mechanism
|
|
}
|
|
----
|
|
|
|
include::../exceptions-jvm.adoc[]
|
|
|
|
ifdef::env-github,rspecator-view[]
|
|
|
|
'''
|
|
== Implementation Specification
|
|
(visible only on this page)
|
|
|
|
include::../message.adoc[]
|
|
|
|
'''
|
|
== Comments And Links
|
|
(visible only on this page)
|
|
|
|
include::../comments-and-links.adoc[]
|
|
|
|
endif::env-github,rspecator-view[]
|