Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -722,15 +722,17 @@ public boolean matches(char[] target, Match match) {
*/
public boolean matches(char[] target, int start, int end, Match match) {

Context ctx;
synchronized (this) {
if (this.operations == null)
this.prepare();
if (this.context == null)
this.context = new Context();
ctx = this.context;
}
Context con = null;
synchronized (this.context) {
con = this.context.inuse ? new Context() : this.context;
synchronized (ctx) {
con = ctx.inuse ? new Context() : ctx;
con.reset(target, start, end, this.numberOfClosures);
}
if (match != null) {
Expand Down Expand Up @@ -907,15 +909,17 @@ public boolean matches(String target, Match match) {
*/
public boolean matches(String target, int start, int end, Match match) {

Context ctx;
synchronized (this) {
if (this.operations == null)
this.prepare();
if (this.context == null)
this.context = new Context();
ctx = this.context;
}
Context con = null;
synchronized (this.context) {
con = this.context.inuse ? new Context() : this.context;
synchronized (ctx) {
con = ctx.inuse ? new Context() : ctx;
con.reset(target, start, end, this.numberOfClosures);
}
if (match != null) {
Expand Down Expand Up @@ -1586,15 +1590,17 @@ public boolean matches(CharacterIterator target, Match match) {



Context ctx;
synchronized (this) {
if (this.operations == null)
this.prepare();
if (this.context == null)
this.context = new Context();
ctx = this.context;
}
Context con = null;
synchronized (this.context) {
con = this.context.inuse ? new Context() : this.context;
synchronized (ctx) {
con = ctx.inuse ? new Context() : ctx;
con.reset(target, start, end, this.numberOfClosures);
}
if (match != null) {
Expand Down