rspec/rules/S6002/java/rule.adoc

33 lines
527 B
Plaintext

== Why is this an issue?
include::../description.adoc[]
=== Noncompliant code example
[source,java]
----
Pattern.compile("(?=a)b"); // Noncompliant, the same character can't be equal to 'a' and 'b' at the same time
----
=== Compliant solution
[source,java]
----
Pattern.compile("(?<=a)b");
Pattern.compile("a(?=b)");
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::../message.adoc[]
include::../highlighting.adoc[]
endif::env-github,rspecator-view[]