Skip to content

Commit

Permalink
Merge pull request #3301 from eclipse-xtext/dependabot/maven/guava-up…
Browse files Browse the repository at this point in the history
…dates-9c6dc04b8d

Bump the guava-updates group with 3 updates
  • Loading branch information
cdietrich authored Dec 27, 2024
2 parents 104098e + 059d582 commit 05de65c
Show file tree
Hide file tree
Showing 27 changed files with 54 additions and 61 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2013, 2016 itemis AG (http://www.itemis.eu) and others.
* Copyright (c) 2013, 2024 itemis AG (http://www.itemis.eu) and others.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
Expand All @@ -8,6 +8,7 @@
*******************************************************************************/
package org.eclipse.xtend.core.tests.compiler;

import java.nio.charset.StandardCharsets;
import java.util.Collections;
import java.util.Set;

Expand All @@ -28,7 +29,6 @@
import org.junit.Test;
import org.junit.runner.RunWith;

import com.google.common.base.Charsets;
import com.google.inject.Inject;

/**
Expand All @@ -43,27 +43,27 @@ public class UnicodeAwarePostProcessorTest extends Assert implements IJvmModelAs

@Test
public void testUTF8_plain() {
CharSequence result = postProcessor.postProcess(URI.createFileURI("com/acme/MyFile.java"), "\u03b1\u03c1\u03b5\u03c4\u03b7", Charsets.UTF_8);
CharSequence result = postProcessor.postProcess(URI.createFileURI("com/acme/MyFile.java"), "\u03b1\u03c1\u03b5\u03c4\u03b7", StandardCharsets.UTF_8);
assertEquals("\u03b1\u03c1\u03b5\u03c4\u03b7", result.toString());
}

@Test
public void testISO_8859_1_plain() {
CharSequence result = postProcessor.postProcess(URI.createFileURI("com/acme/MyFile.java"), "\u03b1\u03c1\u03b5\u03c4\u03b7", Charsets.ISO_8859_1);
CharSequence result = postProcessor.postProcess(URI.createFileURI("com/acme/MyFile.java"), "\u03b1\u03c1\u03b5\u03c4\u03b7", StandardCharsets.ISO_8859_1);
assertEquals("\\u03b1\\u03c1\\u03b5\\u03c4\\u03b7", result.toString());
}

@Test
public void testOnlyJavaEscaped() {
CharSequence result = postProcessor.postProcess(URI.createFileURI("com/acme/MyFile.notJava"), "\u03b1\u03c1\u03b5\u03c4\u03b7", Charsets.ISO_8859_1);
CharSequence result = postProcessor.postProcess(URI.createFileURI("com/acme/MyFile.notJava"), "\u03b1\u03c1\u03b5\u03c4\u03b7", StandardCharsets.ISO_8859_1);
assertEquals("\u03b1\u03c1\u03b5\u03c4\u03b7", result.toString());
}

@Test
public void testUTF8_tree() {
TreeAppendable treeAppendable = new TreeAppendable(null, null, this, this, EcoreFactory.eINSTANCE.createEObject(), " ", "\n");
treeAppendable.append("\u03b1\u03c1\u03b5\u03c4\u03b7");
CharSequence result = postProcessor.postProcess(URI.createFileURI("com/acme/MyFile.java"), treeAppendable, Charsets.UTF_8);
CharSequence result = postProcessor.postProcess(URI.createFileURI("com/acme/MyFile.java"), treeAppendable, StandardCharsets.UTF_8);
assertSame(treeAppendable, result);
assertEquals("\u03b1\u03c1\u03b5\u03c4\u03b7", result.toString());
}
Expand All @@ -72,7 +72,7 @@ public void testUTF8_tree() {
public void testISO_8859_1_tree() {
TreeAppendable treeAppendable = new TreeAppendable(null, null, this, this, EcoreFactory.eINSTANCE.createEObject(), " ", "\n");
treeAppendable.append("\u03b1\u03c1\u03b5\u03c4\u03b7");
CharSequence result = postProcessor.postProcess(URI.createFileURI("com/acme/MyFile.java"), treeAppendable, Charsets.ISO_8859_1);
CharSequence result = postProcessor.postProcess(URI.createFileURI("com/acme/MyFile.java"), treeAppendable, StandardCharsets.ISO_8859_1);
assertSame(treeAppendable, result);
assertEquals("\\u03b1\\u03c1\\u03b5\\u03c4\\u03b7", result.toString());
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2012, 2022 itemis AG (http://www.itemis.eu) and others.
* Copyright (c) 2012, 2024 itemis AG (http://www.itemis.eu) and others.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
Expand All @@ -8,7 +8,6 @@
*******************************************************************************/
package org.eclipse.xtend.core.tests.compiler.batch

import com.google.common.base.Charsets
import com.google.common.io.Files
import com.google.inject.Inject
import java.io.File
Expand All @@ -29,6 +28,7 @@ import org.junit.runner.RunWith

import static org.eclipse.xtext.util.Files.*
import static org.junit.Assert.*
import java.nio.charset.StandardCharsets

/**
* Batch compiler tests.
Expand Down Expand Up @@ -466,7 +466,8 @@ class BatchCompilerTest {
}

def private String getContents(String fileName) {
Files.asCharSource(new File(fileName), Charsets.UTF_8).read()
Files.asCharSource(new File(fileName), StandardCharsets.UTF_8
).read()
}

@Test
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2012, 2022 itemis AG (http://www.itemis.eu) and others.
* Copyright (c) 2012, 2024 itemis AG (http://www.itemis.eu) and others.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
Expand All @@ -8,11 +8,11 @@
*/
package org.eclipse.xtend.core.tests.compiler.batch;

import com.google.common.base.Charsets;
import com.google.inject.Inject;
import java.io.File;
import java.io.FilenameFilter;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.util.List;
import java.util.Set;
import java.util.function.Consumer;
Expand Down Expand Up @@ -696,7 +696,7 @@ private boolean isSymlink(final File file) {
private String getContents(final String fileName) {
try {
File _file = new File(fileName);
return com.google.common.io.Files.asCharSource(_file, Charsets.UTF_8).read();
return com.google.common.io.Files.asCharSource(_file, StandardCharsets.UTF_8).read();
} catch (Throwable _e) {
throw Exceptions.sneakyThrow(_e);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Bundle-SymbolicName: xtend-annotation-examples-client
Bundle-Version: 2.38.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-17
Require-Bundle: org.eclipse.xtend.lib,
com.google.guava;bundle-version="[33.3.1,34.0.0)",
com.google.guava;bundle-version="[33.4.0,34.0.0)",
org.eclipse.xtext.xbase.lib;bundle-version="2.38.0",
xtend-annotation-examples;bundle-version="2.4.3"
Bundle-Vendor: Eclipse Xtext
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Bundle-SymbolicName: xtend-annotation-examples
Bundle-Version: 2.38.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-17
Require-Bundle: org.eclipse.xtend.lib,
com.google.guava;bundle-version="[33.3.1,34.0.0)",
com.google.guava;bundle-version="[33.4.0,34.0.0)",
org.eclipse.xtext.xbase.lib;bundle-version="2.38.0",
org.junit;bundle-version="4.13.2",
org.eclipse.xtend.core,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
*******************************************************************************/
package org.eclipse.xtend.ide.tests.compiler

import com.google.common.base.Charsets
import com.google.common.io.CharStreams
import com.google.inject.Inject
import java.io.InputStreamReader
import java.nio.charset.StandardCharsets
import org.eclipse.core.resources.IFile
import org.eclipse.core.resources.IMarker
import org.eclipse.core.resources.IProject
Expand All @@ -20,6 +20,7 @@ import org.eclipse.ui.texteditor.MarkerUtilities
import org.eclipse.xtend.ide.internal.XtendActivator
import org.eclipse.xtend.ide.tests.WorkbenchTestHelper
import org.eclipse.xtext.ui.testing.util.IResourcesSetupUtil
import org.eclipse.xtext.ui.testing.util.TargetPlatformUtil
import org.eclipse.xtext.util.JavaVersion
import org.junit.After
import org.junit.AfterClass
Expand All @@ -29,7 +30,6 @@ import org.junit.BeforeClass
import org.junit.Test

import static org.eclipse.xtext.ui.testing.util.IResourcesSetupUtil.*
import org.eclipse.xtext.ui.testing.util.TargetPlatformUtil

/**
* @author Miro Spoenemann - Initial contribution and API
Expand Down Expand Up @@ -84,7 +84,7 @@ class JavaVersionSettingTest extends Assert {
assertTrue("Generated Java file does not exist.", javaFile.exists)
assertNoErrors(javaFile)
val javaFileStream = javaFile.contents
val content = CharStreams.toString(new InputStreamReader(javaFileStream, Charsets.UTF_8))
val content = CharStreams.toString(new InputStreamReader(javaFileStream, StandardCharsets.UTF_8))
javaFileStream.close
return content
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
*/
package org.eclipse.xtend.ide.tests.compiler;

import com.google.common.base.Charsets;
import com.google.common.io.CharStreams;
import com.google.inject.Inject;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.resources.IProject;
Expand Down Expand Up @@ -106,7 +106,7 @@ private String getJavaFileContent(final String fileName, final IProject project)
Assert.assertTrue("Generated Java file does not exist.", javaFile.exists());
this.assertNoErrors(javaFile);
final InputStream javaFileStream = javaFile.getContents();
InputStreamReader _inputStreamReader = new InputStreamReader(javaFileStream, Charsets.UTF_8);
InputStreamReader _inputStreamReader = new InputStreamReader(javaFileStream, StandardCharsets.UTF_8);
final String content = CharStreams.toString(_inputStreamReader);
javaFileStream.close();
return content;
Expand Down
2 changes: 1 addition & 1 deletion org.eclipse.xtend.sdk.feature/feature.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ SPDX-License-Identifier: EPL-2.0
<requires>
<import feature="org.eclipse.xtext.ui" version="2.38.0" match="equivalent"/>
<import feature="org.eclipse.xtext.xbase.lib" version="2.38.0" match="equivalent"/>
<import plugin="com.google.guava" version="33.3.1" match="compatible"/>
<import plugin="com.google.guava" version="33.4.0" match="compatible"/>
<import plugin="org.apache.log4j" version="1.2.24" match="equivalent"/>
</requires>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2012, 2017 itemis AG (http://www.itemis.eu) and others.
* Copyright (c) 2012, 2024 itemis AG (http://www.itemis.eu) and others.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
Expand All @@ -11,6 +11,7 @@
import java.io.IOException;
import java.io.InputStream;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;

import org.apache.log4j.Logger;
import org.eclipse.core.resources.IProject;
Expand Down Expand Up @@ -43,7 +44,6 @@
import org.eclipse.xtext.util.Pair;
import org.eclipse.xtext.util.Tuples;

import com.google.common.base.Charsets;
import com.google.inject.Inject;
import com.google.inject.Provider;
import com.google.inject.Singleton;
Expand Down Expand Up @@ -155,7 +155,7 @@ protected Charset getSourceEncoding(final ITypeRoot derivedJavaType) {
return Charset.forName(ResourcesPlugin.getWorkspace().getRoot().getDefaultCharset());
} catch (CoreException e) {
log.error("Error determining encoding for source file for " + derivedJavaType.getElementName(), e);
return Charsets.UTF_8;
return StandardCharsets.UTF_8;
}
}

Expand Down
6 changes: 3 additions & 3 deletions org.eclipse.xtext.dev-bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -158,17 +158,17 @@
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava-gwt</artifactId>
<version>33.3.1-jre</version>
<version>33.4.0-jre</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava-testlib</artifactId>
<version>33.3.1-jre</version>
<version>33.4.0-jre</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>33.3.1-jre</version>
<version>33.4.0-jre</version>
</dependency>
<dependency>
<groupId>com.google.inject</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import org.eclipse.lsp4j.DidChangeWorkspaceFoldersParams;
import org.eclipse.lsp4j.InitializeParams;
import org.eclipse.lsp4j.InitializeResult;
import org.eclipse.lsp4j.NotebookDocumentChangeEvent;
import org.eclipse.lsp4j.WorkspaceClientCapabilities;
import org.eclipse.lsp4j.WorkspaceFolder;
import org.eclipse.lsp4j.WorkspaceFoldersChangeEvent;
Expand Down
4 changes: 2 additions & 2 deletions org.eclipse.xtext.p2repository/category.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
<category name="Xtext"/>
</feature>

<bundle id="com.google.guava" version="33.3.1.qualifier"/>
<bundle id="com.google.guava.source" version="33.3.1.qualifier"/>
<bundle id="com.google.guava" version="33.4.0.qualifier"/>
<bundle id="com.google.guava.source" version="33.4.0.qualifier"/>
<bundle id="com.google.guava.failureaccess" version="1.0.2.qualifier"/>
<bundle id="com.google.guava.failureaccess.source" version="1.0.2.qualifier"/>
<bundle id="com.google.inject" version="7.0.0.qualifier"/>
Expand Down
2 changes: 1 addition & 1 deletion org.eclipse.xtext.redist.feature/feature.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ SPDX-License-Identifier: EPL-2.0
version="0.0.0"/>

<requires>
<import plugin="com.google.guava" version="33.3.1" match="compatible"/>
<import plugin="com.google.guava" version="33.4.0" match="compatible"/>
<import plugin="com.google.inject" version="7.0.0" match="compatible"/>
<import plugin="org.apache.log4j" version="1.2.24" match="equivalent"/>
<import plugin="org.objectweb.asm" version="9.7.1" match="compatible"/>
Expand Down
2 changes: 1 addition & 1 deletion org.eclipse.xtext.runtime.feature/feature.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ SPDX-License-Identifier: EPL-2.0
%license
</license>
<requires>
<import plugin="com.google.guava" version="33.3.1" match="compatible"/>
<import plugin="com.google.guava" version="33.4.0" match="compatible"/>
<import plugin="com.google.inject" version="7.0.0" match="compatible"/>
<import plugin="org.apache.log4j" version="1.2.24" match="equivalent"/>
<import plugin="org.objectweb.asm" version="9.7.1" match="compatible"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2015, 2020 itemis AG (http://www.itemis.eu) and others.
* Copyright (c) 2015, 2024 itemis AG (http://www.itemis.eu) and others.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
Expand All @@ -11,6 +11,7 @@
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
Expand Down Expand Up @@ -43,7 +44,6 @@
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;

import com.google.common.base.Charsets;
import com.google.common.collect.Lists;
import com.google.common.collect.Sets;

Expand Down Expand Up @@ -288,7 +288,7 @@ public String toString() {
}
};
result.setXtextVersion(new XtextVersion("unspecified"));
result.setEncoding(Charsets.UTF_8);
result.setEncoding(StandardCharsets.UTF_8);
result.setLineDelimiter(LineDelimiter.UNIX.getValue());
result.getLanguage().setName("mydsl.MyDsl");
result.getLanguage().setFileExtensions(LanguageDescriptor.FileExtensions.fromString("mydsl"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,6 @@
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.editors.text.TextEditor;
import org.eclipse.ui.texteditor.DefaultMarkerAnnotationAccess;
import org.eclipse.ui.texteditor.IDocumentProvider;
import org.eclipse.ui.texteditor.IDocumentProviderExtension3;
import org.eclipse.ui.texteditor.ITextEditor;
import org.eclipse.ui.texteditor.ITextEditorActionConstants;
import org.eclipse.ui.texteditor.ITextEditorActionDefinitionIds;
Expand Down
2 changes: 1 addition & 1 deletion org.eclipse.xtext.util/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Export-Package: org.eclipse.xtext.util;version="2.38.0";
org.eclipse.xtext.xbase,
org.eclipse.xtext.xbase.tests"
Require-Bundle: org.eclipse.emf.ecore;bundle-version="2.36.0",
com.google.guava;bundle-version="[33.3.1,34.0.0)";visibility:=reexport,
com.google.guava;bundle-version="[33.4.0,34.0.0)";visibility:=reexport,
com.google.inject;bundle-version="7.0.0";visibility:=reexport,
com.google.guava.failureaccess;bundle-version="[1.0.2,2.0.0)";visibility:=reexport,
jakarta.inject.jakarta.inject-api;bundle-version="2.0.1";resolution:=optional;visibility:=reexport;x-installation:=greedy,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2015, 2020 itemis AG (http://www.itemis.eu) and others.
* Copyright (c) 2015, 2024 itemis AG (http://www.itemis.eu) and others.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
Expand All @@ -9,13 +9,13 @@
package org.eclipse.xtext.web.server.test;

import java.io.File;
import java.nio.charset.StandardCharsets;

import org.eclipse.xtext.web.server.XtextServiceDispatcher;
import org.eclipse.xtext.web.server.persistence.ResourceContentResult;
import org.junit.Assert;
import org.junit.Test;

import com.google.common.base.Charsets;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableMap.Builder;
import com.google.common.io.Files;
Expand Down Expand Up @@ -88,7 +88,7 @@ public void testSaveFile() throws Exception {
nb().put("serviceType", "save").put("resource", file.getName()).build(), session);
Assert.assertTrue(save.isHasSideEffects());
save.getService().apply();
String resourceContent = Files.asCharSource(file, Charsets.UTF_8).read();
String resourceContent = Files.asCharSource(file, StandardCharsets.UTF_8).read();
assertEquals("state bar end", resourceContent);
}

Expand Down
2 changes: 1 addition & 1 deletion org.eclipse.xtext.xbase.lib.gwt/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Bundle-Version: 2.38.0.qualifier
Export-Package: org.eclipse.xtend2.lib;version="2.38.0",
org.eclipse.xtext.xbase.lib;version="2.38.0"
Bundle-RequiredExecutionEnvironment: JavaSE-17
Require-Bundle: com.google.guava;bundle-version="[33.3.1,34.0.0)"
Require-Bundle: com.google.guava;bundle-version="[33.4.0,34.0.0)"
Bundle-Vendor: %Vendor-Name
Automatic-Module-Name: org.eclipse.xtext.xbase.lib.gwt
Eclipse-SourceReferences: eclipseSourceReferences
Loading

0 comments on commit 05de65c

Please sign in to comment.