mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
[211534] Changed the constructor of the singleton class to private (try #2).
This commit is contained in:
parent
4e224fce0a
commit
84e4230f31
1 changed files with 11 additions and 1 deletions
|
@ -19,9 +19,19 @@ import java.util.concurrent.Executor;
|
|||
* @see RequestMonitor
|
||||
*/
|
||||
public class ImmediateExecutor implements Executor {
|
||||
|
||||
private static ImmediateExecutor fInstance = new ImmediateExecutor();
|
||||
|
||||
private static Executor getInstance() {
|
||||
/**
|
||||
* The default constructor is hidden. {@link #getInstance()} should be
|
||||
* used instead.
|
||||
*/
|
||||
private ImmediateExecutor() {}
|
||||
|
||||
/**
|
||||
* Returns the singleton instance of ImmediateExecutor.
|
||||
*/
|
||||
public static Executor getInstance() {
|
||||
return fInstance;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue