rspec/rules/S3276/java/rule.adoc
2022-02-04 16:28:24 +00:00

47 lines
871 B
Plaintext

The ``++@Remote++`` annotation indicates that an interface may be called from a remote client. Therefore the parameters and return types of methods in the interface must be ``++Serializable++``.
== Noncompliant Code Example
[source,java]
----
public class Employee { // Nonserializable
}
@Remote
public interface EmployeeServiceRemote {
public Employee getEmployee(String id); // Noncompliant
}
----
== Compliant Solution
[source,java]
----
public class Employee implements Serializable{
}
@Remote
public interface EmployeeServiceRemote {
public Employee getEmployee(String id); // Noncompliant
}
----
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[]