From 5c735131eac67da8441b4a8d5145ac517c08f2eb Mon Sep 17 00:00:00 2001 From: Anton Makeev Date: Sat, 21 May 2011 17:58:25 +0200 Subject: [PATCH] AppCode: Build Settings: taking 'userBuildSettings' from '*.pbxuser' files into account (OC-926) --- .../util/src/com/intellij/util/SystemProperties.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/platform/util/src/com/intellij/util/SystemProperties.java b/platform/util/src/com/intellij/util/SystemProperties.java index 9367564c8cd4..5b3180cfd88a 100644 --- a/platform/util/src/com/intellij/util/SystemProperties.java +++ b/platform/util/src/com/intellij/util/SystemProperties.java @@ -15,6 +15,8 @@ */ package com.intellij.util; +import org.jetbrains.annotations.Nullable; + /** * Utility wrappers for accessing system properties. * @@ -23,6 +25,8 @@ package com.intellij.util; @SuppressWarnings({"HardCodedStringLiteral"}) public class SystemProperties { + private static String ourTestUserName; + private SystemProperties() { } @@ -36,7 +40,11 @@ public class SystemProperties { } public static String getUserName() { - return System.getProperty("user.name"); + return ourTestUserName != null ? ourTestUserName : System.getProperty("user.name"); + } + + public static void setTestUserName(@Nullable String name) { + ourTestUserName = name; } /**