From 2bcb6060eed255e601d5a61738ca5caed02937c8 Mon Sep 17 00:00:00 2001 From: Vladimir Krivosheev Date: Sat, 27 Oct 2018 11:18:06 +0200 Subject: [PATCH] update guava to 26.0 Not to 27.0 to ensure gradual upgrade --- .idea/libraries/Guava.xml | 6 +++--- .../build/CommunityLibraryLicenses.groovy | 2 +- .../javascript/debugger/NameMapper.kt | 20 +++---------------- .../python/console/PyConsoleUtil.java | 20 +++---------------- .../ide/browsers/StartBrowserSettings.java | 3 ++- 5 files changed, 12 insertions(+), 39 deletions(-) diff --git a/.idea/libraries/Guava.xml b/.idea/libraries/Guava.xml index fe284cec7c73..5366cebda2a8 100644 --- a/.idea/libraries/Guava.xml +++ b/.idea/libraries/Guava.xml @@ -1,12 +1,12 @@ - + - + - + \ No newline at end of file diff --git a/platform/build-scripts/groovy/org/jetbrains/intellij/build/CommunityLibraryLicenses.groovy b/platform/build-scripts/groovy/org/jetbrains/intellij/build/CommunityLibraryLicenses.groovy index 5b2629ebfffa..95e5289fe97f 100644 --- a/platform/build-scripts/groovy/org/jetbrains/intellij/build/CommunityLibraryLicenses.groovy +++ b/platform/build-scripts/groovy/org/jetbrains/intellij/build/CommunityLibraryLicenses.groovy @@ -180,7 +180,7 @@ class CommunityLibraryLicenses { new LibraryLicense(name: "Groovy", version: "2.4.6", license: "Apache 2.0", url: "http://groovy-lang.org/"), new LibraryLicense(name: "Gson", version: "2.8.4", libraryName: "gson", license: "Apache 2.0", url: "http://code.google.com/p/google-gson/"), - new LibraryLicense(name: "Guava", version: "23.6", license: "Apache 2.0", url: "http://code.google.com/p/guava-libraries/", + new LibraryLicense(name: "Guava", version: "26.0", license: "Apache 2.0", url: "http://code.google.com/p/guava-libraries/", licenseUrl: "http://ant.apache.org/license.html"), new LibraryLicense(name: "hamcrest", version: "1.3", license: "BSD", url: "http://hamcrest.org/", licenseUrl: "http://opensource.org/licenses/BSD-3-Clause"), diff --git a/platform/script-debugger/debugger-ui/src/com/intellij/javascript/debugger/NameMapper.kt b/platform/script-debugger/debugger-ui/src/com/intellij/javascript/debugger/NameMapper.kt index c75eae1f92c3..fc573e3a47f8 100644 --- a/platform/script-debugger/debugger-ui/src/com/intellij/javascript/debugger/NameMapper.kt +++ b/platform/script-debugger/debugger-ui/src/com/intellij/javascript/debugger/NameMapper.kt @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2016 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-2018 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.javascript.debugger import com.google.common.base.CharMatcher @@ -28,9 +14,9 @@ import org.jetbrains.rpc.LOG private val S1 = ",()[]{}=" // don't trim trailing .&: - could be part of expression -private val OPERATOR_TRIMMER = CharMatcher.INVISIBLE.or(CharMatcher.anyOf(S1)) +private val OPERATOR_TRIMMER = CharMatcher.invisible().or(CharMatcher.anyOf(S1)) -val NAME_TRIMMER: CharMatcher = CharMatcher.INVISIBLE.or(CharMatcher.anyOf(S1 + ".&:")) +val NAME_TRIMMER: CharMatcher = CharMatcher.invisible().or(CharMatcher.anyOf("$S1.&:")) // generateVirtualFile only for debug purposes open class NameMapper(private val document: Document, private val transpiledDocument: Document, private val sourceMappings: Mappings, protected val sourceMap: SourceMap, private val transpiledFile: VirtualFile? = null) { diff --git a/python/src/com/jetbrains/python/console/PyConsoleUtil.java b/python/src/com/jetbrains/python/console/PyConsoleUtil.java index 02a4ddf74bd3..50dfde2c7fdc 100644 --- a/python/src/com/jetbrains/python/console/PyConsoleUtil.java +++ b/python/src/com/jetbrains/python/console/PyConsoleUtil.java @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2014 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-2018 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.jetbrains.python.console; import com.google.common.base.CharMatcher; @@ -56,7 +42,7 @@ public class PyConsoleUtil { private static final String IPYTHON_PAGING_PROMPT = "---Return to continue, q to quit---"; - static final String[] PROMPTS = new String[]{ + private static final String[] PROMPTS = new String[]{ ORDINARY_PROMPT, INDENT_PROMPT, HELP_PROMPT, @@ -189,7 +175,7 @@ public class PyConsoleUtil { Document document = editor.getDocument(); int lineStart = document.getLineStartOffset(document.getLineNumber(offset)); String textToCursor = document.getText(new TextRange(lineStart, offset)); - e.getPresentation().setEnabled(!CharMatcher.WHITESPACE.matchesAllOf(textToCursor)); + e.getPresentation().setEnabled(!CharMatcher.whitespace().matchesAllOf(textToCursor)); } }; diff --git a/xml/impl/src/com/intellij/ide/browsers/StartBrowserSettings.java b/xml/impl/src/com/intellij/ide/browsers/StartBrowserSettings.java index f93e16b5d070..7db443065713 100644 --- a/xml/impl/src/com/intellij/ide/browsers/StartBrowserSettings.java +++ b/xml/impl/src/com/intellij/ide/browsers/StartBrowserSettings.java @@ -1,3 +1,4 @@ +// Copyright 2000-2018 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.ide.browsers; import com.google.common.base.CharMatcher; @@ -47,7 +48,7 @@ public class StartBrowserSettings { public void setUrl(@Nullable String value) { String normalized = StringUtil.nullize(value, true); if (normalized != null) { - normalized = CharMatcher.WHITESPACE.trimFrom(normalized); + normalized = CharMatcher.whitespace().trimFrom(normalized); } myUrl = normalized; }