aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-plugin-api
diff options
context:
space:
mode:
authorDuarte Meneses <duarte.meneses@sonarsource.com>2019-05-14 16:02:43 -0500
committerSonarTech <sonartech@sonarsource.com>2019-05-16 20:21:08 +0200
commit74cbdd7c043e8e9ee51d7c18aeef86db386df136 (patch)
tree480cb1cca1765b6a0d985cb754de31d325604a4e /sonar-plugin-api
parent9240dd9a15b317d94c1db5c94281398a16b2b36a (diff)
downloadsonarqube-74cbdd7c043e8e9ee51d7c18aeef86db386df136.tar.gz
sonarqube-74cbdd7c043e8e9ee51d7c18aeef86db386df136.zip
SONAR-12108 Support Java 11 RTE
Diffstat (limited to 'sonar-plugin-api')
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/utils/System2.java19
1 files changed, 6 insertions, 13 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/utils/System2.java b/sonar-plugin-api/src/main/java/org/sonar/api/utils/System2.java
index 2f2ee31eef1..36dc553a74e 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/utils/System2.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/utils/System2.java
@@ -21,14 +21,13 @@ package org.sonar.api.utils;
import java.net.URL;
import java.time.Clock;
-import java.util.Date;
import java.util.Map;
import java.util.Properties;
import java.util.TimeZone;
import javax.annotation.CheckForNull;
import org.apache.commons.lang.SystemUtils;
-import org.sonar.api.scanner.ScannerSide;
import org.sonar.api.ce.ComputeEngineSide;
+import org.sonar.api.scanner.ScannerSide;
import org.sonar.api.server.ServerSide;
/**
@@ -61,7 +60,6 @@ import org.sonar.api.server.ServerSide;
* Note that the name System2 was chosen to not conflict with {@link java.lang.System}.
* <br>
* An instance is available in IoC container since 4.3.
- *
* Since 6.4 you can also inject {@link Clock} instead of {@link System2} if you are only interested by date/time operations
*
* @since 4.2
@@ -98,6 +96,7 @@ public class System2 {
/**
* Shortcut for {@code System{@link #setProperty(String, String)}}
+ *
* @since 6.4
*/
public System2 setProperty(String key, String value) {
@@ -129,6 +128,7 @@ public class System2 {
/**
* True if Java 7 or Java 8 runtime environment
+ *
* @since 4.3
* @deprecated in 6.4. Java 8+ is required, so this method always returns {@code true}.
*/
@@ -142,24 +142,16 @@ public class System2 {
}
/**
- * @deprecated in 5.2. Please use {@link #now()}
- */
- @Deprecated
- public Date newDate() {
- return new Date();
- }
-
- /**
- * @since 5.1
* @return the JVM's default time zone
+ * @since 5.1
*/
public TimeZone getDefaultTimeZone() {
return TimeZone.getDefault();
}
/**
- * @since 5.5
* @see Class#getResource(String)
+ * @since 5.5
*/
public URL getResource(String name) {
return getClass().getResource(name);
@@ -167,6 +159,7 @@ public class System2 {
/**
* Closes the object and throws an {@link java.lang.IllegalStateException} on error.
+ *
* @since 5.1
*/
public void close(AutoCloseable closeable) {