Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Watson2013-03-07 20:01:28 +0000
committerThomas Watson2013-03-07 20:07:53 +0000
commitb0ce00715f964306ae494c0bf2e570c609fbb4c6 (patch)
tree2cfabc77dd3c93a3456e1e7e8c977332b097a05d /bundles/org.eclipse.equinox.util
parent42720c8cceb95f9267352f84b4f291c623810c8d (diff)
downloadrt.equinox.bundles-b0ce00715f964306ae494c0bf2e570c609fbb4c6.tar.gz
rt.equinox.bundles-b0ce00715f964306ae494c0bf2e570c609fbb4c6.tar.xz
rt.equinox.bundles-b0ce00715f964306ae494c0bf2e570c609fbb4c6.zip
Bug 399617 - jsr14 still present in CBII20130307-2000
Diffstat (limited to 'bundles/org.eclipse.equinox.util')
-rw-r--r--bundles/org.eclipse.equinox.util/pom.xml2
-rw-r--r--bundles/org.eclipse.equinox.util/src/org/eclipse/equinox/internal/util/impl/tpt/threadpool/ThreadPoolManagerImpl.java6
-rw-r--r--bundles/org.eclipse.equinox.util/src/org/eclipse/equinox/internal/util/security/PrivilegedRunner.java8
3 files changed, 9 insertions, 7 deletions
diff --git a/bundles/org.eclipse.equinox.util/pom.xml b/bundles/org.eclipse.equinox.util/pom.xml
index c6de158d1..5015b8008 100644
--- a/bundles/org.eclipse.equinox.util/pom.xml
+++ b/bundles/org.eclipse.equinox.util/pom.xml
@@ -34,7 +34,7 @@
<artifactId>tycho-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
- <target>jsr14</target>
+ <target>1.5</target>
</configuration>
</plugin>
</plugins>
diff --git a/bundles/org.eclipse.equinox.util/src/org/eclipse/equinox/internal/util/impl/tpt/threadpool/ThreadPoolManagerImpl.java b/bundles/org.eclipse.equinox.util/src/org/eclipse/equinox/internal/util/impl/tpt/threadpool/ThreadPoolManagerImpl.java
index 68b826b70..08d1eca84 100644
--- a/bundles/org.eclipse.equinox.util/src/org/eclipse/equinox/internal/util/impl/tpt/threadpool/ThreadPoolManagerImpl.java
+++ b/bundles/org.eclipse.equinox.util/src/org/eclipse/equinox/internal/util/impl/tpt/threadpool/ThreadPoolManagerImpl.java
@@ -81,9 +81,11 @@ public class ThreadPoolManagerImpl extends ObjectPool implements TimerListener,
}
public Object getInstance() throws Exception {
- Object result = (ServiceFactoryImpl.privileged()) ? AccessController.doPrivileged(this) : new Executor();
+ if (ServiceFactoryImpl.privileged()) {
+ return AccessController.doPrivileged(this);
+ }
- return result;
+ return new Executor();
}
public Object run() {
diff --git a/bundles/org.eclipse.equinox.util/src/org/eclipse/equinox/internal/util/security/PrivilegedRunner.java b/bundles/org.eclipse.equinox.util/src/org/eclipse/equinox/internal/util/security/PrivilegedRunner.java
index 43f51b1b6..db10c4326 100644
--- a/bundles/org.eclipse.equinox.util/src/org/eclipse/equinox/internal/util/security/PrivilegedRunner.java
+++ b/bundles/org.eclipse.equinox.util/src/org/eclipse/equinox/internal/util/security/PrivilegedRunner.java
@@ -99,10 +99,10 @@ public final class PrivilegedRunner implements ObjectCreator {
* if security manager is set - then privileged execution is
* started
*/
- return (context != null)
- //
- ? AccessController.doPrivileged(runner, (AccessControlContext) context)
- : AccessController.doPrivileged(runner);
+ if (context != null) {
+ return AccessController.doPrivileged(runner, (AccessControlContext) context);
+ }
+ return AccessController.doPrivileged(runner);
}
/* if no security manager is set - simply run the action */
return runner.run();

Back to the top