/*
 * Copyright 2016, TeamDev Ltd. All rights reserved.
 *
 * Redistribution and use in source and/or binary forms, with or without
 * modification, must retain the above copyright notice and the following
 * disclaimer.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

package org.spine3.util;

/**
 * Provides information about the environment (current platform used, etc).
 *
 * @author Alexander Litus
 */
public class Environment {

    /**
     * The key of the Google AppEngine runtime version system property.
     */
    public static final String APP_ENGINE_RUNTIME_VERSION_KEY = "com.google.appengine.runtime.version";

    @SuppressWarnings("AccessOfSystemProperties")
    private static final String appEngineRuntimeVersion = System.getProperty(APP_ENGINE_RUNTIME_VERSION_KEY);

    protected Environment() {}

    /**
     * Returns the singleton instance.
     */
    public static Environment getInstance() {
        return Singleton.INSTANCE.value;
    }

    /**
     * Returns {@code true} if the code is running on the Google AppEngine,
     * {@code false} otherwise.
     */
    public boolean isAppEngine() {
        final boolean isVersionPresent = (appEngineRuntimeVersion != null) &&
                !appEngineRuntimeVersion.isEmpty();
        return isVersionPresent;
    }

    /**
     * Returns the current Google AppEngine version
     * retrieved by the key {@link Environment#APP_ENGINE_RUNTIME_VERSION_KEY}
     * or {@code null} if the program is running not on the AppEngine.
     */
    public String getAppEngineVersion() {
        return appEngineRuntimeVersion;
    }

    private enum Singleton {
        INSTANCE;
        @SuppressWarnings("NonSerializableFieldInSerializableClass")
        private final Environment value = new Environment();
    }
}

@@ -1036,16 +1036,51 @@
 .util;%0A%0A
+import javax.annotation.Nullable;%0A%0A
 /**%0A * P
@@ -1298,37 +1298,38 @@
 y.%0A     */%0A    p
-ublic
+rivate
  static final St
@@ -1453,24 +1453,38 @@
 roperties%22)%0A
+    @Nullable%0A
     private 
@@ -1625,31 +1625,31 @@
  /**%0A     * 
-R
+@r
 eturn
-s
  the singlet
@@ -1778,23 +1778,23 @@
 %0A     * 
-R
+@r
 eturn
-s
  %7B@code 
@@ -2111,15 +2111,15 @@
   * 
-R
+@r
 eturn
-s
  the
@@ -2156,87 +2156,8 @@
 ion%0A
-     * retrieved by the key %7B@link Environment#APP_ENGINE_RUNTIME_VERSION_KEY%7D%0A
     
@@ -2223,24 +2223,24 @@
 Engine.%0A
-
      */%0A
     publ
@@ -2223,32 +2223,46 @@
 Engine.%0A     */%0A
+    @Nullable%0A
     public Strin

Improve docs, add @Nullable annotation to AppEngine version.