/** * Perform expression compilation. This will only succeed once exit descriptors for all nodes have * been determined. If the compilation fails and has failed more than 100 times the expression is * no longer considered suitable for compilation. */ public boolean compileExpression() { if (this.failedAttempts > FAILED_ATTEMPTS_THRESHOLD) { // Don't try again return false; } if (this.compiledAst == null) { synchronized (this.expression) { // Possibly compiled by another thread before this thread got into the sync block if (this.compiledAst != null) { return true; } SpelCompiler compiler = SpelCompiler.getCompiler(this.configuration.getCompilerClassLoader()); this.compiledAst = compiler.compile(this.ast); if (this.compiledAst == null) { this.failedAttempts++; } } } return (this.compiledAst != null); }
/** * Perform expression compilation. This will only succeed once exit descriptors for all nodes have * been determined. If the compilation fails and has failed more than 100 times the expression is * no longer considered suitable for compilation. */ public boolean compileExpression() { if (this.failedAttempts > FAILED_ATTEMPTS_THRESHOLD) { // Don't try again return false; } if (this.compiledAst == null) { synchronized (this.expression) { // Possibly compiled by another thread before this thread got into the sync block if (this.compiledAst != null) { return true; } SpelCompiler compiler = SpelCompiler.getCompiler(this.configuration.getCompilerClassLoader()); this.compiledAst = compiler.compile(this.ast); if (this.compiledAst == null) { this.failedAttempts++; } } } return (this.compiledAst != null); }
/** * Perform expression compilation. This will only succeed once exit descriptors for all nodes have * been determined. If the compilation fails and has failed more than 100 times the expression is * no longer considered suitable for compilation. */ public boolean compileExpression() { if (this.failedAttempts > FAILED_ATTEMPTS_THRESHOLD) { // Don't try again return false; } if (this.compiledAst == null) { synchronized (this.expression) { // Possibly compiled by another thread before this thread got into the sync block if (this.compiledAst != null) { return true; } SpelCompiler compiler = SpelCompiler.getCompiler(this.configuration.getCompilerClassLoader()); this.compiledAst = compiler.compile(this.ast); if (this.compiledAst == null) { this.failedAttempts++; } } } return (this.compiledAst != null); }