diff --git a/platform/util/src/com/intellij/openapi/util/objectTree/ObjectTree.java b/platform/util/src/com/intellij/openapi/util/objectTree/ObjectTree.java index 44b8576b7d23..4db2e7f0d6f6 100644 --- a/platform/util/src/com/intellij/openapi/util/objectTree/ObjectTree.java +++ b/platform/util/src/com/intellij/openapi/util/objectTree/ObjectTree.java @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2015 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package com.intellij.openapi.util.objectTree; import com.intellij.openapi.Disposable; @@ -34,8 +20,6 @@ import java.util.Set; import java.util.concurrent.atomic.AtomicLong; public final class ObjectTree { - private static final Logger LOG = Logger.getInstance("#com.intellij.openapi.util.objectTree.ObjectTree"); - private static final ThreadLocal ourTopmostDisposeTrace = new ThreadLocal<>(); private final List myListeners = ContainerUtil.createLockFreeCopyOnWriteList(); @@ -179,7 +163,7 @@ public final class ObjectTree { if (!exceptions.isEmpty()) { for (Throwable exception : exceptions) { if (!(exception instanceof ProcessCanceledException)) { - LOG.error(exception); + getLogger().error(exception); } } @@ -259,11 +243,16 @@ public final class ObjectTree { if (throwError) { throw exception; } - LOG.error(exception); + getLogger().error(exception); } } } - + + @NotNull + private static Logger getLogger() { + return Logger.getInstance("#com.intellij.openapi.util.objectTree.ObjectTree"); + } + @TestOnly public boolean isEmpty() { synchronized (treeLock) { diff --git a/platform/util/ui/src/com/intellij/util/ui/JBUI.java b/platform/util/ui/src/com/intellij/util/ui/JBUI.java index 89f0e3c7c8f0..203a70821dc9 100644 --- a/platform/util/ui/src/com/intellij/util/ui/JBUI.java +++ b/platform/util/ui/src/com/intellij/util/ui/JBUI.java @@ -3,7 +3,6 @@ package com.intellij.util.ui; import com.intellij.icons.AllIcons; import com.intellij.openapi.diagnostic.Logger; -import com.intellij.openapi.util.Disposer; import com.intellij.openapi.util.Pair; import com.intellij.openapi.util.SystemInfo; import com.intellij.openapi.util.registry.Registry; @@ -289,7 +288,9 @@ public class JBUI { // Downgrading user scale below 1.0 may be uncomfortable (tiny icons), // whereas some users prefer font size slightly below normal which is ok. - if (!Disposer.isDebugMode() && scale < 1 && sysScale() >= 1) scale = 1; + if (scale < 1 && sysScale() >= 1) { + scale = 1; + } // Ignore the correction when UIUtil.DEF_SYSTEM_FONT_SIZE is overridden, see UIUtil.initSystemFontData. if (SystemInfo.isLinux && scale == 1.25f && UIUtil.DEF_SYSTEM_FONT_SIZE == 12) {