From 385e3292cd434c1ecdd4bb877e689a51147a281e Mon Sep 17 00:00:00 2001 From: Hannes Wellmann Date: Sun, 14 Apr 2024 15:01:24 +0200 Subject: [PATCH] Emit java.util.Objects in generated code instead of Guava's Objects Part of https://github.com/eclipse/xtext/issues/2975 --- .../compiler/CompilerBug424763Test.xtend | 8 +- .../compiler/CompilerBug427637Test.xtend | 16 ++-- .../compiler/CompilerBug451814Test.xtend | 12 +-- .../compiler/CompilerBug461923Test.xtend | 16 ++-- .../compiler/CompilerBug472142Test.xtend | 4 +- .../compiler/CompilerBug491931Test.xtend | 4 +- .../core/tests/compiler/CompilerBugTest.xtend | 36 ++++----- .../tests/compiler/XtendCompilerTest.xtend | 72 +++++++++--------- .../compiler/CompilerBug427637Test.xtend | 16 ++-- .../compiler/CompilerBug458010Test.xtend | 36 ++++----- .../java8/compiler/Java8Compiler2Test.xtend | 18 ++--- .../xtend/core/tests/EmfModelsTest.java | 20 ++--- .../build/XtendIncrementalBuilderTest.java | 6 +- .../tests/compiler/AccessorsCompilerTest.java | 12 +-- .../tests/compiler/AnnotationTestingTest.java | 8 +- .../tests/compiler/CompilerBug424763Test.java | 10 +-- .../tests/compiler/CompilerBug427637Test.java | 18 ++--- .../tests/compiler/CompilerBug451814Test.java | 18 ++--- .../tests/compiler/CompilerBug461923Test.java | 24 +++--- .../tests/compiler/CompilerBug472142Test.java | 6 +- .../tests/compiler/CompilerBug491931Test.java | 4 +- .../core/tests/compiler/CompilerBugTest.java | 44 +++++------ .../tests/compiler/CompilerTraceTest.java | 4 +- .../tests/compiler/DelegateCompilerTest.java | 18 ++--- .../FinalFieldsConstructorCompilerTest.java | 12 +-- .../tests/compiler/NewDataCompilerTest.java | 18 ++--- .../tests/compiler/OldDataCompilerTest.java | 16 ++-- .../tests/compiler/XtendCompilerTest.java | 76 +++++++++---------- .../tests/java8/Java8TypeProviderTest.java | 6 +- .../java8/compiler/CompilerBug427637Test.java | 18 ++--- .../java8/compiler/CompilerBug458010Test.java | 52 ++++++------- .../java8/compiler/Java8Compiler2Test.java | 20 ++--- ...AbstractReusableActiveAnnotationTests.java | 6 +- .../macro/AccessObjectProcessorTest.java | 10 +-- ...otationWithNestedAnnotationsProcessor.java | 8 +- .../xtend/core/tests/macro/Bug464136Test.java | 4 +- .../core/tests/macro/ImmutableProcessor.java | 10 +-- ...atedSourceModifingAnnotationProcessor.java | 4 +- .../tests/resource/ImportedNamesTest.java | 8 +- .../xtend/core/tests/smoke/Case_0.java | 4 +- .../xtend/core/tests/smoke/Case_2.java | 4 +- .../xtend/core/tests/smoke/Case_3.java | 4 +- .../ActualTypeArgumentCollectorTest.java | 6 +- .../ActualTypeArgumentMergeTest.java | 4 +- ...eferredTypeParameterHintCollectorTest.java | 6 +- .../ReorderedFeatureCallArgumentsTest.java | 4 +- ...orderedVarArgFeatureCallArgumentsTest.java | 4 +- .../StandardFeatureCallArgumentsTest.java | 4 +- .../VarArgFeatureCallArgumentsTest.java | 4 +- .../SuspiciousOverloadValidationTest.java | 6 +- .../XImportSectionValidationTest.java | 4 +- .../xtend/core/compiler/XtendGenerator.java | 18 ++--- .../XtendDocumentationProvider.java | 4 +- .../XtendFileHeaderProvider.java | 4 +- .../core/formatting2/RichStringFormatter.java | 6 +- .../core/formatting2/XtendFormatter.java | 10 +-- .../core/macro/AbstractFileSystemSupport.java | 16 ++-- .../xtend/core/macro/ConditionUtils.java | 4 +- .../macro/ConstantExpressionsInterpreter.java | 22 +++--- .../xtend/core/macro/FileLocationsImpl.java | 4 +- .../ProcessorInstanceForJvmTypeProvider.java | 4 +- .../macro/RegisterGlobalsContextImpl.java | 4 +- .../core/macro/XAnnotationExtensions.java | 8 +- .../AnnotationReferenceBuildContextImpl.java | 16 ++-- .../declaration/CompilationUnitImpl.java | 30 ++++---- .../JvmAnnotationReferenceImpl.java | 8 +- .../declaration/JvmAnnotationTargetImpl.java | 4 +- .../JvmAnnotationTypeDeclarationImpl.java | 4 +- .../declaration/JvmClassDeclarationImpl.java | 6 +- .../macro/declaration/JvmElementImpl.java | 4 +- .../JvmEnumerationTypeDeclarationImpl.java | 4 +- .../declaration/JvmTypeDeclarationImpl.java | 10 +-- ...tableJvmAnnotationTypeDeclarationImpl.java | 4 +- ...ableJvmEnumerationTypeDeclarationImpl.java | 4 +- ...utableJvmTypeParameterDeclarationImpl.java | 4 +- .../macro/declaration/ProblemSupportImpl.java | 8 +- .../macro/declaration/TracabilityImpl.java | 8 +- .../macro/declaration/TypeLookupImpl.java | 6 +- .../macro/declaration/TypeReferenceImpl.java | 4 +- .../XtendAnnotationReferenceImpl.java | 8 +- .../XtendAnnotationTargetImpl.java | 4 +- .../XtendAnnotationTypeDeclarationImpl.java | 4 +- .../XtendEnumerationDeclarationImpl.java | 4 +- .../XtendMemberDeclarationImpl.java | 4 +- .../declaration/XtendTypeDeclarationImpl.java | 10 +-- .../xtend/core/tasks/XtendTaskFinder.java | 6 +- .../core/validation/AnnotationValidation.java | 4 +- .../CachingResourceValidatorImpl.java | 4 +- .../xtend-gen/extract/ExtractProcessor.java | 4 +- .../xtend-gen/euler/Solution_004.java | 4 +- .../xtend-gen/euler/Solution_014.java | 6 +- .../xtend-gen/euler/Solution_017.java | 42 +++++----- .../xtend-gen/euler/Solution_021.java | 6 +- .../xtend-gen/example2/BasicExpressions.java | 6 +- .../xtend/ide/tests/SwtBotProjectHelper.java | 10 +-- .../builder/AbstractQueuedBuildDataTest.java | 4 +- ...bstractJunitLibClasspathAdderTestCase.java | 6 +- ...eInstallingCompilationParticipantTest.java | 4 +- .../editor/DirtyStateEditorSupportTest.java | 4 +- .../DirtyStateEditorValidationTest.java | 4 +- .../DirtyStateResourceDescriptionTest.java | 6 +- .../tests/findrefs/JdtFindReferencesTest.java | 64 ++++++++-------- ...AbstractReusableActiveAnnotationTests.java | 6 +- .../ActiveAnnotationsProcessingInIDETest.java | 4 +- .../tests/quickfix/QuickfixTestBuilder.java | 8 +- .../DependentElementsCalculatorTests.java | 6 +- .../UniqueClassNameValidatorUITest.java | 4 +- .../validation/XtendUIValidationTests.java | 6 +- .../ide/codebuilder/AbstractCodeBuilder.java | 14 ++-- .../ide/codebuilder/InsertionOffsets.java | 4 +- .../MemberFromSuperImplementor.java | 4 +- .../codebuilder/XtendAnnotationBuilder.java | 4 +- .../ide/codebuilder/XtendClassBuilder.java | 4 +- .../codebuilder/XtendInterfaceBuilder.java | 4 +- .../FlexerBasedTemplateBodyHighlighter.java | 4 +- .../XtendImportingTypesProposalProvider.java | 4 +- .../ide/macro/JdtBasedProcessorProvider.java | 4 +- .../EclipseXtendOutlineSourceContext.java | 4 +- .../AbstractStaticMethodImporter.java | 4 +- .../importer/StaticMethodImporter.java | 6 +- .../lib/annotations/AccessorsProcessor.java | 4 +- .../lib/annotations/DelegateProcessor.java | 26 +++---- .../annotations/EqualsHashCodeProcessor.java | 36 ++++----- .../FinalFieldsConstructorProcessor.java | 6 +- .../lib/annotations/ToStringProcessor.java | 4 +- .../xtext/purexbase/tests/CompilerTest.java | 6 +- .../testing/AbstractLanguageServerTest.java | 4 +- .../xtext/xbase/lib/ObjectExtensions.java | 11 +-- .../compiler/CompilationTestHelperTest.java | 6 +- .../xbase/tests/compiler/Compiler2Tests.java | 24 +++--- .../compiler/output/CompilerTraceTest.java | 28 +++---- .../xtext/xbase/compiler/XbaseCompiler.java | 4 +- .../xbase/compiler/JvmModelGenerator.java | 22 +++--- .../ConstantConditionsInterpreter.java | 10 +-- .../xbase/controlflow/EvaluationResult.java | 22 +++--- .../formatting/FormattingDataFactory.java | 8 +- .../xbase/formatting/XbaseFormatter2.java | 42 +++++----- .../xbase/formatting2/XbaseFormatter.java | 18 ++--- .../xbase/formatting2/XtypeFormatter.java | 4 +- .../ecore/EMFGeneratorFragment2.java | 10 +-- .../GrammarAccessExtensions.java | 8 +- .../grammarAccess/GrammarAccessFragment2.java | 6 +- .../xtext/generator/junit/JUnitFragment.java | 18 ++--- .../xtext/generator/model/JavaFileAccess.java | 6 +- .../xtext/generator/model/ManifestAccess.java | 14 ++-- .../generator/model/PluginXmlAccess.java | 4 +- .../antlr/XtextAntlrGeneratorFragment2.java | 6 +- .../ImportNamespacesScopingFragment2.java | 6 +- .../serializer/SerializerFragment2.java | 4 +- .../contentAssist/ContentAssistFragment2.java | 4 +- .../generator/web/WebIntegrationFragment.java | 32 ++++---- .../formatting2/RuleEngineFormatter.java | 8 +- .../xtext/wizard/IdeProjectDescriptor.java | 14 ++-- .../xtext/wizard/ParentProjectDescriptor.java | 16 ++-- .../eclipse/xtext/xtext/wizard/PomFile.java | 8 +- .../xtext/xtext/wizard/ProjectDescriptor.java | 4 +- .../wizard/RuntimeProjectDescriptor.java | 16 ++-- .../xtext/wizard/TargetPlatformProject.java | 4 +- .../xtext/wizard/TestProjectDescriptor.java | 14 ++-- .../xtext/wizard/WebProjectDescriptor.java | 8 +- .../Ecore2XtextGrammarCreator.java | 4 +- 161 files changed, 896 insertions(+), 895 deletions(-) diff --git a/org.eclipse.xtend.core.tests/src/org/eclipse/xtend/core/tests/compiler/CompilerBug424763Test.xtend b/org.eclipse.xtend.core.tests/src/org/eclipse/xtend/core/tests/compiler/CompilerBug424763Test.xtend index fe8e4144024..376d62899ad 100644 --- a/org.eclipse.xtend.core.tests/src/org/eclipse/xtend/core/tests/compiler/CompilerBug424763Test.xtend +++ b/org.eclipse.xtend.core.tests/src/org/eclipse/xtend/core/tests/compiler/CompilerBug424763Test.xtend @@ -106,8 +106,8 @@ class CompilerBug424763Test extends AbstractXtendCompilerTest { } } ''', ''' - import com.google.common.base.Objects; import java.util.ArrayList; + import java.util.Objects; import org.eclipse.xtext.xbase.lib.Functions.Function0; @SuppressWarnings("all") @@ -118,7 +118,7 @@ class CompilerBug424763Test extends AbstractXtendCompilerTest { public Test(final Function0 theConstructor, final Class theType) { Function0 _xifexpression = null; - boolean _equals = Objects.equal(theConstructor, null); + boolean _equals = Objects.equals(theConstructor, null); if (_equals) { _xifexpression = new NoConstructor(theType); } else { @@ -237,7 +237,7 @@ class CompilerBug424763Test extends AbstractXtendCompilerTest { } } ''', ''' - import com.google.common.base.Objects; + import java.util.Objects; import org.eclipse.xtext.xbase.lib.Functions.Function0; @SuppressWarnings("all") @@ -246,7 +246,7 @@ class CompilerBug424763Test extends AbstractXtendCompilerTest { public Test(final Function0 theConstructor, final Class theType) { Function0 _xifexpression = null; - boolean _equals = Objects.equal(theConstructor, null); + boolean _equals = Objects.equals(theConstructor, null); if (_equals) { Class _xtrycatchfinallyexpression = null; try { diff --git a/org.eclipse.xtend.core.tests/src/org/eclipse/xtend/core/tests/compiler/CompilerBug427637Test.xtend b/org.eclipse.xtend.core.tests/src/org/eclipse/xtend/core/tests/compiler/CompilerBug427637Test.xtend index 09fcef041fa..cc667570aa6 100644 --- a/org.eclipse.xtend.core.tests/src/org/eclipse/xtend/core/tests/compiler/CompilerBug427637Test.xtend +++ b/org.eclipse.xtend.core.tests/src/org/eclipse/xtend/core/tests/compiler/CompilerBug427637Test.xtend @@ -1121,12 +1121,12 @@ class CompilerBug427637Test extends AbstractXtendCompilerTest { ''', ''' package org.eclipse.xtext.xbase.formatting; - import com.google.common.base.Objects; import com.google.common.collect.Iterables; import com.google.inject.Inject; import java.util.ArrayList; import java.util.Arrays; import java.util.List; + import java.util.Objects; import org.eclipse.xtext.nodemodel.INode; import org.eclipse.xtext.preferences.PreferenceKey; import org.eclipse.xtext.xbase.lib.CollectionLiterals; @@ -1202,7 +1202,7 @@ class CompilerBug427637Test extends AbstractXtendCompilerTest { _elvis = Integer.valueOf(0); } final int newLines2 = (int) _elvis; - if (((Objects.equal(it.space, null) && Objects.equal(it.newLines, null)) || ((leafs.getNewLinesInComments() == 0) && ((newLines2 == 0) || Objects.equal(it.space, ""))))) { + if (((Objects.equals(it.space, null) && Objects.equals(it.newLines, null)) || ((leafs.getNewLinesInComments() == 0) && ((newLines2 == 0) || Objects.equals(it.space, ""))))) { return FormattingDataFactory.this.newWhitespaceData(leafs, it.space, it.increaseIndentationChange, it.decreaseIndentationChange, doc.isDebugConflicts()); } else { return FormattingDataFactory.this.newNewLineData(leafs, newLines2, newLines2, it.increaseIndentationChange, it.decreaseIndentationChange, doc.isDebugConflicts()); @@ -1472,7 +1472,7 @@ class CompilerBug427637Test extends AbstractXtendCompilerTest { WhitespaceData _whitespaceData_1 = new WhitespaceData(_offset_2, _length_1, increaseIndentationChange, decreaseIndentationChange, _xifexpression_3, _xifexpression_4); result.add(_whitespaceData_1); } else { - if ((equalIndentationChange && (!Objects.equal(IterableExtensions.last(leafs.getLeafs()), leaf)))) { + if ((equalIndentationChange && (!Objects.equals(IterableExtensions.last(leafs.getLeafs()), leaf)))) { int _offset_4 = ((WhitespaceInfo)leaf).getOffset(); int _length_2 = ((WhitespaceInfo)leaf).getLength(); RuntimeException _xifexpression_6 = null; @@ -1515,7 +1515,7 @@ class CompilerBug427637Test extends AbstractXtendCompilerTest { if (_endsWithNewLine_2) { newLines_1 = (newLines_1 - 1); } - if ((equalIndentationChange && (!Objects.equal(IterableExtensions.last(leafs.getLeafs()), leaf)))) { + if ((equalIndentationChange && (!Objects.equals(IterableExtensions.last(leafs.getLeafs()), leaf)))) { int _offset_6 = ((WhitespaceInfo)leaf).getOffset(); int _length_4 = ((WhitespaceInfo)leaf).getLength(); RuntimeException _xifexpression_10 = null; @@ -1550,7 +1550,7 @@ class CompilerBug427637Test extends AbstractXtendCompilerTest { public Function1> append(final INode node, final Procedure1 init) { Function1> _xifexpression = null; - boolean _notEquals = (!Objects.equal(node, null)); + boolean _notEquals = (!Objects.equals(node, null)); if (_notEquals) { _xifexpression = this.newFormattingData(this._hiddenLeafAccess.getHiddenLeafsAfter(node), init); } @@ -1559,7 +1559,7 @@ class CompilerBug427637Test extends AbstractXtendCompilerTest { public Function1> prepend(final INode node, final Procedure1 init) { Function1> _xifexpression = null; - boolean _notEquals = (!Objects.equal(node, null)); + boolean _notEquals = (!Objects.equals(node, null)); if (_notEquals) { _xifexpression = this.newFormattingData(this._hiddenLeafAccess.getHiddenLeafsBefore(node), init); } @@ -1572,7 +1572,7 @@ class CompilerBug427637Test extends AbstractXtendCompilerTest { ArrayList _xblockexpression = null; { final ArrayList result = CollectionLiterals.newArrayList(); - boolean _notEquals = (!Objects.equal(node, null)); + boolean _notEquals = (!Objects.equals(node, null)); if (_notEquals) { Iterable _elvis = null; Function1> _newFormattingData = FormattingDataFactory.this.newFormattingData(FormattingDataFactory.this._hiddenLeafAccess.getHiddenLeafsBefore(node), init); @@ -1615,7 +1615,7 @@ class CompilerBug427637Test extends AbstractXtendCompilerTest { ArrayList _xblockexpression = null; { final ArrayList result = CollectionLiterals.newArrayList(); - boolean _notEquals = (!Objects.equal(node, null)); + boolean _notEquals = (!Objects.equals(node, null)); if (_notEquals) { Iterable _elvis = null; Function1> _newFormattingData = FormattingDataFactory.this.newFormattingData(FormattingDataFactory.this._hiddenLeafAccess.getHiddenLeafsBefore(node), before); diff --git a/org.eclipse.xtend.core.tests/src/org/eclipse/xtend/core/tests/compiler/CompilerBug451814Test.xtend b/org.eclipse.xtend.core.tests/src/org/eclipse/xtend/core/tests/compiler/CompilerBug451814Test.xtend index d68ff9efbd2..2601fe23373 100644 --- a/org.eclipse.xtend.core.tests/src/org/eclipse/xtend/core/tests/compiler/CompilerBug451814Test.xtend +++ b/org.eclipse.xtend.core.tests/src/org/eclipse/xtend/core/tests/compiler/CompilerBug451814Test.xtend @@ -57,8 +57,8 @@ class CompilerBug451814Test extends AbstractXtendCompilerTest { } } ''', ''' - import com.google.common.base.Objects; import com.google.common.io.LineReader; + import java.util.Objects; import org.eclipse.xtext.xbase.lib.Exceptions; @SuppressWarnings("all") @@ -67,7 +67,7 @@ class CompilerBug451814Test extends AbstractXtendCompilerTest { try { int counter = 0; LineReader reader = null; - if (((counter == 0) && (!Objects.equal(reader.readLine(), null)))) { + if (((counter == 0) && (!Objects.equals(reader.readLine(), null)))) { } } catch (Throwable _e) { throw Exceptions.sneakyThrow(_e); @@ -90,8 +90,8 @@ class CompilerBug451814Test extends AbstractXtendCompilerTest { } } ''', ''' - import com.google.common.base.Objects; import com.google.common.io.LineReader; + import java.util.Objects; import org.eclipse.xtext.xbase.lib.Exceptions; @SuppressWarnings("all") @@ -100,7 +100,7 @@ class CompilerBug451814Test extends AbstractXtendCompilerTest { try { int counter = 0; LineReader reader = null; - while (((counter == 0) && (!Objects.equal(reader.readLine(), null)))) { + while (((counter == 0) && (!Objects.equals(reader.readLine(), null)))) { } } catch (Throwable _e) { throw Exceptions.sneakyThrow(_e); @@ -121,8 +121,8 @@ class CompilerBug451814Test extends AbstractXtendCompilerTest { } } ''', ''' - import com.google.common.base.Objects; import com.google.common.io.LineReader; + import java.util.Objects; import org.eclipse.xtext.xbase.lib.Exceptions; @SuppressWarnings("all") @@ -131,7 +131,7 @@ class CompilerBug451814Test extends AbstractXtendCompilerTest { try { LineReader reader = null; do { - } while((!Objects.equal(reader.readLine(), null))); + } while((!Objects.equals(reader.readLine(), null))); } catch (Throwable _e) { throw Exceptions.sneakyThrow(_e); } diff --git a/org.eclipse.xtend.core.tests/src/org/eclipse/xtend/core/tests/compiler/CompilerBug461923Test.xtend b/org.eclipse.xtend.core.tests/src/org/eclipse/xtend/core/tests/compiler/CompilerBug461923Test.xtend index 8d3419bb56e..41781b3b85a 100644 --- a/org.eclipse.xtend.core.tests/src/org/eclipse/xtend/core/tests/compiler/CompilerBug461923Test.xtend +++ b/org.eclipse.xtend.core.tests/src/org/eclipse/xtend/core/tests/compiler/CompilerBug461923Test.xtend @@ -26,9 +26,9 @@ class CompilerBug461923Test extends AbstractXtendCompilerTest { } } '''.assertCompilesTo(''' - import com.google.common.base.Objects; import com.google.common.collect.ImmutableList; import java.util.List; + import java.util.Objects; import org.eclipse.xtext.xbase.lib.Functions.Function1; import org.eclipse.xtext.xbase.lib.IterableExtensions; @@ -37,7 +37,7 @@ class CompilerBug461923Test extends AbstractXtendCompilerTest { public static ImmutableList m(final List list, final T value) { final Function1 _function = new Function1() { public Boolean apply(final T it) { - return Boolean.valueOf((!Objects.equal(it, value))); + return Boolean.valueOf((!Objects.equals(it, value))); } }; return ImmutableList.builder().addAll(IterableExtensions.filter(list, _function)).build(); @@ -57,9 +57,9 @@ class CompilerBug461923Test extends AbstractXtendCompilerTest { } } '''.assertCompilesTo(''' - import com.google.common.base.Objects; import com.google.common.collect.ImmutableList; import java.util.List; + import java.util.Objects; import org.eclipse.xtext.xbase.lib.Functions.Function1; import org.eclipse.xtext.xbase.lib.IterableExtensions; @@ -68,7 +68,7 @@ class CompilerBug461923Test extends AbstractXtendCompilerTest { public static ImmutableList m(final List list, final T value) { final Function1 _function = new Function1() { public Boolean apply(final T it) { - return Boolean.valueOf((!Objects.equal(it, value))); + return Boolean.valueOf((!Objects.equals(it, value))); } }; return ImmutableList.builder().addAll(IterableExtensions.filter(list, _function)).build(); @@ -88,9 +88,9 @@ class CompilerBug461923Test extends AbstractXtendCompilerTest { } } '''.assertCompilesTo(''' - import com.google.common.base.Objects; import com.google.common.collect.ImmutableList; import java.util.List; + import java.util.Objects; import org.eclipse.xtext.xbase.lib.Functions.Function1; import org.eclipse.xtext.xbase.lib.IterableExtensions; @@ -99,7 +99,7 @@ class CompilerBug461923Test extends AbstractXtendCompilerTest { public static ImmutableList m(final List list, final T value) { final Function1 _function = new Function1() { public Boolean apply(final Object it) { - return Boolean.valueOf((!Objects.equal(it, value))); + return Boolean.valueOf((!Objects.equals(it, value))); } }; return ImmutableList.builder().addAll(IterableExtensions.filter(list, _function)).build(); @@ -237,8 +237,8 @@ class CompilerBug461923Test extends AbstractXtendCompilerTest { } } '''.assertCompilesTo(''' - import com.google.common.base.Objects; import com.google.common.collect.ImmutableList; + import java.util.Objects; import org.eclipse.xtext.xbase.lib.Conversions; import org.eclipse.xtext.xbase.lib.Functions.Function1; import org.eclipse.xtext.xbase.lib.IterableExtensions; @@ -248,7 +248,7 @@ class CompilerBug461923Test extends AbstractXtendCompilerTest { public static ImmutableList m(final T[] arr, final T value) { final Function1 _function = new Function1() { public Boolean apply(final T it) { - return Boolean.valueOf((!Objects.equal(it, value))); + return Boolean.valueOf((!Objects.equals(it, value))); } }; return ImmutableList.builder().addAll(IterableExtensions.filter(((Iterable)Conversions.doWrapArray(arr)), _function)).build(); diff --git a/org.eclipse.xtend.core.tests/src/org/eclipse/xtend/core/tests/compiler/CompilerBug472142Test.xtend b/org.eclipse.xtend.core.tests/src/org/eclipse/xtend/core/tests/compiler/CompilerBug472142Test.xtend index 13a97cfe17f..5d3ccf2937a 100644 --- a/org.eclipse.xtend.core.tests/src/org/eclipse/xtend/core/tests/compiler/CompilerBug472142Test.xtend +++ b/org.eclipse.xtend.core.tests/src/org/eclipse/xtend/core/tests/compiler/CompilerBug472142Test.xtend @@ -94,8 +94,8 @@ class CompilerBug472142Test extends AbstractXtendCompilerTest { } } '''.assertCompilesTo(''' - import com.google.common.base.Objects; import java.util.List; + import java.util.Objects; import org.eclipse.xtend2.lib.StringConcatenation; import org.eclipse.xtext.xbase.lib.IterableExtensions; @@ -106,7 +106,7 @@ class CompilerBug472142Test extends AbstractXtendCompilerTest { public CharSequence m() { CharSequence _xblockexpression = null; { - boolean _equals = Objects.equal(this.mySeq, null); + boolean _equals = Objects.equals(this.mySeq, null); if (_equals) { StringConcatenation _builder = new StringConcatenation(); _builder.append("s2"); diff --git a/org.eclipse.xtend.core.tests/src/org/eclipse/xtend/core/tests/compiler/CompilerBug491931Test.xtend b/org.eclipse.xtend.core.tests/src/org/eclipse/xtend/core/tests/compiler/CompilerBug491931Test.xtend index 9248c0bd91b..25598a7486d 100644 --- a/org.eclipse.xtend.core.tests/src/org/eclipse/xtend/core/tests/compiler/CompilerBug491931Test.xtend +++ b/org.eclipse.xtend.core.tests/src/org/eclipse/xtend/core/tests/compiler/CompilerBug491931Test.xtend @@ -119,12 +119,12 @@ class CompilerBug491931Test extends AbstractXtendCompilerTest { } } '''.assertCompilesTo(''' - import com.google.common.base.Objects; + import java.util.Objects; @SuppressWarnings("all") public class C { public boolean foo(final CharSequence obj) { - return (!((obj.subSequence(1, 1) instanceof String) && (!Objects.equal(obj, null)))); + return (!((obj.subSequence(1, 1) instanceof String) && (!Objects.equals(obj, null)))); } } ''') diff --git a/org.eclipse.xtend.core.tests/src/org/eclipse/xtend/core/tests/compiler/CompilerBugTest.xtend b/org.eclipse.xtend.core.tests/src/org/eclipse/xtend/core/tests/compiler/CompilerBugTest.xtend index b0383e883f2..b47fe245988 100644 --- a/org.eclipse.xtend.core.tests/src/org/eclipse/xtend/core/tests/compiler/CompilerBugTest.xtend +++ b/org.eclipse.xtend.core.tests/src/org/eclipse/xtend/core/tests/compiler/CompilerBugTest.xtend @@ -381,8 +381,8 @@ class CompilerBugTest extends AbstractXtendCompilerTest { } } ''',''' - import com.google.common.base.Objects; import java.util.List; + import java.util.Objects; import org.eclipse.xtext.xbase.lib.Conversions; @SuppressWarnings("all") @@ -390,7 +390,7 @@ class CompilerBugTest extends AbstractXtendCompilerTest { public Iterable m() { final List a = null; final Object[] b = null; - boolean _equals = Objects.equal("foo", "bar"); + boolean _equals = Objects.equals("foo", "bar"); if (_equals) { return a; } else { @@ -415,8 +415,8 @@ class CompilerBugTest extends AbstractXtendCompilerTest { } } ''',''' - import com.google.common.base.Objects; import java.util.List; + import java.util.Objects; import org.eclipse.xtext.xbase.lib.Conversions; @SuppressWarnings("all") @@ -424,7 +424,7 @@ class CompilerBugTest extends AbstractXtendCompilerTest { public Object[] m() { final List a = null; final Object[] b = null; - boolean _equals = Objects.equal("foo", "bar"); + boolean _equals = Objects.equals("foo", "bar"); if (_equals) { return ((Object[])Conversions.unwrapArray(a, Object.class)); } else { @@ -449,15 +449,15 @@ class CompilerBugTest extends AbstractXtendCompilerTest { } } ''',''' - import com.google.common.base.Objects; import java.util.List; + import java.util.Objects; @SuppressWarnings("all") public class C { public Object m() { final List a = null; final Object[] b = null; - boolean _equals = Objects.equal("foo", "bar"); + boolean _equals = Objects.equals("foo", "bar"); if (_equals) { return a; } else { @@ -484,14 +484,14 @@ class CompilerBugTest extends AbstractXtendCompilerTest { } } ''',''' - import com.google.common.base.Objects; import com.google.common.base.Predicate; + import java.util.Objects; import org.eclipse.xtext.xbase.lib.Functions.Function1; @SuppressWarnings("all") public class C { public Function1 foo() { - boolean _equals = Objects.equal("foo", null); + boolean _equals = Objects.equals("foo", null); if (_equals) { return new Function1() { public Boolean apply(String arg0) { @@ -2281,7 +2281,7 @@ class CompilerBugTest extends AbstractXtendCompilerTest { } } ''', ''' - import com.google.common.base.Objects; + import java.util.Objects; @SuppressWarnings("all") public class C { @@ -2289,12 +2289,12 @@ class CompilerBugTest extends AbstractXtendCompilerTest { String _switchResult = null; final String _switchValue = "a"; boolean _matched = false; - if (Objects.equal(_switchValue, "b")) { + if (Objects.equals(_switchValue, "b")) { _matched=true; _switchResult = "a"; } if (!_matched) { - if (Objects.equal(_switchValue, "c")) { + if (Objects.equals(_switchValue, "c")) { _matched=true; if ((1 == 2)) { return "b"; @@ -2326,7 +2326,7 @@ class CompilerBugTest extends AbstractXtendCompilerTest { } } ''', ''' - import com.google.common.base.Objects; + import java.util.Objects; @SuppressWarnings("all") public class C { @@ -2334,12 +2334,12 @@ class CompilerBugTest extends AbstractXtendCompilerTest { String _switchResult = null; final String _switchValue = "a"; boolean _matched = false; - if (Objects.equal(_switchValue, "b")) { + if (Objects.equals(_switchValue, "b")) { _matched=true; _switchResult = "a"; } if (!_matched) { - if (Objects.equal(_switchValue, "c")) { + if (Objects.equals(_switchValue, "c")) { _matched=true; if (b) { return "b"; @@ -2368,7 +2368,7 @@ class CompilerBugTest extends AbstractXtendCompilerTest { } } ''', ''' - import com.google.common.base.Objects; + import java.util.Objects; import org.eclipse.xtext.xbase.compiler.output.ITreeAppendable; @SuppressWarnings("all") @@ -2382,7 +2382,7 @@ class CompilerBugTest extends AbstractXtendCompilerTest { _switchResult = "Double.NaN"; } if (!_matched) { - if (Objects.equal(it, Double.POSITIVE_INFINITY)) { + if (Objects.equals(it, Double.POSITIVE_INFINITY)) { _matched=true; _switchResult = "Double.POSITIVE_INFINITY"; } @@ -3637,7 +3637,7 @@ class CompilerBugTest extends AbstractXtendCompilerTest { } } '''.assertCompilesTo(''' - import com.google.common.base.Objects; + import java.util.Objects; @SuppressWarnings("all") public class Bug { @@ -3652,7 +3652,7 @@ class CompilerBugTest extends AbstractXtendCompilerTest { if (this!=null) { _text_1=this.text; } - return Objects.equal(_text, _text_1); + return Objects.equals(_text, _text_1); } } ''') diff --git a/org.eclipse.xtend.core.tests/src/org/eclipse/xtend/core/tests/compiler/XtendCompilerTest.xtend b/org.eclipse.xtend.core.tests/src/org/eclipse/xtend/core/tests/compiler/XtendCompilerTest.xtend index fb12c42b67b..01f58970837 100644 --- a/org.eclipse.xtend.core.tests/src/org/eclipse/xtend/core/tests/compiler/XtendCompilerTest.xtend +++ b/org.eclipse.xtend.core.tests/src/org/eclipse/xtend/core/tests/compiler/XtendCompilerTest.xtend @@ -989,9 +989,9 @@ class XtendCompilerTest extends AbstractXtendCompilerTest { } } ''', ''' - import com.google.common.base.Objects; import com.google.common.collect.AbstractIterator; import java.util.Iterator; + import java.util.Objects; @SuppressWarnings("all") public class Foo { @@ -1002,7 +1002,7 @@ class XtendCompilerTest extends AbstractXtendCompilerTest { while (iter.hasNext()) { { final T elem = iter.next(); - boolean _notEquals = (!Objects.equal(elem, null)); + boolean _notEquals = (!Objects.equals(elem, null)); if (_notEquals) { return elem; } @@ -1119,9 +1119,9 @@ class XtendCompilerTest extends AbstractXtendCompilerTest { } } ''', ''' - import com.google.common.base.Objects; import com.google.common.collect.AbstractIterator; import java.util.Iterator; + import java.util.Objects; import org.eclipse.xtext.xbase.lib.Functions.Function1; import org.eclipse.xtext.xbase.lib.IteratorExtensions; @@ -1134,7 +1134,7 @@ class XtendCompilerTest extends AbstractXtendCompilerTest { T _elvis = null; final Function1 _function = new Function1() { public Boolean apply(final T it_1) { - return Boolean.valueOf((!Objects.equal(it_1, null))); + return Boolean.valueOf((!Objects.equals(it_1, null))); } }; T _findFirst = IteratorExtensions.findFirst(it, _function); @@ -1556,21 +1556,21 @@ class XtendCompilerTest extends AbstractXtendCompilerTest { } } ''', ''' - import com.google.common.base.Objects; + import java.util.Objects; import org.eclipse.xtext.xbase.lib.IntegerRange; @SuppressWarnings("all") public class C { public void m(final Object a) { boolean _matched = false; - if (Objects.equal(a, "b")) { + if (Objects.equals(a, "b")) { _matched=true; while (true) { "".toString(); } } if (!_matched) { - if (Objects.equal(a, "c")) { + if (Objects.equals(a, "c")) { _matched=true; if (true) { return; @@ -1578,7 +1578,7 @@ class XtendCompilerTest extends AbstractXtendCompilerTest { } } if (!_matched) { - if (Objects.equal(a, "d")) { + if (Objects.equals(a, "d")) { _matched=true; IntegerRange _upTo = new IntegerRange(1, 1); for (final Integer i : _upTo) { @@ -1726,21 +1726,21 @@ class XtendCompilerTest extends AbstractXtendCompilerTest { } } ''', ''' - import com.google.common.base.Objects; + import java.util.Objects; import org.eclipse.xtext.xbase.lib.IntegerRange; @SuppressWarnings("all") public class C { public String m(final Object a) { boolean _matched = false; - if (Objects.equal(a, "b")) { + if (Objects.equals(a, "b")) { _matched=true; while (true) { "".toString(); } } if (!_matched) { - if (Objects.equal(a, "c")) { + if (Objects.equals(a, "c")) { _matched=true; if (true) { return "a"; @@ -1748,7 +1748,7 @@ class XtendCompilerTest extends AbstractXtendCompilerTest { } } if (!_matched) { - if (Objects.equal(a, "d")) { + if (Objects.equals(a, "d")) { _matched=true; IntegerRange _upTo = new IntegerRange(1, 1); for (final Integer i : _upTo) { @@ -1773,14 +1773,14 @@ class XtendCompilerTest extends AbstractXtendCompilerTest { } } ''', ''' - import com.google.common.base.Objects; + import java.util.Objects; @SuppressWarnings("all") public class C { public String m(final Object a, final boolean b) { String _switchResult = null; boolean _matched = false; - if (Objects.equal(a, "a")) { + if (Objects.equals(a, "a")) { _matched=true; String _xblockexpression = null; { @@ -1792,7 +1792,7 @@ class XtendCompilerTest extends AbstractXtendCompilerTest { _switchResult = _xblockexpression; } if (!_matched) { - if (Objects.equal(a, "b")) { + if (Objects.equals(a, "b")) { _matched=true; if (true) { return "a"; @@ -1928,7 +1928,7 @@ class XtendCompilerTest extends AbstractXtendCompilerTest { } } ''', ''' - import com.google.common.base.Objects; + import java.util.Objects; import org.eclipse.xtext.xbase.lib.Functions.Function1; @SuppressWarnings("all") @@ -1937,7 +1937,7 @@ class XtendCompilerTest extends AbstractXtendCompilerTest { Function1 _switchResult = null; final Object _switchValue = null; boolean _matched = false; - if (Objects.equal(_switchValue, null)) { + if (Objects.equals(_switchValue, null)) { _matched=true; final Function1 _function = new Function1() { public Object apply(final Object it) { @@ -1947,7 +1947,7 @@ class XtendCompilerTest extends AbstractXtendCompilerTest { _switchResult = _function; } if (!_matched) { - if (Objects.equal(_switchValue, null)) { + if (Objects.equals(_switchValue, null)) { _matched=true; final Function1 _function_1 = new Function1() { public Integer apply(final Integer it) { @@ -2016,7 +2016,7 @@ class XtendCompilerTest extends AbstractXtendCompilerTest { } '''.assertCompilesTo( ''' - import com.google.common.base.Objects; + import java.util.Objects; @SuppressWarnings("all") public class Foo { @@ -2024,7 +2024,7 @@ class XtendCompilerTest extends AbstractXtendCompilerTest { int _switchResult = (int) 0; final double x = (1d + 2); boolean _matched = false; - if (Objects.equal(x, 1)) { + if (Objects.equals(x, 1)) { _matched=true; _switchResult = 1; } @@ -2050,7 +2050,7 @@ class XtendCompilerTest extends AbstractXtendCompilerTest { } '''.assertCompilesTo( ''' - import com.google.common.base.Objects; + import java.util.Objects; @SuppressWarnings("all") public class Foo { @@ -2058,7 +2058,7 @@ class XtendCompilerTest extends AbstractXtendCompilerTest { int _switchResult = (int) 0; final int x = 1; boolean _matched = false; - if (Objects.equal(x, 1d)) { + if (Objects.equals(x, 1d)) { _matched=true; _switchResult = 1; } @@ -2188,7 +2188,7 @@ class XtendCompilerTest extends AbstractXtendCompilerTest { } '''.assertCompilesTo( ''' - import com.google.common.base.Objects; + import java.util.Objects; import org.eclipse.xtext.xbase.lib.Functions.Function0; @SuppressWarnings("all") @@ -2203,7 +2203,7 @@ class XtendCompilerTest extends AbstractXtendCompilerTest { } }; Integer _apply = _function.apply(); - if (Objects.equal(x, _apply)) { + if (Objects.equals(x, _apply)) { _matched=true; _switchResult = true; } @@ -2346,7 +2346,7 @@ class XtendCompilerTest extends AbstractXtendCompilerTest { } '''.assertCompilesTo( ''' - import com.google.common.base.Objects; + import java.util.Objects; @SuppressWarnings("all") public class Foo { @@ -2360,7 +2360,7 @@ class XtendCompilerTest extends AbstractXtendCompilerTest { } final int y = _xtrycatchfinallyexpression; int _xifexpression = (int) 0; - boolean _equals = Objects.equal(Integer.valueOf(y), Boolean.valueOf(true)); + boolean _equals = Objects.equals(Integer.valueOf(y), Boolean.valueOf(true)); if (_equals) { _xifexpression = 1; } else { @@ -2370,7 +2370,7 @@ class XtendCompilerTest extends AbstractXtendCompilerTest { boolean _switchResult = false; final int x = 1; boolean _matched = false; - if (Objects.equal(x, z)) { + if (Objects.equals(x, z)) { _matched=true; _switchResult = true; } @@ -2395,7 +2395,7 @@ class XtendCompilerTest extends AbstractXtendCompilerTest { } '''.assertCompilesTo( ''' - import com.google.common.base.Objects; + import java.util.Objects; @SuppressWarnings("all") public class Foo { @@ -2406,7 +2406,7 @@ class XtendCompilerTest extends AbstractXtendCompilerTest { boolean _switchResult = false; final Thread.State x = Thread.State.NEW; boolean _matched = false; - if (Objects.equal(x, state)) { + if (Objects.equals(x, state)) { _matched=true; _switchResult = true; } @@ -3527,13 +3527,13 @@ class XtendCompilerTest extends AbstractXtendCompilerTest { ''', ''' package x; - import com.google.common.base.Objects; + import java.util.Objects; @SuppressWarnings("all") public class Y { public boolean equals(final Object p) { boolean _xifexpression = false; - boolean _equals = Objects.equal("foo", p); + boolean _equals = Objects.equals("foo", p); if (_equals) { return true; } else { @@ -5502,16 +5502,16 @@ class XtendCompilerTest extends AbstractXtendCompilerTest { } } '''.assertCompilesTo(''' - import com.google.common.base.Objects; + import java.util.Objects; @SuppressWarnings("all") public class Foo { public void foo() { - boolean _equals = Objects.equal("a", "b"); + boolean _equals = Objects.equals("a", "b"); if (_equals) { } for (;;) { - boolean _equals_1 = Objects.equal("b", "c"); + boolean _equals_1 = Objects.equals("b", "c"); if (_equals_1) { } } @@ -5950,7 +5950,7 @@ class XtendCompilerTest extends AbstractXtendCompilerTest { } } '''.assertCompilesTo(''' - import com.google.common.base.Objects; + import java.util.Objects; @SuppressWarnings("all") public class Foo { @@ -5960,7 +5960,7 @@ class XtendCompilerTest extends AbstractXtendCompilerTest { public void foo(final int x) { boolean _matched = false; - if (Objects.equal(x, this.X)) { + if (Objects.equals(x, this.X)) { _matched=true; this.foo(x); } diff --git a/org.eclipse.xtend.core.tests/src/org/eclipse/xtend/core/tests/java8/compiler/CompilerBug427637Test.xtend b/org.eclipse.xtend.core.tests/src/org/eclipse/xtend/core/tests/java8/compiler/CompilerBug427637Test.xtend index f6a79419a48..f3fca4d69e3 100644 --- a/org.eclipse.xtend.core.tests/src/org/eclipse/xtend/core/tests/java8/compiler/CompilerBug427637Test.xtend +++ b/org.eclipse.xtend.core.tests/src/org/eclipse/xtend/core/tests/java8/compiler/CompilerBug427637Test.xtend @@ -1075,12 +1075,12 @@ class CompilerBug427637Test extends org.eclipse.xtend.core.tests.compiler.Compil ''',''' package org.eclipse.xtext.xbase.formatting; - import com.google.common.base.Objects; import com.google.common.collect.Iterables; import com.google.inject.Inject; import java.util.ArrayList; import java.util.Arrays; import java.util.List; + import java.util.Objects; import org.eclipse.xtext.nodemodel.INode; import org.eclipse.xtext.preferences.PreferenceKey; import org.eclipse.xtext.xbase.lib.CollectionLiterals; @@ -1156,7 +1156,7 @@ class CompilerBug427637Test extends org.eclipse.xtend.core.tests.compiler.Compil _elvis = Integer.valueOf(0); } final int newLines2 = (int) _elvis; - if (((Objects.equal(it.space, null) && Objects.equal(it.newLines, null)) || ((leafs.getNewLinesInComments() == 0) && ((newLines2 == 0) || Objects.equal(it.space, ""))))) { + if (((Objects.equals(it.space, null) && Objects.equals(it.newLines, null)) || ((leafs.getNewLinesInComments() == 0) && ((newLines2 == 0) || Objects.equals(it.space, ""))))) { return this.newWhitespaceData(leafs, it.space, it.increaseIndentationChange, it.decreaseIndentationChange, doc.isDebugConflicts()); } else { return this.newNewLineData(leafs, newLines2, newLines2, it.increaseIndentationChange, it.decreaseIndentationChange, doc.isDebugConflicts()); @@ -1417,7 +1417,7 @@ class CompilerBug427637Test extends org.eclipse.xtend.core.tests.compiler.Compil WhitespaceData _whitespaceData_1 = new WhitespaceData(_offset_2, _length_1, increaseIndentationChange, decreaseIndentationChange, _xifexpression_3, _xifexpression_4); result.add(_whitespaceData_1); } else { - if ((equalIndentationChange && (!Objects.equal(IterableExtensions.last(leafs.getLeafs()), leaf)))) { + if ((equalIndentationChange && (!Objects.equals(IterableExtensions.last(leafs.getLeafs()), leaf)))) { int _offset_4 = ((WhitespaceInfo)leaf).getOffset(); int _length_2 = ((WhitespaceInfo)leaf).getLength(); RuntimeException _xifexpression_6 = null; @@ -1460,7 +1460,7 @@ class CompilerBug427637Test extends org.eclipse.xtend.core.tests.compiler.Compil if (_endsWithNewLine_2) { newLines_1 = (newLines_1 - 1); } - if ((equalIndentationChange && (!Objects.equal(IterableExtensions.last(leafs.getLeafs()), leaf)))) { + if ((equalIndentationChange && (!Objects.equals(IterableExtensions.last(leafs.getLeafs()), leaf)))) { int _offset_6 = ((WhitespaceInfo)leaf).getOffset(); int _length_4 = ((WhitespaceInfo)leaf).getLength(); RuntimeException _xifexpression_10 = null; @@ -1495,7 +1495,7 @@ class CompilerBug427637Test extends org.eclipse.xtend.core.tests.compiler.Compil public Function1> append(final INode node, final Procedure1 init) { Function1> _xifexpression = null; - boolean _notEquals = (!Objects.equal(node, null)); + boolean _notEquals = (!Objects.equals(node, null)); if (_notEquals) { _xifexpression = this.newFormattingData(this._hiddenLeafAccess.getHiddenLeafsAfter(node), init); } @@ -1504,7 +1504,7 @@ class CompilerBug427637Test extends org.eclipse.xtend.core.tests.compiler.Compil public Function1> prepend(final INode node, final Procedure1 init) { Function1> _xifexpression = null; - boolean _notEquals = (!Objects.equal(node, null)); + boolean _notEquals = (!Objects.equals(node, null)); if (_notEquals) { _xifexpression = this.newFormattingData(this._hiddenLeafAccess.getHiddenLeafsBefore(node), init); } @@ -1516,7 +1516,7 @@ class CompilerBug427637Test extends org.eclipse.xtend.core.tests.compiler.Compil ArrayList _xblockexpression = null; { final ArrayList result = CollectionLiterals.newArrayList(); - boolean _notEquals = (!Objects.equal(node, null)); + boolean _notEquals = (!Objects.equals(node, null)); if (_notEquals) { Iterable _elvis = null; Function1> _newFormattingData = this.newFormattingData(this._hiddenLeafAccess.getHiddenLeafsBefore(node), init); @@ -1557,7 +1557,7 @@ class CompilerBug427637Test extends org.eclipse.xtend.core.tests.compiler.Compil ArrayList _xblockexpression = null; { final ArrayList result = CollectionLiterals.newArrayList(); - boolean _notEquals = (!Objects.equal(node, null)); + boolean _notEquals = (!Objects.equals(node, null)); if (_notEquals) { Iterable _elvis = null; Function1> _newFormattingData = this.newFormattingData(this._hiddenLeafAccess.getHiddenLeafsBefore(node), before); diff --git a/org.eclipse.xtend.core.tests/src/org/eclipse/xtend/core/tests/java8/compiler/CompilerBug458010Test.xtend b/org.eclipse.xtend.core.tests/src/org/eclipse/xtend/core/tests/java8/compiler/CompilerBug458010Test.xtend index c7938082f02..37b20045fb9 100644 --- a/org.eclipse.xtend.core.tests/src/org/eclipse/xtend/core/tests/java8/compiler/CompilerBug458010Test.xtend +++ b/org.eclipse.xtend.core.tests/src/org/eclipse/xtend/core/tests/java8/compiler/CompilerBug458010Test.xtend @@ -62,10 +62,10 @@ class CompilerBug458010Test extends AbstractXtendCompilerTest { } } ''', ''' - import com.google.common.base.Objects; import java.time.LocalDate; import java.time.Period; import java.util.ArrayList; + import java.util.Objects; import java.util.function.Consumer; import java.util.function.Function; import java.util.function.Predicate; @@ -136,7 +136,7 @@ class CompilerBug458010Test extends AbstractXtendCompilerTest { public static void main(final String[] args) { final ArrayList roster = CollectionLiterals.newArrayList(); final Predicate _function = (Demo.Person it) -> { - return ((Objects.equal(it.gender, Demo.Person.Sex.MALE) && (it.getAge() >= 18)) && (it.getAge() <= 25)); + return ((Objects.equals(it.gender, Demo.Person.Sex.MALE) && (it.getAge() >= 18)) && (it.getAge() <= 25)); }; final Function _function_1 = (Demo.Person it) -> { return it.emailAddress; @@ -185,10 +185,10 @@ class CompilerBug458010Test extends AbstractXtendCompilerTest { } } ''', ''' - import com.google.common.base.Objects; import java.time.LocalDate; import java.time.Period; import java.util.ArrayList; + import java.util.Objects; import java.util.function.Consumer; import java.util.function.Function; import java.util.function.Predicate; @@ -259,7 +259,7 @@ class CompilerBug458010Test extends AbstractXtendCompilerTest { public static void main(final String[] args) { final ArrayList roster = CollectionLiterals.newArrayList(); final Predicate _function = (Demo.Person it) -> { - return ((Objects.equal(it.gender, Demo.Person.Sex.MALE) && (it.getAge() >= 18)) && (it.getAge() <= 25)); + return ((Objects.equals(it.gender, Demo.Person.Sex.MALE) && (it.getAge() >= 18)) && (it.getAge() <= 25)); }; final Function _function_1 = (Demo.Person it) -> { return it.emailAddress; @@ -305,10 +305,10 @@ class CompilerBug458010Test extends AbstractXtendCompilerTest { } } ''', ''' - import com.google.common.base.Objects; import java.time.LocalDate; import java.time.Period; import java.util.ArrayList; + import java.util.Objects; import java.util.function.Consumer; import org.eclipse.xtend.lib.annotations.Accessors; import org.eclipse.xtext.xbase.lib.CollectionLiterals; @@ -379,7 +379,7 @@ class CompilerBug458010Test extends AbstractXtendCompilerTest { public static void main(final String[] args) { final ArrayList roster = CollectionLiterals.newArrayList(); final Function1 _function = (Demo.Person it) -> { - return Boolean.valueOf(((Objects.equal(it.gender, Demo.Person.Sex.MALE) && (it.getAge() >= 18)) && (it.getAge() <= 25))); + return Boolean.valueOf(((Objects.equals(it.gender, Demo.Person.Sex.MALE) && (it.getAge() >= 18)) && (it.getAge() <= 25))); }; final Function1 _function_1 = (Demo.Person it) -> { return it.emailAddress; @@ -427,10 +427,10 @@ class CompilerBug458010Test extends AbstractXtendCompilerTest { } } ''', ''' - import com.google.common.base.Objects; import java.time.LocalDate; import java.time.Period; import java.util.ArrayList; + import java.util.Objects; import java.util.function.Predicate; import java.util.function.ToIntFunction; import org.eclipse.xtend.lib.annotations.Accessors; @@ -499,7 +499,7 @@ class CompilerBug458010Test extends AbstractXtendCompilerTest { public static void main(final String[] args) { final ArrayList roster = CollectionLiterals.newArrayList(); final Predicate _function = (Demo.Person it) -> { - return Objects.equal(it.gender, Demo.Person.Sex.MALE); + return Objects.equals(it.gender, Demo.Person.Sex.MALE); }; final ToIntFunction _function_1 = (Demo.Person it) -> { return it.getAge(); @@ -677,10 +677,10 @@ class CompilerBug458010Test extends AbstractXtendCompilerTest { } } ''', ''' - import com.google.common.base.Objects; import java.time.LocalDate; import java.time.Period; import java.util.ArrayList; + import java.util.Objects; import java.util.function.BiConsumer; import java.util.function.Function; import java.util.function.IntConsumer; @@ -786,7 +786,7 @@ class CompilerBug458010Test extends AbstractXtendCompilerTest { public static void main(final String[] args) { final ArrayList roster = CollectionLiterals.newArrayList(); final Predicate _function = (Demo.Person it) -> { - return Objects.equal(it.gender, Demo.Person.Sex.MALE); + return Objects.equals(it.gender, Demo.Person.Sex.MALE); }; final Function _function_1 = (Demo.Person it) -> { return Integer.valueOf(it.getAge()); @@ -857,10 +857,10 @@ class CompilerBug458010Test extends AbstractXtendCompilerTest { } } ''', ''' - import com.google.common.base.Objects; import java.time.LocalDate; import java.time.Period; import java.util.List; + import java.util.Objects; import java.util.function.BiConsumer; import java.util.function.Function; import java.util.function.IntConsumer; @@ -965,7 +965,7 @@ class CompilerBug458010Test extends AbstractXtendCompilerTest { public static void main(final Demo.Person[] roster) { final Predicate _function = (Demo.Person it) -> { - return Objects.equal(it.gender, Demo.Person.Sex.MALE); + return Objects.equals(it.gender, Demo.Person.Sex.MALE); }; final Function _function_1 = (Demo.Person it) -> { return Integer.valueOf(it.getAge()); @@ -1019,10 +1019,10 @@ class CompilerBug458010Test extends AbstractXtendCompilerTest { } } ''', ''' - import com.google.common.base.Objects; import java.time.LocalDate; import java.time.Period; import java.util.ArrayList; + import java.util.Objects; import java.util.function.Function; import java.util.function.Predicate; import java.util.stream.Collectors; @@ -1092,7 +1092,7 @@ class CompilerBug458010Test extends AbstractXtendCompilerTest { public static void main(final String[] args) { final ArrayList roster = CollectionLiterals.newArrayList(); final Predicate _function = (Demo.Person it) -> { - return Objects.equal(it.gender, Demo.Person.Sex.MALE); + return Objects.equals(it.gender, Demo.Person.Sex.MALE); }; final Function _function_1 = (Demo.Person it) -> { return it.name; @@ -2186,9 +2186,9 @@ class CompilerBug458010Test extends AbstractXtendCompilerTest { } } ''', ''' - import com.google.common.base.Objects; import java.util.ArrayList; import java.util.List; + import java.util.Objects; import org.eclipse.xtend.lib.annotations.Accessors; import org.eclipse.xtext.xbase.lib.CollectionLiterals; import org.eclipse.xtext.xbase.lib.Functions.Function1; @@ -2242,7 +2242,7 @@ class CompilerBug458010Test extends AbstractXtendCompilerTest { public static void main(final String[] args) { final ArrayList roster = CollectionLiterals.newArrayList(); final Function1 _function = (Demo.Person it) -> { - return Boolean.valueOf(Objects.equal(it.gender, Demo.Person.Sex.MALE)); + return Boolean.valueOf(Objects.equals(it.gender, Demo.Person.Sex.MALE)); }; final Function1 _function_1 = (Demo.Person it) -> { return it.name; @@ -2278,7 +2278,7 @@ class CompilerBug458010Test extends AbstractXtendCompilerTest { } } ''', ''' - import com.google.common.base.Objects; + import java.util.Objects; import org.eclipse.xtend.lib.annotations.Accessors; import org.eclipse.xtext.xbase.lib.Conversions; import org.eclipse.xtext.xbase.lib.Functions.Function1; @@ -2331,7 +2331,7 @@ class CompilerBug458010Test extends AbstractXtendCompilerTest { public static void main(final Demo.Person[] roster) { final Function1 _function = (Demo.Person it) -> { - return Boolean.valueOf(Objects.equal(it.gender, Demo.Person.Sex.MALE)); + return Boolean.valueOf(Objects.equals(it.gender, Demo.Person.Sex.MALE)); }; final Function1 _function_1 = (Demo.Person it) -> { return it.name; diff --git a/org.eclipse.xtend.core.tests/src/org/eclipse/xtend/core/tests/java8/compiler/Java8Compiler2Test.xtend b/org.eclipse.xtend.core.tests/src/org/eclipse/xtend/core/tests/java8/compiler/Java8Compiler2Test.xtend index 9d288c4fdce..db27a64d0cc 100644 --- a/org.eclipse.xtend.core.tests/src/org/eclipse/xtend/core/tests/java8/compiler/Java8Compiler2Test.xtend +++ b/org.eclipse.xtend.core.tests/src/org/eclipse/xtend/core/tests/java8/compiler/Java8Compiler2Test.xtend @@ -696,7 +696,7 @@ class Java8Compiler2Test extends XtendCompilerTest { } } '''.assertCompilesTo(''' - import com.google.common.base.Objects; + import java.util.Objects; import org.eclipse.xtext.xbase.lib.Functions.Function1; @SuppressWarnings("all") @@ -705,7 +705,7 @@ class Java8Compiler2Test extends XtendCompilerTest { Function1 _switchResult = null; final Object _switchValue = null; boolean _matched = false; - if (Objects.equal(_switchValue, null)) { + if (Objects.equals(_switchValue, null)) { _matched=true; final Function1 _function = (Object it) -> { return it; @@ -713,7 +713,7 @@ class Java8Compiler2Test extends XtendCompilerTest { _switchResult = _function; } if (!_matched) { - if (Objects.equal(_switchValue, null)) { + if (Objects.equals(_switchValue, null)) { _matched=true; final Function1 _function_1 = (Integer it) -> { return it; @@ -771,7 +771,7 @@ class Java8Compiler2Test extends XtendCompilerTest { } } '''.assertCompilesTo(''' - import com.google.common.base.Objects; + import java.util.Objects; import org.eclipse.xtext.xbase.lib.Functions.Function0; @SuppressWarnings("all") @@ -784,7 +784,7 @@ class Java8Compiler2Test extends XtendCompilerTest { return Integer.valueOf(1); }; Integer _apply = _function.apply(); - if (Objects.equal(x, _apply)) { + if (Objects.equals(x, _apply)) { _matched=true; _switchResult = true; } @@ -1016,9 +1016,9 @@ class Java8Compiler2Test extends XtendCompilerTest { } } '''.assertCompilesTo(''' - import com.google.common.base.Objects; import com.google.common.collect.AbstractIterator; import java.util.Iterator; + import java.util.Objects; import org.eclipse.xtext.xbase.lib.Functions.Function1; import org.eclipse.xtext.xbase.lib.IteratorExtensions; @@ -1030,7 +1030,7 @@ class Java8Compiler2Test extends XtendCompilerTest { protected T computeNext() { T _elvis = null; final Function1 _function = (T it_1) -> { - return Boolean.valueOf((!Objects.equal(it_1, null))); + return Boolean.valueOf((!Objects.equals(it_1, null))); }; T _findFirst = IteratorExtensions.findFirst(it, _function); if (_findFirst != null) { @@ -1389,14 +1389,14 @@ class Java8Compiler2Test extends XtendCompilerTest { '''.assertCompilesTo(''' package x; - import com.google.common.base.Objects; + import java.util.Objects; @SuppressWarnings("all") public class Y { @Override public boolean equals(final Object p) { boolean _xifexpression = false; - boolean _equals = Objects.equal("foo", p); + boolean _equals = Objects.equals("foo", p); if (_equals) { return true; } else { diff --git a/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/EmfModelsTest.java b/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/EmfModelsTest.java index 2ff42755a3f..40cbb1ae558 100644 --- a/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/EmfModelsTest.java +++ b/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/EmfModelsTest.java @@ -8,10 +8,10 @@ */ package org.eclipse.xtend.core.tests; -import com.google.common.base.Objects; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.List; +import java.util.Objects; import java.util.function.Consumer; import org.apache.log4j.Logger; import org.eclipse.emf.common.util.EList; @@ -155,7 +155,7 @@ public void dumpFeatures(final EClass eClassifier, final EObject obj) { for (final EStructuralFeature eStructuralFeature : _eAllStructuralFeatures) { try { String prefix = "get"; - if ((Objects.equal(eStructuralFeature.getEType(), EcorePackage.Literals.EBOOLEAN) && (eStructuralFeature.getUpperBound() == 1))) { + if ((Objects.equals(eStructuralFeature.getEType(), EcorePackage.Literals.EBOOLEAN) && (eStructuralFeature.getUpperBound() == 1))) { prefix = "is"; } String _firstUpper = Strings.toFirstUpper(eStructuralFeature.getName()); @@ -225,48 +225,48 @@ private Object getDefaultValue(final Class clazz) { boolean _isPrimitive = clazz.isPrimitive(); if (_isPrimitive) { boolean _matched = false; - if (Objects.equal(clazz, Boolean.TYPE)) { + if (Objects.equals(clazz, Boolean.TYPE)) { _matched=true; return Boolean.valueOf(false); } if (!_matched) { - if (Objects.equal(clazz, Long.TYPE)) { + if (Objects.equals(clazz, Long.TYPE)) { _matched=true; return Long.valueOf(0l); } } if (!_matched) { - if (Objects.equal(clazz, Integer.TYPE)) { + if (Objects.equals(clazz, Integer.TYPE)) { _matched=true; return Integer.valueOf(0); } } if (!_matched) { - if (Objects.equal(clazz, Character.TYPE)) { + if (Objects.equals(clazz, Character.TYPE)) { _matched=true; return Character.valueOf(((char) 0)); } } if (!_matched) { - if (Objects.equal(clazz, Short.TYPE)) { + if (Objects.equals(clazz, Short.TYPE)) { _matched=true; return Short.valueOf(((short) 0)); } } if (!_matched) { - if (Objects.equal(clazz, Byte.TYPE)) { + if (Objects.equals(clazz, Byte.TYPE)) { _matched=true; return Byte.valueOf(((byte) 0)); } } if (!_matched) { - if (Objects.equal(clazz, Double.TYPE)) { + if (Objects.equals(clazz, Double.TYPE)) { _matched=true; return Double.valueOf(0d); } } if (!_matched) { - if (Objects.equal(clazz, Float.TYPE)) { + if (Objects.equals(clazz, Float.TYPE)) { _matched=true; return Float.valueOf(0f); } diff --git a/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/build/XtendIncrementalBuilderTest.java b/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/build/XtendIncrementalBuilderTest.java index 20e60f87fd6..db4f43d09ca 100644 --- a/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/build/XtendIncrementalBuilderTest.java +++ b/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/build/XtendIncrementalBuilderTest.java @@ -8,10 +8,10 @@ */ package org.eclipse.xtend.core.tests.build; -import com.google.common.base.Objects; import com.google.inject.Inject; import com.google.inject.Injector; import java.util.Collections; +import java.util.Objects; import java.util.concurrent.atomic.AtomicBoolean; import org.eclipse.emf.common.util.URI; import org.eclipse.xtend.core.tests.RuntimeInjectorProvider; @@ -292,14 +292,14 @@ public void testDelete_01() { it.setDeletedFiles(Collections.unmodifiableList(CollectionLiterals.newArrayList(_delete))); final BuildRequest.IPostValidationCallback _function_2 = (URI uri, Iterable issues) -> { URI _uri = this.uri("src/A.xtend"); - boolean _equals = Objects.equal(_uri, uri); + boolean _equals = Objects.equals(_uri, uri); if (_equals) { Assert.assertTrue(IterableExtensions.head(issues).getMessage(), IterableExtensions.head(issues).getMessage().contains("foo.B cannot be resolved to a type")); validateCalled.set(true); return false; } else { URI _uri_1 = this.uri("src/foo/B.xtend"); - boolean _equals_1 = Objects.equal(_uri_1, uri); + boolean _equals_1 = Objects.equals(_uri_1, uri); if (_equals_1) { Assert.assertEquals("zero issues expected", 0, IterableExtensions.size(issues)); return true; diff --git a/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/compiler/AccessorsCompilerTest.java b/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/compiler/AccessorsCompilerTest.java index 77a29da7718..4e2e339361e 100644 --- a/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/compiler/AccessorsCompilerTest.java +++ b/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/compiler/AccessorsCompilerTest.java @@ -8,11 +8,11 @@ */ package org.eclipse.xtend.core.tests.compiler; -import com.google.common.base.Objects; import com.google.inject.Inject; import java.lang.reflect.Field; import java.lang.reflect.Method; import java.lang.reflect.Modifier; +import java.util.Objects; import org.eclipse.xtend.core.validation.IssueCodes; import org.eclipse.xtend.core.xtend.XtendPackage; import org.eclipse.xtend2.lib.StringConcatenation; @@ -425,12 +425,12 @@ public void testSpecifyingVisiblity() { Assert.assertTrue(Modifier.isPublic(it_1.getDeclaredMethod("setB", int.class).getModifiers())); final Function1 _function_2 = (Method it_2) -> { String _name = it_2.getName(); - return Boolean.valueOf(Objects.equal(_name, "getC")); + return Boolean.valueOf(Objects.equals(_name, "getC")); }; Assert.assertFalse(IterableExtensions.exists(((Iterable)Conversions.doWrapArray(it_1.getDeclaredMethods())), _function_2)); final Function1 _function_3 = (Method it_2) -> { String _name = it_2.getName(); - return Boolean.valueOf(Objects.equal(_name, "setC")); + return Boolean.valueOf(Objects.equals(_name, "setC")); }; Assert.assertFalse(IterableExtensions.exists(((Iterable)Conversions.doWrapArray(it_1.getDeclaredMethods())), _function_3)); } catch (Throwable _e) { @@ -476,12 +476,12 @@ public void testSpecifyingVisiblityNoStaticImport() { Assert.assertTrue(Modifier.isPublic(it_1.getDeclaredMethod("setB", int.class).getModifiers())); final Function1 _function_2 = (Method it_2) -> { String _name = it_2.getName(); - return Boolean.valueOf(Objects.equal(_name, "getC")); + return Boolean.valueOf(Objects.equals(_name, "getC")); }; Assert.assertFalse(IterableExtensions.exists(((Iterable)Conversions.doWrapArray(it_1.getDeclaredMethods())), _function_2)); final Function1 _function_3 = (Method it_2) -> { String _name = it_2.getName(); - return Boolean.valueOf(Objects.equal(_name, "setC")); + return Boolean.valueOf(Objects.equals(_name, "setC")); }; Assert.assertFalse(IterableExtensions.exists(((Iterable)Conversions.doWrapArray(it_1.getDeclaredMethods())), _function_3)); } catch (Throwable _e) { @@ -524,7 +524,7 @@ public void testIntegrationWithData() { Assert.assertTrue(Modifier.isProtected(it_1.getDeclaredMethod("getA").getModifiers())); final Function1 _function_2 = (Method it_2) -> { String _name = it_2.getName(); - return Boolean.valueOf(Objects.equal(_name, "setA")); + return Boolean.valueOf(Objects.equals(_name, "setA")); }; Assert.assertFalse(IterableExtensions.exists(((Iterable)Conversions.doWrapArray(it_1.getDeclaredMethods())), _function_2)); } catch (Throwable _e) { diff --git a/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/compiler/AnnotationTestingTest.java b/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/compiler/AnnotationTestingTest.java index 98f21a47c32..8eec971173e 100644 --- a/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/compiler/AnnotationTestingTest.java +++ b/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/compiler/AnnotationTestingTest.java @@ -8,13 +8,13 @@ */ package org.eclipse.xtend.core.tests.compiler; -import com.google.common.base.Objects; import com.google.common.io.Files; import com.google.inject.Inject; import java.io.File; import java.lang.reflect.Field; import java.nio.charset.Charset; import java.util.List; +import java.util.Objects; import org.eclipse.emf.common.util.URI; import org.eclipse.xtend2.lib.StringConcatenation; import org.eclipse.xtext.util.IAcceptor; @@ -52,17 +52,17 @@ public void testPath() { Assert.assertEquals(3, ((List)Conversions.doWrapArray(compiledClass.getDeclaredFields())).size()); final Function1 _function_1 = (Field it_1) -> { String _name = it_1.getName(); - return Boolean.valueOf(Objects.equal(_name, "foo")); + return Boolean.valueOf(Objects.equals(_name, "foo")); }; Assert.assertTrue(IterableExtensions.exists(((Iterable)Conversions.doWrapArray(compiledClass.getDeclaredFields())), _function_1)); final Function1 _function_2 = (Field it_1) -> { String _name = it_1.getName(); - return Boolean.valueOf(Objects.equal(_name, "bar")); + return Boolean.valueOf(Objects.equals(_name, "bar")); }; Assert.assertTrue(IterableExtensions.exists(((Iterable)Conversions.doWrapArray(compiledClass.getDeclaredFields())), _function_2)); final Function1 _function_3 = (Field it_1) -> { String _name = it_1.getName(); - return Boolean.valueOf(Objects.equal(_name, "baz")); + return Boolean.valueOf(Objects.equals(_name, "baz")); }; Assert.assertTrue(IterableExtensions.exists(((Iterable)Conversions.doWrapArray(compiledClass.getDeclaredFields())), _function_3)); final URI targetFileUri = sourceFileUri.trimSegments(2).appendSegment("xtend-gen").appendSegment("out.txt"); diff --git a/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/compiler/CompilerBug424763Test.java b/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/compiler/CompilerBug424763Test.java index 2e92a894664..07b54709953 100644 --- a/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/compiler/CompilerBug424763Test.java +++ b/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/compiler/CompilerBug424763Test.java @@ -230,10 +230,10 @@ public void testBug_424763_02() { _builder.append("}"); _builder.newLine(); StringConcatenation _builder_1 = new StringConcatenation(); - _builder_1.append("import com.google.common.base.Objects;"); - _builder_1.newLine(); _builder_1.append("import java.util.ArrayList;"); _builder_1.newLine(); + _builder_1.append("import java.util.Objects;"); + _builder_1.newLine(); _builder_1.append("import org.eclipse.xtext.xbase.lib.Functions.Function0;"); _builder_1.newLine(); _builder_1.newLine(); @@ -256,7 +256,7 @@ public void testBug_424763_02() { _builder_1.append("Function0 _xifexpression = null;"); _builder_1.newLine(); _builder_1.append(" "); - _builder_1.append("boolean _equals = Objects.equal(theConstructor, null);"); + _builder_1.append("boolean _equals = Objects.equals(theConstructor, null);"); _builder_1.newLine(); _builder_1.append(" "); _builder_1.append("if (_equals) {"); @@ -530,7 +530,7 @@ public void testBug_424763_05() { _builder.append("}"); _builder.newLine(); StringConcatenation _builder_1 = new StringConcatenation(); - _builder_1.append("import com.google.common.base.Objects;"); + _builder_1.append("import java.util.Objects;"); _builder_1.newLine(); _builder_1.append("import org.eclipse.xtext.xbase.lib.Functions.Function0;"); _builder_1.newLine(); @@ -550,7 +550,7 @@ public void testBug_424763_05() { _builder_1.append("Function0 _xifexpression = null;"); _builder_1.newLine(); _builder_1.append(" "); - _builder_1.append("boolean _equals = Objects.equal(theConstructor, null);"); + _builder_1.append("boolean _equals = Objects.equals(theConstructor, null);"); _builder_1.newLine(); _builder_1.append(" "); _builder_1.append("if (_equals) {"); diff --git a/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/compiler/CompilerBug427637Test.java b/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/compiler/CompilerBug427637Test.java index 85817e51aa2..1bb5f0636e9 100644 --- a/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/compiler/CompilerBug427637Test.java +++ b/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/compiler/CompilerBug427637Test.java @@ -2659,8 +2659,6 @@ public void testBug_427637_15() { _builder_1.append("package org.eclipse.xtext.xbase.formatting;"); _builder_1.newLine(); _builder_1.newLine(); - _builder_1.append("import com.google.common.base.Objects;"); - _builder_1.newLine(); _builder_1.append("import com.google.common.collect.Iterables;"); _builder_1.newLine(); _builder_1.append("import com.google.inject.Inject;"); @@ -2671,6 +2669,8 @@ public void testBug_427637_15() { _builder_1.newLine(); _builder_1.append("import java.util.List;"); _builder_1.newLine(); + _builder_1.append("import java.util.Objects;"); + _builder_1.newLine(); _builder_1.append("import org.eclipse.xtext.nodemodel.INode;"); _builder_1.newLine(); _builder_1.append("import org.eclipse.xtext.preferences.PreferenceKey;"); @@ -2857,7 +2857,7 @@ public void testBug_427637_15() { _builder_1.append("final int newLines2 = (int) _elvis;"); _builder_1.newLine(); _builder_1.append(" "); - _builder_1.append("if (((Objects.equal(it.space, null) && Objects.equal(it.newLines, null)) || ((leafs.getNewLinesInComments() == 0) && ((newLines2 == 0) || Objects.equal(it.space, \"\"))))) {"); + _builder_1.append("if (((Objects.equals(it.space, null) && Objects.equals(it.newLines, null)) || ((leafs.getNewLinesInComments() == 0) && ((newLines2 == 0) || Objects.equals(it.space, \"\"))))) {"); _builder_1.newLine(); _builder_1.append(" "); _builder_1.append("return FormattingDataFactory.this.newWhitespaceData(leafs, it.space, it.increaseIndentationChange, it.decreaseIndentationChange, doc.isDebugConflicts());"); @@ -3653,7 +3653,7 @@ public void testBug_427637_15() { _builder_1.append("} else {"); _builder_1.newLine(); _builder_1.append(" "); - _builder_1.append("if ((equalIndentationChange && (!Objects.equal(IterableExtensions.last(leafs.getLeafs()), leaf)))) {"); + _builder_1.append("if ((equalIndentationChange && (!Objects.equals(IterableExtensions.last(leafs.getLeafs()), leaf)))) {"); _builder_1.newLine(); _builder_1.append(" "); _builder_1.append("int _offset_4 = ((WhitespaceInfo)leaf).getOffset();"); @@ -3782,7 +3782,7 @@ public void testBug_427637_15() { _builder_1.append("}"); _builder_1.newLine(); _builder_1.append(" "); - _builder_1.append("if ((equalIndentationChange && (!Objects.equal(IterableExtensions.last(leafs.getLeafs()), leaf)))) {"); + _builder_1.append("if ((equalIndentationChange && (!Objects.equals(IterableExtensions.last(leafs.getLeafs()), leaf)))) {"); _builder_1.newLine(); _builder_1.append(" "); _builder_1.append("int _offset_6 = ((WhitespaceInfo)leaf).getOffset();"); @@ -3885,7 +3885,7 @@ public void testBug_427637_15() { _builder_1.append("Function1> _xifexpression = null;"); _builder_1.newLine(); _builder_1.append(" "); - _builder_1.append("boolean _notEquals = (!Objects.equal(node, null));"); + _builder_1.append("boolean _notEquals = (!Objects.equals(node, null));"); _builder_1.newLine(); _builder_1.append(" "); _builder_1.append("if (_notEquals) {"); @@ -3910,7 +3910,7 @@ public void testBug_427637_15() { _builder_1.append("Function1> _xifexpression = null;"); _builder_1.newLine(); _builder_1.append(" "); - _builder_1.append("boolean _notEquals = (!Objects.equal(node, null));"); + _builder_1.append("boolean _notEquals = (!Objects.equals(node, null));"); _builder_1.newLine(); _builder_1.append(" "); _builder_1.append("if (_notEquals) {"); @@ -3947,7 +3947,7 @@ public void testBug_427637_15() { _builder_1.append("final ArrayList result = CollectionLiterals.newArrayList();"); _builder_1.newLine(); _builder_1.append(" "); - _builder_1.append("boolean _notEquals = (!Objects.equal(node, null));"); + _builder_1.append("boolean _notEquals = (!Objects.equals(node, null));"); _builder_1.newLine(); _builder_1.append(" "); _builder_1.append("if (_notEquals) {"); @@ -4074,7 +4074,7 @@ public void testBug_427637_15() { _builder_1.append("final ArrayList result = CollectionLiterals.newArrayList();"); _builder_1.newLine(); _builder_1.append(" "); - _builder_1.append("boolean _notEquals = (!Objects.equal(node, null));"); + _builder_1.append("boolean _notEquals = (!Objects.equals(node, null));"); _builder_1.newLine(); _builder_1.append(" "); _builder_1.append("if (_notEquals) {"); diff --git a/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/compiler/CompilerBug451814Test.java b/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/compiler/CompilerBug451814Test.java index 4695d749298..f978bd56947 100644 --- a/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/compiler/CompilerBug451814Test.java +++ b/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/compiler/CompilerBug451814Test.java @@ -110,10 +110,10 @@ public void test_02() { _builder.append("}"); _builder.newLine(); StringConcatenation _builder_1 = new StringConcatenation(); - _builder_1.append("import com.google.common.base.Objects;"); - _builder_1.newLine(); _builder_1.append("import com.google.common.io.LineReader;"); _builder_1.newLine(); + _builder_1.append("import java.util.Objects;"); + _builder_1.newLine(); _builder_1.append("import org.eclipse.xtext.xbase.lib.Exceptions;"); _builder_1.newLine(); _builder_1.newLine(); @@ -134,7 +134,7 @@ public void test_02() { _builder_1.append("LineReader reader = null;"); _builder_1.newLine(); _builder_1.append(" "); - _builder_1.append("if (((counter == 0) && (!Objects.equal(reader.readLine(), null)))) {"); + _builder_1.append("if (((counter == 0) && (!Objects.equals(reader.readLine(), null)))) {"); _builder_1.newLine(); _builder_1.append(" "); _builder_1.append("}"); @@ -184,10 +184,10 @@ public void test_03() { _builder.append("}"); _builder.newLine(); StringConcatenation _builder_1 = new StringConcatenation(); - _builder_1.append("import com.google.common.base.Objects;"); - _builder_1.newLine(); _builder_1.append("import com.google.common.io.LineReader;"); _builder_1.newLine(); + _builder_1.append("import java.util.Objects;"); + _builder_1.newLine(); _builder_1.append("import org.eclipse.xtext.xbase.lib.Exceptions;"); _builder_1.newLine(); _builder_1.newLine(); @@ -208,7 +208,7 @@ public void test_03() { _builder_1.append("LineReader reader = null;"); _builder_1.newLine(); _builder_1.append(" "); - _builder_1.append("while (((counter == 0) && (!Objects.equal(reader.readLine(), null)))) {"); + _builder_1.append("while (((counter == 0) && (!Objects.equals(reader.readLine(), null)))) {"); _builder_1.newLine(); _builder_1.append(" "); _builder_1.append("}"); @@ -252,10 +252,10 @@ public void test_04() { _builder.append("}"); _builder.newLine(); StringConcatenation _builder_1 = new StringConcatenation(); - _builder_1.append("import com.google.common.base.Objects;"); - _builder_1.newLine(); _builder_1.append("import com.google.common.io.LineReader;"); _builder_1.newLine(); + _builder_1.append("import java.util.Objects;"); + _builder_1.newLine(); _builder_1.append("import org.eclipse.xtext.xbase.lib.Exceptions;"); _builder_1.newLine(); _builder_1.newLine(); @@ -276,7 +276,7 @@ public void test_04() { _builder_1.append("do {"); _builder_1.newLine(); _builder_1.append(" "); - _builder_1.append("} while((!Objects.equal(reader.readLine(), null)));"); + _builder_1.append("} while((!Objects.equals(reader.readLine(), null)));"); _builder_1.newLine(); _builder_1.append(" "); _builder_1.append("} catch (Throwable _e) {"); diff --git a/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/compiler/CompilerBug461923Test.java b/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/compiler/CompilerBug461923Test.java index cf712ca97a5..cfb3101e545 100644 --- a/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/compiler/CompilerBug461923Test.java +++ b/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/compiler/CompilerBug461923Test.java @@ -38,12 +38,12 @@ public void test_01() { _builder.append("}"); _builder.newLine(); StringConcatenation _builder_1 = new StringConcatenation(); - _builder_1.append("import com.google.common.base.Objects;"); - _builder_1.newLine(); _builder_1.append("import com.google.common.collect.ImmutableList;"); _builder_1.newLine(); _builder_1.append("import java.util.List;"); _builder_1.newLine(); + _builder_1.append("import java.util.Objects;"); + _builder_1.newLine(); _builder_1.append("import org.eclipse.xtext.xbase.lib.Functions.Function1;"); _builder_1.newLine(); _builder_1.append("import org.eclipse.xtext.xbase.lib.IterableExtensions;"); @@ -63,7 +63,7 @@ public void test_01() { _builder_1.append("public Boolean apply(final T it) {"); _builder_1.newLine(); _builder_1.append(" "); - _builder_1.append("return Boolean.valueOf((!Objects.equal(it, value)));"); + _builder_1.append("return Boolean.valueOf((!Objects.equals(it, value)));"); _builder_1.newLine(); _builder_1.append(" "); _builder_1.append("}"); @@ -104,12 +104,12 @@ public void test_02() { _builder.append("}"); _builder.newLine(); StringConcatenation _builder_1 = new StringConcatenation(); - _builder_1.append("import com.google.common.base.Objects;"); - _builder_1.newLine(); _builder_1.append("import com.google.common.collect.ImmutableList;"); _builder_1.newLine(); _builder_1.append("import java.util.List;"); _builder_1.newLine(); + _builder_1.append("import java.util.Objects;"); + _builder_1.newLine(); _builder_1.append("import org.eclipse.xtext.xbase.lib.Functions.Function1;"); _builder_1.newLine(); _builder_1.append("import org.eclipse.xtext.xbase.lib.IterableExtensions;"); @@ -129,7 +129,7 @@ public void test_02() { _builder_1.append("public Boolean apply(final T it) {"); _builder_1.newLine(); _builder_1.append(" "); - _builder_1.append("return Boolean.valueOf((!Objects.equal(it, value)));"); + _builder_1.append("return Boolean.valueOf((!Objects.equals(it, value)));"); _builder_1.newLine(); _builder_1.append(" "); _builder_1.append("}"); @@ -170,12 +170,12 @@ public void test_03() { _builder.append("}"); _builder.newLine(); StringConcatenation _builder_1 = new StringConcatenation(); - _builder_1.append("import com.google.common.base.Objects;"); - _builder_1.newLine(); _builder_1.append("import com.google.common.collect.ImmutableList;"); _builder_1.newLine(); _builder_1.append("import java.util.List;"); _builder_1.newLine(); + _builder_1.append("import java.util.Objects;"); + _builder_1.newLine(); _builder_1.append("import org.eclipse.xtext.xbase.lib.Functions.Function1;"); _builder_1.newLine(); _builder_1.append("import org.eclipse.xtext.xbase.lib.IterableExtensions;"); @@ -195,7 +195,7 @@ public void test_03() { _builder_1.append("public Boolean apply(final Object it) {"); _builder_1.newLine(); _builder_1.append(" "); - _builder_1.append("return Boolean.valueOf((!Objects.equal(it, value)));"); + _builder_1.append("return Boolean.valueOf((!Objects.equals(it, value)));"); _builder_1.newLine(); _builder_1.append(" "); _builder_1.append("}"); @@ -488,10 +488,10 @@ public void test_08() { _builder.append("}"); _builder.newLine(); StringConcatenation _builder_1 = new StringConcatenation(); - _builder_1.append("import com.google.common.base.Objects;"); - _builder_1.newLine(); _builder_1.append("import com.google.common.collect.ImmutableList;"); _builder_1.newLine(); + _builder_1.append("import java.util.Objects;"); + _builder_1.newLine(); _builder_1.append("import org.eclipse.xtext.xbase.lib.Conversions;"); _builder_1.newLine(); _builder_1.append("import org.eclipse.xtext.xbase.lib.Functions.Function1;"); @@ -513,7 +513,7 @@ public void test_08() { _builder_1.append("public Boolean apply(final T it) {"); _builder_1.newLine(); _builder_1.append(" "); - _builder_1.append("return Boolean.valueOf((!Objects.equal(it, value)));"); + _builder_1.append("return Boolean.valueOf((!Objects.equals(it, value)));"); _builder_1.newLine(); _builder_1.append(" "); _builder_1.append("}"); diff --git a/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/compiler/CompilerBug472142Test.java b/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/compiler/CompilerBug472142Test.java index aace381ca1a..fcfd7681750 100644 --- a/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/compiler/CompilerBug472142Test.java +++ b/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/compiler/CompilerBug472142Test.java @@ -216,10 +216,10 @@ public void test_03() { _builder.append("}"); _builder.newLine(); StringConcatenation _builder_1 = new StringConcatenation(); - _builder_1.append("import com.google.common.base.Objects;"); - _builder_1.newLine(); _builder_1.append("import java.util.List;"); _builder_1.newLine(); + _builder_1.append("import java.util.Objects;"); + _builder_1.newLine(); _builder_1.append("import org.eclipse.xtend2.lib.StringConcatenation;"); _builder_1.newLine(); _builder_1.append("import org.eclipse.xtext.xbase.lib.IterableExtensions;"); @@ -243,7 +243,7 @@ public void test_03() { _builder_1.append("{"); _builder_1.newLine(); _builder_1.append(" "); - _builder_1.append("boolean _equals = Objects.equal(this.mySeq, null);"); + _builder_1.append("boolean _equals = Objects.equals(this.mySeq, null);"); _builder_1.newLine(); _builder_1.append(" "); _builder_1.append("if (_equals) {"); diff --git a/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/compiler/CompilerBug491931Test.java b/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/compiler/CompilerBug491931Test.java index 6e6c7e63926..90ec2552175 100644 --- a/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/compiler/CompilerBug491931Test.java +++ b/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/compiler/CompilerBug491931Test.java @@ -254,7 +254,7 @@ public void test_05() { _builder.append("}"); _builder.newLine(); StringConcatenation _builder_1 = new StringConcatenation(); - _builder_1.append("import com.google.common.base.Objects;"); + _builder_1.append("import java.util.Objects;"); _builder_1.newLine(); _builder_1.newLine(); _builder_1.append("@SuppressWarnings(\"all\")"); @@ -265,7 +265,7 @@ public void test_05() { _builder_1.append("public boolean foo(final CharSequence obj) {"); _builder_1.newLine(); _builder_1.append(" "); - _builder_1.append("return (!((obj.subSequence(1, 1) instanceof String) && (!Objects.equal(obj, null))));"); + _builder_1.append("return (!((obj.subSequence(1, 1) instanceof String) && (!Objects.equals(obj, null))));"); _builder_1.newLine(); _builder_1.append(" "); _builder_1.append("}"); diff --git a/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/compiler/CompilerBugTest.java b/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/compiler/CompilerBugTest.java index 1f4de6bb4e8..5a89a66a807 100644 --- a/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/compiler/CompilerBugTest.java +++ b/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/compiler/CompilerBugTest.java @@ -847,10 +847,10 @@ public void testReturnExpressionConverted_01() { _builder.append("}"); _builder.newLine(); StringConcatenation _builder_1 = new StringConcatenation(); - _builder_1.append("import com.google.common.base.Objects;"); - _builder_1.newLine(); _builder_1.append("import java.util.List;"); _builder_1.newLine(); + _builder_1.append("import java.util.Objects;"); + _builder_1.newLine(); _builder_1.append("import org.eclipse.xtext.xbase.lib.Conversions;"); _builder_1.newLine(); _builder_1.newLine(); @@ -868,7 +868,7 @@ public void testReturnExpressionConverted_01() { _builder_1.append("final Object[] b = null;"); _builder_1.newLine(); _builder_1.append(" "); - _builder_1.append("boolean _equals = Objects.equal(\"foo\", \"bar\");"); + _builder_1.append("boolean _equals = Objects.equals(\"foo\", \"bar\");"); _builder_1.newLine(); _builder_1.append(" "); _builder_1.append("if (_equals) {"); @@ -928,10 +928,10 @@ public void testReturnExpressionConverted_02() { _builder.append("}"); _builder.newLine(); StringConcatenation _builder_1 = new StringConcatenation(); - _builder_1.append("import com.google.common.base.Objects;"); - _builder_1.newLine(); _builder_1.append("import java.util.List;"); _builder_1.newLine(); + _builder_1.append("import java.util.Objects;"); + _builder_1.newLine(); _builder_1.append("import org.eclipse.xtext.xbase.lib.Conversions;"); _builder_1.newLine(); _builder_1.newLine(); @@ -949,7 +949,7 @@ public void testReturnExpressionConverted_02() { _builder_1.append("final Object[] b = null;"); _builder_1.newLine(); _builder_1.append(" "); - _builder_1.append("boolean _equals = Objects.equal(\"foo\", \"bar\");"); + _builder_1.append("boolean _equals = Objects.equals(\"foo\", \"bar\");"); _builder_1.newLine(); _builder_1.append(" "); _builder_1.append("if (_equals) {"); @@ -1009,10 +1009,10 @@ public void testReturnExpressionConverted_03() { _builder.append("}"); _builder.newLine(); StringConcatenation _builder_1 = new StringConcatenation(); - _builder_1.append("import com.google.common.base.Objects;"); - _builder_1.newLine(); _builder_1.append("import java.util.List;"); _builder_1.newLine(); + _builder_1.append("import java.util.Objects;"); + _builder_1.newLine(); _builder_1.newLine(); _builder_1.append("@SuppressWarnings(\"all\")"); _builder_1.newLine(); @@ -1028,7 +1028,7 @@ public void testReturnExpressionConverted_03() { _builder_1.append("final Object[] b = null;"); _builder_1.newLine(); _builder_1.append(" "); - _builder_1.append("boolean _equals = Objects.equal(\"foo\", \"bar\");"); + _builder_1.append("boolean _equals = Objects.equals(\"foo\", \"bar\");"); _builder_1.newLine(); _builder_1.append(" "); _builder_1.append("if (_equals) {"); @@ -1093,10 +1093,10 @@ public void testReturnExpressionConverted_04() { _builder.append("}"); _builder.newLine(); StringConcatenation _builder_1 = new StringConcatenation(); - _builder_1.append("import com.google.common.base.Objects;"); - _builder_1.newLine(); _builder_1.append("import com.google.common.base.Predicate;"); _builder_1.newLine(); + _builder_1.append("import java.util.Objects;"); + _builder_1.newLine(); _builder_1.append("import org.eclipse.xtext.xbase.lib.Functions.Function1;"); _builder_1.newLine(); _builder_1.newLine(); @@ -1108,7 +1108,7 @@ public void testReturnExpressionConverted_04() { _builder_1.append("public Function1 foo() {"); _builder_1.newLine(); _builder_1.append(" "); - _builder_1.append("boolean _equals = Objects.equal(\"foo\", null);"); + _builder_1.append("boolean _equals = Objects.equals(\"foo\", null);"); _builder_1.newLine(); _builder_1.append(" "); _builder_1.append("if (_equals) {"); @@ -5072,7 +5072,7 @@ public void testEarlyExitInBranch_01() { _builder.append("}"); _builder.newLine(); StringConcatenation _builder_1 = new StringConcatenation(); - _builder_1.append("import com.google.common.base.Objects;"); + _builder_1.append("import java.util.Objects;"); _builder_1.newLine(); _builder_1.newLine(); _builder_1.append("@SuppressWarnings(\"all\")"); @@ -5092,7 +5092,7 @@ public void testEarlyExitInBranch_01() { _builder_1.append("boolean _matched = false;"); _builder_1.newLine(); _builder_1.append(" "); - _builder_1.append("if (Objects.equal(_switchValue, \"b\")) {"); + _builder_1.append("if (Objects.equals(_switchValue, \"b\")) {"); _builder_1.newLine(); _builder_1.append(" "); _builder_1.append("_matched=true;"); @@ -5107,7 +5107,7 @@ public void testEarlyExitInBranch_01() { _builder_1.append("if (!_matched) {"); _builder_1.newLine(); _builder_1.append(" "); - _builder_1.append("if (Objects.equal(_switchValue, \"c\")) {"); + _builder_1.append("if (Objects.equals(_switchValue, \"c\")) {"); _builder_1.newLine(); _builder_1.append(" "); _builder_1.append("_matched=true;"); @@ -5185,7 +5185,7 @@ public void testEarlyExitInBranch_02() { _builder.append("}"); _builder.newLine(); StringConcatenation _builder_1 = new StringConcatenation(); - _builder_1.append("import com.google.common.base.Objects;"); + _builder_1.append("import java.util.Objects;"); _builder_1.newLine(); _builder_1.newLine(); _builder_1.append("@SuppressWarnings(\"all\")"); @@ -5205,7 +5205,7 @@ public void testEarlyExitInBranch_02() { _builder_1.append("boolean _matched = false;"); _builder_1.newLine(); _builder_1.append(" "); - _builder_1.append("if (Objects.equal(_switchValue, \"b\")) {"); + _builder_1.append("if (Objects.equals(_switchValue, \"b\")) {"); _builder_1.newLine(); _builder_1.append(" "); _builder_1.append("_matched=true;"); @@ -5220,7 +5220,7 @@ public void testEarlyExitInBranch_02() { _builder_1.append("if (!_matched) {"); _builder_1.newLine(); _builder_1.append(" "); - _builder_1.append("if (Objects.equal(_switchValue, \"c\")) {"); + _builder_1.append("if (Objects.equals(_switchValue, \"c\")) {"); _builder_1.newLine(); _builder_1.append(" "); _builder_1.append("_matched=true;"); @@ -5288,7 +5288,7 @@ public void testOverloadWithSwitchExpression_01() { _builder.append("}"); _builder.newLine(); StringConcatenation _builder_1 = new StringConcatenation(); - _builder_1.append("import com.google.common.base.Objects;"); + _builder_1.append("import java.util.Objects;"); _builder_1.newLine(); _builder_1.append("import org.eclipse.xtext.xbase.compiler.output.ITreeAppendable;"); _builder_1.newLine(); @@ -5325,7 +5325,7 @@ public void testOverloadWithSwitchExpression_01() { _builder_1.append("if (!_matched) {"); _builder_1.newLine(); _builder_1.append(" "); - _builder_1.append("if (Objects.equal(it, Double.POSITIVE_INFINITY)) {"); + _builder_1.append("if (Objects.equals(it, Double.POSITIVE_INFINITY)) {"); _builder_1.newLine(); _builder_1.append(" "); _builder_1.append("_matched=true;"); @@ -8151,7 +8151,7 @@ public void testBug415849() { _builder.append("}"); _builder.newLine(); StringConcatenation _builder_1 = new StringConcatenation(); - _builder_1.append("import com.google.common.base.Objects;"); + _builder_1.append("import java.util.Objects;"); _builder_1.newLine(); _builder_1.newLine(); _builder_1.append("@SuppressWarnings(\"all\")"); @@ -8190,7 +8190,7 @@ public void testBug415849() { _builder_1.append("}"); _builder_1.newLine(); _builder_1.append(" "); - _builder_1.append("return Objects.equal(_text, _text_1);"); + _builder_1.append("return Objects.equals(_text, _text_1);"); _builder_1.newLine(); _builder_1.append(" "); _builder_1.append("}"); diff --git a/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/compiler/CompilerTraceTest.java b/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/compiler/CompilerTraceTest.java index b8fdc6467fe..24130829cbe 100644 --- a/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/compiler/CompilerTraceTest.java +++ b/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/compiler/CompilerTraceTest.java @@ -8,9 +8,9 @@ */ package org.eclipse.xtend.core.tests.compiler; -import com.google.common.base.Objects; import com.google.inject.Inject; import java.util.List; +import java.util.Objects; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.eclipse.emf.common.util.URI; @@ -1585,7 +1585,7 @@ public void tracesTo(final CharSequence xtend, final CharSequence java) { Assert.assertFalse(IterableExtensions.isEmpty(locations)); for (final ILocationInResource location : locations) { ITextRegionWithLineInformation _textRegion_1 = location.getTextRegion(); - boolean _equals = Objects.equal(_textRegion_1, expectedRegion); + boolean _equals = Objects.equals(_textRegion_1, expectedRegion); if (_equals) { return; } diff --git a/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/compiler/DelegateCompilerTest.java b/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/compiler/DelegateCompilerTest.java index 2120394e24f..0c7911f32fc 100644 --- a/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/compiler/DelegateCompilerTest.java +++ b/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/compiler/DelegateCompilerTest.java @@ -8,11 +8,11 @@ */ package org.eclipse.xtend.core.tests.compiler; -import com.google.common.base.Objects; import com.google.inject.Inject; import java.lang.reflect.Method; import java.util.Collections; import java.util.List; +import java.util.Objects; import org.eclipse.xtend.core.validation.IssueCodes; import org.eclipse.xtend.core.xtend.XtendFile; import org.eclipse.xtend.core.xtend.XtendPackage; @@ -69,7 +69,7 @@ public void testDelegateField() { this._validationTestHelper.assertNoIssues(this.file(text)); final IAcceptor _function = (CompilationTestHelper.Result it) -> { final Function1 _function_1 = (Method it_1) -> { - return Boolean.valueOf(((Objects.equal(it_1.getName(), "m") && ((List>)Conversions.doWrapArray(it_1.getParameterTypes())).isEmpty()) && Objects.equal(it_1.getReturnType(), void.class))); + return Boolean.valueOf(((Objects.equals(it_1.getName(), "m") && ((List>)Conversions.doWrapArray(it_1.getParameterTypes())).isEmpty()) && Objects.equals(it_1.getReturnType(), void.class))); }; Assert.assertTrue(IterableExtensions.exists(((Iterable)Conversions.doWrapArray(it.getCompiledClass().getDeclaredMethods())), _function_1)); }; @@ -110,7 +110,7 @@ public void testMethodWithReturnType() { this._validationTestHelper.assertNoIssues(this.file(text)); final IAcceptor _function = (CompilationTestHelper.Result it) -> { final Function1 _function_1 = (Method it_1) -> { - return Boolean.valueOf(((Objects.equal(it_1.getName(), "m") && ((List>)Conversions.doWrapArray(it_1.getParameterTypes())).isEmpty()) && Objects.equal(it_1.getReturnType(), int.class))); + return Boolean.valueOf(((Objects.equals(it_1.getName(), "m") && ((List>)Conversions.doWrapArray(it_1.getParameterTypes())).isEmpty()) && Objects.equals(it_1.getReturnType(), int.class))); }; Assert.assertTrue(IterableExtensions.exists(((Iterable)Conversions.doWrapArray(it.getCompiledClass().getDeclaredMethods())), _function_1)); }; @@ -151,7 +151,7 @@ public void testMethodWithParameters() { this._validationTestHelper.assertNoIssues(this.file(text)); final IAcceptor _function = (CompilationTestHelper.Result it) -> { final Function1 _function_1 = (Method it_1) -> { - return Boolean.valueOf(((Objects.equal(it_1.getName(), "m") && Objects.equal(IterableExtensions.>toList(((Iterable>)Conversions.doWrapArray(it_1.getParameterTypes()))), Collections.>unmodifiableList(CollectionLiterals.>newArrayList(String.class, Object.class)))) && Objects.equal(it_1.getReturnType(), void.class))); + return Boolean.valueOf(((Objects.equals(it_1.getName(), "m") && Objects.equals(IterableExtensions.>toList(((Iterable>)Conversions.doWrapArray(it_1.getParameterTypes()))), Collections.>unmodifiableList(CollectionLiterals.>newArrayList(String.class, Object.class)))) && Objects.equals(it_1.getReturnType(), void.class))); }; Assert.assertTrue(IterableExtensions.exists(((Iterable)Conversions.doWrapArray(it.getCompiledClass().getDeclaredMethods())), _function_1)); }; @@ -193,7 +193,7 @@ public void testDelegateMethod() { final IAcceptor _function = (CompilationTestHelper.Result it) -> { final Function1 _function_1 = (Method it_1) -> { String _name = it_1.getName(); - return Boolean.valueOf(Objects.equal(_name, "m")); + return Boolean.valueOf(Objects.equals(_name, "m")); }; Assert.assertTrue(IterableExtensions.exists(((Iterable)Conversions.doWrapArray(it.getCompiledClass().getDeclaredMethods())), _function_1)); }; @@ -235,7 +235,7 @@ public void testDelegateMethod2() { final IAcceptor _function = (CompilationTestHelper.Result it) -> { final Function1 _function_1 = (Method it_1) -> { String _name = it_1.getName(); - return Boolean.valueOf(Objects.equal(_name, "m")); + return Boolean.valueOf(Objects.equals(_name, "m")); }; Assert.assertTrue(IterableExtensions.exists(((Iterable)Conversions.doWrapArray(it.getCompiledClass().getDeclaredMethods())), _function_1)); }; @@ -277,7 +277,7 @@ public void testDelegateMethod3() { final IAcceptor _function = (CompilationTestHelper.Result it) -> { final Function1 _function_1 = (Method it_1) -> { String _name = it_1.getName(); - return Boolean.valueOf(Objects.equal(_name, "m")); + return Boolean.valueOf(Objects.equals(_name, "m")); }; Assert.assertTrue(IterableExtensions.exists(((Iterable)Conversions.doWrapArray(it.getCompiledClass().getDeclaredMethods())), _function_1)); }; @@ -512,7 +512,7 @@ public void testIgnoreInterfacesNotDeclaredOnTargetClass() { final IAcceptor _function = (CompilationTestHelper.Result it) -> { final Function1 _function_1 = (Method it_1) -> { String _name = it_1.getName(); - return Boolean.valueOf(Objects.equal(_name, "f")); + return Boolean.valueOf(Objects.equals(_name, "f")); }; Assert.assertFalse(IterableExtensions.exists(((Iterable)Conversions.doWrapArray(it.getCompiledClass().getDeclaredMethods())), _function_1)); }; @@ -716,7 +716,7 @@ public void testObjectMethodsAreIgnored() { final IAcceptor _function = (CompilationTestHelper.Result it) -> { final Function1 _function_1 = (Method it_1) -> { String _simpleName = it_1.getDeclaringClass().getSimpleName(); - return Boolean.valueOf(Objects.equal(_simpleName, "A")); + return Boolean.valueOf(Objects.equals(_simpleName, "A")); }; Assert.assertTrue(IterableExtensions.forall(((Iterable)Conversions.doWrapArray(it.getCompiledClass().getDeclaredMethods())), _function_1)); }; diff --git a/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/compiler/FinalFieldsConstructorCompilerTest.java b/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/compiler/FinalFieldsConstructorCompilerTest.java index d7ec280dd25..90feb219026 100644 --- a/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/compiler/FinalFieldsConstructorCompilerTest.java +++ b/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/compiler/FinalFieldsConstructorCompilerTest.java @@ -8,11 +8,11 @@ */ package org.eclipse.xtend.core.tests.compiler; -import com.google.common.base.Objects; import com.google.inject.Inject; import java.lang.reflect.Constructor; import java.util.Collections; import java.util.List; +import java.util.Objects; import org.eclipse.xtend.core.xtend.XtendPackage; import org.eclipse.xtend2.lib.StringConcatenation; import org.eclipse.xtext.testing.validation.ValidationTestHelper; @@ -58,7 +58,7 @@ public void testOnClass() { final IAcceptor _function = (CompilationTestHelper.Result it) -> { final Function1, Boolean> _function_1 = (Constructor it_1) -> { List> _list = IterableExtensions.>toList(((Iterable>)Conversions.doWrapArray(it_1.getParameterTypes()))); - return Boolean.valueOf(Objects.equal(_list, Collections.>unmodifiableList(CollectionLiterals.>newArrayList(int.class, String.class)))); + return Boolean.valueOf(Objects.equals(_list, Collections.>unmodifiableList(CollectionLiterals.>newArrayList(int.class, String.class)))); }; Assert.assertTrue( IterableExtensions.>exists(((Iterable>)Conversions.doWrapArray(it.getCompiledClass().getDeclaredConstructors())), _function_1)); @@ -95,7 +95,7 @@ public void testOnConstructor() { final IAcceptor _function = (CompilationTestHelper.Result it) -> { final Function1, Boolean> _function_1 = (Constructor it_1) -> { List> _list = IterableExtensions.>toList(((Iterable>)Conversions.doWrapArray(it_1.getParameterTypes()))); - return Boolean.valueOf(Objects.equal(_list, Collections.>unmodifiableList(CollectionLiterals.>newArrayList(int.class, String.class)))); + return Boolean.valueOf(Objects.equals(_list, Collections.>unmodifiableList(CollectionLiterals.>newArrayList(int.class, String.class)))); }; Assert.assertTrue( IterableExtensions.>exists(((Iterable>)Conversions.doWrapArray(it.getCompiledClass().getDeclaredConstructors())), _function_1)); @@ -261,7 +261,7 @@ public void testIntegrationWithData() { final IAcceptor _function = (CompilationTestHelper.Result it) -> { final Function1, Boolean> _function_1 = (Constructor it_1) -> { List> _list = IterableExtensions.>toList(((Iterable>)Conversions.doWrapArray(it_1.getParameterTypes()))); - return Boolean.valueOf(Objects.equal(_list, Collections.>unmodifiableList(CollectionLiterals.>newArrayList(int.class, String.class)))); + return Boolean.valueOf(Objects.equals(_list, Collections.>unmodifiableList(CollectionLiterals.>newArrayList(int.class, String.class)))); }; Assert.assertTrue( IterableExtensions.>exists(((Iterable>)Conversions.doWrapArray(it.getCompiledClass().getDeclaredConstructors())), _function_1)); @@ -307,7 +307,7 @@ public void testIntegrationWithData2() { final IAcceptor _function = (CompilationTestHelper.Result it) -> { final Function1, Boolean> _function_1 = (Constructor it_1) -> { List> _list = IterableExtensions.>toList(((Iterable>)Conversions.doWrapArray(it_1.getParameterTypes()))); - return Boolean.valueOf(Objects.equal(_list, Collections.>unmodifiableList(CollectionLiterals.>newArrayList(int.class, String.class)))); + return Boolean.valueOf(Objects.equals(_list, Collections.>unmodifiableList(CollectionLiterals.>newArrayList(int.class, String.class)))); }; Assert.assertTrue( IterableExtensions.>exists(((Iterable>)Conversions.doWrapArray(it.getCompiledClass().getDeclaredConstructors())), _function_1)); @@ -341,7 +341,7 @@ public void testIntegrationWithAccessors() { final IAcceptor _function = (CompilationTestHelper.Result it) -> { final Function1, Boolean> _function_1 = (Constructor it_1) -> { List> _list = IterableExtensions.>toList(((Iterable>)Conversions.doWrapArray(it_1.getParameterTypes()))); - return Boolean.valueOf(Objects.equal(_list, Collections.>unmodifiableList(CollectionLiterals.>newArrayList(int.class, String.class)))); + return Boolean.valueOf(Objects.equals(_list, Collections.>unmodifiableList(CollectionLiterals.>newArrayList(int.class, String.class)))); }; Assert.assertTrue( IterableExtensions.>exists(((Iterable>)Conversions.doWrapArray(it.getCompiledClass().getDeclaredConstructors())), _function_1)); diff --git a/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/compiler/NewDataCompilerTest.java b/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/compiler/NewDataCompilerTest.java index 0972a73c886..a34de3e0d17 100644 --- a/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/compiler/NewDataCompilerTest.java +++ b/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/compiler/NewDataCompilerTest.java @@ -8,13 +8,13 @@ */ package org.eclipse.xtend.core.tests.compiler; -import com.google.common.base.Objects; import com.google.inject.Inject; import java.lang.reflect.Constructor; import java.lang.reflect.Field; import java.lang.reflect.Method; import java.util.Collections; import java.util.List; +import java.util.Objects; import org.eclipse.xtend.core.xtend.XtendPackage; import org.eclipse.xtend2.lib.StringConcatenation; import org.eclipse.xtext.testing.validation.ValidationTestHelper; @@ -375,7 +375,7 @@ public void testExistingGetter2() { Assert.assertEquals(Boolean.valueOf(true), getFoo.invoke(instance)); final Function1 _function_1 = (Method it_1) -> { String _name = it_1.getName(); - return Boolean.valueOf(Objects.equal(_name, "isFoo")); + return Boolean.valueOf(Objects.equals(_name, "isFoo")); }; Assert.assertFalse(IterableExtensions.exists(((Iterable)Conversions.doWrapArray(it.getCompiledClass().getDeclaredMethods())), _function_1)); } catch (Throwable _e) { @@ -656,12 +656,12 @@ public void testDataClassWithStaticField() { final Procedure1> _function_1 = (Class it_1) -> { final Function1 _function_2 = (Field it_2) -> { String _name = it_2.getName(); - return Boolean.valueOf(Objects.equal(_name, "foo")); + return Boolean.valueOf(Objects.equals(_name, "foo")); }; Assert.assertTrue(IterableExtensions.exists(((Iterable)Conversions.doWrapArray(it_1.getDeclaredFields())), _function_2)); final Function1 _function_3 = (Method it_2) -> { String _name = it_2.getName(); - return Boolean.valueOf(Objects.equal(_name, "getFoo")); + return Boolean.valueOf(Objects.equals(_name, "getFoo")); }; Assert.assertFalse(IterableExtensions.exists(((Iterable)Conversions.doWrapArray(it_1.getDeclaredMethods())), _function_3)); final Function1, Boolean> _function_4 = (Constructor it_2) -> { @@ -699,22 +699,22 @@ public void testBooleanProperties() { final Procedure1> _function_1 = (Class it_1) -> { final Function1 _function_2 = (Field it_2) -> { String _name = it_2.getName(); - return Boolean.valueOf(Objects.equal(_name, "foo")); + return Boolean.valueOf(Objects.equals(_name, "foo")); }; Assert.assertTrue(IterableExtensions.exists(((Iterable)Conversions.doWrapArray(it_1.getDeclaredFields())), _function_2)); final Function1 _function_3 = (Field it_2) -> { String _name = it_2.getName(); - return Boolean.valueOf(Objects.equal(_name, "bar")); + return Boolean.valueOf(Objects.equals(_name, "bar")); }; Assert.assertTrue(IterableExtensions.exists(((Iterable)Conversions.doWrapArray(it_1.getDeclaredFields())), _function_3)); final Function1 _function_4 = (Method it_2) -> { String _name = it_2.getName(); - return Boolean.valueOf(Objects.equal(_name, "isFoo")); + return Boolean.valueOf(Objects.equals(_name, "isFoo")); }; Assert.assertTrue(IterableExtensions.exists(((Iterable)Conversions.doWrapArray(it_1.getDeclaredMethods())), _function_4)); final Function1 _function_5 = (Method it_2) -> { String _name = it_2.getName(); - return Boolean.valueOf(Objects.equal(_name, "getBar")); + return Boolean.valueOf(Objects.equals(_name, "getBar")); }; Assert.assertTrue(IterableExtensions.exists(((Iterable)Conversions.doWrapArray(it_1.getDeclaredMethods())), _function_5)); }; @@ -751,7 +751,7 @@ public void testParametrizedSuperConstructor() { final Procedure1> _function_1 = (Class it_1) -> { final Function1, Boolean> _function_2 = (Constructor it_2) -> { List> _list = IterableExtensions.>toList(((Iterable>)Conversions.doWrapArray(it_2.getParameterTypes()))); - return Boolean.valueOf(Objects.equal(_list, Collections.>unmodifiableList(CollectionLiterals.>newArrayList(int.class, String.class)))); + return Boolean.valueOf(Objects.equals(_list, Collections.>unmodifiableList(CollectionLiterals.>newArrayList(int.class, String.class)))); }; Assert.assertTrue(IterableExtensions.>exists(((Iterable>)Conversions.doWrapArray(it_1.getDeclaredConstructors())), _function_2)); }; diff --git a/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/compiler/OldDataCompilerTest.java b/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/compiler/OldDataCompilerTest.java index 525164e5d74..d1de9f84101 100644 --- a/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/compiler/OldDataCompilerTest.java +++ b/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/compiler/OldDataCompilerTest.java @@ -8,13 +8,13 @@ */ package org.eclipse.xtend.core.tests.compiler; -import com.google.common.base.Objects; import com.google.inject.Inject; import java.lang.reflect.Constructor; import java.lang.reflect.Field; import java.lang.reflect.Method; import java.util.Collections; import java.util.List; +import java.util.Objects; import org.eclipse.xtend2.lib.StringConcatenation; import org.eclipse.xtext.testing.validation.ValidationTestHelper; import org.eclipse.xtext.util.IAcceptor; @@ -996,12 +996,12 @@ public void testDataClassWithStaticField() { final Procedure1> _function_1 = (Class it_1) -> { final Function1 _function_2 = (Field it_2) -> { String _name = it_2.getName(); - return Boolean.valueOf(Objects.equal(_name, "foo")); + return Boolean.valueOf(Objects.equals(_name, "foo")); }; Assert.assertTrue(IterableExtensions.exists(((Iterable)Conversions.doWrapArray(it_1.getDeclaredFields())), _function_2)); final Function1 _function_3 = (Method it_2) -> { String _name = it_2.getName(); - return Boolean.valueOf(Objects.equal(_name, "getFoo")); + return Boolean.valueOf(Objects.equals(_name, "getFoo")); }; Assert.assertFalse(IterableExtensions.exists(((Iterable)Conversions.doWrapArray(it_1.getDeclaredMethods())), _function_3)); final Function1, Boolean> _function_4 = (Constructor it_2) -> { @@ -1037,22 +1037,22 @@ public void testBooleanProperties() { final Procedure1> _function_1 = (Class it_1) -> { final Function1 _function_2 = (Field it_2) -> { String _name = it_2.getName(); - return Boolean.valueOf(Objects.equal(_name, "_foo")); + return Boolean.valueOf(Objects.equals(_name, "_foo")); }; Assert.assertTrue(IterableExtensions.exists(((Iterable)Conversions.doWrapArray(it_1.getDeclaredFields())), _function_2)); final Function1 _function_3 = (Field it_2) -> { String _name = it_2.getName(); - return Boolean.valueOf(Objects.equal(_name, "_bar")); + return Boolean.valueOf(Objects.equals(_name, "_bar")); }; Assert.assertTrue(IterableExtensions.exists(((Iterable)Conversions.doWrapArray(it_1.getDeclaredFields())), _function_3)); final Function1 _function_4 = (Method it_2) -> { String _name = it_2.getName(); - return Boolean.valueOf(Objects.equal(_name, "isFoo")); + return Boolean.valueOf(Objects.equals(_name, "isFoo")); }; Assert.assertTrue(IterableExtensions.exists(((Iterable)Conversions.doWrapArray(it_1.getDeclaredMethods())), _function_4)); final Function1 _function_5 = (Method it_2) -> { String _name = it_2.getName(); - return Boolean.valueOf(Objects.equal(_name, "getBar")); + return Boolean.valueOf(Objects.equals(_name, "getBar")); }; Assert.assertTrue(IterableExtensions.exists(((Iterable)Conversions.doWrapArray(it_1.getDeclaredMethods())), _function_5)); }; @@ -1087,7 +1087,7 @@ public void testParametrizedSuperConstructor() { final Procedure1> _function_1 = (Class it_1) -> { final Function1, Boolean> _function_2 = (Constructor it_2) -> { List> _list = IterableExtensions.>toList(((Iterable>)Conversions.doWrapArray(it_2.getParameterTypes()))); - return Boolean.valueOf(Objects.equal(_list, Collections.>unmodifiableList(CollectionLiterals.>newArrayList(int.class, String.class)))); + return Boolean.valueOf(Objects.equals(_list, Collections.>unmodifiableList(CollectionLiterals.>newArrayList(int.class, String.class)))); }; Assert.assertTrue(IterableExtensions.>exists(((Iterable>)Conversions.doWrapArray(it_1.getDeclaredConstructors())), _function_2)); }; diff --git a/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/compiler/XtendCompilerTest.java b/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/compiler/XtendCompilerTest.java index 42e4eb7cf94..18e2f725623 100644 --- a/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/compiler/XtendCompilerTest.java +++ b/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/compiler/XtendCompilerTest.java @@ -2249,12 +2249,12 @@ public void testAbstractIterator_01() { _builder.append("}"); _builder.newLine(); StringConcatenation _builder_1 = new StringConcatenation(); - _builder_1.append("import com.google.common.base.Objects;"); - _builder_1.newLine(); _builder_1.append("import com.google.common.collect.AbstractIterator;"); _builder_1.newLine(); _builder_1.append("import java.util.Iterator;"); _builder_1.newLine(); + _builder_1.append("import java.util.Objects;"); + _builder_1.newLine(); _builder_1.newLine(); _builder_1.append("@SuppressWarnings(\"all\")"); _builder_1.newLine(); @@ -2282,7 +2282,7 @@ public void testAbstractIterator_01() { _builder_1.append("final T elem = iter.next();"); _builder_1.newLine(); _builder_1.append(" "); - _builder_1.append("boolean _notEquals = (!Objects.equal(elem, null));"); + _builder_1.append("boolean _notEquals = (!Objects.equals(elem, null));"); _builder_1.newLine(); _builder_1.append(" "); _builder_1.append("if (_notEquals) {"); @@ -2564,12 +2564,12 @@ public void testAbstractIterator_04() { _builder.append("}"); _builder.newLine(); StringConcatenation _builder_1 = new StringConcatenation(); - _builder_1.append("import com.google.common.base.Objects;"); - _builder_1.newLine(); _builder_1.append("import com.google.common.collect.AbstractIterator;"); _builder_1.newLine(); _builder_1.append("import java.util.Iterator;"); _builder_1.newLine(); + _builder_1.append("import java.util.Objects;"); + _builder_1.newLine(); _builder_1.append("import org.eclipse.xtext.xbase.lib.Functions.Function1;"); _builder_1.newLine(); _builder_1.append("import org.eclipse.xtext.xbase.lib.IteratorExtensions;"); @@ -2601,7 +2601,7 @@ public void testAbstractIterator_04() { _builder_1.append("public Boolean apply(final T it_1) {"); _builder_1.newLine(); _builder_1.append(" "); - _builder_1.append("return Boolean.valueOf((!Objects.equal(it_1, null)));"); + _builder_1.append("return Boolean.valueOf((!Objects.equals(it_1, null)));"); _builder_1.newLine(); _builder_1.append(" "); _builder_1.append("}"); @@ -3527,7 +3527,7 @@ public void testSwitchAsVoid() { _builder.append("}"); _builder.newLine(); StringConcatenation _builder_1 = new StringConcatenation(); - _builder_1.append("import com.google.common.base.Objects;"); + _builder_1.append("import java.util.Objects;"); _builder_1.newLine(); _builder_1.append("import org.eclipse.xtext.xbase.lib.IntegerRange;"); _builder_1.newLine(); @@ -3543,7 +3543,7 @@ public void testSwitchAsVoid() { _builder_1.append("boolean _matched = false;"); _builder_1.newLine(); _builder_1.append(" "); - _builder_1.append("if (Objects.equal(a, \"b\")) {"); + _builder_1.append("if (Objects.equals(a, \"b\")) {"); _builder_1.newLine(); _builder_1.append(" "); _builder_1.append("_matched=true;"); @@ -3564,7 +3564,7 @@ public void testSwitchAsVoid() { _builder_1.append("if (!_matched) {"); _builder_1.newLine(); _builder_1.append(" "); - _builder_1.append("if (Objects.equal(a, \"c\")) {"); + _builder_1.append("if (Objects.equals(a, \"c\")) {"); _builder_1.newLine(); _builder_1.append(" "); _builder_1.append("_matched=true;"); @@ -3588,7 +3588,7 @@ public void testSwitchAsVoid() { _builder_1.append("if (!_matched) {"); _builder_1.newLine(); _builder_1.append(" "); - _builder_1.append("if (Objects.equal(a, \"d\")) {"); + _builder_1.append("if (Objects.equals(a, \"d\")) {"); _builder_1.newLine(); _builder_1.append(" "); _builder_1.append("_matched=true;"); @@ -3957,7 +3957,7 @@ public void testSwitchWithNonVoidReturn_01() { _builder.append("}"); _builder.newLine(); StringConcatenation _builder_1 = new StringConcatenation(); - _builder_1.append("import com.google.common.base.Objects;"); + _builder_1.append("import java.util.Objects;"); _builder_1.newLine(); _builder_1.append("import org.eclipse.xtext.xbase.lib.IntegerRange;"); _builder_1.newLine(); @@ -3973,7 +3973,7 @@ public void testSwitchWithNonVoidReturn_01() { _builder_1.append("boolean _matched = false;"); _builder_1.newLine(); _builder_1.append(" "); - _builder_1.append("if (Objects.equal(a, \"b\")) {"); + _builder_1.append("if (Objects.equals(a, \"b\")) {"); _builder_1.newLine(); _builder_1.append(" "); _builder_1.append("_matched=true;"); @@ -3994,7 +3994,7 @@ public void testSwitchWithNonVoidReturn_01() { _builder_1.append("if (!_matched) {"); _builder_1.newLine(); _builder_1.append(" "); - _builder_1.append("if (Objects.equal(a, \"c\")) {"); + _builder_1.append("if (Objects.equals(a, \"c\")) {"); _builder_1.newLine(); _builder_1.append(" "); _builder_1.append("_matched=true;"); @@ -4018,7 +4018,7 @@ public void testSwitchWithNonVoidReturn_01() { _builder_1.append("if (!_matched) {"); _builder_1.newLine(); _builder_1.append(" "); - _builder_1.append("if (Objects.equal(a, \"d\")) {"); + _builder_1.append("if (Objects.equals(a, \"d\")) {"); _builder_1.newLine(); _builder_1.append(" "); _builder_1.append("_matched=true;"); @@ -4078,7 +4078,7 @@ public void testSwitchWithNonVoidReturn_02() { _builder.append("}"); _builder.newLine(); StringConcatenation _builder_1 = new StringConcatenation(); - _builder_1.append("import com.google.common.base.Objects;"); + _builder_1.append("import java.util.Objects;"); _builder_1.newLine(); _builder_1.newLine(); _builder_1.append("@SuppressWarnings(\"all\")"); @@ -4095,7 +4095,7 @@ public void testSwitchWithNonVoidReturn_02() { _builder_1.append("boolean _matched = false;"); _builder_1.newLine(); _builder_1.append(" "); - _builder_1.append("if (Objects.equal(a, \"a\")) {"); + _builder_1.append("if (Objects.equals(a, \"a\")) {"); _builder_1.newLine(); _builder_1.append(" "); _builder_1.append("_matched=true;"); @@ -4131,7 +4131,7 @@ public void testSwitchWithNonVoidReturn_02() { _builder_1.append("if (!_matched) {"); _builder_1.newLine(); _builder_1.append(" "); - _builder_1.append("if (Objects.equal(a, \"b\")) {"); + _builder_1.append("if (Objects.equals(a, \"b\")) {"); _builder_1.newLine(); _builder_1.append(" "); _builder_1.append("_matched=true;"); @@ -4452,7 +4452,7 @@ public void testSwitchOverNull() { _builder.append("}"); _builder.newLine(); StringConcatenation _builder_1 = new StringConcatenation(); - _builder_1.append("import com.google.common.base.Objects;"); + _builder_1.append("import java.util.Objects;"); _builder_1.newLine(); _builder_1.append("import org.eclipse.xtext.xbase.lib.Functions.Function1;"); _builder_1.newLine(); @@ -4474,7 +4474,7 @@ public void testSwitchOverNull() { _builder_1.append("boolean _matched = false;"); _builder_1.newLine(); _builder_1.append(" "); - _builder_1.append("if (Objects.equal(_switchValue, null)) {"); + _builder_1.append("if (Objects.equals(_switchValue, null)) {"); _builder_1.newLine(); _builder_1.append(" "); _builder_1.append("_matched=true;"); @@ -4504,7 +4504,7 @@ public void testSwitchOverNull() { _builder_1.append("if (!_matched) {"); _builder_1.newLine(); _builder_1.append(" "); - _builder_1.append("if (Objects.equal(_switchValue, null)) {"); + _builder_1.append("if (Objects.equals(_switchValue, null)) {"); _builder_1.newLine(); _builder_1.append(" "); _builder_1.append("_matched=true;"); @@ -4668,7 +4668,7 @@ public void testSwitchWithConstantExpressions_2() { _builder.append("}"); _builder.newLine(); StringConcatenation _builder_1 = new StringConcatenation(); - _builder_1.append("import com.google.common.base.Objects;"); + _builder_1.append("import java.util.Objects;"); _builder_1.newLine(); _builder_1.newLine(); _builder_1.append("@SuppressWarnings(\"all\")"); @@ -4688,7 +4688,7 @@ public void testSwitchWithConstantExpressions_2() { _builder_1.append("boolean _matched = false;"); _builder_1.newLine(); _builder_1.append(" "); - _builder_1.append("if (Objects.equal(x, 1)) {"); + _builder_1.append("if (Objects.equals(x, 1)) {"); _builder_1.newLine(); _builder_1.append(" "); _builder_1.append("_matched=true;"); @@ -4745,7 +4745,7 @@ public void testSwitchWithConstantExpressions_3() { _builder.append("}"); _builder.newLine(); StringConcatenation _builder_1 = new StringConcatenation(); - _builder_1.append("import com.google.common.base.Objects;"); + _builder_1.append("import java.util.Objects;"); _builder_1.newLine(); _builder_1.newLine(); _builder_1.append("@SuppressWarnings(\"all\")"); @@ -4765,7 +4765,7 @@ public void testSwitchWithConstantExpressions_3() { _builder_1.append("boolean _matched = false;"); _builder_1.newLine(); _builder_1.append(" "); - _builder_1.append("if (Objects.equal(x, 1d)) {"); + _builder_1.append("if (Objects.equals(x, 1d)) {"); _builder_1.newLine(); _builder_1.append(" "); _builder_1.append("_matched=true;"); @@ -5065,7 +5065,7 @@ public void testSwitchWithConstantExpressions_7() { _builder.append("}"); _builder.newLine(); StringConcatenation _builder_1 = new StringConcatenation(); - _builder_1.append("import com.google.common.base.Objects;"); + _builder_1.append("import java.util.Objects;"); _builder_1.newLine(); _builder_1.append("import org.eclipse.xtext.xbase.lib.Functions.Function0;"); _builder_1.newLine(); @@ -5105,7 +5105,7 @@ public void testSwitchWithConstantExpressions_7() { _builder_1.append("Integer _apply = _function.apply();"); _builder_1.newLine(); _builder_1.append(" "); - _builder_1.append("if (Objects.equal(x, _apply)) {"); + _builder_1.append("if (Objects.equals(x, _apply)) {"); _builder_1.newLine(); _builder_1.append(" "); _builder_1.append("_matched=true;"); @@ -5447,7 +5447,7 @@ public void testSwitchWithConstantExpressions_11() { _builder.append("}"); _builder.newLine(); StringConcatenation _builder_1 = new StringConcatenation(); - _builder_1.append("import com.google.common.base.Objects;"); + _builder_1.append("import java.util.Objects;"); _builder_1.newLine(); _builder_1.newLine(); _builder_1.append("@SuppressWarnings(\"all\")"); @@ -5485,7 +5485,7 @@ public void testSwitchWithConstantExpressions_11() { _builder_1.append("int _xifexpression = (int) 0;"); _builder_1.newLine(); _builder_1.append(" "); - _builder_1.append("boolean _equals = Objects.equal(Integer.valueOf(y), Boolean.valueOf(true));"); + _builder_1.append("boolean _equals = Objects.equals(Integer.valueOf(y), Boolean.valueOf(true));"); _builder_1.newLine(); _builder_1.append(" "); _builder_1.append("if (_equals) {"); @@ -5515,7 +5515,7 @@ public void testSwitchWithConstantExpressions_11() { _builder_1.append("boolean _matched = false;"); _builder_1.newLine(); _builder_1.append(" "); - _builder_1.append("if (Objects.equal(x, z)) {"); + _builder_1.append("if (Objects.equals(x, z)) {"); _builder_1.newLine(); _builder_1.append(" "); _builder_1.append("_matched=true;"); @@ -5569,7 +5569,7 @@ public void testSwitchWithConstantExpressions_12() { _builder.append("}"); _builder.newLine(); StringConcatenation _builder_1 = new StringConcatenation(); - _builder_1.append("import com.google.common.base.Objects;"); + _builder_1.append("import java.util.Objects;"); _builder_1.newLine(); _builder_1.newLine(); _builder_1.append("@SuppressWarnings(\"all\")"); @@ -5598,7 +5598,7 @@ public void testSwitchWithConstantExpressions_12() { _builder_1.append("boolean _matched = false;"); _builder_1.newLine(); _builder_1.append(" "); - _builder_1.append("if (Objects.equal(x, state)) {"); + _builder_1.append("if (Objects.equals(x, state)) {"); _builder_1.newLine(); _builder_1.append(" "); _builder_1.append("_matched=true;"); @@ -7965,7 +7965,7 @@ public void testSuperCall_01() { _builder_1.append("package x;"); _builder_1.newLine(); _builder_1.newLine(); - _builder_1.append("import com.google.common.base.Objects;"); + _builder_1.append("import java.util.Objects;"); _builder_1.newLine(); _builder_1.newLine(); _builder_1.append("@SuppressWarnings(\"all\")"); @@ -7979,7 +7979,7 @@ public void testSuperCall_01() { _builder_1.append("boolean _xifexpression = false;"); _builder_1.newLine(); _builder_1.append(" "); - _builder_1.append("boolean _equals = Objects.equal(\"foo\", p);"); + _builder_1.append("boolean _equals = Objects.equals(\"foo\", p);"); _builder_1.newLine(); _builder_1.append(" "); _builder_1.append("if (_equals) {"); @@ -12098,7 +12098,7 @@ public void basicForLoopWithDuplicateSyntheticVariables() { _builder.append("}"); _builder.newLine(); StringConcatenation _builder_1 = new StringConcatenation(); - _builder_1.append("import com.google.common.base.Objects;"); + _builder_1.append("import java.util.Objects;"); _builder_1.newLine(); _builder_1.newLine(); _builder_1.append("@SuppressWarnings(\"all\")"); @@ -12109,7 +12109,7 @@ public void basicForLoopWithDuplicateSyntheticVariables() { _builder_1.append("public void foo() {"); _builder_1.newLine(); _builder_1.append(" "); - _builder_1.append("boolean _equals = Objects.equal(\"a\", \"b\");"); + _builder_1.append("boolean _equals = Objects.equals(\"a\", \"b\");"); _builder_1.newLine(); _builder_1.append(" "); _builder_1.append("if (_equals) {"); @@ -12121,7 +12121,7 @@ public void basicForLoopWithDuplicateSyntheticVariables() { _builder_1.append("for (;;) {"); _builder_1.newLine(); _builder_1.append(" "); - _builder_1.append("boolean _equals_1 = Objects.equal(\"b\", \"c\");"); + _builder_1.append("boolean _equals_1 = Objects.equals(\"b\", \"c\");"); _builder_1.newLine(); _builder_1.append(" "); _builder_1.append("if (_equals_1) {"); @@ -13045,7 +13045,7 @@ public void testBug485556() { _builder.append("}"); _builder.newLine(); StringConcatenation _builder_1 = new StringConcatenation(); - _builder_1.append("import com.google.common.base.Objects;"); + _builder_1.append("import java.util.Objects;"); _builder_1.newLine(); _builder_1.newLine(); _builder_1.append("@SuppressWarnings(\"all\")"); @@ -13067,7 +13067,7 @@ public void testBug485556() { _builder_1.append("boolean _matched = false;"); _builder_1.newLine(); _builder_1.append(" "); - _builder_1.append("if (Objects.equal(x, this.X)) {"); + _builder_1.append("if (Objects.equals(x, this.X)) {"); _builder_1.newLine(); _builder_1.append(" "); _builder_1.append("_matched=true;"); diff --git a/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/java8/Java8TypeProviderTest.java b/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/java8/Java8TypeProviderTest.java index 53e5b18d8ba..ebbd3ed90ee 100644 --- a/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/java8/Java8TypeProviderTest.java +++ b/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/java8/Java8TypeProviderTest.java @@ -8,9 +8,9 @@ */ package org.eclipse.xtend.core.tests.java8; -import com.google.common.base.Objects; import com.google.common.collect.Iterables; import com.google.inject.Inject; +import java.util.Objects; import org.eclipse.emf.ecore.EObject; import org.eclipse.xtend.core.xtend.XtendFile; import org.eclipse.xtend2.lib.StringConcatenation; @@ -75,7 +75,7 @@ public void testDefaultXtendMethod() { protected void doTestMethods(final JvmGenericType intf) { final Function1 _function = (JvmOperation it) -> { String _simpleName = it.getSimpleName(); - return Boolean.valueOf(Objects.equal(_simpleName, "staticMethod")); + return Boolean.valueOf(Objects.equals(_simpleName, "staticMethod")); }; final JvmOperation staticMethod = IterableExtensions.head(IterableExtensions.filter(Iterables.filter(intf.getMembers(), JvmOperation.class), _function)); Assert.assertNotNull(staticMethod); @@ -84,7 +84,7 @@ protected void doTestMethods(final JvmGenericType intf) { Assert.assertFalse(staticMethod.isDefault()); final Function1 _function_1 = (JvmOperation it) -> { String _simpleName = it.getSimpleName(); - return Boolean.valueOf(Objects.equal(_simpleName, "defaultMethod")); + return Boolean.valueOf(Objects.equals(_simpleName, "defaultMethod")); }; final JvmOperation defaultMethod = IterableExtensions.head(IterableExtensions.filter(Iterables.filter(intf.getMembers(), JvmOperation.class), _function_1)); Assert.assertNotNull(defaultMethod); diff --git a/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/java8/compiler/CompilerBug427637Test.java b/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/java8/compiler/CompilerBug427637Test.java index 9a14cc929b7..024413636b6 100644 --- a/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/java8/compiler/CompilerBug427637Test.java +++ b/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/java8/compiler/CompilerBug427637Test.java @@ -2538,8 +2538,6 @@ public void testBug_427637_15() { _builder_1.append("package org.eclipse.xtext.xbase.formatting;"); _builder_1.newLine(); _builder_1.newLine(); - _builder_1.append("import com.google.common.base.Objects;"); - _builder_1.newLine(); _builder_1.append("import com.google.common.collect.Iterables;"); _builder_1.newLine(); _builder_1.append("import com.google.inject.Inject;"); @@ -2550,6 +2548,8 @@ public void testBug_427637_15() { _builder_1.newLine(); _builder_1.append("import java.util.List;"); _builder_1.newLine(); + _builder_1.append("import java.util.Objects;"); + _builder_1.newLine(); _builder_1.append("import org.eclipse.xtext.nodemodel.INode;"); _builder_1.newLine(); _builder_1.append("import org.eclipse.xtext.preferences.PreferenceKey;"); @@ -2736,7 +2736,7 @@ public void testBug_427637_15() { _builder_1.append("final int newLines2 = (int) _elvis;"); _builder_1.newLine(); _builder_1.append(" "); - _builder_1.append("if (((Objects.equal(it.space, null) && Objects.equal(it.newLines, null)) || ((leafs.getNewLinesInComments() == 0) && ((newLines2 == 0) || Objects.equal(it.space, \"\"))))) {"); + _builder_1.append("if (((Objects.equals(it.space, null) && Objects.equals(it.newLines, null)) || ((leafs.getNewLinesInComments() == 0) && ((newLines2 == 0) || Objects.equals(it.space, \"\"))))) {"); _builder_1.newLine(); _builder_1.append(" "); _builder_1.append("return this.newWhitespaceData(leafs, it.space, it.increaseIndentationChange, it.decreaseIndentationChange, doc.isDebugConflicts());"); @@ -3505,7 +3505,7 @@ public void testBug_427637_15() { _builder_1.append("} else {"); _builder_1.newLine(); _builder_1.append(" "); - _builder_1.append("if ((equalIndentationChange && (!Objects.equal(IterableExtensions.last(leafs.getLeafs()), leaf)))) {"); + _builder_1.append("if ((equalIndentationChange && (!Objects.equals(IterableExtensions.last(leafs.getLeafs()), leaf)))) {"); _builder_1.newLine(); _builder_1.append(" "); _builder_1.append("int _offset_4 = ((WhitespaceInfo)leaf).getOffset();"); @@ -3634,7 +3634,7 @@ public void testBug_427637_15() { _builder_1.append("}"); _builder_1.newLine(); _builder_1.append(" "); - _builder_1.append("if ((equalIndentationChange && (!Objects.equal(IterableExtensions.last(leafs.getLeafs()), leaf)))) {"); + _builder_1.append("if ((equalIndentationChange && (!Objects.equals(IterableExtensions.last(leafs.getLeafs()), leaf)))) {"); _builder_1.newLine(); _builder_1.append(" "); _builder_1.append("int _offset_6 = ((WhitespaceInfo)leaf).getOffset();"); @@ -3737,7 +3737,7 @@ public void testBug_427637_15() { _builder_1.append("Function1> _xifexpression = null;"); _builder_1.newLine(); _builder_1.append(" "); - _builder_1.append("boolean _notEquals = (!Objects.equal(node, null));"); + _builder_1.append("boolean _notEquals = (!Objects.equals(node, null));"); _builder_1.newLine(); _builder_1.append(" "); _builder_1.append("if (_notEquals) {"); @@ -3762,7 +3762,7 @@ public void testBug_427637_15() { _builder_1.append("Function1> _xifexpression = null;"); _builder_1.newLine(); _builder_1.append(" "); - _builder_1.append("boolean _notEquals = (!Objects.equal(node, null));"); + _builder_1.append("boolean _notEquals = (!Objects.equals(node, null));"); _builder_1.newLine(); _builder_1.append(" "); _builder_1.append("if (_notEquals) {"); @@ -3796,7 +3796,7 @@ public void testBug_427637_15() { _builder_1.append("final ArrayList result = CollectionLiterals.newArrayList();"); _builder_1.newLine(); _builder_1.append(" "); - _builder_1.append("boolean _notEquals = (!Objects.equal(node, null));"); + _builder_1.append("boolean _notEquals = (!Objects.equals(node, null));"); _builder_1.newLine(); _builder_1.append(" "); _builder_1.append("if (_notEquals) {"); @@ -3917,7 +3917,7 @@ public void testBug_427637_15() { _builder_1.append("final ArrayList result = CollectionLiterals.newArrayList();"); _builder_1.newLine(); _builder_1.append(" "); - _builder_1.append("boolean _notEquals = (!Objects.equal(node, null));"); + _builder_1.append("boolean _notEquals = (!Objects.equals(node, null));"); _builder_1.newLine(); _builder_1.append(" "); _builder_1.append("if (_notEquals) {"); diff --git a/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/java8/compiler/CompilerBug458010Test.java b/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/java8/compiler/CompilerBug458010Test.java index 42ddbb91afa..77ebc72dbc0 100644 --- a/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/java8/compiler/CompilerBug458010Test.java +++ b/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/java8/compiler/CompilerBug458010Test.java @@ -127,14 +127,14 @@ public void test_01() { _builder.append("}"); _builder.newLine(); StringConcatenation _builder_1 = new StringConcatenation(); - _builder_1.append("import com.google.common.base.Objects;"); - _builder_1.newLine(); _builder_1.append("import java.time.LocalDate;"); _builder_1.newLine(); _builder_1.append("import java.time.Period;"); _builder_1.newLine(); _builder_1.append("import java.util.ArrayList;"); _builder_1.newLine(); + _builder_1.append("import java.util.Objects;"); + _builder_1.newLine(); _builder_1.append("import java.util.function.Consumer;"); _builder_1.newLine(); _builder_1.append("import java.util.function.Function;"); @@ -305,7 +305,7 @@ public void test_01() { _builder_1.append("final Predicate _function = (Demo.Person it) -> {"); _builder_1.newLine(); _builder_1.append(" "); - _builder_1.append("return ((Objects.equal(it.gender, Demo.Person.Sex.MALE) && (it.getAge() >= 18)) && (it.getAge() <= 25));"); + _builder_1.append("return ((Objects.equals(it.gender, Demo.Person.Sex.MALE) && (it.getAge() >= 18)) && (it.getAge() <= 25));"); _builder_1.newLine(); _builder_1.append(" "); _builder_1.append("};"); @@ -426,14 +426,14 @@ public void test_02() { _builder.append("}"); _builder.newLine(); StringConcatenation _builder_1 = new StringConcatenation(); - _builder_1.append("import com.google.common.base.Objects;"); - _builder_1.newLine(); _builder_1.append("import java.time.LocalDate;"); _builder_1.newLine(); _builder_1.append("import java.time.Period;"); _builder_1.newLine(); _builder_1.append("import java.util.ArrayList;"); _builder_1.newLine(); + _builder_1.append("import java.util.Objects;"); + _builder_1.newLine(); _builder_1.append("import java.util.function.Consumer;"); _builder_1.newLine(); _builder_1.append("import java.util.function.Function;"); @@ -604,7 +604,7 @@ public void test_02() { _builder_1.append("final Predicate _function = (Demo.Person it) -> {"); _builder_1.newLine(); _builder_1.append(" "); - _builder_1.append("return ((Objects.equal(it.gender, Demo.Person.Sex.MALE) && (it.getAge() >= 18)) && (it.getAge() <= 25));"); + _builder_1.append("return ((Objects.equals(it.gender, Demo.Person.Sex.MALE) && (it.getAge() >= 18)) && (it.getAge() <= 25));"); _builder_1.newLine(); _builder_1.append(" "); _builder_1.append("};"); @@ -716,14 +716,14 @@ public void test_03() { _builder.append("}"); _builder.newLine(); StringConcatenation _builder_1 = new StringConcatenation(); - _builder_1.append("import com.google.common.base.Objects;"); - _builder_1.newLine(); _builder_1.append("import java.time.LocalDate;"); _builder_1.newLine(); _builder_1.append("import java.time.Period;"); _builder_1.newLine(); _builder_1.append("import java.util.ArrayList;"); _builder_1.newLine(); + _builder_1.append("import java.util.Objects;"); + _builder_1.newLine(); _builder_1.append("import java.util.function.Consumer;"); _builder_1.newLine(); _builder_1.append("import org.eclipse.xtend.lib.annotations.Accessors;"); @@ -894,7 +894,7 @@ public void test_03() { _builder_1.append("final Function1 _function = (Demo.Person it) -> {"); _builder_1.newLine(); _builder_1.append(" "); - _builder_1.append("return Boolean.valueOf(((Objects.equal(it.gender, Demo.Person.Sex.MALE) && (it.getAge() >= 18)) && (it.getAge() <= 25)));"); + _builder_1.append("return Boolean.valueOf(((Objects.equals(it.gender, Demo.Person.Sex.MALE) && (it.getAge() >= 18)) && (it.getAge() <= 25)));"); _builder_1.newLine(); _builder_1.append(" "); _builder_1.append("};"); @@ -1012,14 +1012,14 @@ public void test_04() { _builder.append("}"); _builder.newLine(); StringConcatenation _builder_1 = new StringConcatenation(); - _builder_1.append("import com.google.common.base.Objects;"); - _builder_1.newLine(); _builder_1.append("import java.time.LocalDate;"); _builder_1.newLine(); _builder_1.append("import java.time.Period;"); _builder_1.newLine(); _builder_1.append("import java.util.ArrayList;"); _builder_1.newLine(); + _builder_1.append("import java.util.Objects;"); + _builder_1.newLine(); _builder_1.append("import java.util.function.Predicate;"); _builder_1.newLine(); _builder_1.append("import java.util.function.ToIntFunction;"); @@ -1186,7 +1186,7 @@ public void test_04() { _builder_1.append("final Predicate _function = (Demo.Person it) -> {"); _builder_1.newLine(); _builder_1.append(" "); - _builder_1.append("return Objects.equal(it.gender, Demo.Person.Sex.MALE);"); + _builder_1.append("return Objects.equals(it.gender, Demo.Person.Sex.MALE);"); _builder_1.newLine(); _builder_1.append(" "); _builder_1.append("};"); @@ -1625,14 +1625,14 @@ public void test_06_a() { _builder.append("}"); _builder.newLine(); StringConcatenation _builder_1 = new StringConcatenation(); - _builder_1.append("import com.google.common.base.Objects;"); - _builder_1.newLine(); _builder_1.append("import java.time.LocalDate;"); _builder_1.newLine(); _builder_1.append("import java.time.Period;"); _builder_1.newLine(); _builder_1.append("import java.util.ArrayList;"); _builder_1.newLine(); + _builder_1.append("import java.util.Objects;"); + _builder_1.newLine(); _builder_1.append("import java.util.function.BiConsumer;"); _builder_1.newLine(); _builder_1.append("import java.util.function.Function;"); @@ -1897,7 +1897,7 @@ public void test_06_a() { _builder_1.append("final Predicate _function = (Demo.Person it) -> {"); _builder_1.newLine(); _builder_1.append(" "); - _builder_1.append("return Objects.equal(it.gender, Demo.Person.Sex.MALE);"); + _builder_1.append("return Objects.equals(it.gender, Demo.Person.Sex.MALE);"); _builder_1.newLine(); _builder_1.append(" "); _builder_1.append("};"); @@ -2083,14 +2083,14 @@ public void test_06_b() { _builder.append("}"); _builder.newLine(); StringConcatenation _builder_1 = new StringConcatenation(); - _builder_1.append("import com.google.common.base.Objects;"); - _builder_1.newLine(); _builder_1.append("import java.time.LocalDate;"); _builder_1.newLine(); _builder_1.append("import java.time.Period;"); _builder_1.newLine(); _builder_1.append("import java.util.List;"); _builder_1.newLine(); + _builder_1.append("import java.util.Objects;"); + _builder_1.newLine(); _builder_1.append("import java.util.function.BiConsumer;"); _builder_1.newLine(); _builder_1.append("import java.util.function.Function;"); @@ -2352,7 +2352,7 @@ public void test_06_b() { _builder_1.append("final Predicate _function = (Demo.Person it) -> {"); _builder_1.newLine(); _builder_1.append(" "); - _builder_1.append("return Objects.equal(it.gender, Demo.Person.Sex.MALE);"); + _builder_1.append("return Objects.equals(it.gender, Demo.Person.Sex.MALE);"); _builder_1.newLine(); _builder_1.append(" "); _builder_1.append("};"); @@ -2487,14 +2487,14 @@ public void test_07() { _builder.append("}"); _builder.newLine(); StringConcatenation _builder_1 = new StringConcatenation(); - _builder_1.append("import com.google.common.base.Objects;"); - _builder_1.newLine(); _builder_1.append("import java.time.LocalDate;"); _builder_1.newLine(); _builder_1.append("import java.time.Period;"); _builder_1.newLine(); _builder_1.append("import java.util.ArrayList;"); _builder_1.newLine(); + _builder_1.append("import java.util.Objects;"); + _builder_1.newLine(); _builder_1.append("import java.util.function.Function;"); _builder_1.newLine(); _builder_1.append("import java.util.function.Predicate;"); @@ -2663,7 +2663,7 @@ public void test_07() { _builder_1.append("final Predicate _function = (Demo.Person it) -> {"); _builder_1.newLine(); _builder_1.append(" "); - _builder_1.append("return Objects.equal(it.gender, Demo.Person.Sex.MALE);"); + _builder_1.append("return Objects.equals(it.gender, Demo.Person.Sex.MALE);"); _builder_1.newLine(); _builder_1.append(" "); _builder_1.append("};"); @@ -5318,12 +5318,12 @@ public void test_11_a() { _builder.append("}"); _builder.newLine(); StringConcatenation _builder_1 = new StringConcatenation(); - _builder_1.append("import com.google.common.base.Objects;"); - _builder_1.newLine(); _builder_1.append("import java.util.ArrayList;"); _builder_1.newLine(); _builder_1.append("import java.util.List;"); _builder_1.newLine(); + _builder_1.append("import java.util.Objects;"); + _builder_1.newLine(); _builder_1.append("import org.eclipse.xtend.lib.annotations.Accessors;"); _builder_1.newLine(); _builder_1.append("import org.eclipse.xtext.xbase.lib.CollectionLiterals;"); @@ -5453,7 +5453,7 @@ public void test_11_a() { _builder_1.append("final Function1 _function = (Demo.Person it) -> {"); _builder_1.newLine(); _builder_1.append(" "); - _builder_1.append("return Boolean.valueOf(Objects.equal(it.gender, Demo.Person.Sex.MALE));"); + _builder_1.append("return Boolean.valueOf(Objects.equals(it.gender, Demo.Person.Sex.MALE));"); _builder_1.newLine(); _builder_1.append(" "); _builder_1.append("};"); @@ -5537,7 +5537,7 @@ public void test_11_b() { _builder.append("}"); _builder.newLine(); StringConcatenation _builder_1 = new StringConcatenation(); - _builder_1.append("import com.google.common.base.Objects;"); + _builder_1.append("import java.util.Objects;"); _builder_1.newLine(); _builder_1.append("import org.eclipse.xtend.lib.annotations.Accessors;"); _builder_1.newLine(); @@ -5665,7 +5665,7 @@ public void test_11_b() { _builder_1.append("final Function1 _function = (Demo.Person it) -> {"); _builder_1.newLine(); _builder_1.append(" "); - _builder_1.append("return Boolean.valueOf(Objects.equal(it.gender, Demo.Person.Sex.MALE));"); + _builder_1.append("return Boolean.valueOf(Objects.equals(it.gender, Demo.Person.Sex.MALE));"); _builder_1.newLine(); _builder_1.append(" "); _builder_1.append("};"); diff --git a/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/java8/compiler/Java8Compiler2Test.java b/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/java8/compiler/Java8Compiler2Test.java index cf38cfac889..5474245f56a 100644 --- a/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/java8/compiler/Java8Compiler2Test.java +++ b/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/java8/compiler/Java8Compiler2Test.java @@ -1585,7 +1585,7 @@ public void testSwitchOverNull() { _builder.append("}"); _builder.newLine(); StringConcatenation _builder_1 = new StringConcatenation(); - _builder_1.append("import com.google.common.base.Objects;"); + _builder_1.append("import java.util.Objects;"); _builder_1.newLine(); _builder_1.append("import org.eclipse.xtext.xbase.lib.Functions.Function1;"); _builder_1.newLine(); @@ -1607,7 +1607,7 @@ public void testSwitchOverNull() { _builder_1.append("boolean _matched = false;"); _builder_1.newLine(); _builder_1.append(" "); - _builder_1.append("if (Objects.equal(_switchValue, null)) {"); + _builder_1.append("if (Objects.equals(_switchValue, null)) {"); _builder_1.newLine(); _builder_1.append(" "); _builder_1.append("_matched=true;"); @@ -1631,7 +1631,7 @@ public void testSwitchOverNull() { _builder_1.append("if (!_matched) {"); _builder_1.newLine(); _builder_1.append(" "); - _builder_1.append("if (Objects.equal(_switchValue, null)) {"); + _builder_1.append("if (Objects.equals(_switchValue, null)) {"); _builder_1.newLine(); _builder_1.append(" "); _builder_1.append("_matched=true;"); @@ -1773,7 +1773,7 @@ public void testSwitchWithConstantExpressions_7() { _builder.append("}"); _builder.newLine(); StringConcatenation _builder_1 = new StringConcatenation(); - _builder_1.append("import com.google.common.base.Objects;"); + _builder_1.append("import java.util.Objects;"); _builder_1.newLine(); _builder_1.append("import org.eclipse.xtext.xbase.lib.Functions.Function0;"); _builder_1.newLine(); @@ -1807,7 +1807,7 @@ public void testSwitchWithConstantExpressions_7() { _builder_1.append("Integer _apply = _function.apply();"); _builder_1.newLine(); _builder_1.append(" "); - _builder_1.append("if (Objects.equal(x, _apply)) {"); + _builder_1.append("if (Objects.equals(x, _apply)) {"); _builder_1.newLine(); _builder_1.append(" "); _builder_1.append("_matched=true;"); @@ -2353,12 +2353,12 @@ public void testAbstractIterator_04() { _builder.append("}"); _builder.newLine(); StringConcatenation _builder_1 = new StringConcatenation(); - _builder_1.append("import com.google.common.base.Objects;"); - _builder_1.newLine(); _builder_1.append("import com.google.common.collect.AbstractIterator;"); _builder_1.newLine(); _builder_1.append("import java.util.Iterator;"); _builder_1.newLine(); + _builder_1.append("import java.util.Objects;"); + _builder_1.newLine(); _builder_1.append("import org.eclipse.xtext.xbase.lib.Functions.Function1;"); _builder_1.newLine(); _builder_1.append("import org.eclipse.xtext.xbase.lib.IteratorExtensions;"); @@ -2387,7 +2387,7 @@ public void testAbstractIterator_04() { _builder_1.append("final Function1 _function = (T it_1) -> {"); _builder_1.newLine(); _builder_1.append(" "); - _builder_1.append("return Boolean.valueOf((!Objects.equal(it_1, null)));"); + _builder_1.append("return Boolean.valueOf((!Objects.equals(it_1, null)));"); _builder_1.newLine(); _builder_1.append(" "); _builder_1.append("};"); @@ -3144,7 +3144,7 @@ public void testSuperCall_01() { _builder_1.append("package x;"); _builder_1.newLine(); _builder_1.newLine(); - _builder_1.append("import com.google.common.base.Objects;"); + _builder_1.append("import java.util.Objects;"); _builder_1.newLine(); _builder_1.newLine(); _builder_1.append("@SuppressWarnings(\"all\")"); @@ -3161,7 +3161,7 @@ public void testSuperCall_01() { _builder_1.append("boolean _xifexpression = false;"); _builder_1.newLine(); _builder_1.append(" "); - _builder_1.append("boolean _equals = Objects.equal(\"foo\", p);"); + _builder_1.append("boolean _equals = Objects.equals(\"foo\", p);"); _builder_1.newLine(); _builder_1.append(" "); _builder_1.append("if (_equals) {"); diff --git a/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/macro/AbstractReusableActiveAnnotationTests.java b/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/macro/AbstractReusableActiveAnnotationTests.java index 7aae912e09d..40fc8c99c0c 100644 --- a/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/macro/AbstractReusableActiveAnnotationTests.java +++ b/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/macro/AbstractReusableActiveAnnotationTests.java @@ -8,11 +8,11 @@ */ package org.eclipse.xtend.core.tests.macro; -import com.google.common.base.Objects; import com.google.common.collect.Iterables; import com.google.inject.Inject; import java.util.Collections; import java.util.List; +import java.util.Objects; import java.util.Set; import java.util.function.Consumer; import org.eclipse.emf.ecore.EObject; @@ -4885,7 +4885,7 @@ public void testCreateTypeFromUsage() { Pair _mappedTo_1 = Pair.of("myusercode/UserCode.xtend", _builder_1.toString()); final Procedure1 _function = (CompilationUnitImpl it) -> { String _simpleName = it.getTypeLookup().findClass("myusercode.DoesNotExist").getSimpleName(); - boolean _equals = Objects.equal(_simpleName, "DoesNotExist"); + boolean _equals = Objects.equals(_simpleName, "DoesNotExist"); Assert.assertTrue(_equals); }; this.assertProcessing(_mappedTo, _mappedTo_1, _function); @@ -6301,7 +6301,7 @@ public void testMoveExpressionToTypeParameterDeclarator() { } public void assertSameType(final TypeReference first, final TypeReference second) { - boolean _notEquals = (!Objects.equal(first, second)); + boolean _notEquals = (!Objects.equals(first, second)); if (_notEquals) { StringConcatenation _builder = new StringConcatenation(); _builder.append(first); diff --git a/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/macro/AccessObjectProcessorTest.java b/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/macro/AccessObjectProcessorTest.java index 6e894a83753..bfa82498bbc 100644 --- a/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/macro/AccessObjectProcessorTest.java +++ b/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/macro/AccessObjectProcessorTest.java @@ -8,8 +8,8 @@ */ package org.eclipse.xtend.core.tests.macro; -import com.google.common.base.Objects; import java.io.Serializable; +import java.util.Objects; import org.eclipse.xtend.core.compiler.batch.XtendCompilerTester; import org.eclipse.xtend.lib.macro.TransformationContext; import org.eclipse.xtend.lib.macro.declaration.MutableClassDeclaration; @@ -47,14 +47,14 @@ public void testWithoutPackage() { final Function1 _function_1 = (TypeReference it_1) -> { Type _type = it_1.getType(); Type _type_1 = ctx.newTypeReference(Serializable.class).getType(); - return Boolean.valueOf(Objects.equal(_type, _type_1)); + return Boolean.valueOf(Objects.equals(_type, _type_1)); }; Assert.assertNotNull(IterableExtensions.findFirst(classPA.getImplementedInterfaces(), _function_1)); final MutableClassDeclaration classGA = ctx.findClass("GA"); final Function1 _function_2 = (TypeReference it_1) -> { Type _type = it_1.getType(); Type _type_1 = ctx.newTypeReference(Serializable.class).getType(); - return Boolean.valueOf(Objects.equal(_type, _type_1)); + return Boolean.valueOf(Objects.equals(_type, _type_1)); }; Assert.assertNotNull(IterableExtensions.findFirst(classGA.getImplementedInterfaces(), _function_2)); }; @@ -86,14 +86,14 @@ public void testWithPackage() { final Function1 _function_1 = (TypeReference it_1) -> { Type _type = it_1.getType(); Type _type_1 = ctx.newTypeReference(Serializable.class).getType(); - return Boolean.valueOf(Objects.equal(_type, _type_1)); + return Boolean.valueOf(Objects.equals(_type, _type_1)); }; Assert.assertNotNull(IterableExtensions.findFirst(classPA.getImplementedInterfaces(), _function_1)); final MutableClassDeclaration classGA = ctx.findClass("my.pack.GA"); final Function1 _function_2 = (TypeReference it_1) -> { Type _type = it_1.getType(); Type _type_1 = ctx.newTypeReference(Serializable.class).getType(); - return Boolean.valueOf(Objects.equal(_type, _type_1)); + return Boolean.valueOf(Objects.equals(_type, _type_1)); }; Assert.assertNotNull(IterableExtensions.findFirst(classGA.getImplementedInterfaces(), _function_2)); }; diff --git a/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/macro/AnnotationWithNestedAnnotationsProcessor.java b/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/macro/AnnotationWithNestedAnnotationsProcessor.java index 414af92aef6..0f737f76119 100644 --- a/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/macro/AnnotationWithNestedAnnotationsProcessor.java +++ b/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/macro/AnnotationWithNestedAnnotationsProcessor.java @@ -8,8 +8,8 @@ */ package org.eclipse.xtend.core.tests.macro; -import com.google.common.base.Objects; import java.util.List; +import java.util.Objects; import java.util.function.Consumer; import org.eclipse.xtend.core.tests.macro.AnnotationWithNestedAnnotations; import org.eclipse.xtend.lib.macro.RegisterGlobalsContext; @@ -79,7 +79,7 @@ public static void readConfig(final TypeDeclaration clazz) { final Function1 _function = (AnnotationReference it) -> { String _qualifiedName = it.getAnnotationTypeDeclaration().getQualifiedName(); String _name = AnnotationWithNestedAnnotations.Annotation1.class.getName(); - return Boolean.valueOf(Objects.equal(_qualifiedName, _name)); + return Boolean.valueOf(Objects.equals(_qualifiedName, _name)); }; final Consumer _function_1 = (AnnotationReference it) -> { new AnnotationWithNestedAnnotations.Annotation1Config(it); @@ -88,7 +88,7 @@ public static void readConfig(final TypeDeclaration clazz) { final Function1 _function_2 = (AnnotationReference it) -> { String _qualifiedName = it.getAnnotationTypeDeclaration().getQualifiedName(); String _name = AnnotationWithNestedAnnotations.Annotation2.class.getName(); - return Boolean.valueOf(Objects.equal(_qualifiedName, _name)); + return Boolean.valueOf(Objects.equals(_qualifiedName, _name)); }; final Consumer _function_3 = (AnnotationReference it) -> { new AnnotationWithNestedAnnotations.Annotation2Config(it); @@ -97,7 +97,7 @@ public static void readConfig(final TypeDeclaration clazz) { final Function1 _function_4 = (AnnotationReference it) -> { String _qualifiedName = it.getAnnotationTypeDeclaration().getQualifiedName(); String _name = AnnotationWithNestedAnnotations.Annotation3.class.getName(); - return Boolean.valueOf(Objects.equal(_qualifiedName, _name)); + return Boolean.valueOf(Objects.equals(_qualifiedName, _name)); }; final Consumer _function_5 = (AnnotationReference it) -> { new AnnotationWithNestedAnnotations.Annotation3Config(it); diff --git a/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/macro/Bug464136Test.java b/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/macro/Bug464136Test.java index f5d99240242..4909ca7cf26 100644 --- a/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/macro/Bug464136Test.java +++ b/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/macro/Bug464136Test.java @@ -8,8 +8,8 @@ */ package org.eclipse.xtend.core.tests.macro; -import com.google.common.base.Objects; import java.util.List; +import java.util.Objects; import org.eclipse.xtend.core.compiler.batch.XtendCompilerTester; import org.eclipse.xtend.lib.macro.services.Problem; import org.eclipse.xtend2.lib.StringConcatenation; @@ -51,7 +51,7 @@ public void testThrownErrorInPreValidation() { _builder_2.append("at org.eclipse.xtend.core.tests.macro.Bug464136Processor.lambda$0(Bug464136Processor.java:22)"); _builder_2.newLine(); final String messageEclipse = _builder_2.toString(); - if (((!Objects.equal(messageJava, IterableExtensions.head(problems).getMessage())) && (!Objects.equal(messageEclipse, IterableExtensions.head(problems).getMessage())))) { + if (((!Objects.equals(messageJava, IterableExtensions.head(problems).getMessage())) && (!Objects.equals(messageEclipse, IterableExtensions.head(problems).getMessage())))) { StringConcatenation _builder_3 = new StringConcatenation(); _builder_3.append("Expected one of the following problem messages:"); _builder_3.newLine(); diff --git a/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/macro/ImmutableProcessor.java b/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/macro/ImmutableProcessor.java index ce70349e933..0cdd7703b90 100644 --- a/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/macro/ImmutableProcessor.java +++ b/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/macro/ImmutableProcessor.java @@ -8,9 +8,9 @@ */ package org.eclipse.xtend.core.tests.macro; -import com.google.common.base.Objects; import java.util.Collections; import java.util.List; +import java.util.Objects; import org.eclipse.xtend.lib.macro.TransformationContext; import org.eclipse.xtend.lib.macro.TransformationParticipant; import org.eclipse.xtend.lib.macro.declaration.CompilationStrategy; @@ -102,7 +102,7 @@ public void doTransform(final List annotatedT { TypeReference _type = f_1.getType(); TypeReference _primitiveBoolean = context.getPrimitiveBoolean(); - boolean _equals = Objects.equal(_type, _primitiveBoolean); + boolean _equals = Objects.equals(_type, _primitiveBoolean); if (_equals) { _builder.append("result = prime * result + ("); String _simpleName = f_1.getSimpleName(); @@ -124,7 +124,7 @@ public void doTransform(final List annotatedT } else { TypeReference _primitiveLong = context.getPrimitiveLong(); TypeReference _type_1 = f_1.getType(); - boolean _equals_1 = Objects.equal(_primitiveLong, _type_1); + boolean _equals_1 = Objects.equals(_primitiveLong, _type_1); if (_equals_1) { _builder.append("result = prime * result + (int) ("); String _simpleName_2 = f_1.getSimpleName(); @@ -137,7 +137,7 @@ public void doTransform(final List annotatedT } else { TypeReference _primitiveFloat = context.getPrimitiveFloat(); TypeReference _type_2 = f_1.getType(); - boolean _equals_2 = Objects.equal(_primitiveFloat, _type_2); + boolean _equals_2 = Objects.equals(_primitiveFloat, _type_2); if (_equals_2) { _builder.append("result = prime * result + Float.floatToIntBits("); String _simpleName_4 = f_1.getSimpleName(); @@ -147,7 +147,7 @@ public void doTransform(final List annotatedT } else { TypeReference _primitiveDouble = context.getPrimitiveDouble(); TypeReference _type_3 = f_1.getType(); - boolean _equals_3 = Objects.equal(_primitiveDouble, _type_3); + boolean _equals_3 = Objects.equals(_primitiveDouble, _type_3); if (_equals_3) { _builder.append("result = prime * result + (int) (Double.doubleToLongBits("); String _simpleName_5 = f_1.getSimpleName(); diff --git a/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/macro/__GeneratedSourceModifingAnnotationProcessor.java b/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/macro/__GeneratedSourceModifingAnnotationProcessor.java index acc4633009a..dfa04de913f 100644 --- a/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/macro/__GeneratedSourceModifingAnnotationProcessor.java +++ b/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/macro/__GeneratedSourceModifingAnnotationProcessor.java @@ -8,7 +8,7 @@ */ package org.eclipse.xtend.core.tests.macro; -import com.google.common.base.Objects; +import java.util.Objects; import org.eclipse.xtend.lib.macro.AbstractClassProcessor; import org.eclipse.xtend.lib.macro.CodeGenerationContext; import org.eclipse.xtend.lib.macro.declaration.ClassDeclaration; @@ -22,7 +22,7 @@ public class __GeneratedSourceModifingAnnotationProcessor extends AbstractClassP public void doGenerateCode(final ClassDeclaration annotatedClass, @Extension final CodeGenerationContext context) { final Path targetFolder = context.getTargetFolder(annotatedClass.getCompilationUnit().getFilePath()); String _lastSegment = targetFolder.getLastSegment(); - boolean _equals = Objects.equal(_lastSegment, "xtend-gen"); + boolean _equals = Objects.equals(_lastSegment, "xtend-gen"); Assert.assertTrue(_equals); } } diff --git a/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/resource/ImportedNamesTest.java b/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/resource/ImportedNamesTest.java index 68a23bade2a..2146651ad67 100644 --- a/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/resource/ImportedNamesTest.java +++ b/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/resource/ImportedNamesTest.java @@ -8,12 +8,12 @@ */ package org.eclipse.xtend.core.tests.resource; -import com.google.common.base.Objects; import com.google.inject.Inject; import java.util.Arrays; import java.util.Collections; import java.util.Comparator; import java.util.List; +import java.util.Objects; import org.eclipse.xtend.core.tests.AbstractXtendTestCase; import org.eclipse.xtend.core.xtend.XtendFile; import org.eclipse.xtend2.lib.StringConcatenation; @@ -188,7 +188,7 @@ public void testNestedTypesIncluded() { final Function1 _function = (QualifiedName it) -> { String _string = it.toString(); String _lowerCase = "types.StaticOuterClass$StaticMiddleClass$StaticInnerClass".toLowerCase(); - return Boolean.valueOf(Objects.equal(_string, _lowerCase)); + return Boolean.valueOf(Objects.equals(_string, _lowerCase)); }; Assert.assertTrue(("" + importedNames), IterableExtensions.exists(importedNames, _function)); } catch (Throwable _e) { @@ -216,7 +216,7 @@ public void testNestedTypesIncludedOnUnresolvedFeatures() { final Function1 _function = (QualifiedName it) -> { String _string = it.toString(); String _lowerCase = "types.StaticOuterClass$Unknown".toLowerCase(); - return Boolean.valueOf(Objects.equal(_string, _lowerCase)); + return Boolean.valueOf(Objects.equals(_string, _lowerCase)); }; Assert.assertTrue(("" + importedNames), IterableExtensions.exists(importedNames, _function)); } catch (Throwable _e) { @@ -244,7 +244,7 @@ public void testNestedTypesIncludedOnUnresolvedFeatures_02() { final Function1 _function = (QualifiedName it) -> { String _string = it.toString(); String _lowerCase = "types.StaticOuterClass$StaticMiddleClass$Unknown".toLowerCase(); - return Boolean.valueOf(Objects.equal(_string, _lowerCase)); + return Boolean.valueOf(Objects.equals(_string, _lowerCase)); }; Assert.assertTrue(("" + importedNames), IterableExtensions.exists(importedNames, _function)); } catch (Throwable _e) { diff --git a/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/smoke/Case_0.java b/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/smoke/Case_0.java index 1f7e9656631..c42517600e9 100644 --- a/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/smoke/Case_0.java +++ b/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/smoke/Case_0.java @@ -8,8 +8,8 @@ */ package org.eclipse.xtend.core.tests.smoke; -import com.google.common.base.Objects; import java.util.ArrayList; +import java.util.Objects; import org.eclipse.xtend.lib.annotations.Data; import org.eclipse.xtext.xbase.lib.CollectionLiterals; import org.eclipse.xtext.xbase.lib.InputOutput; @@ -59,7 +59,7 @@ public String foo(final String a, final String b) { public boolean isUpper(final String s) { String _upperCase = s.toUpperCase(); - return Objects.equal(_upperCase, s); + return Objects.equals(_upperCase, s); } public String another(final String x, final String y) { diff --git a/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/smoke/Case_2.java b/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/smoke/Case_2.java index c999dbaac98..4d95087b316 100644 --- a/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/smoke/Case_2.java +++ b/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/smoke/Case_2.java @@ -8,7 +8,7 @@ */ package org.eclipse.xtend.core.tests.smoke; -import com.google.common.base.Objects; +import java.util.Objects; import org.eclipse.xtext.xbase.lib.StringExtensions; @SuppressWarnings("all") @@ -25,7 +25,7 @@ public String aOrB(final String a, final String b) { } public String returnInIf(final char c) { - boolean _notEquals = (!Objects.equal("x", Character.valueOf(c))); + boolean _notEquals = (!Objects.equals("x", Character.valueOf(c))); if (_notEquals) { return "xx"; } else { diff --git a/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/smoke/Case_3.java b/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/smoke/Case_3.java index 6216c0dba8c..2d1f87bc704 100644 --- a/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/smoke/Case_3.java +++ b/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/smoke/Case_3.java @@ -8,8 +8,8 @@ */ package org.eclipse.xtend.core.tests.smoke; -import com.google.common.base.Objects; import java.util.List; +import java.util.Objects; import org.eclipse.xtext.xbase.lib.Conversions; import org.eclipse.xtext.xbase.lib.Functions.Function1; import org.eclipse.xtext.xbase.lib.IntegerRange; @@ -29,7 +29,7 @@ public void testReturnExpression_06() { } public void testReturnExpression_07(final Class c) { - boolean _notEquals = (!Objects.equal(Case_3.class, c)); + boolean _notEquals = (!Objects.equals(Case_3.class, c)); if (_notEquals) { final Function1 _function = (Integer i) -> { return (i).intValue(); diff --git a/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/typesystem/ActualTypeArgumentCollectorTest.java b/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/typesystem/ActualTypeArgumentCollectorTest.java index 42f01f0ae3d..4dc252b0f01 100644 --- a/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/typesystem/ActualTypeArgumentCollectorTest.java +++ b/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/typesystem/ActualTypeArgumentCollectorTest.java @@ -8,10 +8,10 @@ */ package org.eclipse.xtend.core.tests.typesystem; -import com.google.common.base.Objects; import com.google.inject.Inject; import java.util.List; import java.util.Map; +import java.util.Objects; import java.util.Set; import org.eclipse.emf.common.util.EList; import org.eclipse.xtend.core.jvmmodel.IXtendJvmAssociations; @@ -66,7 +66,7 @@ public Map> assertMapping(f final Set allKeys = mapping.keySet(); for (final JvmTypeParameter key : allKeys) { String _simpleName = key.getSimpleName(); - boolean _equals = Objects.equal(_simpleName, typeParamName); + boolean _equals = Objects.equals(_simpleName, typeParamName); if (_equals) { Assert.assertNotNull(mappedTypes); final List mappingData = mapping.get(key); @@ -110,7 +110,7 @@ public Map> assertOrigins(f final Set allKeys = mapping.keySet(); for (final JvmTypeParameter key : allKeys) { String _simpleName = key.getSimpleName(); - boolean _equals = Objects.equal(_simpleName, typeParamName); + boolean _equals = Objects.equals(_simpleName, typeParamName); if (_equals) { final List mappingData = mapping.get(key); final Function1 _function = (LightweightBoundTypeArgument it) -> { diff --git a/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/typesystem/ActualTypeArgumentMergeTest.java b/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/typesystem/ActualTypeArgumentMergeTest.java index 5702f189ed2..e14c3543bf7 100644 --- a/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/typesystem/ActualTypeArgumentMergeTest.java +++ b/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/typesystem/ActualTypeArgumentMergeTest.java @@ -8,10 +8,10 @@ */ package org.eclipse.xtend.core.tests.typesystem; -import com.google.common.base.Objects; import com.google.inject.Inject; import java.util.List; import java.util.Map; +import java.util.Objects; import java.util.Set; import org.eclipse.emf.common.util.EList; import org.eclipse.xtend.core.jvmmodel.IXtendJvmAssociations; @@ -92,7 +92,7 @@ public Pair>, Lightweig final Set allKeys = mapping.keySet(); for (final JvmTypeParameter key : allKeys) { String _simpleName = key.getSimpleName(); - boolean _equals = Objects.equal(_simpleName, typeParamName); + boolean _equals = Objects.equals(_simpleName, typeParamName); if (_equals) { final List mappingData = mapping.get(key); LightweightMergedBoundTypeArgument _merge = this.merger.merge(mappingData, this.getOwner()); diff --git a/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/typesystem/DeferredTypeParameterHintCollectorTest.java b/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/typesystem/DeferredTypeParameterHintCollectorTest.java index 38d405428b0..6b751b2c608 100644 --- a/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/typesystem/DeferredTypeParameterHintCollectorTest.java +++ b/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/typesystem/DeferredTypeParameterHintCollectorTest.java @@ -8,12 +8,12 @@ */ package org.eclipse.xtend.core.tests.typesystem; -import com.google.common.base.Objects; import com.google.common.collect.ListMultimap; import com.google.inject.Inject; import com.google.inject.Provider; import java.util.List; import java.util.Map; +import java.util.Objects; import java.util.Set; import java.util.function.Consumer; import org.eclipse.emf.ecore.resource.ResourceSet; @@ -100,7 +100,7 @@ public List hasHintsFor(final Map allKeys = mapping.keySet(); for (final JvmTypeParameter key : allKeys) { String _simpleName = key.getSimpleName(); - boolean _equals = Objects.equal(_simpleName, typeParamName); + boolean _equals = Objects.equals(_simpleName, typeParamName); if (_equals) { LightweightTypeReference _typeReference = mapping.get(key).getTypeReference(); final UnboundTypeReference unbound = ((UnboundTypeReference) _typeReference); @@ -128,7 +128,7 @@ public void hasNoHintsFor(final Map allKeys = mapping.keySet(); for (final JvmTypeParameter key : allKeys) { String _simpleName = key.getSimpleName(); - boolean _equals = Objects.equal(_simpleName, typeParamName); + boolean _equals = Objects.equals(_simpleName, typeParamName); if (_equals) { LightweightTypeReference _typeReference = mapping.get(key).getTypeReference(); final UnboundTypeReference unbound = ((UnboundTypeReference) _typeReference); diff --git a/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/typesystem/ReorderedFeatureCallArgumentsTest.java b/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/typesystem/ReorderedFeatureCallArgumentsTest.java index 818ad1d6eee..dcd7886e12a 100644 --- a/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/typesystem/ReorderedFeatureCallArgumentsTest.java +++ b/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/typesystem/ReorderedFeatureCallArgumentsTest.java @@ -8,9 +8,9 @@ */ package org.eclipse.xtend.core.tests.typesystem; -import com.google.common.base.Objects; import com.google.inject.Inject; import java.util.List; +import java.util.Objects; import java.util.function.Consumer; import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EObject; @@ -269,7 +269,7 @@ protected IFeatureCallArguments toArguments(final String signature, final String final JvmOperation operation = this._iXtendJvmAssociations.getDirectlyInferredOperation(function); final IFeatureCallArguments result = this.factory.createStandardArguments(arguments, operation.getParameters(), receiver, this.getOwner()); Class _class = result.getClass(); - boolean _equals = Objects.equal(_class, ReorderedFeatureCallArguments.class); + boolean _equals = Objects.equals(_class, ReorderedFeatureCallArguments.class); Assert.assertTrue(_equals); return result; } catch (Throwable _e) { diff --git a/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/typesystem/ReorderedVarArgFeatureCallArgumentsTest.java b/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/typesystem/ReorderedVarArgFeatureCallArgumentsTest.java index ece21e38935..e6bc1f2abc3 100644 --- a/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/typesystem/ReorderedVarArgFeatureCallArgumentsTest.java +++ b/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/typesystem/ReorderedVarArgFeatureCallArgumentsTest.java @@ -8,9 +8,9 @@ */ package org.eclipse.xtend.core.tests.typesystem; -import com.google.common.base.Objects; import com.google.inject.Inject; import java.util.List; +import java.util.Objects; import java.util.function.Consumer; import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EObject; @@ -294,7 +294,7 @@ protected IFeatureCallArguments toArguments(final String signature, final String final JvmOperation operation = this._iXtendJvmAssociations.getDirectlyInferredOperation(function); final IFeatureCallArguments result = this.factory.createVarArgArguments(arguments, operation.getParameters(), receiver, this.getOwner()); Class _class = result.getClass(); - boolean _equals = Objects.equal(_class, ReorderedVarArgFeatureCallArguments.class); + boolean _equals = Objects.equals(_class, ReorderedVarArgFeatureCallArguments.class); Assert.assertTrue(_equals); return result; } catch (Throwable _e) { diff --git a/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/typesystem/StandardFeatureCallArgumentsTest.java b/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/typesystem/StandardFeatureCallArgumentsTest.java index 4747477969d..d97a8f09075 100644 --- a/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/typesystem/StandardFeatureCallArgumentsTest.java +++ b/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/typesystem/StandardFeatureCallArgumentsTest.java @@ -8,9 +8,9 @@ */ package org.eclipse.xtend.core.tests.typesystem; -import com.google.common.base.Objects; import com.google.inject.Inject; import java.util.NoSuchElementException; +import java.util.Objects; import org.eclipse.emf.common.util.EList; import org.eclipse.xtend.core.jvmmodel.IXtendJvmAssociations; import org.eclipse.xtend.core.xtend.XtendFunction; @@ -346,7 +346,7 @@ protected IFeatureCallArguments toArguments(final String signature, final String final JvmOperation operation = this._iXtendJvmAssociations.getDirectlyInferredOperation(function); final IFeatureCallArguments result = this.factory.createStandardArguments(arguments, operation.getParameters(), receiver, this.getOwner()); Class _class = result.getClass(); - boolean _equals = Objects.equal(_class, StandardFeatureCallArguments.class); + boolean _equals = Objects.equals(_class, StandardFeatureCallArguments.class); Assert.assertTrue(_equals); return result; } catch (Throwable _e) { diff --git a/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/typesystem/VarArgFeatureCallArgumentsTest.java b/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/typesystem/VarArgFeatureCallArgumentsTest.java index 6bba411c719..4291bf3bcbf 100644 --- a/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/typesystem/VarArgFeatureCallArgumentsTest.java +++ b/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/typesystem/VarArgFeatureCallArgumentsTest.java @@ -8,10 +8,10 @@ */ package org.eclipse.xtend.core.tests.typesystem; -import com.google.common.base.Objects; import com.google.inject.Inject; import java.util.List; import java.util.NoSuchElementException; +import java.util.Objects; import org.eclipse.emf.common.util.EList; import org.eclipse.xtend.core.jvmmodel.IXtendJvmAssociations; import org.eclipse.xtend.core.xtend.XtendFunction; @@ -340,7 +340,7 @@ protected IFeatureCallArguments toArguments(final String signature, final String final JvmOperation operation = this._iXtendJvmAssociations.getDirectlyInferredOperation(function); final IFeatureCallArguments result = this.factory.createVarArgArguments(arguments, operation.getParameters(), receiver, this.getOwner()); Class _class = result.getClass(); - boolean _equals = Objects.equal(_class, VarArgFeatureCallArguments.class); + boolean _equals = Objects.equals(_class, VarArgFeatureCallArguments.class); Assert.assertTrue(_equals); return result; } catch (Throwable _e) { diff --git a/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/validation/SuspiciousOverloadValidationTest.java b/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/validation/SuspiciousOverloadValidationTest.java index a5c7a388fd4..ec2b7765411 100644 --- a/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/validation/SuspiciousOverloadValidationTest.java +++ b/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/validation/SuspiciousOverloadValidationTest.java @@ -8,10 +8,10 @@ */ package org.eclipse.xtend.core.tests.validation; -import com.google.common.base.Objects; import com.google.common.collect.Iterators; import com.google.inject.Inject; import java.util.List; +import java.util.Objects; import java.util.function.Consumer; import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.resource.Resource; @@ -88,7 +88,7 @@ protected void assertSuspicious(final CharSequence contents, final String... mes XExpression _expression = firstMember.getExpression(); final XBlockExpression block = ((XBlockExpression) _expression); final Function1 _function_2 = (XAbstractFeatureCall it) -> { - return Boolean.valueOf(((!Objects.equal(it.eContainingFeature(), XbasePackage.Literals.XABSTRACT_FEATURE_CALL__IMPLICIT_RECEIVER)) && (it.getFeature() instanceof JvmOperation))); + return Boolean.valueOf(((!Objects.equals(it.eContainingFeature(), XbasePackage.Literals.XABSTRACT_FEATURE_CALL__IMPLICIT_RECEIVER)) && (it.getFeature() instanceof JvmOperation))); }; final XAbstractFeatureCall featureCall = IteratorExtensions.findLast(Iterators.filter(block.eAllContents(), XAbstractFeatureCall.class), _function_2); final IFeatureLinkingCandidate linkingCandidate = this._iBatchTypeResolver.resolveTypes(file).getLinkingCandidate(featureCall); @@ -122,7 +122,7 @@ protected void assertSuspiciousInInnerClass(final CharSequence contents, final S XExpression _expression = firstMember.getExpression(); final XBlockExpression block = ((XBlockExpression) _expression); final Function1 _function_2 = (XAbstractFeatureCall it) -> { - return Boolean.valueOf(((!Objects.equal(it.eContainingFeature(), XbasePackage.Literals.XABSTRACT_FEATURE_CALL__IMPLICIT_RECEIVER)) && (it.getFeature() instanceof JvmOperation))); + return Boolean.valueOf(((!Objects.equals(it.eContainingFeature(), XbasePackage.Literals.XABSTRACT_FEATURE_CALL__IMPLICIT_RECEIVER)) && (it.getFeature() instanceof JvmOperation))); }; final XAbstractFeatureCall featureCall = IteratorExtensions.findLast(Iterators.filter(block.eAllContents(), XAbstractFeatureCall.class), _function_2); final IFeatureLinkingCandidate linkingCandidate = this._iBatchTypeResolver.resolveTypes(file).getLinkingCandidate(featureCall); diff --git a/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/validation/XImportSectionValidationTest.java b/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/validation/XImportSectionValidationTest.java index e52ae4a0ffa..5d3ed40afe8 100644 --- a/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/validation/XImportSectionValidationTest.java +++ b/org.eclipse.xtend.core.tests/xtend-gen/org/eclipse/xtend/core/tests/validation/XImportSectionValidationTest.java @@ -8,9 +8,9 @@ */ package org.eclipse.xtend.core.tests.validation; -import com.google.common.base.Objects; import com.google.inject.Inject; import java.util.List; +import java.util.Objects; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.resource.Resource; @@ -630,7 +630,7 @@ public void assertFeatureCallError(final XtendFile file, final EClass objectType final Function1 _function = (Issue it) -> { EObject object = resource.getResourceSet().getEObject(it.getUriToProblem(), true); final boolean featureCall = ArrayExtensions.contains(it.getData(), UnresolvedFeatureCallTypeAwareMessageProvider.FEATURE_CALL); - return Boolean.valueOf((((Objects.equal(it.getCode(), Diagnostic.LINKING_DIAGNOSTIC) && (it.getSeverity() == Severity.ERROR)) && + return Boolean.valueOf((((Objects.equals(it.getCode(), Diagnostic.LINKING_DIAGNOSTIC) && (it.getSeverity() == Severity.ERROR)) && objectType.isInstance(object)) && featureCall)); }; final Iterable match = IterableExtensions.filter(allIssues, _function); diff --git a/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/compiler/XtendGenerator.java b/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/compiler/XtendGenerator.java index 82852612615..e54f9237aca 100644 --- a/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/compiler/XtendGenerator.java +++ b/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/compiler/XtendGenerator.java @@ -8,13 +8,13 @@ */ package org.eclipse.xtend.core.compiler; -import com.google.common.base.Objects; import com.google.common.collect.Iterables; import com.google.common.collect.Lists; import com.google.inject.Inject; import java.util.ArrayList; import java.util.Collection; import java.util.List; +import java.util.Objects; import java.util.function.Consumer; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EReference; @@ -404,13 +404,13 @@ private boolean needSyntheticThisVariable(final AnonymousClass anonymousClass, f if ((_eContainer instanceof XAbstractFeatureCall)) { EObject _eContainer_1 = referrer.eContainer(); final XAbstractFeatureCall containingFeature = ((XAbstractFeatureCall) _eContainer_1); - if (((Objects.equal(containingFeature.getActualReceiver(), referrer) && (containingFeature.getFeature() instanceof JvmMember)) && (!this.isVisible(((JvmMember) containingFeature.getFeature()), localType)))) { + if (((Objects.equals(containingFeature.getActualReceiver(), referrer) && (containingFeature.getFeature() instanceof JvmMember)) && (!this.isVisible(((JvmMember) containingFeature.getFeature()), localType)))) { references.clear(); throw new XtendGenerator.StopCollecting(); } } final XtendTypeDeclaration enclosingType = EcoreUtil2.getContainerOfType(referrer, XtendTypeDeclaration.class); - if (((enclosingType != null) && (!Objects.equal(enclosingType, anonymousClass)))) { + if (((enclosingType != null) && (!Objects.equals(enclosingType, anonymousClass)))) { boolean _isEmpty = references.isEmpty(); if (_isEmpty) { references.add(referrer); @@ -444,7 +444,7 @@ private boolean needSyntheticThisVariable(final AnonymousClass anonymousClass, f */ private boolean isVisible(final JvmMember member, final JvmDeclaredType context) { final JvmVisibility visibility = member.getVisibility(); - boolean _equals = Objects.equal(visibility, JvmVisibility.PUBLIC); + boolean _equals = Objects.equals(visibility, JvmVisibility.PUBLIC); if (_equals) { return true; } @@ -455,11 +455,11 @@ private boolean isVisible(final JvmMember member, final JvmDeclaredType context) _xifexpression = member.getDeclaringType(); } final JvmDeclaredType type = _xifexpression; - if ((Objects.equal(type, context) || EcoreUtil.isAncestor(context, type))) { + if ((Objects.equals(type, context) || EcoreUtil.isAncestor(context, type))) { return true; } - if (((type != null) && (Objects.equal(visibility, JvmVisibility.DEFAULT) || Objects.equal(visibility, JvmVisibility.PROTECTED)))) { - if (((Strings.isEmpty(context.getPackageName()) && Strings.isEmpty(type.getPackageName())) || Objects.equal(context.getPackageName(), type.getPackageName()))) { + if (((type != null) && (Objects.equals(visibility, JvmVisibility.DEFAULT) || Objects.equals(visibility, JvmVisibility.PROTECTED)))) { + if (((Strings.isEmpty(context.getPackageName()) && Strings.isEmpty(type.getPackageName())) || Objects.equals(context.getPackageName(), type.getPackageName()))) { return true; } } @@ -471,7 +471,7 @@ public ITreeAppendable generateVisibilityModifier(final JvmMember it, final ITre ITreeAppendable _xblockexpression = null; { JvmVisibility _visibility = it.getVisibility(); - boolean _equals = Objects.equal(_visibility, JvmVisibility.PRIVATE); + boolean _equals = Objects.equals(_visibility, JvmVisibility.PRIVATE); if (_equals) { JvmDeclaredType _declaringType = it.getDeclaringType(); boolean _tripleEquals = (_declaringType == null); @@ -489,7 +489,7 @@ public ITreeAppendable generateVisibilityModifier(final JvmMember it, final ITre } } else { JvmVisibility _visibility_1 = it.getVisibility(); - boolean _equals_1 = Objects.equal(_visibility_1, JvmVisibility.PUBLIC); + boolean _equals_1 = Objects.equals(_visibility_1, JvmVisibility.PUBLIC); if (_equals_1) { if (((it.getDeclaringType() instanceof JvmGenericType) && ((JvmGenericType) it.getDeclaringType()).isInterface())) { return result; diff --git a/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/documentation/XtendDocumentationProvider.java b/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/documentation/XtendDocumentationProvider.java index 595b7ebe691..3cae4792592 100644 --- a/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/documentation/XtendDocumentationProvider.java +++ b/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/documentation/XtendDocumentationProvider.java @@ -8,9 +8,9 @@ */ package org.eclipse.xtend.core.documentation; -import com.google.common.base.Objects; import com.google.inject.Singleton; import java.util.List; +import java.util.Objects; import org.eclipse.emf.ecore.EObject; import org.eclipse.xtend.core.xtend.XtendAnnotationTarget; import org.eclipse.xtend.core.xtend.XtendPackage; @@ -56,6 +56,6 @@ public List getDocumentationNodes(final EObject o) { * The Xtend parser constructs a synthetic nested AST element to hold annotations which should be ignored as a documentation provider */ public boolean shouldBeHandled(final EObject o) { - return (!((o instanceof XtendAnnotationTarget) && Objects.equal(o.eContainingFeature(), XtendPackage.Literals.XTEND_MEMBER__ANNOTATION_INFO))); + return (!((o instanceof XtendAnnotationTarget) && Objects.equals(o.eContainingFeature(), XtendPackage.Literals.XTEND_MEMBER__ANNOTATION_INFO))); } } diff --git a/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/documentation/XtendFileHeaderProvider.java b/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/documentation/XtendFileHeaderProvider.java index 0cd46338200..acefd5c6c03 100644 --- a/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/documentation/XtendFileHeaderProvider.java +++ b/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/documentation/XtendFileHeaderProvider.java @@ -8,10 +8,10 @@ */ package org.eclipse.xtend.core.documentation; -import com.google.common.base.Objects; import com.google.inject.Inject; import java.util.Collections; import java.util.List; +import java.util.Objects; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.resource.Resource; import org.eclipse.xtend.core.xtend.XtendFile; @@ -77,7 +77,7 @@ private boolean isTypeComment(final ILeafNode leafNode, final Resource resource) if ((type != null)) { if ((this.documentationProvider instanceof IEObjectDocumentationProviderExtension)) { INode _head = IterableExtensions.head(((IEObjectDocumentationProviderExtension)this.documentationProvider).getDocumentationNodes(type)); - return Objects.equal(leafNode, _head); + return Objects.equals(leafNode, _head); } } } diff --git a/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/formatting2/RichStringFormatter.java b/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/formatting2/RichStringFormatter.java index 782d32ee44e..ea4f50c941d 100644 --- a/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/formatting2/RichStringFormatter.java +++ b/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/formatting2/RichStringFormatter.java @@ -8,11 +8,11 @@ */ package org.eclipse.xtend.core.formatting2; -import com.google.common.base.Objects; import com.google.common.base.Predicate; import com.google.inject.Inject; import java.util.Arrays; import java.util.List; +import java.util.Objects; import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.plugin.EcorePlugin; @@ -103,14 +103,14 @@ protected void _format(final RichString richString, final IFormattableDocument d boolean _greaterThan = (_rootIndentLenght > 0); if (_greaterThan) { int _xifexpression = (int) 0; - if ((canIndent && Objects.equal(line, IterableExtensions.head(lines)))) { + if ((canIndent && Objects.equals(line, IterableExtensions.head(lines)))) { _xifexpression = 1; } else { _xifexpression = 0; } final int increaseIndentationChange = _xifexpression; int _xifexpression_1 = (int) 0; - if ((canIndent && Objects.equal(line, IterableExtensions.lastOrNull(lines)))) { + if ((canIndent && Objects.equals(line, IterableExtensions.lastOrNull(lines)))) { _xifexpression_1 = 1; } else { _xifexpression_1 = 0; diff --git a/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/formatting2/XtendFormatter.java b/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/formatting2/XtendFormatter.java index 0562ad77241..020a807888d 100644 --- a/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/formatting2/XtendFormatter.java +++ b/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/formatting2/XtendFormatter.java @@ -8,10 +8,10 @@ */ package org.eclipse.xtend.core.formatting2; -import com.google.common.base.Objects; import com.google.inject.Inject; import java.util.Arrays; import java.util.List; +import java.util.Objects; import java.util.function.Consumer; import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EObject; @@ -121,7 +121,7 @@ protected void _format(final XtendFile xtendFile, @Extension final IFormattableD { format.format(clazz); XtendTypeDeclaration _lastOrNull = IterableExtensions.lastOrNull(xtendFile.getXtendTypes()); - boolean _notEquals = (!Objects.equal(clazz, _lastOrNull)); + boolean _notEquals = (!Objects.equals(clazz, _lastOrNull)); if (_notEquals) { format.append(clazz, XtendFormatterPreferenceKeys.blankLinesBetweenClasses); } @@ -670,9 +670,9 @@ protected XClosure builder(final List params) { { final EObject grammarElement = this.grammarElement(IterableExtensions.lastOrNull(params)); XClosure _xifexpression_1 = null; - if (((Objects.equal(grammarElement, this._xtendGrammarAccess.getXMemberFeatureCallAccess().getMemberCallArgumentsXClosureParserRuleCall_1_1_4_0()) || - Objects.equal(grammarElement, this._xtendGrammarAccess.getXFeatureCallAccess().getFeatureCallArgumentsXClosureParserRuleCall_4_0())) || - Objects.equal(grammarElement, this._xtendGrammarAccess.getXbaseConstructorCallAccess().getArgumentsXClosureParserRuleCall_5_0()))) { + if (((Objects.equals(grammarElement, this._xtendGrammarAccess.getXMemberFeatureCallAccess().getMemberCallArgumentsXClosureParserRuleCall_1_1_4_0()) || + Objects.equals(grammarElement, this._xtendGrammarAccess.getXFeatureCallAccess().getFeatureCallArgumentsXClosureParserRuleCall_4_0())) || + Objects.equals(grammarElement, this._xtendGrammarAccess.getXbaseConstructorCallAccess().getArgumentsXClosureParserRuleCall_5_0()))) { XExpression _lastOrNull_1 = IterableExtensions.lastOrNull(params); _xifexpression_1 = ((XClosure) _lastOrNull_1); } diff --git a/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/AbstractFileSystemSupport.java b/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/AbstractFileSystemSupport.java index b324c52a720..660fd7978ba 100644 --- a/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/AbstractFileSystemSupport.java +++ b/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/AbstractFileSystemSupport.java @@ -8,7 +8,6 @@ */ package org.eclipse.xtend.core.macro; -import com.google.common.base.Objects; import com.google.common.io.ByteStreams; import com.google.common.io.CharStreams; import com.google.inject.Inject; @@ -22,6 +21,7 @@ import java.net.URL; import java.util.Collections; import java.util.HashMap; +import java.util.Objects; import java.util.Set; import org.eclipse.emf.common.util.URI; import org.eclipse.emf.ecore.resource.Resource; @@ -209,7 +209,7 @@ protected boolean hasContentsChanged(final InputStream newContent, final InputSt @Override public Iterable getChildren(final Path path) { - boolean _equals = Objects.equal(path, Path.ROOT); + boolean _equals = Objects.equals(path, Path.ROOT); if (_equals) { Path _absolutePath = path.getAbsolutePath(this.projectConfigProvider.getProjectConfig(this.context).getName()); return Collections.unmodifiableList(CollectionLiterals.newArrayList(_absolutePath)); @@ -272,7 +272,7 @@ public void delete(final Path path) { public boolean exists(final Path path) { boolean _xblockexpression = false; { - boolean _equals = Objects.equal(path, Path.ROOT); + boolean _equals = Objects.equals(path, Path.ROOT); if (_equals) { return true; } @@ -344,7 +344,7 @@ protected boolean isFile(final URI uri) { public boolean isFolder(final Path path) { Boolean _xblockexpression = null; { - boolean _equals = Objects.equal(path, Path.ROOT); + boolean _equals = Objects.equals(path, Path.ROOT); if (_equals) { return true; } @@ -407,7 +407,7 @@ protected java.net.URI toURI(final URI uri) { } protected URI getURI(final Path path) { - if (((path == null) || Objects.equal(path, Path.ROOT))) { + if (((path == null) || Objects.equals(path, Path.ROOT))) { return null; } final IProjectConfig projectConfig = this.projectConfigProvider.getProjectConfig(this.context); @@ -417,7 +417,7 @@ protected URI getURI(final Path path) { final URI projectURI = projectConfig.getPath(); final String projectName = IterableExtensions.head(path.getSegments()); String _name = projectConfig.getName(); - boolean _notEquals = (!Objects.equal(projectName, _name)); + boolean _notEquals = (!Objects.equals(projectName, _name)); if (_notEquals) { return null; } @@ -472,7 +472,7 @@ protected Path getPath(final URI absoluteURI, final URI baseURI, final Path base URI _xifexpression_1 = null; String _segment = baseURI.segment(1); String _segment_1 = absoluteURI.segment(1); - boolean _notEquals = (!Objects.equal(_segment, _segment_1)); + boolean _notEquals = (!Objects.equals(_segment, _segment_1)); if (_notEquals) { URI _xblockexpression_1 = null; { @@ -491,7 +491,7 @@ protected Path getPath(final URI absoluteURI, final URI baseURI, final Path base _xifexpression = absoluteURI.deresolve(baseURI); } final URI relativeURI = _xifexpression; - if ((relativeURI.isEmpty() || Objects.equal(relativeURI, absoluteURI))) { + if ((relativeURI.isEmpty() || Objects.equals(relativeURI, absoluteURI))) { return null; } _xblockexpression = basePath.getAbsolutePath(relativeURI.toString()); diff --git a/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/ConditionUtils.java b/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/ConditionUtils.java index 9119acfc5e2..24351e36b08 100644 --- a/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/ConditionUtils.java +++ b/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/ConditionUtils.java @@ -8,8 +8,8 @@ */ package org.eclipse.xtend.core.macro; -import com.google.common.base.Objects; import com.google.common.base.Preconditions; +import java.util.Objects; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.resource.Resource; import org.eclipse.xtend.lib.macro.declaration.TypeReference; @@ -77,7 +77,7 @@ public static void checkJavaIdentifier(final String string, final String name) { } public static void checkTypeName(final String typeName, final String valueType) { - boolean _equals = Objects.equal(typeName, valueType); + boolean _equals = Objects.equals(typeName, valueType); Preconditions.checkArgument(_equals, ConditionUtils.isNotApplicableMessage(valueType, typeName)); } diff --git a/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/ConstantExpressionsInterpreter.java b/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/ConstantExpressionsInterpreter.java index 7374949051d..607a1b207c0 100644 --- a/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/ConstantExpressionsInterpreter.java +++ b/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/ConstantExpressionsInterpreter.java @@ -8,7 +8,6 @@ */ package org.eclipse.xtend.core.macro; -import com.google.common.base.Objects; import com.google.common.collect.Iterables; import com.google.inject.Inject; import com.google.inject.Provider; @@ -17,6 +16,7 @@ import java.util.LinkedHashSet; import java.util.List; import java.util.Map; +import java.util.Objects; import java.util.Set; import java.util.function.Consumer; import org.eclipse.emf.common.util.EList; @@ -315,42 +315,42 @@ protected Object _internalEvaluate(final XListLiteral it, final Context ctx) { Class _class = IterableExtensions.head(elements).getClass(); final Class cl = _class; boolean _matched_1 = false; - if (Objects.equal(cl, Integer.class)) { + if (Objects.equals(cl, Integer.class)) { _matched_1=true; _switchResult_1 = Integer.TYPE; } if (!_matched_1) { - if (Objects.equal(cl, Long.class)) { + if (Objects.equals(cl, Long.class)) { _matched_1=true; _switchResult_1 = Long.TYPE; } } if (!_matched_1) { - if (Objects.equal(cl, Short.class)) { + if (Objects.equals(cl, Short.class)) { _matched_1=true; _switchResult_1 = Short.TYPE; } } if (!_matched_1) { - if (Objects.equal(cl, Boolean.class)) { + if (Objects.equals(cl, Boolean.class)) { _matched_1=true; _switchResult_1 = Boolean.TYPE; } } if (!_matched_1) { - if (Objects.equal(cl, Double.class)) { + if (Objects.equals(cl, Double.class)) { _matched_1=true; _switchResult_1 = Double.TYPE; } } if (!_matched_1) { - if (Objects.equal(cl, Byte.class)) { + if (Objects.equals(cl, Byte.class)) { _matched_1=true; _switchResult_1 = Byte.TYPE; } } if (!_matched_1) { - if (Objects.equal(cl, Float.class)) { + if (Objects.equals(cl, Float.class)) { _matched_1=true; _switchResult_1 = Float.TYPE; } @@ -570,7 +570,7 @@ protected Object _internalEvaluate(final XMemberFeatureCall it, final Context ct _matched_2=true; final Function1 _function = (JvmEnumerationLiteral it_1) -> { String _simpleName = it_1.getSimpleName(); - return Boolean.valueOf(Objects.equal(_simpleName, featureName)); + return Boolean.valueOf(Objects.equals(_simpleName, featureName)); }; final JvmEnumerationLiteral enumValue = IterableExtensions.findFirst(((JvmEnumerationType)type).getLiterals(), _function); if ((enumValue == null)) { @@ -586,7 +586,7 @@ protected Object _internalEvaluate(final XMemberFeatureCall it, final Context ct _matched_2=true; final Function1 _function = (JvmField it_1) -> { String _simpleName = it_1.getSimpleName(); - return Boolean.valueOf(Objects.equal(_simpleName, featureName)); + return Boolean.valueOf(Objects.equals(_simpleName, featureName)); }; final JvmField field = IterableExtensions.findFirst(Iterables.filter(((JvmGenericType)type).getAllFeatures(), JvmField.class), _function); if ((field == null)) { @@ -686,7 +686,7 @@ protected Class getJavaType(final JvmType type, final ClassFinder classFinder return classFinder.forName(_plus); } String _identifier = type.getIdentifier(); - boolean _equals = Objects.equal(_identifier, "java.lang.Class"); + boolean _equals = Objects.equals(_identifier, "java.lang.Class"); if (_equals) { return JvmTypeReference.class; } diff --git a/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/FileLocationsImpl.java b/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/FileLocationsImpl.java index e38910c66ae..2c8c234e4b4 100644 --- a/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/FileLocationsImpl.java +++ b/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/FileLocationsImpl.java @@ -8,8 +8,8 @@ */ package org.eclipse.xtend.core.macro; -import com.google.common.base.Objects; import com.google.inject.Inject; +import java.util.Objects; import java.util.Set; import org.eclipse.emf.ecore.resource.Resource; import org.eclipse.xtend.lib.annotations.Accessors; @@ -43,7 +43,7 @@ public class FileLocationsImpl implements FileLocations { protected IProjectConfig getProjectConfig(final Path path) { final String firstSegment = path.getSegments().get(0); final IProjectConfig projectConfig = this.projectInformationProvider.getProjectConfig(this.context.getResourceSet()); - if (((projectConfig == null) || (!Objects.equal(projectConfig.getName(), firstSegment)))) { + if (((projectConfig == null) || (!Objects.equals(projectConfig.getName(), firstSegment)))) { throw new IllegalArgumentException((("The project \'" + firstSegment) + "\' has not been configured.")); } return projectConfig; diff --git a/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/ProcessorInstanceForJvmTypeProvider.java b/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/ProcessorInstanceForJvmTypeProvider.java index 1a3f0300ba3..a4bf55cb2ff 100644 --- a/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/ProcessorInstanceForJvmTypeProvider.java +++ b/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/ProcessorInstanceForJvmTypeProvider.java @@ -8,7 +8,6 @@ */ package org.eclipse.xtend.core.macro; -import com.google.common.base.Objects; import com.google.common.collect.Iterables; import com.google.inject.Singleton; import java.io.Closeable; @@ -18,6 +17,7 @@ import java.net.URLClassLoader; import java.util.ArrayList; import java.util.Collections; +import java.util.Objects; import org.apache.log4j.Logger; import org.eclipse.emf.common.notify.Adapter; import org.eclipse.emf.common.notify.Notifier; @@ -49,7 +49,7 @@ public ProcessorClassloaderAdapter(final ClassLoader classLoader) { @Override public boolean isAdapterForType(final Object type) { - return Objects.equal(type, ProcessorInstanceForJvmTypeProvider.ProcessorClassloaderAdapter.class); + return Objects.equals(type, ProcessorInstanceForJvmTypeProvider.ProcessorClassloaderAdapter.class); } @Override diff --git a/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/RegisterGlobalsContextImpl.java b/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/RegisterGlobalsContextImpl.java index 4fce7a5e9bb..1d3f3ef976b 100644 --- a/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/RegisterGlobalsContextImpl.java +++ b/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/RegisterGlobalsContextImpl.java @@ -8,11 +8,11 @@ */ package org.eclipse.xtend.core.macro; -import com.google.common.base.Objects; import com.google.common.base.Preconditions; import com.google.common.collect.Iterables; import java.io.InputStream; import java.net.URI; +import java.util.Objects; import java.util.Set; import org.eclipse.emf.common.util.EList; import org.eclipse.xtend.core.macro.declaration.CompilationUnitImpl; @@ -120,7 +120,7 @@ private JvmDeclaredType findRecursively(final String string, final IterablefindFirst(it.getAnnotations(), _function); final Function1 _function_1 = (JvmAnnotationValue it_1) -> { - return Boolean.valueOf(((it_1.getOperation() == null) || Objects.equal(it_1.getOperation().getSimpleName(), "value"))); + return Boolean.valueOf(((it_1.getOperation() == null) || Objects.equals(it_1.getOperation().getSimpleName(), "value"))); }; final JvmAnnotationValue annoVal = IterableExtensions.findFirst(activeAnnotation.getValues(), _function_1); boolean _matched = false; @@ -246,7 +246,7 @@ protected boolean isActiveAnnotation(final JvmAnnotationType annotationType) { for (final JvmAnnotationReference anno : _annotations) { String _identifier = anno.getAnnotation().getIdentifier(); String _name = Active.class.getName(); - boolean _equals = Objects.equal(_identifier, _name); + boolean _equals = Objects.equals(_identifier, _name); if (_equals) { return true; } diff --git a/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/AnnotationReferenceBuildContextImpl.java b/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/AnnotationReferenceBuildContextImpl.java index 1046bd54b94..744e42f6d09 100644 --- a/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/AnnotationReferenceBuildContextImpl.java +++ b/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/AnnotationReferenceBuildContextImpl.java @@ -8,12 +8,12 @@ */ package org.eclipse.xtend.core.macro.declaration; -import com.google.common.base.Objects; import com.google.common.base.Predicate; import com.google.common.collect.Iterables; import com.google.common.collect.Iterators; import java.util.Arrays; import java.util.List; +import java.util.Objects; import java.util.function.Consumer; import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EClass; @@ -73,7 +73,7 @@ protected JvmOperation findOperation(final String name) { final JvmAnnotationType annotationType = this.delegate.getAnnotation(); final Function1 _function = (JvmOperation it) -> { String _simpleName = it.getSimpleName(); - return Boolean.valueOf(Objects.equal(_simpleName, name)); + return Boolean.valueOf(Objects.equals(_simpleName, name)); }; final JvmOperation jvmOperation = IterableExtensions.findFirst(annotationType.getDeclaredOperations(), _function); if ((jvmOperation == null)) { @@ -96,7 +96,7 @@ protected boolean remove(final String name) { protected boolean remove(final JvmOperation op) { final Predicate _function = (JvmAnnotationValue it) -> { - return (Objects.equal(op, it.getOperation()) || ((it.getOperation() == null) && Objects.equal(op.getSimpleName(), "value"))); + return (Objects.equals(op, it.getOperation()) || ((it.getOperation() == null) && Objects.equals(op.getSimpleName(), "value"))); }; return Iterators.removeIf(this.delegate.getExplicitValues().iterator(), _function); } @@ -117,7 +117,7 @@ protected JvmOperation findOperation(final String name, final boolean mustBeArra if (returnType!=null) { _eClass=returnType.eClass(); } - boolean _notEquals = (!Objects.equal(_eClass, TypesPackage.Literals.JVM_ARRAY_TYPE)); + boolean _notEquals = (!Objects.equals(_eClass, TypesPackage.Literals.JVM_ARRAY_TYPE)); _and = _notEquals; } if (_and) { @@ -444,13 +444,13 @@ protected JvmAnnotationValue createAnnotationValue(final JvmOperation op, final String _identifier = ((JvmGenericType)type).getIdentifier(); boolean _matched_1 = false; String _name = String.class.getName(); - if (Objects.equal(_identifier, _name)) { + if (Objects.equals(_identifier, _name)) { _matched_1=true; _switchResult_1 = TypesFactory.eINSTANCE.createJvmStringAnnotationValue(); } if (!_matched_1) { String _name_1 = Class.class.getName(); - if (Objects.equal(_identifier, _name_1)) { + if (Objects.equals(_identifier, _name_1)) { _matched_1=true; _switchResult_1 = TypesFactory.eINSTANCE.createJvmTypeAnnotationValue(); } @@ -504,7 +504,7 @@ protected void _setValue(final JvmAnnotationValue it, final Object value, final if (_type!=null) { _eClass=_type.eClass(); } - boolean _equals = Objects.equal(_eClass, TypesPackage.Literals.JVM_ARRAY_TYPE); + boolean _equals = Objects.equals(_eClass, TypesPackage.Literals.JVM_ARRAY_TYPE); _or = _equals; } if (_or) { @@ -783,7 +783,7 @@ protected void checkType(final JvmAnnotationValue it, final String componentType if (returnType!=null) { _eClass=returnType.eClass(); } - boolean _equals = Objects.equal(_eClass, TypesPackage.Literals.JVM_ARRAY_TYPE); + boolean _equals = Objects.equals(_eClass, TypesPackage.Literals.JVM_ARRAY_TYPE); _or = _equals; } if (_or) { diff --git a/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/CompilationUnitImpl.java b/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/CompilationUnitImpl.java index 4c406580865..4abdf1042a2 100644 --- a/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/CompilationUnitImpl.java +++ b/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/CompilationUnitImpl.java @@ -8,7 +8,6 @@ */ package org.eclipse.xtend.core.macro.declaration; -import com.google.common.base.Objects; import com.google.common.base.Throwables; import com.google.common.collect.Iterables; import com.google.common.primitives.Booleans; @@ -26,6 +25,7 @@ import java.util.Collection; import java.util.List; import java.util.Map; +import java.util.Objects; import java.util.concurrent.CancellationException; import org.eclipse.emf.common.util.EList; import org.eclipse.emf.common.util.URI; @@ -357,7 +357,7 @@ public void setXtendFile(final XtendFile xtendFile) { public void before(final ActiveAnnotationContexts.AnnotationCallback phase) { this.lastPhase = phase; final StandardTypeReferenceOwner standardTypeReferenceOwner = new StandardTypeReferenceOwner(this.services, this.xtendFile); - boolean _equals = Objects.equal(ActiveAnnotationContexts.AnnotationCallback.INDEXING, phase); + boolean _equals = Objects.equals(ActiveAnnotationContexts.AnnotationCallback.INDEXING, phase); if (_equals) { IndexingLightweightTypeReferenceFactory _indexingLightweightTypeReferenceFactory = new IndexingLightweightTypeReferenceFactory(standardTypeReferenceOwner); this.typeRefFactory = _indexingLightweightTypeReferenceFactory; @@ -365,18 +365,18 @@ public void before(final ActiveAnnotationContexts.AnnotationCallback phase) { LightweightTypeReferenceFactory _lightweightTypeReferenceFactory = new LightweightTypeReferenceFactory(standardTypeReferenceOwner); this.typeRefFactory = _lightweightTypeReferenceFactory; } - boolean _equals_1 = Objects.equal(ActiveAnnotationContexts.AnnotationCallback.VALIDATION, phase); + boolean _equals_1 = Objects.equals(ActiveAnnotationContexts.AnnotationCallback.VALIDATION, phase); if (_equals_1) { this.problemSupport.validationPhaseStarted(); } } public void after(final ActiveAnnotationContexts.AnnotationCallback phase) { - boolean _equals = Objects.equal(phase, ActiveAnnotationContexts.AnnotationCallback.INDEXING); + boolean _equals = Objects.equals(phase, ActiveAnnotationContexts.AnnotationCallback.INDEXING); if (_equals) { this.identityCache.clear(); } - boolean _equals_1 = Objects.equal(phase, ActiveAnnotationContexts.AnnotationCallback.GENERATION); + boolean _equals_1 = Objects.equals(phase, ActiveAnnotationContexts.AnnotationCallback.GENERATION); if (_equals_1) { this.resourceChangeRegistry.discardCreateOrModifyInformation(this.xtendFile.eResource().getURI()); } @@ -771,7 +771,7 @@ public MemberDeclaration toMemberDeclaration(final JvmMember delegate) { public boolean isBelongedToCompilationUnit(final EObject element) { Resource _eResource = element.eResource(); Resource _eResource_1 = this.xtendFile.eResource(); - return Objects.equal(_eResource, _eResource_1); + return Objects.equals(_eResource, _eResource_1); } public NamedElement toNamedElement(final JvmIdentifiableElement delegate) { @@ -1453,48 +1453,48 @@ private Object toArrayOfType(final Iterable iterable, final Class componen final Collection collection = _xifexpression; Object _switchResult = null; boolean _matched = false; - if (Objects.equal(componentType, int.class)) { + if (Objects.equals(componentType, int.class)) { _matched=true; _switchResult = Ints.toArray(((List) collection)); } if (!_matched) { - if (Objects.equal(componentType, long.class)) { + if (Objects.equals(componentType, long.class)) { _matched=true; _switchResult = Longs.toArray(((List) collection)); } } if (!_matched) { - if (Objects.equal(componentType, char.class)) { + if (Objects.equals(componentType, char.class)) { _matched=true; _switchResult = Chars.toArray(((List) collection)); } } if (!_matched) { - if (Objects.equal(componentType, boolean.class)) { + if (Objects.equals(componentType, boolean.class)) { _matched=true; _switchResult = Booleans.toArray(((List) collection)); } } if (!_matched) { - if (Objects.equal(componentType, byte.class)) { + if (Objects.equals(componentType, byte.class)) { _matched=true; _switchResult = Bytes.toArray(((List) collection)); } } if (!_matched) { - if (Objects.equal(componentType, short.class)) { + if (Objects.equals(componentType, short.class)) { _matched=true; _switchResult = Shorts.toArray(((List) collection)); } } if (!_matched) { - if (Objects.equal(componentType, float.class)) { + if (Objects.equals(componentType, float.class)) { _matched=true; _switchResult = Floats.toArray(((List) collection)); } } if (!_matched) { - if (Objects.equal(componentType, double.class)) { + if (Objects.equals(componentType, double.class)) { _matched=true; _switchResult = Doubles.toArray(((List) collection)); } @@ -1631,7 +1631,7 @@ public void handleProcessingError(final Iterable sourceElemen if ((t instanceof VirtualMachineError)) { throw ((VirtualMachineError)t); } - boolean _equals = Objects.equal(this.lastPhase, ActiveAnnotationContexts.AnnotationCallback.GENERATION); + boolean _equals = Objects.equals(this.lastPhase, ActiveAnnotationContexts.AnnotationCallback.GENERATION); if (_equals) { Throwables.throwIfUnchecked(t); String _messageWithoutStackTrace = this.getMessageWithoutStackTrace(t); diff --git a/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/JvmAnnotationReferenceImpl.java b/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/JvmAnnotationReferenceImpl.java index faaeb15825b..6d0a3a81593 100644 --- a/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/JvmAnnotationReferenceImpl.java +++ b/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/JvmAnnotationReferenceImpl.java @@ -8,7 +8,7 @@ */ package org.eclipse.xtend.core.macro.declaration; -import com.google.common.base.Objects; +import java.util.Objects; import org.eclipse.emf.ecore.EObject; import org.eclipse.xtend.core.macro.ConditionUtils; import org.eclipse.xtend.lib.macro.declaration.AnnotationReference; @@ -40,7 +40,7 @@ public AnnotationTypeDeclaration getAnnotationTypeDeclaration() { public Expression getExpression(final String property) { final JvmOperation op = this.findOperation(property); final Function1 _function = (JvmAnnotationValue it) -> { - return Boolean.valueOf((Objects.equal(it.getOperation(), op) || ((it.getOperation() == null) && Objects.equal(op.getSimpleName(), "value")))); + return Boolean.valueOf((Objects.equals(it.getOperation(), op) || ((it.getOperation() == null) && Objects.equals(op.getSimpleName(), "value")))); }; final JvmAnnotationValue annotationValue = IterableExtensions.findFirst(this.getDelegate().getValues(), _function); boolean _matched = false; @@ -60,7 +60,7 @@ public Object getValue(final String property) { try { final JvmOperation op = this.findOperation(property); final Function1 _function = (JvmAnnotationValue it) -> { - return Boolean.valueOf((Objects.equal(it.getOperation(), op) || ((it.getOperation() == null) && Objects.equal(op.getSimpleName(), "value")))); + return Boolean.valueOf((Objects.equals(it.getOperation(), op) || ((it.getOperation() == null) && Objects.equals(op.getSimpleName(), "value")))); }; final JvmAnnotationValue annotationValue = IterableExtensions.findFirst(this.getDelegate().getValues(), _function); final boolean isArrayType = ((op != null) && this.getCompilationUnit().getTypeReferences().isArray(op.getReturnType())); @@ -84,7 +84,7 @@ private JvmOperation findOperation(final String name) { final JvmAnnotationType jvmAnnoType = ((JvmAnnotationTypeDeclarationImpl) _annotationTypeDeclaration).getDelegate(); final Function1 _function = (JvmOperation it) -> { String _simpleName = it.getSimpleName(); - return Boolean.valueOf(Objects.equal(_simpleName, name)); + return Boolean.valueOf(Objects.equals(_simpleName, name)); }; final JvmOperation jvmOperation = IterableExtensions.findFirst(jvmAnnoType.getDeclaredOperations(), _function); if ((jvmOperation == null)) { diff --git a/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/JvmAnnotationTargetImpl.java b/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/JvmAnnotationTargetImpl.java index a50aa374d47..781dfbe670f 100644 --- a/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/JvmAnnotationTargetImpl.java +++ b/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/JvmAnnotationTargetImpl.java @@ -8,9 +8,9 @@ */ package org.eclipse.xtend.core.macro.declaration; -import com.google.common.base.Objects; import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableList; +import java.util.Objects; import org.eclipse.emf.common.util.EList; import org.eclipse.xtend.lib.macro.declaration.AnnotationReference; import org.eclipse.xtend.lib.macro.declaration.AnnotationTypeDeclaration; @@ -69,7 +69,7 @@ public boolean removeAnnotation(final AnnotationReference annotationReference) { public AnnotationReference findAnnotation(final Type annotationType) { final Function1 _function = (AnnotationReference it) -> { AnnotationTypeDeclaration _annotationTypeDeclaration = it.getAnnotationTypeDeclaration(); - return Boolean.valueOf(Objects.equal(_annotationTypeDeclaration, annotationType)); + return Boolean.valueOf(Objects.equals(_annotationTypeDeclaration, annotationType)); }; return IterableExtensions.findFirst(this.getAnnotations(), _function); } diff --git a/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/JvmAnnotationTypeDeclarationImpl.java b/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/JvmAnnotationTypeDeclarationImpl.java index a1916c9a062..c8278c8699f 100644 --- a/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/JvmAnnotationTypeDeclarationImpl.java +++ b/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/JvmAnnotationTypeDeclarationImpl.java @@ -8,8 +8,8 @@ */ package org.eclipse.xtend.core.macro.declaration; -import com.google.common.base.Objects; import com.google.common.collect.Iterables; +import java.util.Objects; import org.eclipse.xtend.lib.macro.declaration.AnnotationTypeDeclaration; import org.eclipse.xtend.lib.macro.declaration.AnnotationTypeElementDeclaration; import org.eclipse.xtend.lib.macro.declaration.MemberDeclaration; @@ -53,7 +53,7 @@ public MutableMethodDeclaration addMethod(final String name, final Procedure1 _function = (AnnotationTypeElementDeclaration it) -> { String _simpleName = it.getSimpleName(); - return Boolean.valueOf(Objects.equal(_simpleName, name)); + return Boolean.valueOf(Objects.equals(_simpleName, name)); }; return IterableExtensions.findFirst(this.getDeclaredAnnotationTypeElements(), _function); } diff --git a/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/JvmClassDeclarationImpl.java b/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/JvmClassDeclarationImpl.java index 84f417432c4..10d67973359 100644 --- a/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/JvmClassDeclarationImpl.java +++ b/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/JvmClassDeclarationImpl.java @@ -8,9 +8,9 @@ */ package org.eclipse.xtend.core.macro.declaration; -import com.google.common.base.Objects; import com.google.common.collect.Iterables; import java.util.List; +import java.util.Objects; import org.eclipse.xtend.core.macro.ConditionUtils; import org.eclipse.xtend.lib.macro.declaration.ClassDeclaration; import org.eclipse.xtend.lib.macro.declaration.FieldDeclaration; @@ -102,7 +102,7 @@ public Iterable getTypeParameters() { public FieldDeclaration findDeclaredField(final String name) { final Function1 _function = (FieldDeclaration it) -> { String _simpleName = it.getSimpleName(); - return Boolean.valueOf(Objects.equal(_simpleName, name)); + return Boolean.valueOf(Objects.equals(_simpleName, name)); }; return IterableExtensions.findFirst(Iterables.filter(this.getDeclaredMembers(), FieldDeclaration.class), _function); } @@ -113,7 +113,7 @@ public MethodDeclaration findDeclaredMethod(final String name, final TypeReferen { ConditionUtils.checkIterable(((Iterable)Conversions.doWrapArray(parameterTypes)), "parameterTypes"); final Function1 _function = (MethodDeclaration it) -> { - return Boolean.valueOf((Objects.equal(it.getSimpleName(), name) && Objects.equal(IterableExtensions.toList(IterableExtensions.map(it.getParameters(), ((Function1) (ParameterDeclaration it_1) -> { + return Boolean.valueOf((Objects.equals(it.getSimpleName(), name) && Objects.equals(IterableExtensions.toList(IterableExtensions.map(it.getParameters(), ((Function1) (ParameterDeclaration it_1) -> { return it_1.getType(); }))), IterableExtensions.toList(((Iterable)Conversions.doWrapArray(parameterTypes)))))); }; diff --git a/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/JvmElementImpl.java b/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/JvmElementImpl.java index 56c3b97e8fe..02991371510 100644 --- a/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/JvmElementImpl.java +++ b/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/JvmElementImpl.java @@ -8,8 +8,8 @@ */ package org.eclipse.xtend.core.macro.declaration; -import com.google.common.base.Objects; import com.google.common.base.Preconditions; +import java.util.Objects; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.resource.Resource; import org.eclipse.emf.ecore.util.EcoreUtil; @@ -40,7 +40,7 @@ public void remove() { protected final void checkMutable() { ActiveAnnotationContexts.AnnotationCallback _lastPhase = this.getCompilationUnit().getLastPhase(); - boolean _notEquals = (!Objects.equal(_lastPhase, ActiveAnnotationContexts.AnnotationCallback.INFERENCE)); + boolean _notEquals = (!Objects.equals(_lastPhase, ActiveAnnotationContexts.AnnotationCallback.INFERENCE)); if (_notEquals) { throw new IllegalStateException("Element cannot be modified outside the transformation phase"); } diff --git a/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/JvmEnumerationTypeDeclarationImpl.java b/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/JvmEnumerationTypeDeclarationImpl.java index 0dd4b0b0ebb..40de41f65df 100644 --- a/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/JvmEnumerationTypeDeclarationImpl.java +++ b/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/JvmEnumerationTypeDeclarationImpl.java @@ -8,8 +8,8 @@ */ package org.eclipse.xtend.core.macro.declaration; -import com.google.common.base.Objects; import com.google.common.collect.Iterables; +import java.util.Objects; import org.eclipse.xtend.lib.macro.declaration.EnumerationTypeDeclaration; import org.eclipse.xtend.lib.macro.declaration.EnumerationValueDeclaration; import org.eclipse.xtext.common.types.JvmEnumerationType; @@ -27,7 +27,7 @@ public Iterable getDeclaredValues() { public EnumerationValueDeclaration findDeclaredValue(final String name) { final Function1 _function = (EnumerationValueDeclaration value) -> { String _simpleName = value.getSimpleName(); - return Boolean.valueOf(Objects.equal(_simpleName, name)); + return Boolean.valueOf(Objects.equals(_simpleName, name)); }; return IterableExtensions.findFirst(this.getDeclaredValues(), _function); } diff --git a/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/JvmTypeDeclarationImpl.java b/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/JvmTypeDeclarationImpl.java index 40aebac338f..e1f67bca0b7 100644 --- a/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/JvmTypeDeclarationImpl.java +++ b/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/JvmTypeDeclarationImpl.java @@ -8,11 +8,11 @@ */ package org.eclipse.xtend.core.macro.declaration; -import com.google.common.base.Objects; import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableList; import com.google.common.collect.Iterables; import java.util.List; +import java.util.Objects; import org.eclipse.xtend.core.macro.ConditionUtils; import org.eclipse.xtend.lib.macro.declaration.AnnotationTypeDeclaration; import org.eclipse.xtend.lib.macro.declaration.ClassDeclaration; @@ -130,7 +130,7 @@ public ConstructorDeclaration findDeclaredConstructor(final TypeReference... par }; List _list = IterableExtensions.toList(IterableExtensions.map(constructor.getParameters(), _function_1)); List _list_1 = IterableExtensions.toList(((Iterable)Conversions.doWrapArray(parameterTypes))); - return Boolean.valueOf(Objects.equal(_list, _list_1)); + return Boolean.valueOf(Objects.equals(_list, _list_1)); }; _xblockexpression = IterableExtensions.findFirst(this.getDeclaredConstructors(), _function); } @@ -140,7 +140,7 @@ public ConstructorDeclaration findDeclaredConstructor(final TypeReference... par public FieldDeclaration findDeclaredField(final String name) { final Function1 _function = (FieldDeclaration field) -> { String _simpleName = field.getSimpleName(); - return Boolean.valueOf(Objects.equal(_simpleName, name)); + return Boolean.valueOf(Objects.equals(_simpleName, name)); }; return IterableExtensions.findFirst(this.getDeclaredFields(), _function); } @@ -148,7 +148,7 @@ public FieldDeclaration findDeclaredField(final String name) { public TypeDeclaration findDeclaredType(final String name) { final Function1 _function = (TypeDeclaration type) -> { String _simpleName = type.getSimpleName(); - return Boolean.valueOf(Objects.equal(_simpleName, name)); + return Boolean.valueOf(Objects.equals(_simpleName, name)); }; return IterableExtensions.findFirst(this.getDeclaredTypes(), _function); } @@ -158,7 +158,7 @@ public MethodDeclaration findDeclaredMethod(final String name, final TypeReferen { ConditionUtils.checkIterable(((Iterable)Conversions.doWrapArray(parameterTypes)), "parameterTypes"); final Function1 _function = (MethodDeclaration method) -> { - return Boolean.valueOf((Objects.equal(method.getSimpleName(), name) && Objects.equal(IterableExtensions.toList(IterableExtensions.map(method.getParameters(), ((Function1) (ParameterDeclaration it) -> { + return Boolean.valueOf((Objects.equals(method.getSimpleName(), name) && Objects.equals(IterableExtensions.toList(IterableExtensions.map(method.getParameters(), ((Function1) (ParameterDeclaration it) -> { return it.getType(); }))), IterableExtensions.toList(((Iterable)Conversions.doWrapArray(parameterTypes)))))); }; diff --git a/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/MutableJvmAnnotationTypeDeclarationImpl.java b/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/MutableJvmAnnotationTypeDeclarationImpl.java index 91a457ed3ea..a15a5103e85 100644 --- a/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/MutableJvmAnnotationTypeDeclarationImpl.java +++ b/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/MutableJvmAnnotationTypeDeclarationImpl.java @@ -8,9 +8,9 @@ */ package org.eclipse.xtend.core.macro.declaration; -import com.google.common.base.Objects; import com.google.common.base.Preconditions; import com.google.common.collect.Iterables; +import java.util.Objects; import org.eclipse.xtend.core.macro.ConditionUtils; import org.eclipse.xtend.lib.macro.declaration.AnnotationTypeDeclaration; import org.eclipse.xtend.lib.macro.declaration.ClassDeclaration; @@ -152,7 +152,7 @@ public MutableAnnotationTypeElementDeclaration addAnnotationTypeElement(final St public MutableAnnotationTypeElementDeclaration findDeclaredAnnotationTypeElement(final String name) { final Function1 _function = (MutableAnnotationTypeElementDeclaration it) -> { String _simpleName = it.getSimpleName(); - return Boolean.valueOf(Objects.equal(_simpleName, name)); + return Boolean.valueOf(Objects.equals(_simpleName, name)); }; return IterableExtensions.findFirst(this.getDeclaredAnnotationTypeElements(), _function); } diff --git a/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/MutableJvmEnumerationTypeDeclarationImpl.java b/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/MutableJvmEnumerationTypeDeclarationImpl.java index bf9157ce124..ec686fa7ce1 100644 --- a/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/MutableJvmEnumerationTypeDeclarationImpl.java +++ b/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/MutableJvmEnumerationTypeDeclarationImpl.java @@ -8,9 +8,9 @@ */ package org.eclipse.xtend.core.macro.declaration; -import com.google.common.base.Objects; import com.google.common.base.Preconditions; import com.google.common.collect.Iterables; +import java.util.Objects; import org.eclipse.xtend.core.macro.ConditionUtils; import org.eclipse.xtend.lib.macro.declaration.AnnotationTypeDeclaration; import org.eclipse.xtend.lib.macro.declaration.ClassDeclaration; @@ -140,7 +140,7 @@ public Iterable getDeclaredValues( public MutableEnumerationValueDeclaration findDeclaredValue(final String name) { final Function1 _function = (MutableEnumerationValueDeclaration value) -> { String _simpleName = value.getSimpleName(); - return Boolean.valueOf(Objects.equal(_simpleName, name)); + return Boolean.valueOf(Objects.equals(_simpleName, name)); }; return IterableExtensions.findFirst(this.getDeclaredValues(), _function); } diff --git a/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/MutableJvmTypeParameterDeclarationImpl.java b/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/MutableJvmTypeParameterDeclarationImpl.java index 508a79330e9..1cb0588975e 100644 --- a/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/MutableJvmTypeParameterDeclarationImpl.java +++ b/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/MutableJvmTypeParameterDeclarationImpl.java @@ -8,8 +8,8 @@ */ package org.eclipse.xtend.core.macro.declaration; -import com.google.common.base.Objects; import com.google.common.base.Preconditions; +import java.util.Objects; import org.eclipse.emf.ecore.resource.Resource; import org.eclipse.emf.ecore.util.EcoreUtil; import org.eclipse.xtend.core.macro.ActiveAnnotationContexts; @@ -98,7 +98,7 @@ public void setUpperBounds(final Iterable upperBounds) protected final void checkMutable() { ActiveAnnotationContexts.AnnotationCallback _lastPhase = this.getCompilationUnit().getLastPhase(); - boolean _notEquals = (!Objects.equal(_lastPhase, ActiveAnnotationContexts.AnnotationCallback.INFERENCE)); + boolean _notEquals = (!Objects.equals(_lastPhase, ActiveAnnotationContexts.AnnotationCallback.INFERENCE)); if (_notEquals) { throw new IllegalStateException("Element cannot be modified outside the transformation phase"); } diff --git a/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/ProblemSupportImpl.java b/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/ProblemSupportImpl.java index 0282d42bf61..c03595f551e 100644 --- a/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/ProblemSupportImpl.java +++ b/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/ProblemSupportImpl.java @@ -8,10 +8,10 @@ */ package org.eclipse.xtend.core.macro.declaration; -import com.google.common.base.Objects; import com.google.common.collect.Iterables; import java.util.Collections; import java.util.List; +import java.util.Objects; import java.util.function.Consumer; import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EObject; @@ -125,7 +125,7 @@ public List getProblems(final Element element) { final Function1 _function = (EObjectDiagnosticImpl diag) -> { EObject _problematicObject = diag.getProblematicObject(); EObject _value = resAndObj.getValue(); - return Boolean.valueOf(Objects.equal(_problematicObject, _value)); + return Boolean.valueOf(Objects.equals(_problematicObject, _value)); }; final Function1 _function_1 = (EObjectDiagnosticImpl diag) -> { String _code = diag.getCode(); @@ -176,7 +176,7 @@ private Pair getResourceAndEObject(final Element element) { this.checkCanceled(); boolean _matched = false; if (element instanceof CompilationUnitImpl) { - boolean _equals = Objects.equal(element, this.compilationUnit); + boolean _equals = Objects.equals(element, this.compilationUnit); if (_equals) { _matched=true; Resource _eResource = this.compilationUnit.getXtendFile().eResource(); @@ -189,7 +189,7 @@ private Pair getResourceAndEObject(final Element element) { _matched=true; final Resource resource = ((AbstractElementImpl)element).getDelegate().eResource(); Resource _eResource = this.compilationUnit.getXtendFile().eResource(); - boolean _equals = Objects.equal(resource, _eResource); + boolean _equals = Objects.equals(resource, _eResource); if (_equals) { final EObject eobject = this.compilationUnit.getJvmModelAssociations().getPrimarySourceElement(((AbstractElementImpl)element).getDelegate()); if ((eobject == null)) { diff --git a/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/TracabilityImpl.java b/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/TracabilityImpl.java index d2bc820d207..53a9b01fdcf 100644 --- a/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/TracabilityImpl.java +++ b/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/TracabilityImpl.java @@ -8,7 +8,7 @@ */ package org.eclipse.xtend.core.macro.declaration; -import com.google.common.base.Objects; +import java.util.Objects; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.resource.Resource; import org.eclipse.xtend.lib.macro.declaration.Element; @@ -73,14 +73,14 @@ public boolean isGenerated(final Element element) { _matched=true; Resource _eResource = ((JvmElementImpl)element).getDelegate().eResource(); Resource _eResource_1 = this.unit.getXtendFile().eResource(); - return Objects.equal(_eResource, _eResource_1); + return Objects.equals(_eResource, _eResource_1); } if (!_matched) { if (element instanceof JvmTypeParameterDeclarationImpl) { _matched=true; Resource _eResource = ((JvmTypeParameterDeclarationImpl)element).getDelegate().eResource(); Resource _eResource_1 = this.unit.getXtendFile().eResource(); - return Objects.equal(_eResource, _eResource_1); + return Objects.equals(_eResource, _eResource_1); } } if (!_matched) { @@ -134,7 +134,7 @@ public boolean isThePrimaryGeneratedJavaElement(final Element target) { return false; } Element _primaryGeneratedJavaElement = this.getPrimaryGeneratedJavaElement(source); - _xblockexpression = Objects.equal(_primaryGeneratedJavaElement, target); + _xblockexpression = Objects.equals(_primaryGeneratedJavaElement, target); } return _xblockexpression; } diff --git a/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/TypeLookupImpl.java b/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/TypeLookupImpl.java index e75390530c7..d894c4cbf61 100644 --- a/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/TypeLookupImpl.java +++ b/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/TypeLookupImpl.java @@ -8,8 +8,8 @@ */ package org.eclipse.xtend.core.macro.declaration; -import com.google.common.base.Objects; import com.google.common.collect.Iterables; +import java.util.Objects; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.resource.Resource; import org.eclipse.xtend.core.xtend.XtendFile; @@ -179,7 +179,7 @@ private T recursiveFindType(final String qualifiedName, final for (final T type : typeDeclarations) { { final String name = qualifiedNameProvider.apply(type); - boolean _equals = Objects.equal(qualifiedName, name); + boolean _equals = Objects.equals(qualifiedName, name); if (_equals) { return type; } @@ -222,7 +222,7 @@ public Type findUpstreamType(final String typeName) { final Function1 _function = (IEObjectDescription it) -> { Resource _eResource = it.getEObjectOrProxy().eResource(); Resource _eResource_1 = this.compilationUnit.getXtendFile().eResource(); - return Boolean.valueOf((!Objects.equal(_eResource, _eResource_1))); + return Boolean.valueOf((!Objects.equals(_eResource, _eResource_1))); }; return this.findTypeOnScope(typeName, _function); } diff --git a/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/TypeReferenceImpl.java b/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/TypeReferenceImpl.java index c8046a1feb2..73525939fe8 100644 --- a/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/TypeReferenceImpl.java +++ b/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/TypeReferenceImpl.java @@ -8,8 +8,8 @@ */ package org.eclipse.xtend.core.macro.declaration; -import com.google.common.base.Objects; import java.util.List; +import java.util.Objects; import org.eclipse.xtend.lib.annotations.Accessors; import org.eclipse.xtend.lib.macro.declaration.ResolvedConstructor; import org.eclipse.xtend.lib.macro.declaration.ResolvedMethod; @@ -200,7 +200,7 @@ public boolean equals(final Object obj) { if ((obj instanceof TypeReferenceImpl)) { String _identifier = this.getDelegate().getIdentifier(); String _identifier_1 = ((TypeReferenceImpl)obj).getDelegate().getIdentifier(); - return Objects.equal(_identifier, _identifier_1); + return Objects.equals(_identifier, _identifier_1); } return false; } diff --git a/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/XtendAnnotationReferenceImpl.java b/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/XtendAnnotationReferenceImpl.java index 4d27f6e870f..5ccb32f2c6e 100644 --- a/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/XtendAnnotationReferenceImpl.java +++ b/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/XtendAnnotationReferenceImpl.java @@ -8,8 +8,8 @@ */ package org.eclipse.xtend.core.macro.declaration; -import com.google.common.base.Objects; import com.google.common.collect.Iterables; +import java.util.Objects; import org.eclipse.emf.common.util.URI; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.InternalEObject; @@ -102,12 +102,12 @@ public Object getValue(final String property) { protected XExpression findValue(final String property) { XExpression _xblockexpression = null; { - if ((Objects.equal(property, "value") && (this.getDelegate().getValue() != null))) { + if ((Objects.equals(property, "value") && (this.getDelegate().getValue() != null))) { return this.getDelegate().getValue(); } final Function1 _function = (XAnnotationElementValuePair it) -> { String _simpleName = it.getElement().getSimpleName(); - return Boolean.valueOf(Objects.equal(_simpleName, property)); + return Boolean.valueOf(Objects.equals(_simpleName, property)); }; XAnnotationElementValuePair _findFirst = IterableExtensions.findFirst(this.getDelegate().getElementValuePairs(), _function); XExpression _value = null; @@ -124,7 +124,7 @@ protected Object translateAnnotationValue(final XExpression value, final String if ((annotationType instanceof JvmAnnotationType)) { final Function1 _function = (JvmOperation it) -> { String _simpleName = it.getSimpleName(); - return Boolean.valueOf(Objects.equal(_simpleName, property)); + return Boolean.valueOf(Objects.equals(_simpleName, property)); }; final JvmOperation operation = IterableExtensions.findFirst(Iterables.filter(((JvmAnnotationType)annotationType).getMembers(), JvmOperation.class), _function); if ((operation != null)) { diff --git a/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/XtendAnnotationTargetImpl.java b/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/XtendAnnotationTargetImpl.java index 92cedf7f6c7..9bc033fe679 100644 --- a/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/XtendAnnotationTargetImpl.java +++ b/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/XtendAnnotationTargetImpl.java @@ -8,8 +8,8 @@ */ package org.eclipse.xtend.core.macro.declaration; -import com.google.common.base.Objects; import com.google.common.collect.ImmutableList; +import java.util.Objects; import org.eclipse.xtend.core.xtend.XtendAnnotationTarget; import org.eclipse.xtend.lib.macro.declaration.AnnotationReference; import org.eclipse.xtend.lib.macro.declaration.AnnotationTarget; @@ -34,7 +34,7 @@ public Iterable getAnnotations() { public AnnotationReference findAnnotation(final Type annotationType) { final Function1 _function = (AnnotationReference it) -> { AnnotationTypeDeclaration _annotationTypeDeclaration = it.getAnnotationTypeDeclaration(); - return Boolean.valueOf(Objects.equal(_annotationTypeDeclaration, annotationType)); + return Boolean.valueOf(Objects.equals(_annotationTypeDeclaration, annotationType)); }; return IterableExtensions.findFirst(this.getAnnotations(), _function); } diff --git a/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/XtendAnnotationTypeDeclarationImpl.java b/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/XtendAnnotationTypeDeclarationImpl.java index ef32b47789c..88c0c479e1c 100644 --- a/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/XtendAnnotationTypeDeclarationImpl.java +++ b/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/XtendAnnotationTypeDeclarationImpl.java @@ -8,8 +8,8 @@ */ package org.eclipse.xtend.core.macro.declaration; -import com.google.common.base.Objects; import com.google.common.collect.Iterables; +import java.util.Objects; import org.eclipse.xtend.core.xtend.XtendAnnotationType; import org.eclipse.xtend.core.xtend.XtendMember; import org.eclipse.xtend.lib.macro.declaration.AnnotationTypeDeclaration; @@ -25,7 +25,7 @@ public class XtendAnnotationTypeDeclarationImpl extends XtendTypeDeclarationImpl public AnnotationTypeElementDeclaration findDeclaredAnnotationTypeElement(final String name) { final Function1 _function = (AnnotationTypeElementDeclaration it) -> { String _simpleName = it.getSimpleName(); - return Boolean.valueOf(Objects.equal(_simpleName, name)); + return Boolean.valueOf(Objects.equals(_simpleName, name)); }; return IterableExtensions.findFirst(this.getDeclaredAnnotationTypeElements(), _function); } diff --git a/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/XtendEnumerationDeclarationImpl.java b/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/XtendEnumerationDeclarationImpl.java index 141b1e66a67..f9b826e3ef3 100644 --- a/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/XtendEnumerationDeclarationImpl.java +++ b/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/XtendEnumerationDeclarationImpl.java @@ -8,8 +8,8 @@ */ package org.eclipse.xtend.core.macro.declaration; -import com.google.common.base.Objects; import com.google.common.collect.Iterables; +import java.util.Objects; import org.eclipse.xtend.core.xtend.XtendEnum; import org.eclipse.xtend.lib.macro.declaration.EnumerationTypeDeclaration; import org.eclipse.xtend.lib.macro.declaration.EnumerationValueDeclaration; @@ -22,7 +22,7 @@ public class XtendEnumerationDeclarationImpl extends XtendTypeDeclarationImpl _function = (EnumerationValueDeclaration value) -> { String _simpleName = value.getSimpleName(); - return Boolean.valueOf(Objects.equal(_simpleName, name)); + return Boolean.valueOf(Objects.equals(_simpleName, name)); }; return IterableExtensions.findFirst(this.getDeclaredValues(), _function); } diff --git a/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/XtendMemberDeclarationImpl.java b/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/XtendMemberDeclarationImpl.java index e2470063839..3a94bc38ea1 100644 --- a/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/XtendMemberDeclarationImpl.java +++ b/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/XtendMemberDeclarationImpl.java @@ -8,7 +8,7 @@ */ package org.eclipse.xtend.core.macro.declaration; -import com.google.common.base.Objects; +import java.util.Objects; import java.util.Set; import org.eclipse.emf.ecore.EObject; import org.eclipse.xtend.core.xtend.XtendMember; @@ -68,7 +68,7 @@ public boolean isDeprecated() { if (_annotationType!=null) { _identifier=_annotationType.getIdentifier(); } - return Boolean.valueOf(Objects.equal(_name, _identifier)); + return Boolean.valueOf(Objects.equals(_name, _identifier)); }; return IterableExtensions.exists(this.getDelegate().getAnnotations(), _function); } diff --git a/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/XtendTypeDeclarationImpl.java b/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/XtendTypeDeclarationImpl.java index 4c815638d66..368bea2ea2b 100644 --- a/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/XtendTypeDeclarationImpl.java +++ b/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/macro/declaration/XtendTypeDeclarationImpl.java @@ -8,9 +8,9 @@ */ package org.eclipse.xtend.core.macro.declaration; -import com.google.common.base.Objects; import com.google.common.collect.Iterables; import java.util.List; +import java.util.Objects; import org.eclipse.emf.ecore.EObject; import org.eclipse.xtend.core.xtend.XtendFile; import org.eclipse.xtend.core.xtend.XtendMember; @@ -106,7 +106,7 @@ public ConstructorDeclaration findDeclaredConstructor(final TypeReference... par }; List _list = IterableExtensions.toList(IterableExtensions.map(constructor.getParameters(), _function_1)); List _list_1 = IterableExtensions.toList(((Iterable)Conversions.doWrapArray(parameterTypes))); - return Boolean.valueOf(Objects.equal(_list, _list_1)); + return Boolean.valueOf(Objects.equals(_list, _list_1)); }; return IterableExtensions.findFirst(this.getDeclaredConstructors(), _function); } @@ -115,7 +115,7 @@ public ConstructorDeclaration findDeclaredConstructor(final TypeReference... par public FieldDeclaration findDeclaredField(final String name) { final Function1 _function = (FieldDeclaration field) -> { String _simpleName = field.getSimpleName(); - return Boolean.valueOf(Objects.equal(_simpleName, name)); + return Boolean.valueOf(Objects.equals(_simpleName, name)); }; return IterableExtensions.findFirst(this.getDeclaredFields(), _function); } @@ -124,7 +124,7 @@ public FieldDeclaration findDeclaredField(final String name) { public TypeDeclaration findDeclaredType(final String name) { final Function1 _function = (TypeDeclaration type) -> { String _simpleName = type.getSimpleName(); - return Boolean.valueOf(Objects.equal(_simpleName, name)); + return Boolean.valueOf(Objects.equals(_simpleName, name)); }; return IterableExtensions.findFirst(this.getDeclaredTypes(), _function); } @@ -132,7 +132,7 @@ public TypeDeclaration findDeclaredType(final String name) { @Override public MethodDeclaration findDeclaredMethod(final String name, final TypeReference... parameterTypes) { final Function1 _function = (MethodDeclaration method) -> { - return Boolean.valueOf((Objects.equal(method.getSimpleName(), name) && Objects.equal(IterableExtensions.toList(IterableExtensions.map(method.getParameters(), ((Function1) (ParameterDeclaration it) -> { + return Boolean.valueOf((Objects.equals(method.getSimpleName(), name) && Objects.equals(IterableExtensions.toList(IterableExtensions.map(method.getParameters(), ((Function1) (ParameterDeclaration it) -> { return it.getType(); }))), IterableExtensions.toList(((Iterable)Conversions.doWrapArray(parameterTypes)))))); }; diff --git a/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/tasks/XtendTaskFinder.java b/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/tasks/XtendTaskFinder.java index e843370f807..77f39aaa670 100644 --- a/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/tasks/XtendTaskFinder.java +++ b/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/tasks/XtendTaskFinder.java @@ -8,8 +8,8 @@ */ package org.eclipse.xtend.core.tasks; -import com.google.common.base.Objects; import com.google.inject.Inject; +import java.util.Objects; import org.eclipse.emf.ecore.EObject; import org.eclipse.xtend.core.services.XtendGrammarAccess; import org.eclipse.xtext.RuleCall; @@ -57,8 +57,8 @@ protected String stripText(final ILeafNode node, final String text) { private boolean isRichComment(final ILeafNode node) { EObject _grammarElement = node.getGrammarElement(); if ((_grammarElement instanceof RuleCall)) { - return (Objects.equal(((RuleCall) node.getGrammarElement()).getRule(), this._xtendGrammarAccess.getCOMMENT_RICH_TEXT_ENDRule()) || - Objects.equal(((RuleCall) node.getGrammarElement()).getRule(), this._xtendGrammarAccess.getCOMMENT_RICH_TEXT_INBETWEENRule())); + return (Objects.equals(((RuleCall) node.getGrammarElement()).getRule(), this._xtendGrammarAccess.getCOMMENT_RICH_TEXT_ENDRule()) || + Objects.equals(((RuleCall) node.getGrammarElement()).getRule(), this._xtendGrammarAccess.getCOMMENT_RICH_TEXT_INBETWEENRule())); } return false; } diff --git a/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/validation/AnnotationValidation.java b/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/validation/AnnotationValidation.java index ff01734493d..8ada32d12b8 100644 --- a/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/validation/AnnotationValidation.java +++ b/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/validation/AnnotationValidation.java @@ -8,10 +8,10 @@ */ package org.eclipse.xtend.core.validation; -import com.google.common.base.Objects; import com.google.common.collect.Iterables; import com.google.inject.Inject; import java.util.List; +import java.util.Objects; import org.eclipse.emf.ecore.EPackage; import org.eclipse.xtend.core.xtend.XtendAnnotationType; import org.eclipse.xtend.core.xtend.XtendField; @@ -99,7 +99,7 @@ public boolean isValidAnnotationValueType(final JvmTypeReference reference) { if ((_type_2 instanceof JvmAnnotationType)) { return true; } - if ((Objects.equal(toCheck.getType().getQualifiedName(), "java.lang.String") || Objects.equal(toCheck.getType().getQualifiedName(), "java.lang.Class"))) { + if ((Objects.equals(toCheck.getType().getQualifiedName(), "java.lang.String") || Objects.equals(toCheck.getType().getQualifiedName(), "java.lang.Class"))) { return true; } return false; diff --git a/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/validation/CachingResourceValidatorImpl.java b/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/validation/CachingResourceValidatorImpl.java index 7beff3bf62a..ce722ec51aa 100644 --- a/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/validation/CachingResourceValidatorImpl.java +++ b/org.eclipse.xtend.core/xtend-gen/org/eclipse/xtend/core/validation/CachingResourceValidatorImpl.java @@ -8,13 +8,13 @@ */ package org.eclipse.xtend.core.validation; -import com.google.common.base.Objects; import com.google.common.collect.Iterables; import com.google.common.collect.Iterators; import com.google.inject.Inject; import com.google.inject.Provider; import java.util.Collection; import java.util.List; +import java.util.Objects; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.resource.Resource; import org.eclipse.xtend.core.macro.ActiveAnnotationContext; @@ -118,7 +118,7 @@ private void runActiveAnnotationValidation(final Resource resource, final Cancel private void addWarningsForOrphanedJvmElements(final Resource resource, final CancelIndicator monitor, final IAcceptor acceptor) { final IssueSeverities issueSeverities = this.issueSeveritiesProvider.getIssueSeverities(resource); final Severity severity = issueSeverities.getSeverity(IssueCodes.ORPHAN_ELEMENT); - boolean _equals = Objects.equal(severity, Severity.IGNORE); + boolean _equals = Objects.equals(severity, Severity.IGNORE); if (_equals) { return; } diff --git a/org.eclipse.xtend.examples/projects/xtend-annotation-examples/xtend-gen/extract/ExtractProcessor.java b/org.eclipse.xtend.examples/projects/xtend-annotation-examples/xtend-gen/extract/ExtractProcessor.java index 6a25de6bb2c..a58fbbcbcb4 100644 --- a/org.eclipse.xtend.examples/projects/xtend-annotation-examples/xtend-gen/extract/ExtractProcessor.java +++ b/org.eclipse.xtend.examples/projects/xtend-annotation-examples/xtend-gen/extract/ExtractProcessor.java @@ -8,9 +8,9 @@ */ package extract; -import com.google.common.base.Objects; import com.google.common.collect.Iterables; import java.util.Collections; +import java.util.Objects; import org.eclipse.xtend.lib.macro.AbstractClassProcessor; import org.eclipse.xtend.lib.macro.RegisterGlobalsContext; import org.eclipse.xtend.lib.macro.TransformationContext; @@ -49,7 +49,7 @@ public void doTransform(final MutableClassDeclaration annotatedClass, @Extension Iterable _declaredMethods = annotatedClass.getDeclaredMethods(); for (final MutableMethodDeclaration method : _declaredMethods) { Visibility _visibility = method.getVisibility(); - boolean _equals = Objects.equal(_visibility, Visibility.PUBLIC); + boolean _equals = Objects.equals(_visibility, Visibility.PUBLIC); if (_equals) { final Procedure1 _function = (MutableMethodDeclaration it) -> { it.setDocComment(method.getDocComment()); diff --git a/org.eclipse.xtend.examples/projects/xtend-euler/xtend-gen/euler/Solution_004.java b/org.eclipse.xtend.examples/projects/xtend-euler/xtend-gen/euler/Solution_004.java index 094c59583e5..e97d3a4c526 100644 --- a/org.eclipse.xtend.examples/projects/xtend-euler/xtend-gen/euler/Solution_004.java +++ b/org.eclipse.xtend.examples/projects/xtend-euler/xtend-gen/euler/Solution_004.java @@ -11,8 +11,8 @@ */ package euler; -import com.google.common.base.Objects; import java.util.List; +import java.util.Objects; import org.eclipse.xtext.xbase.lib.Conversions; import org.eclipse.xtext.xbase.lib.InputOutput; import org.eclipse.xtext.xbase.lib.IntegerRange; @@ -39,7 +39,7 @@ public static void main(final String[] args) { if ((candidate > result)) { List charList = (List)Conversions.doWrapArray(Integer.valueOf(candidate).toString().toCharArray()); List _reverseView = ListExtensions.reverseView(charList); - boolean _equals = Objects.equal(_reverseView, charList); + boolean _equals = Objects.equals(_reverseView, charList); if (_equals) { result = candidate; } diff --git a/org.eclipse.xtend.examples/projects/xtend-euler/xtend-gen/euler/Solution_014.java b/org.eclipse.xtend.examples/projects/xtend-euler/xtend-gen/euler/Solution_014.java index 27f991e34f7..090ccc32d8c 100644 --- a/org.eclipse.xtend.examples/projects/xtend-euler/xtend-gen/euler/Solution_014.java +++ b/org.eclipse.xtend.examples/projects/xtend-euler/xtend-gen/euler/Solution_014.java @@ -11,9 +11,9 @@ */ package euler; -import com.google.common.base.Objects; import com.google.common.collect.AbstractIterator; import java.util.BitSet; +import java.util.Objects; import org.eclipse.xtext.xbase.lib.Functions.Function1; import org.eclipse.xtext.xbase.lib.Functions.Function2; import org.eclipse.xtext.xbase.lib.InputOutput; @@ -83,12 +83,12 @@ protected Long computeNext() { long _switchResult = (long) 0; final Long current = this.current; boolean _matched = false; - if (Objects.equal(current, 0L)) { + if (Objects.equals(current, 0L)) { _matched=true; return this.endOfData(); } if (!_matched) { - if (Objects.equal(current, 1L)) { + if (Objects.equals(current, 1L)) { _matched=true; _switchResult = 0L; } diff --git a/org.eclipse.xtend.examples/projects/xtend-euler/xtend-gen/euler/Solution_017.java b/org.eclipse.xtend.examples/projects/xtend-euler/xtend-gen/euler/Solution_017.java index 82060f73f94..64711510dcd 100644 --- a/org.eclipse.xtend.examples/projects/xtend-euler/xtend-gen/euler/Solution_017.java +++ b/org.eclipse.xtend.examples/projects/xtend-euler/xtend-gen/euler/Solution_017.java @@ -11,7 +11,7 @@ */ package euler; -import com.google.common.base.Objects; +import java.util.Objects; import org.eclipse.xtext.xbase.lib.Functions.Function1; import org.eclipse.xtext.xbase.lib.Functions.Function2; import org.eclipse.xtext.xbase.lib.InputOutput; @@ -86,120 +86,120 @@ public String word(final int number) { public String wordToHundred(final int number) { String _switchResult = null; boolean _matched = false; - if (Objects.equal(number, 0)) { + if (Objects.equals(number, 0)) { _matched=true; _switchResult = ""; } if (!_matched) { - if (Objects.equal(number, 1)) { + if (Objects.equals(number, 1)) { _matched=true; _switchResult = "one"; } } if (!_matched) { - if (Objects.equal(number, 2)) { + if (Objects.equals(number, 2)) { _matched=true; _switchResult = "two"; } } if (!_matched) { - if (Objects.equal(number, 3)) { + if (Objects.equals(number, 3)) { _matched=true; _switchResult = "three"; } } if (!_matched) { - if (Objects.equal(number, 4)) { + if (Objects.equals(number, 4)) { _matched=true; _switchResult = "four"; } } if (!_matched) { - if (Objects.equal(number, 5)) { + if (Objects.equals(number, 5)) { _matched=true; _switchResult = "five"; } } if (!_matched) { - if (Objects.equal(number, 6)) { + if (Objects.equals(number, 6)) { _matched=true; _switchResult = "six"; } } if (!_matched) { - if (Objects.equal(number, 7)) { + if (Objects.equals(number, 7)) { _matched=true; _switchResult = "seven"; } } if (!_matched) { - if (Objects.equal(number, 8)) { + if (Objects.equals(number, 8)) { _matched=true; _switchResult = "eight"; } } if (!_matched) { - if (Objects.equal(number, 9)) { + if (Objects.equals(number, 9)) { _matched=true; _switchResult = "nine"; } } if (!_matched) { - if (Objects.equal(number, 10)) { + if (Objects.equals(number, 10)) { _matched=true; _switchResult = "ten"; } } if (!_matched) { - if (Objects.equal(number, 11)) { + if (Objects.equals(number, 11)) { _matched=true; _switchResult = "eleven"; } } if (!_matched) { - if (Objects.equal(number, 12)) { + if (Objects.equals(number, 12)) { _matched=true; _switchResult = "twelve"; } } if (!_matched) { - if (Objects.equal(number, 13)) { + if (Objects.equals(number, 13)) { _matched=true; _switchResult = "thirteen"; } } if (!_matched) { - if (Objects.equal(number, 14)) { + if (Objects.equals(number, 14)) { _matched=true; _switchResult = "fourteen"; } } if (!_matched) { - if (Objects.equal(number, 15)) { + if (Objects.equals(number, 15)) { _matched=true; _switchResult = "fifteen"; } } if (!_matched) { - if (Objects.equal(number, 16)) { + if (Objects.equals(number, 16)) { _matched=true; _switchResult = "sixteen"; } } if (!_matched) { - if (Objects.equal(number, 17)) { + if (Objects.equals(number, 17)) { _matched=true; _switchResult = "seventeen"; } } if (!_matched) { - if (Objects.equal(number, 18)) { + if (Objects.equals(number, 18)) { _matched=true; _switchResult = "eighteen"; } } if (!_matched) { - if (Objects.equal(number, 19)) { + if (Objects.equals(number, 19)) { _matched=true; _switchResult = "nineteen"; } diff --git a/org.eclipse.xtend.examples/projects/xtend-euler/xtend-gen/euler/Solution_021.java b/org.eclipse.xtend.examples/projects/xtend-euler/xtend-gen/euler/Solution_021.java index 8cd728c9920..7c3ce7198e7 100644 --- a/org.eclipse.xtend.examples/projects/xtend-euler/xtend-gen/euler/Solution_021.java +++ b/org.eclipse.xtend.examples/projects/xtend-euler/xtend-gen/euler/Solution_021.java @@ -11,8 +11,8 @@ */ package euler; -import com.google.common.base.Objects; import java.util.HashSet; +import java.util.Objects; import org.eclipse.xtext.xbase.lib.CollectionLiterals; import org.eclipse.xtext.xbase.lib.Functions.Function1; import org.eclipse.xtext.xbase.lib.Functions.Function2; @@ -42,9 +42,9 @@ public static void main(final String[] args) { boolean _not = (!_contains); if (_not) { final Integer sumOfDivisors = Solution_021.sumOfDivisors((i).intValue()); - if (((!Objects.equal(sumOfDivisors, i)) && ((sumOfDivisors).intValue() <= max))) { + if (((!Objects.equals(sumOfDivisors, i)) && ((sumOfDivisors).intValue() <= max))) { final Integer otherSumOfDivisors = Solution_021.sumOfDivisors((sumOfDivisors).intValue()); - boolean _equals = Objects.equal(otherSumOfDivisors, i); + boolean _equals = Objects.equals(otherSumOfDivisors, i); if (_equals) { result.add(i); result.add(sumOfDivisors); diff --git a/org.eclipse.xtend.examples/projects/xtend-examples/xtend-gen/example2/BasicExpressions.java b/org.eclipse.xtend.examples/projects/xtend-examples/xtend-gen/example2/BasicExpressions.java index a99c57560fc..efec16ab612 100644 --- a/org.eclipse.xtend.examples/projects/xtend-examples/xtend-gen/example2/BasicExpressions.java +++ b/org.eclipse.xtend.examples/projects/xtend-examples/xtend-gen/example2/BasicExpressions.java @@ -8,7 +8,6 @@ */ package example2; -import com.google.common.base.Objects; import java.math.BigDecimal; import java.util.ArrayList; import java.util.Collections; @@ -17,6 +16,7 @@ import java.util.Iterator; import java.util.List; import java.util.Map; +import java.util.Objects; import java.util.Set; import org.eclipse.xtext.xbase.lib.CollectionLiterals; import org.eclipse.xtext.xbase.lib.Functions.Function1; @@ -93,7 +93,7 @@ public void controlStructures() { if (_equals) { int _xifexpression = (int) 0; String _lowerCase = "BAR".toLowerCase(); - boolean _notEquals = (!Objects.equal("foo", _lowerCase)); + boolean _notEquals = (!Objects.equals("foo", _lowerCase)); if (_notEquals) { _xifexpression = 42; } else { @@ -112,7 +112,7 @@ public void controlStructures() { Assert.fail("Never happens!"); } if (!_matched) { - if (Objects.equal(t, "text")) { + if (Objects.equals(t, "text")) { _matched=true; Assert.assertTrue(true); } diff --git a/org.eclipse.xtend.ide.swtbot.tests/swtbot/xtend-gen/org/eclipse/xtend/ide/tests/SwtBotProjectHelper.java b/org.eclipse.xtend.ide.swtbot.tests/swtbot/xtend-gen/org/eclipse/xtend/ide/tests/SwtBotProjectHelper.java index 69846c06e6f..217a468593c 100644 --- a/org.eclipse.xtend.ide.swtbot.tests/swtbot/xtend-gen/org/eclipse/xtend/ide/tests/SwtBotProjectHelper.java +++ b/org.eclipse.xtend.ide.swtbot.tests/swtbot/xtend-gen/org/eclipse/xtend/ide/tests/SwtBotProjectHelper.java @@ -8,8 +8,8 @@ */ package org.eclipse.xtend.ide.tests; -import com.google.common.base.Objects; import java.util.List; +import java.util.Objects; import java.util.function.Consumer; import org.eclipse.core.resources.IResource; import org.eclipse.core.resources.ResourcesPlugin; @@ -56,7 +56,7 @@ public static SWTBotShell newXtendProject(final SWTWorkbenchBot it, final String final SWTBotShell shell = it.activeShell(); final Function1 _function = (SWTBotView it_1) -> { String _title = it_1.getTitle(); - return Boolean.valueOf(Objects.equal(_title, "Welcome")); + return Boolean.valueOf(Objects.equals(_title, "Welcome")); }; SWTBotView _findFirst = IterableExtensions.findFirst(it.views(), _function); if (_findFirst!=null) { @@ -244,12 +244,12 @@ protected static Pair getLineAndColumn(final String content, f for (final Integer i : _doubleDotLessThan) { String _substring = content.substring((i).intValue(), ((i).intValue() + 1)); boolean _matched = false; - if (Objects.equal(_substring, ignoreNext)) { + if (Objects.equals(_substring, ignoreNext)) { _matched=true; ignoreNext = null; } if (!_matched) { - if (Objects.equal(_substring, "\n")) { + if (Objects.equals(_substring, "\n")) { _matched=true; column = 0; line = (line + 1); @@ -257,7 +257,7 @@ protected static Pair getLineAndColumn(final String content, f } } if (!_matched) { - if (Objects.equal(_substring, "\r")) { + if (Objects.equals(_substring, "\r")) { _matched=true; column = 0; line = (line + 1); diff --git a/org.eclipse.xtend.ide.tests/xtend-gen/org/eclipse/xtend/ide/tests/builder/AbstractQueuedBuildDataTest.java b/org.eclipse.xtend.ide.tests/xtend-gen/org/eclipse/xtend/ide/tests/builder/AbstractQueuedBuildDataTest.java index 783c402e5f8..d64413732c8 100644 --- a/org.eclipse.xtend.ide.tests/xtend-gen/org/eclipse/xtend/ide/tests/builder/AbstractQueuedBuildDataTest.java +++ b/org.eclipse.xtend.ide.tests/xtend-gen/org/eclipse/xtend/ide/tests/builder/AbstractQueuedBuildDataTest.java @@ -8,10 +8,10 @@ */ package org.eclipse.xtend.ide.tests.builder; -import com.google.common.base.Objects; import com.google.inject.Inject; import java.util.Collection; import java.util.HashSet; +import java.util.Objects; import java.util.function.Consumer; import org.eclipse.jdt.core.ElementChangedEvent; import org.eclipse.jdt.core.JavaCore; @@ -106,7 +106,7 @@ public Collection assertThereAreDeltas(fin for (final String exportedName : _exportedNames) { { final Function1 _function = (String it) -> { - return Boolean.valueOf(Objects.equal(exportedName, it)); + return Boolean.valueOf(Objects.equals(exportedName, it)); }; final String qualifiedName = IterableExtensions.findFirst(((Iterable)Conversions.doWrapArray(expectedExportedNames)), _function); if ((qualifiedName == null)) { diff --git a/org.eclipse.xtend.ide.tests/xtend-gen/org/eclipse/xtend/ide/tests/buildpath/AbstractJunitLibClasspathAdderTestCase.java b/org.eclipse.xtend.ide.tests/xtend-gen/org/eclipse/xtend/ide/tests/buildpath/AbstractJunitLibClasspathAdderTestCase.java index d610ce05af7..f915dbe50ab 100644 --- a/org.eclipse.xtend.ide.tests/xtend-gen/org/eclipse/xtend/ide/tests/buildpath/AbstractJunitLibClasspathAdderTestCase.java +++ b/org.eclipse.xtend.ide.tests/xtend-gen/org/eclipse/xtend/ide/tests/buildpath/AbstractJunitLibClasspathAdderTestCase.java @@ -8,9 +8,9 @@ */ package org.eclipse.xtend.ide.tests.buildpath; -import com.google.common.base.Objects; import com.google.inject.Inject; import java.io.InputStream; +import java.util.Objects; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IProjectDescription; import org.eclipse.core.runtime.IPath; @@ -73,7 +73,7 @@ protected void removePluginNature() { final IProject project = this.workbenchHelper.getProject(); final IProjectDescription description = project.getDescription(); final Function1 _function = (String it) -> { - return Boolean.valueOf((!Objects.equal(it, "org.eclipse.pde.PluginNature"))); + return Boolean.valueOf((!Objects.equals(it, "org.eclipse.pde.PluginNature"))); }; description.setNatureIds(((String[])Conversions.unwrapArray(IterableExtensions.filter(((Iterable)Conversions.doWrapArray(description.getNatureIds())), _function), String.class))); NullProgressMonitor _nullProgressMonitor = new NullProgressMonitor(); @@ -89,7 +89,7 @@ protected void removePluginNature() { protected void assertClasspath(final String message, final IPath entryPath) { try { final Function1 _function = (IClasspathEntry it) -> { - return Boolean.valueOf((Objects.equal(it.getPath(), entryPath) && (it.getEntryKind() == IClasspathEntry.CPE_CONTAINER))); + return Boolean.valueOf((Objects.equals(it.getPath(), entryPath) && (it.getEntryKind() == IClasspathEntry.CPE_CONTAINER))); }; Assert.assertTrue(message, IterableExtensions.exists(((Iterable)Conversions.doWrapArray(JavaCore.create(this.workbenchHelper.getProject()).getRawClasspath())), _function)); diff --git a/org.eclipse.xtend.ide.tests/xtend-gen/org/eclipse/xtend/ide/tests/compiler/QuickDebugSourceInstallingCompilationParticipantTest.java b/org.eclipse.xtend.ide.tests/xtend-gen/org/eclipse/xtend/ide/tests/compiler/QuickDebugSourceInstallingCompilationParticipantTest.java index 983737dae9b..d9f64d2c284 100644 --- a/org.eclipse.xtend.ide.tests/xtend-gen/org/eclipse/xtend/ide/tests/compiler/QuickDebugSourceInstallingCompilationParticipantTest.java +++ b/org.eclipse.xtend.ide.tests/xtend-gen/org/eclipse/xtend/ide/tests/compiler/QuickDebugSourceInstallingCompilationParticipantTest.java @@ -8,10 +8,10 @@ */ package org.eclipse.xtend.ide.tests.compiler; -import com.google.common.base.Objects; import com.google.common.io.ByteStreams; import com.google.inject.Inject; import java.io.InputStream; +import java.util.Objects; import java.util.concurrent.atomic.AtomicBoolean; import org.eclipse.core.resources.IFile; import org.eclipse.xtend.ide.tests.AbstractXtendUITestCase; @@ -92,7 +92,7 @@ public InputStream apply() { r.accept(new ClassVisitor(Opcodes.ASM9) { @Override public void visitSource(final String source, final String debug) { - boolean _equals = Objects.equal("Outer.java", source); + boolean _equals = Objects.equals("Outer.java", source); if (_equals) { StringConcatenation _builder = new StringConcatenation(); _builder.append("SMAP"); diff --git a/org.eclipse.xtend.ide.tests/xtend-gen/org/eclipse/xtend/ide/tests/editor/DirtyStateEditorSupportTest.java b/org.eclipse.xtend.ide.tests/xtend-gen/org/eclipse/xtend/ide/tests/editor/DirtyStateEditorSupportTest.java index 419ff59c803..e54246c4d95 100644 --- a/org.eclipse.xtend.ide.tests/xtend-gen/org/eclipse/xtend/ide/tests/editor/DirtyStateEditorSupportTest.java +++ b/org.eclipse.xtend.ide.tests/xtend-gen/org/eclipse/xtend/ide/tests/editor/DirtyStateEditorSupportTest.java @@ -8,10 +8,10 @@ */ package org.eclipse.xtend.ide.tests.editor; -import com.google.common.base.Objects; import com.google.common.collect.Iterators; import com.google.inject.Inject; import java.util.List; +import java.util.Objects; import java.util.Set; import org.apache.log4j.Level; import org.eclipse.jface.text.source.Annotation; @@ -267,7 +267,7 @@ private void assertHasNoErrors(final XtextEditor editor) { private List getErrorAnnotations(final XtextEditor editor) { final Function1 _function = (Annotation it) -> { String _type = it.getType(); - return Boolean.valueOf(Objects.equal(_type, "org.eclipse.xtext.ui.editor.error")); + return Boolean.valueOf(Objects.equals(_type, "org.eclipse.xtext.ui.editor.error")); }; return IteratorExtensions.toList(IteratorExtensions.filter(Iterators.filter(editor.getDocumentProvider().getAnnotationModel(editor.getEditorInput()).getAnnotationIterator(), Annotation.class), _function)); } diff --git a/org.eclipse.xtend.ide.tests/xtend-gen/org/eclipse/xtend/ide/tests/editor/DirtyStateEditorValidationTest.java b/org.eclipse.xtend.ide.tests/xtend-gen/org/eclipse/xtend/ide/tests/editor/DirtyStateEditorValidationTest.java index 355651dee6c..3eb39dfc96b 100644 --- a/org.eclipse.xtend.ide.tests/xtend-gen/org/eclipse/xtend/ide/tests/editor/DirtyStateEditorValidationTest.java +++ b/org.eclipse.xtend.ide.tests/xtend-gen/org/eclipse/xtend/ide/tests/editor/DirtyStateEditorValidationTest.java @@ -8,10 +8,10 @@ */ package org.eclipse.xtend.ide.tests.editor; -import com.google.common.base.Objects; import com.google.common.collect.Iterators; import com.google.inject.Inject; import java.util.List; +import java.util.Objects; import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IMarker; import org.eclipse.core.resources.IResource; @@ -488,7 +488,7 @@ private void assertNumberOfErrorAnnotations(final XtextEditor editor, final int private List getErrorAnnotations(final XtextEditor editor) { final Function1 _function = (Annotation it) -> { String _type = it.getType(); - return Boolean.valueOf(Objects.equal(_type, "org.eclipse.xtext.ui.editor.error")); + return Boolean.valueOf(Objects.equals(_type, "org.eclipse.xtext.ui.editor.error")); }; return IteratorExtensions.toList(IteratorExtensions.filter(Iterators.filter(editor.getDocumentProvider().getAnnotationModel(editor.getEditorInput()).getAnnotationIterator(), Annotation.class), _function)); } diff --git a/org.eclipse.xtend.ide.tests/xtend-gen/org/eclipse/xtend/ide/tests/editor/DirtyStateResourceDescriptionTest.java b/org.eclipse.xtend.ide.tests/xtend-gen/org/eclipse/xtend/ide/tests/editor/DirtyStateResourceDescriptionTest.java index 7abc3768451..028c3c5da00 100644 --- a/org.eclipse.xtend.ide.tests/xtend-gen/org/eclipse/xtend/ide/tests/editor/DirtyStateResourceDescriptionTest.java +++ b/org.eclipse.xtend.ide.tests/xtend-gen/org/eclipse/xtend/ide/tests/editor/DirtyStateResourceDescriptionTest.java @@ -8,10 +8,10 @@ */ package org.eclipse.xtend.ide.tests.editor; -import com.google.common.base.Objects; import com.google.inject.Inject; import com.google.inject.Provider; import java.util.Collections; +import java.util.Objects; import org.eclipse.emf.common.util.URI; import org.eclipse.emf.ecore.resource.Resource; import org.eclipse.xtend.ide.tests.AbstractXtendUITestCase; @@ -53,7 +53,7 @@ public void testTextHash() { Assert.assertEquals(1, IterableExtensions.size(d.getExportedObjects())); final String textHash = IterableExtensions.head(d.getExportedObjects()).getUserData(DirtyStateResourceDescription.Manager.TEXT_HASH); Assert.assertNotNull(textHash); - boolean _equals = Objects.equal("", textHash); + boolean _equals = Objects.equals("", textHash); Assert.assertFalse(_equals); } @@ -88,7 +88,7 @@ public void testTextChange() { _builder_1.newLine(); final IResourceDescription d1 = this.getDirtyResourceDescription(_builder_1); final String textHash1 = IterableExtensions.head(d1.getExportedObjects()).getUserData(DirtyStateResourceDescription.Manager.TEXT_HASH); - boolean _equals = Objects.equal(textHash, textHash1); + boolean _equals = Objects.equals(textHash, textHash1); Assert.assertFalse(_equals); final IResourceDescription.Delta delta = this.dirtyManager.createDelta(d, d1); Assert.assertTrue(delta.haveEObjectDescriptionsChanged()); diff --git a/org.eclipse.xtend.ide.tests/xtend-gen/org/eclipse/xtend/ide/tests/findrefs/JdtFindReferencesTest.java b/org.eclipse.xtend.ide.tests/xtend-gen/org/eclipse/xtend/ide/tests/findrefs/JdtFindReferencesTest.java index e36e0b23bc9..0787bfe30b9 100644 --- a/org.eclipse.xtend.ide.tests/xtend-gen/org/eclipse/xtend/ide/tests/findrefs/JdtFindReferencesTest.java +++ b/org.eclipse.xtend.ide.tests/xtend-gen/org/eclipse/xtend/ide/tests/findrefs/JdtFindReferencesTest.java @@ -8,10 +8,10 @@ */ package org.eclipse.xtend.ide.tests.findrefs; -import com.google.common.base.Objects; import com.google.common.collect.Iterables; import com.google.inject.Inject; import java.util.ArrayList; +import java.util.Objects; import java.util.function.Consumer; import org.eclipse.core.resources.IResource; import org.eclipse.jdt.core.IField; @@ -140,22 +140,22 @@ public void testFindClassRef() { Assert.assertEquals(4, it.size()); final Function1 _function_1 = (IField it_1) -> { String _elementName = it_1.getElementName(); - return Boolean.valueOf(Objects.equal(_elementName, "x")); + return Boolean.valueOf(Objects.equals(_elementName, "x")); }; Assert.assertTrue(IterableExtensions.exists(Iterables.filter(it, IField.class), _function_1)); final Function1 _function_2 = (IMethod it_1) -> { String _elementName = it_1.getElementName(); - return Boolean.valueOf(Objects.equal(_elementName, "foo")); + return Boolean.valueOf(Objects.equals(_elementName, "foo")); }; Assert.assertTrue(IterableExtensions.exists(Iterables.filter(it, IMethod.class), _function_2)); final Function1 _function_3 = (IMethod it_1) -> { String _elementName = it_1.getElementName(); - return Boolean.valueOf(Objects.equal(_elementName, "bar")); + return Boolean.valueOf(Objects.equals(_elementName, "bar")); }; Assert.assertTrue(IterableExtensions.exists(Iterables.filter(it, IMethod.class), _function_3)); final Function1 _function_4 = (IMethod it_1) -> { String _elementName = it_1.getElementName(); - return Boolean.valueOf(Objects.equal(_elementName, "baz")); + return Boolean.valueOf(Objects.equals(_elementName, "baz")); }; Assert.assertTrue(IterableExtensions.exists(Iterables.filter(it, IMethod.class), _function_4)); }; @@ -201,11 +201,11 @@ public void testFindMethodRef() { final Procedure1> _function = (ArrayList it) -> { Assert.assertEquals(2, it.size()); final Function1 _function_1 = (Object it_1) -> { - return Boolean.valueOf(((it_1 instanceof IField) && Objects.equal(((IField) it_1).getElementName(), "y"))); + return Boolean.valueOf(((it_1 instanceof IField) && Objects.equals(((IField) it_1).getElementName(), "y"))); }; Assert.assertTrue(IterableExtensions.exists(it, _function_1)); final Function1 _function_2 = (Object it_1) -> { - return Boolean.valueOf(((it_1 instanceof IMethod) && Objects.equal(((IMethod) it_1).getElementName(), "bar"))); + return Boolean.valueOf(((it_1 instanceof IMethod) && Objects.equals(((IMethod) it_1).getElementName(), "bar"))); }; Assert.assertTrue(IterableExtensions.exists(it, _function_2)); }; @@ -270,19 +270,19 @@ public void testFindFieldRef() { final Procedure1> _function = (ArrayList it) -> { Assert.assertEquals(4, it.size()); final Function1 _function_1 = (Object it_1) -> { - return Boolean.valueOf(((it_1 instanceof IField) && Objects.equal(((IField) it_1).getElementName(), "bar"))); + return Boolean.valueOf(((it_1 instanceof IField) && Objects.equals(((IField) it_1).getElementName(), "bar"))); }; Assert.assertTrue(IterableExtensions.exists(it, _function_1)); final Function1 _function_2 = (Object it_1) -> { - return Boolean.valueOf(((it_1 instanceof IMethod) && Objects.equal(((IMethod) it_1).getElementName(), "baz"))); + return Boolean.valueOf(((it_1 instanceof IMethod) && Objects.equals(((IMethod) it_1).getElementName(), "baz"))); }; Assert.assertTrue(IterableExtensions.exists(it, _function_2)); final Function1 _function_3 = (Object it_1) -> { - return Boolean.valueOf(((it_1 instanceof IMethod) && Objects.equal(((IMethod) it_1).getElementName(), "fooBar_0"))); + return Boolean.valueOf(((it_1 instanceof IMethod) && Objects.equals(((IMethod) it_1).getElementName(), "fooBar_0"))); }; Assert.assertTrue(IterableExtensions.exists(it, _function_3)); final Function1 _function_4 = (Object it_1) -> { - return Boolean.valueOf(((it_1 instanceof IMethod) && Objects.equal(((IMethod) it_1).getElementName(), "fooBar_1"))); + return Boolean.valueOf(((it_1 instanceof IMethod) && Objects.equals(((IMethod) it_1).getElementName(), "fooBar_1"))); }; Assert.assertTrue(IterableExtensions.exists(it, _function_4)); }; @@ -343,23 +343,23 @@ public void testFindPropertyRef() { final Procedure1> _function = (ArrayList it) -> { Assert.assertEquals(5, it.size()); final Function1 _function_1 = (Object it_1) -> { - return Boolean.valueOf(((it_1 instanceof IField) && Objects.equal(((IField) it_1).getElementName(), "bar"))); + return Boolean.valueOf(((it_1 instanceof IField) && Objects.equals(((IField) it_1).getElementName(), "bar"))); }; Assert.assertTrue(IterableExtensions.exists(it, _function_1)); final Function1 _function_2 = (Object it_1) -> { - return Boolean.valueOf(((it_1 instanceof IMethod) && Objects.equal(((IMethod) it_1).getElementName(), "baz"))); + return Boolean.valueOf(((it_1 instanceof IMethod) && Objects.equals(((IMethod) it_1).getElementName(), "baz"))); }; Assert.assertTrue(IterableExtensions.exists(it, _function_2)); final Function1 _function_3 = (Object it_1) -> { - return Boolean.valueOf(((it_1 instanceof IMethod) && Objects.equal(((IMethod) it_1).getElementName(), "fooBar"))); + return Boolean.valueOf(((it_1 instanceof IMethod) && Objects.equals(((IMethod) it_1).getElementName(), "fooBar"))); }; Assert.assertTrue(IterableExtensions.exists(it, _function_3)); final Function1 _function_4 = (Object it_1) -> { - return Boolean.valueOf(((it_1 instanceof IMethod) && Objects.equal(((IMethod) it_1).getElementName(), "getFoo"))); + return Boolean.valueOf(((it_1 instanceof IMethod) && Objects.equals(((IMethod) it_1).getElementName(), "getFoo"))); }; Assert.assertTrue(IterableExtensions.exists(it, _function_4)); final Function1 _function_5 = (Object it_1) -> { - return Boolean.valueOf(((it_1 instanceof IMethod) && Objects.equal(((IMethod) it_1).getElementName(), "setFoo"))); + return Boolean.valueOf(((it_1 instanceof IMethod) && Objects.equals(((IMethod) it_1).getElementName(), "setFoo"))); }; Assert.assertTrue(IterableExtensions.exists(it, _function_5)); }; @@ -438,15 +438,15 @@ public void testDispatchMethodRef() { final Procedure1> _function = (ArrayList it) -> { Assert.assertEquals(3, it.size()); final Function1 _function_1 = (Object it_1) -> { - return Boolean.valueOf(((it_1 instanceof IMethod) && Objects.equal(((IMethod) it_1).getElementName(), "foo_1"))); + return Boolean.valueOf(((it_1 instanceof IMethod) && Objects.equals(((IMethod) it_1).getElementName(), "foo_1"))); }; Assert.assertTrue(IterableExtensions.exists(it, _function_1)); final Function1 _function_2 = (Object it_1) -> { - return Boolean.valueOf(((it_1 instanceof IMethod) && Objects.equal(((IMethod) it_1).getElementName(), "baz"))); + return Boolean.valueOf(((it_1 instanceof IMethod) && Objects.equals(((IMethod) it_1).getElementName(), "baz"))); }; Assert.assertTrue(IterableExtensions.exists(it, _function_2)); final Function1 _function_3 = (Object it_1) -> { - return Boolean.valueOf(((it_1 instanceof IMethod) && Objects.equal(((IMethod) it_1).getElementName(), "foo"))); + return Boolean.valueOf(((it_1 instanceof IMethod) && Objects.equals(((IMethod) it_1).getElementName(), "foo"))); }; Assert.assertTrue(IterableExtensions.exists(it, _function_3)); }; @@ -501,15 +501,15 @@ public void testJavaClassRef() { final Procedure1> _function = (ArrayList it) -> { Assert.assertEquals(3, it.size()); final Function1 _function_1 = (Object it_1) -> { - return Boolean.valueOf(((it_1 instanceof IField) && Objects.equal(((IField) it_1).getElementName(), "foo"))); + return Boolean.valueOf(((it_1 instanceof IField) && Objects.equals(((IField) it_1).getElementName(), "foo"))); }; Assert.assertTrue(IterableExtensions.exists(it, _function_1)); final Function1 _function_2 = (Object it_1) -> { - return Boolean.valueOf(((it_1 instanceof IMethod) && Objects.equal(((IMethod) it_1).getElementName(), "bar"))); + return Boolean.valueOf(((it_1 instanceof IMethod) && Objects.equals(((IMethod) it_1).getElementName(), "bar"))); }; Assert.assertTrue(IterableExtensions.exists(it, _function_2)); final Function1 _function_3 = (Object it_1) -> { - return Boolean.valueOf(((it_1 instanceof IMethod) && Objects.equal(((IMethod) it_1).getElementName(), "baz"))); + return Boolean.valueOf(((it_1 instanceof IMethod) && Objects.equals(((IMethod) it_1).getElementName(), "baz"))); }; Assert.assertTrue(IterableExtensions.exists(it, _function_3)); }; @@ -533,7 +533,7 @@ public void testClassJavaElements() { final Procedure1> _function = (Iterable it) -> { Assert.assertEquals(1, IterableExtensions.size(it)); final Function1 _function_1 = (IJavaElement it_1) -> { - return Boolean.valueOf(((it_1 instanceof IType) && Objects.equal(((IType) it_1).getElementName(), "Xtend"))); + return Boolean.valueOf(((it_1 instanceof IType) && Objects.equals(((IType) it_1).getElementName(), "Xtend"))); }; Assert.assertTrue(IterableExtensions.exists(it, _function_1)); }; @@ -563,7 +563,7 @@ public void testMethodJavaElements() { final Procedure1> _function = (Iterable it) -> { Assert.assertEquals(1, IterableExtensions.size(it)); final Function1 _function_1 = (IJavaElement it_1) -> { - return Boolean.valueOf(((it_1 instanceof IMethod) && Objects.equal(((IMethod) it_1).getElementName(), "foo"))); + return Boolean.valueOf(((it_1 instanceof IMethod) && Objects.equals(((IMethod) it_1).getElementName(), "foo"))); }; Assert.assertTrue(IterableExtensions.exists(it, _function_1)); }; @@ -590,7 +590,7 @@ public void testFieldJavaElements() { final Procedure1> _function = (Iterable it) -> { Assert.assertEquals(1, IterableExtensions.size(it)); final Function1 _function_1 = (IJavaElement it_1) -> { - return Boolean.valueOf(((it_1 instanceof IField) && Objects.equal(((IField) it_1).getElementName(), "foo"))); + return Boolean.valueOf(((it_1 instanceof IField) && Objects.equals(((IField) it_1).getElementName(), "foo"))); }; Assert.assertTrue(IterableExtensions.exists(it, _function_1)); }; @@ -617,15 +617,15 @@ public void testPropertyJavaElements() { final Procedure1> _function = (Iterable it) -> { Assert.assertEquals(3, IterableExtensions.size(it)); final Function1 _function_1 = (IJavaElement it_1) -> { - return Boolean.valueOf(((it_1 instanceof IMethod) && Objects.equal(((IMethod) it_1).getElementName(), "getFoo"))); + return Boolean.valueOf(((it_1 instanceof IMethod) && Objects.equals(((IMethod) it_1).getElementName(), "getFoo"))); }; Assert.assertTrue(IterableExtensions.exists(it, _function_1)); final Function1 _function_2 = (IJavaElement it_1) -> { - return Boolean.valueOf(((it_1 instanceof IMethod) && Objects.equal(((IMethod) it_1).getElementName(), "setFoo"))); + return Boolean.valueOf(((it_1 instanceof IMethod) && Objects.equals(((IMethod) it_1).getElementName(), "setFoo"))); }; Assert.assertTrue(IterableExtensions.exists(it, _function_2)); final Function1 _function_3 = (IJavaElement it_1) -> { - return Boolean.valueOf(((it_1 instanceof IField) && Objects.equal(((IField) it_1).getElementName(), "_foo"))); + return Boolean.valueOf(((it_1 instanceof IField) && Objects.equals(((IField) it_1).getElementName(), "_foo"))); }; Assert.assertTrue(IterableExtensions.exists(it, _function_3)); }; @@ -662,11 +662,11 @@ public void testDispatchMethodJavaElements() { final Procedure1> _function = (Iterable it) -> { Assert.assertEquals(2, IterableExtensions.size(it)); final Function1 _function_1 = (IJavaElement it_1) -> { - return Boolean.valueOf(((it_1 instanceof IMethod) && Objects.equal(((IMethod) it_1).getElementName(), "_foo"))); + return Boolean.valueOf(((it_1 instanceof IMethod) && Objects.equals(((IMethod) it_1).getElementName(), "_foo"))); }; Assert.assertTrue(IterableExtensions.exists(it, _function_1)); final Function1 _function_2 = (IJavaElement it_1) -> { - return Boolean.valueOf(((it_1 instanceof IMethod) && Objects.equal(((IMethod) it_1).getElementName(), "foo"))); + return Boolean.valueOf(((it_1 instanceof IMethod) && Objects.equals(((IMethod) it_1).getElementName(), "foo"))); }; Assert.assertTrue(IterableExtensions.exists(it, _function_2)); }; @@ -737,11 +737,11 @@ public void testBug387230() { final Procedure1> _function = (Iterable it) -> { Assert.assertEquals(2, IterableExtensions.size(it)); final Function1 _function_1 = (IJavaElement it_1) -> { - return Boolean.valueOf(((it_1 instanceof IType) && Objects.equal(((IType) it_1).getElementName(), "Xtend"))); + return Boolean.valueOf(((it_1 instanceof IType) && Objects.equals(((IType) it_1).getElementName(), "Xtend"))); }; Assert.assertTrue(IterableExtensions.exists(it, _function_1)); final Function1 _function_2 = (IJavaElement it_1) -> { - return Boolean.valueOf(((it_1 instanceof IMethod) && Objects.equal(((IMethod) it_1).getElementName(), "Xtend"))); + return Boolean.valueOf(((it_1 instanceof IMethod) && Objects.equals(((IMethod) it_1).getElementName(), "Xtend"))); }; Assert.assertTrue(IterableExtensions.exists(it, _function_2)); }; diff --git a/org.eclipse.xtend.ide.tests/xtend-gen/org/eclipse/xtend/ide/tests/macros/AbstractReusableActiveAnnotationTests.java b/org.eclipse.xtend.ide.tests/xtend-gen/org/eclipse/xtend/ide/tests/macros/AbstractReusableActiveAnnotationTests.java index cbc3ecaf776..ff0c3ec7b14 100644 --- a/org.eclipse.xtend.ide.tests/xtend-gen/org/eclipse/xtend/ide/tests/macros/AbstractReusableActiveAnnotationTests.java +++ b/org.eclipse.xtend.ide.tests/xtend-gen/org/eclipse/xtend/ide/tests/macros/AbstractReusableActiveAnnotationTests.java @@ -8,11 +8,11 @@ */ package org.eclipse.xtend.ide.tests.macros; -import com.google.common.base.Objects; import com.google.common.collect.Iterables; import com.google.inject.Inject; import java.util.Collections; import java.util.List; +import java.util.Objects; import java.util.Set; import java.util.function.Consumer; import org.eclipse.emf.ecore.EObject; @@ -4860,7 +4860,7 @@ public void testCreateTypeFromUsage() { Pair _mappedTo_1 = Pair.of("myusercode/UserCode.xtend", _builder_1.toString()); final Procedure1 _function = (CompilationUnitImpl it) -> { String _simpleName = it.getTypeLookup().findClass("myusercode.DoesNotExist").getSimpleName(); - boolean _equals = Objects.equal(_simpleName, "DoesNotExist"); + boolean _equals = Objects.equals(_simpleName, "DoesNotExist"); Assert.assertTrue(_equals); }; this.assertProcessing(_mappedTo, _mappedTo_1, _function); @@ -6273,7 +6273,7 @@ public void testMoveExpressionToTypeParameterDeclarator() { } public void assertSameType(final TypeReference first, final TypeReference second) { - boolean _notEquals = (!Objects.equal(first, second)); + boolean _notEquals = (!Objects.equals(first, second)); if (_notEquals) { StringConcatenation _builder = new StringConcatenation(); _builder.append(first); diff --git a/org.eclipse.xtend.ide.tests/xtend-gen/org/eclipse/xtend/ide/tests/macros/ActiveAnnotationsProcessingInIDETest.java b/org.eclipse.xtend.ide.tests/xtend-gen/org/eclipse/xtend/ide/tests/macros/ActiveAnnotationsProcessingInIDETest.java index c9cb581d27b..099175304ef 100644 --- a/org.eclipse.xtend.ide.tests/xtend-gen/org/eclipse/xtend/ide/tests/macros/ActiveAnnotationsProcessingInIDETest.java +++ b/org.eclipse.xtend.ide.tests/xtend-gen/org/eclipse/xtend/ide/tests/macros/ActiveAnnotationsProcessingInIDETest.java @@ -8,11 +8,11 @@ */ package org.eclipse.xtend.ide.tests.macros; -import com.google.common.base.Objects; import com.google.common.collect.Iterables; import com.google.inject.Inject; import com.google.inject.Provider; import java.nio.charset.StandardCharsets; +import java.util.Objects; import org.eclipse.core.resources.IContainer; import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IFolder; @@ -224,7 +224,7 @@ public void tearDown() throws Exception { this.workbenchTestHelper.closeAllEditors(false); this.clientFile.delete(true, null); this.macroFile.delete(true, null); - boolean _notEquals = (!Objects.equal("myannotation", this.exportedPackage)); + boolean _notEquals = (!Objects.equals("myannotation", this.exportedPackage)); if (_notEquals) { boolean _removeExportedPackages = WorkbenchTestHelper.removeExportedPackages(ActiveAnnotationsProcessingInIDETest.macroProject.getProject(), this.exportedPackage); if (_removeExportedPackages) { diff --git a/org.eclipse.xtend.ide.tests/xtend-gen/org/eclipse/xtend/ide/tests/quickfix/QuickfixTestBuilder.java b/org.eclipse.xtend.ide.tests/xtend-gen/org/eclipse/xtend/ide/tests/quickfix/QuickfixTestBuilder.java index 4b51537c1d3..9999f6b2ff6 100644 --- a/org.eclipse.xtend.ide.tests/xtend-gen/org/eclipse/xtend/ide/tests/quickfix/QuickfixTestBuilder.java +++ b/org.eclipse.xtend.ide.tests/xtend-gen/org/eclipse/xtend/ide/tests/quickfix/QuickfixTestBuilder.java @@ -8,10 +8,10 @@ */ package org.eclipse.xtend.ide.tests.quickfix; -import com.google.common.base.Objects; import com.google.common.collect.Iterables; import com.google.inject.Inject; import java.util.List; +import java.util.Objects; import java.util.Set; import java.util.function.Consumer; import java.util.regex.Pattern; @@ -149,7 +149,7 @@ public QuickfixTestBuilder assertFeatureCallLinkingIssue() { QuickfixTestBuilder _xblockexpression = null; { final Function1 _function = (Issue it) -> { - return Boolean.valueOf((Objects.equal(it.getCode(), Diagnostic.LINKING_DIAGNOSTIC) && + return Boolean.valueOf((Objects.equals(it.getCode(), Diagnostic.LINKING_DIAGNOSTIC) && ArrayExtensions.contains(it.getData(), UnresolvedFeatureCallTypeAwareMessageProvider.FEATURE_CALL))); }; Assert.assertTrue(IterableExtensions.exists(this.getIssuesAtCaret(), _function)); @@ -162,7 +162,7 @@ public QuickfixTestBuilder assertTypeLiteralLinkingIssue() { QuickfixTestBuilder _xblockexpression = null; { final Function1 _function = (Issue it) -> { - return Boolean.valueOf((Objects.equal(it.getCode(), Diagnostic.LINKING_DIAGNOSTIC) && + return Boolean.valueOf((Objects.equals(it.getCode(), Diagnostic.LINKING_DIAGNOSTIC) && ArrayExtensions.contains(it.getData(), UnresolvedFeatureCallTypeAwareMessageProvider.TYPE_LITERAL))); }; Assert.assertTrue(IterableExtensions.exists(this.getIssuesAtCaret(), _function)); @@ -258,7 +258,7 @@ public QuickfixTestBuilder assertModelAfterQuickfix(final String label, final Ch final String originalModel = this.editor.getDocument().get(); final Function1 _function_1 = (IssueResolution it) -> { String _label = it.getLabel(); - return Boolean.valueOf(Objects.equal(_label, label)); + return Boolean.valueOf(Objects.equals(_label, label)); }; final IssueResolution matchingResolution = IterableExtensions.findFirst(resolutions, _function_1); final Function1 _function_2 = (IssueResolution it) -> { diff --git a/org.eclipse.xtend.ide.tests/xtend-gen/org/eclipse/xtend/ide/tests/refactoring/DependentElementsCalculatorTests.java b/org.eclipse.xtend.ide.tests/xtend-gen/org/eclipse/xtend/ide/tests/refactoring/DependentElementsCalculatorTests.java index da769bbd52c..cd5cad03f13 100644 --- a/org.eclipse.xtend.ide.tests/xtend-gen/org/eclipse/xtend/ide/tests/refactoring/DependentElementsCalculatorTests.java +++ b/org.eclipse.xtend.ide.tests/xtend-gen/org/eclipse/xtend/ide/tests/refactoring/DependentElementsCalculatorTests.java @@ -8,9 +8,9 @@ */ package org.eclipse.xtend.ide.tests.refactoring; -import com.google.common.base.Objects; import com.google.common.collect.Iterables; import com.google.inject.Inject; +import java.util.Objects; import java.util.function.Consumer; import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.emf.common.util.EList; @@ -81,7 +81,7 @@ public void testDependentElements() { final Consumer _function = (EObject it) -> { final Function1 _function_1 = (URI element) -> { URI _uRI = EcoreUtil.getURI(it); - return Boolean.valueOf(Objects.equal(element, _uRI)); + return Boolean.valueOf(Objects.equals(element, _uRI)); }; Assert.assertTrue(it.toString(), IterableExtensions.exists(dependentElementURIs, _function_1)); }; @@ -127,7 +127,7 @@ public void testPolymorphicDispatch() { final Consumer _function_1 = (EObject it) -> { final Function1 _function_2 = (URI element) -> { URI _uRI = EcoreUtil.getURI(it); - return Boolean.valueOf(Objects.equal(element, _uRI)); + return Boolean.valueOf(Objects.equals(element, _uRI)); }; Assert.assertTrue(it.toString(), IterableExtensions.exists(dependentElementURIs, _function_2)); }; diff --git a/org.eclipse.xtend.ide.tests/xtend-gen/org/eclipse/xtend/ide/tests/validation/UniqueClassNameValidatorUITest.java b/org.eclipse.xtend.ide.tests/xtend-gen/org/eclipse/xtend/ide/tests/validation/UniqueClassNameValidatorUITest.java index 0200fa868dd..9469d47fe2f 100644 --- a/org.eclipse.xtend.ide.tests/xtend-gen/org/eclipse/xtend/ide/tests/validation/UniqueClassNameValidatorUITest.java +++ b/org.eclipse.xtend.ide.tests/xtend-gen/org/eclipse/xtend/ide/tests/validation/UniqueClassNameValidatorUITest.java @@ -8,8 +8,8 @@ */ package org.eclipse.xtend.ide.tests.validation; -import com.google.common.base.Objects; import java.util.Map; +import java.util.Objects; import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IMarker; import org.eclipse.core.resources.IProject; @@ -219,7 +219,7 @@ public Iterable onlyErrors(final Iterable markers) { final Function1 _function = (IMarker it) -> { try { Object _attribute = it.getAttribute(IMarker.SEVERITY); - return Boolean.valueOf(Objects.equal(Integer.valueOf(IMarker.SEVERITY_ERROR), _attribute)); + return Boolean.valueOf(Objects.equals(Integer.valueOf(IMarker.SEVERITY_ERROR), _attribute)); } catch (Throwable _e) { throw Exceptions.sneakyThrow(_e); } diff --git a/org.eclipse.xtend.ide.tests/xtend-gen/org/eclipse/xtend/ide/tests/validation/XtendUIValidationTests.java b/org.eclipse.xtend.ide.tests/xtend-gen/org/eclipse/xtend/ide/tests/validation/XtendUIValidationTests.java index cf5dd085aa4..2e12b39188c 100644 --- a/org.eclipse.xtend.ide.tests/xtend-gen/org/eclipse/xtend/ide/tests/validation/XtendUIValidationTests.java +++ b/org.eclipse.xtend.ide.tests/xtend-gen/org/eclipse/xtend/ide/tests/validation/XtendUIValidationTests.java @@ -8,9 +8,9 @@ */ package org.eclipse.xtend.ide.tests.validation; -import com.google.common.base.Objects; import com.google.common.collect.Iterables; import com.google.inject.Inject; +import java.util.Objects; import org.eclipse.jdt.core.IJavaProject; import org.eclipse.jdt.core.JavaCore; import org.eclipse.jface.preference.IPersistentPreferenceStore; @@ -459,7 +459,7 @@ public void testIssueCodeDelegation() { final IJavaProject javaProject = JavaCore.create(this.testHelper.getProject()); final String javaSeverity = javaProject.getOption(JavaCore.COMPILER_PB_FORBIDDEN_REFERENCE, true); try { - boolean _notEquals = (!Objects.equal(javaSeverity, "error")); + boolean _notEquals = (!Objects.equals(javaSeverity, "error")); if (_notEquals) { Assert.fail((("Wrong expectation Java compiler option \'" + JavaCore.COMPILER_PB_FORBIDDEN_REFERENCE) + "\' should be \'error\' by default")); } @@ -535,7 +535,7 @@ public void testJavaDocRefs_Delegation() throws Exception { final IJavaProject javaProject = JavaCore.create(this.testHelper.getProject()); final String javaSeverity = javaProject.getOption(JavaCore.COMPILER_PB_INVALID_JAVADOC, true); try { - boolean _notEquals = (!Objects.equal(javaSeverity, "ignore")); + boolean _notEquals = (!Objects.equals(javaSeverity, "ignore")); if (_notEquals) { Assert.fail((("Wrong expectation Java compiler option \'" + JavaCore.COMPILER_PB_INVALID_JAVADOC) + "\' should be \'ignore\' by default")); } diff --git a/org.eclipse.xtend.ide/xtend-gen/org/eclipse/xtend/ide/codebuilder/AbstractCodeBuilder.java b/org.eclipse.xtend.ide/xtend-gen/org/eclipse/xtend/ide/codebuilder/AbstractCodeBuilder.java index 9a19b4e2f65..07fba6b55e8 100644 --- a/org.eclipse.xtend.ide/xtend-gen/org/eclipse/xtend/ide/codebuilder/AbstractCodeBuilder.java +++ b/org.eclipse.xtend.ide/xtend-gen/org/eclipse/xtend/ide/codebuilder/AbstractCodeBuilder.java @@ -8,11 +8,11 @@ */ package org.eclipse.xtend.ide.codebuilder; -import com.google.common.base.Objects; import com.google.common.collect.Iterables; import com.google.inject.Inject; import java.util.Iterator; import java.util.List; +import java.util.Objects; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.resource.Resource; import org.eclipse.jdt.core.IJavaElement; @@ -81,24 +81,24 @@ public String getPreview() { protected ISourceAppender appendVisibility(final ISourceAppender appendable, final JvmVisibility visibility, final JvmVisibility skippableDefault) { String _switchResult = null; boolean _matched = false; - if (Objects.equal(visibility, skippableDefault)) { + if (Objects.equals(visibility, skippableDefault)) { _matched=true; _switchResult = ""; } if (!_matched) { - if (Objects.equal(visibility, JvmVisibility.PRIVATE)) { + if (Objects.equals(visibility, JvmVisibility.PRIVATE)) { _matched=true; _switchResult = "private "; } } if (!_matched) { - if (Objects.equal(visibility, JvmVisibility.PROTECTED)) { + if (Objects.equals(visibility, JvmVisibility.PROTECTED)) { _matched=true; _switchResult = "protected "; } } if (!_matched) { - if (Objects.equal(visibility, JvmVisibility.PUBLIC)) { + if (Objects.equals(visibility, JvmVisibility.PUBLIC)) { _matched=true; _switchResult = "public "; } @@ -111,7 +111,7 @@ protected ISourceAppender appendVisibility(final ISourceAppender appendable, fin protected T findByFragment(final XtextResource resource, final T object) { final Resource myResource = object.eResource(); - boolean _equals = Objects.equal(myResource, resource); + boolean _equals = Objects.equals(myResource, resource); if (_equals) { return object; } @@ -147,7 +147,7 @@ protected ISourceAppender appendTypeParameters(final ISourceAppender appendable, appendable.append(typeParameter.getName()); final Function1 _function = (JvmUpperBound it) -> { String _identifier = it.getTypeReference().getIdentifier(); - return Boolean.valueOf((!Objects.equal(_identifier, "java.lang.Object"))); + return Boolean.valueOf((!Objects.equals(_identifier, "java.lang.Object"))); }; final Iterable upperBounds = IterableExtensions.filter(Iterables.filter(typeParameter.getConstraints(), JvmUpperBound.class), _function); boolean _isEmpty = IterableExtensions.isEmpty(upperBounds); diff --git a/org.eclipse.xtend.ide/xtend-gen/org/eclipse/xtend/ide/codebuilder/InsertionOffsets.java b/org.eclipse.xtend.ide/xtend-gen/org/eclipse/xtend/ide/codebuilder/InsertionOffsets.java index e2af17b42d4..6e9cbf86963 100644 --- a/org.eclipse.xtend.ide/xtend-gen/org/eclipse/xtend/ide/codebuilder/InsertionOffsets.java +++ b/org.eclipse.xtend.ide/xtend-gen/org/eclipse/xtend/ide/codebuilder/InsertionOffsets.java @@ -8,8 +8,8 @@ */ package org.eclipse.xtend.ide.codebuilder; -import com.google.common.base.Objects; import com.google.common.collect.Iterables; +import java.util.Objects; import org.eclipse.emf.ecore.EObject; import org.eclipse.xtend.core.xtend.XtendConstructor; import org.eclipse.xtend.core.xtend.XtendField; @@ -92,7 +92,7 @@ protected int inEmpty(final XtendTypeDeclaration ownerType) { final ICompositeNode classNode = NodeModelUtils.findActualNodeFor(ownerType); final Function1 _function = (ILeafNode it) -> { String _text = it.getText(); - return Boolean.valueOf(Objects.equal(_text, "{")); + return Boolean.valueOf(Objects.equals(_text, "{")); }; final ILeafNode openingBraceNode = IterableExtensions.findFirst(classNode.getLeafNodes(), _function); int _xifexpression = (int) 0; diff --git a/org.eclipse.xtend.ide/xtend-gen/org/eclipse/xtend/ide/codebuilder/MemberFromSuperImplementor.java b/org.eclipse.xtend.ide/xtend-gen/org/eclipse/xtend/ide/codebuilder/MemberFromSuperImplementor.java index 7f93c5b9614..83841e6f3c7 100644 --- a/org.eclipse.xtend.ide/xtend-gen/org/eclipse/xtend/ide/codebuilder/MemberFromSuperImplementor.java +++ b/org.eclipse.xtend.ide/xtend-gen/org/eclipse/xtend/ide/codebuilder/MemberFromSuperImplementor.java @@ -8,10 +8,10 @@ */ package org.eclipse.xtend.ide.codebuilder; -import com.google.common.base.Objects; import com.google.inject.Inject; import java.util.ArrayList; import java.util.List; +import java.util.Objects; import java.util.function.Consumer; import org.eclipse.emf.common.util.EList; import org.eclipse.xtend.core.jvmmodel.IXtendJvmAssociations; @@ -142,7 +142,7 @@ private Procedure1 getImplementedInterface(final JvmDec if (((superInterface instanceof JvmGenericType) && ((JvmGenericType) superInterface).isInterface())) { final Function1 _function = (JvmTypeReference it) -> { JvmType _type = it.getType(); - return Boolean.valueOf(Objects.equal(_type, superInterface)); + return Boolean.valueOf(Objects.equals(_type, superInterface)); }; boolean _exists = IterableExtensions.exists(subType.getSuperTypes(), _function); if (_exists) { diff --git a/org.eclipse.xtend.ide/xtend-gen/org/eclipse/xtend/ide/codebuilder/XtendAnnotationBuilder.java b/org.eclipse.xtend.ide/xtend-gen/org/eclipse/xtend/ide/codebuilder/XtendAnnotationBuilder.java index 41cadde83d8..6e52b671406 100644 --- a/org.eclipse.xtend.ide/xtend-gen/org/eclipse/xtend/ide/codebuilder/XtendAnnotationBuilder.java +++ b/org.eclipse.xtend.ide/xtend-gen/org/eclipse/xtend/ide/codebuilder/XtendAnnotationBuilder.java @@ -8,8 +8,8 @@ */ package org.eclipse.xtend.ide.codebuilder; -import com.google.common.base.Objects; import com.google.inject.Inject; +import java.util.Objects; import org.eclipse.xtend.core.xtend.XtendTypeDeclaration; import org.eclipse.xtend.ide.codebuilder.ICodeBuilder; import org.eclipse.xtext.common.types.JvmVisibility; @@ -28,7 +28,7 @@ public class XtendAnnotationBuilder extends AbstractAnnotationBuilder implements @Override public boolean isValid() { - return ((super.isValid() && (this.getAnnotationName() != null)) && Objects.equal(this.getVisibility(), JvmVisibility.PUBLIC)); + return ((super.isValid() && (this.getAnnotationName() != null)) && Objects.equals(this.getVisibility(), JvmVisibility.PUBLIC)); } @Override diff --git a/org.eclipse.xtend.ide/xtend-gen/org/eclipse/xtend/ide/codebuilder/XtendClassBuilder.java b/org.eclipse.xtend.ide/xtend-gen/org/eclipse/xtend/ide/codebuilder/XtendClassBuilder.java index d3afe92f119..a596daa13be 100644 --- a/org.eclipse.xtend.ide/xtend-gen/org/eclipse/xtend/ide/codebuilder/XtendClassBuilder.java +++ b/org.eclipse.xtend.ide/xtend-gen/org/eclipse/xtend/ide/codebuilder/XtendClassBuilder.java @@ -8,8 +8,8 @@ */ package org.eclipse.xtend.ide.codebuilder; -import com.google.common.base.Objects; import com.google.inject.Inject; +import java.util.Objects; import org.eclipse.xtend.core.xtend.XtendTypeDeclaration; import org.eclipse.xtend.ide.codebuilder.ICodeBuilder; import org.eclipse.xtext.common.types.JvmVisibility; @@ -28,7 +28,7 @@ public class XtendClassBuilder extends AbstractClassBuilder implements ICodeBuil @Override public boolean isValid() { - return ((super.isValid() && (this.getClassName() != null)) && Objects.equal(this.getVisibility(), JvmVisibility.PUBLIC)); + return ((super.isValid() && (this.getClassName() != null)) && Objects.equals(this.getVisibility(), JvmVisibility.PUBLIC)); } @Override diff --git a/org.eclipse.xtend.ide/xtend-gen/org/eclipse/xtend/ide/codebuilder/XtendInterfaceBuilder.java b/org.eclipse.xtend.ide/xtend-gen/org/eclipse/xtend/ide/codebuilder/XtendInterfaceBuilder.java index 4ca5cfd117b..0c05e78d709 100644 --- a/org.eclipse.xtend.ide/xtend-gen/org/eclipse/xtend/ide/codebuilder/XtendInterfaceBuilder.java +++ b/org.eclipse.xtend.ide/xtend-gen/org/eclipse/xtend/ide/codebuilder/XtendInterfaceBuilder.java @@ -8,8 +8,8 @@ */ package org.eclipse.xtend.ide.codebuilder; -import com.google.common.base.Objects; import com.google.inject.Inject; +import java.util.Objects; import org.eclipse.xtend.core.xtend.XtendTypeDeclaration; import org.eclipse.xtend.ide.codebuilder.ICodeBuilder; import org.eclipse.xtext.common.types.JvmVisibility; @@ -28,7 +28,7 @@ public class XtendInterfaceBuilder extends AbstractInterfaceBuilder implements I @Override public boolean isValid() { - return ((super.isValid() && (this.getInterfaceName() != null)) && Objects.equal(this.getVisibility(), JvmVisibility.PUBLIC)); + return ((super.isValid() && (this.getInterfaceName() != null)) && Objects.equals(this.getVisibility(), JvmVisibility.PUBLIC)); } @Override diff --git a/org.eclipse.xtend.ide/xtend-gen/org/eclipse/xtend/ide/codetemplates/ui/highlighting/FlexerBasedTemplateBodyHighlighter.java b/org.eclipse.xtend.ide/xtend-gen/org/eclipse/xtend/ide/codetemplates/ui/highlighting/FlexerBasedTemplateBodyHighlighter.java index a8f89b6a87a..5639829ca0f 100644 --- a/org.eclipse.xtend.ide/xtend-gen/org/eclipse/xtend/ide/codetemplates/ui/highlighting/FlexerBasedTemplateBodyHighlighter.java +++ b/org.eclipse.xtend.ide/xtend-gen/org/eclipse/xtend/ide/codetemplates/ui/highlighting/FlexerBasedTemplateBodyHighlighter.java @@ -8,9 +8,9 @@ */ package org.eclipse.xtend.ide.codetemplates.ui.highlighting; -import com.google.common.base.Objects; import com.google.inject.Inject; import java.io.StringReader; +import java.util.Objects; import org.antlr.runtime.Token; import org.eclipse.xtend.core.parser.antlr.internal.FlexTokenSource; import org.eclipse.xtend.core.parser.antlr.internal.FlexerFactory; @@ -38,7 +38,7 @@ public void doProvideHighlightingFor(final String body, final IHighlightedPositi StringReader _stringReader = new StringReader(body); final FlexTokenSource tokenSource = this._flexerFactory.createTokenSource(_stringReader); Token token = tokenSource.nextToken(); - while ((!Objects.equal(token, Token.EOF_TOKEN))) { + while ((!Objects.equals(token, Token.EOF_TOKEN))) { { final String id = this._abstractAntlrTokenToAttributeIdMapper.getId(token.getType()); final int offset = TokenTool.getOffset(token); diff --git a/org.eclipse.xtend.ide/xtend-gen/org/eclipse/xtend/ide/contentassist/XtendImportingTypesProposalProvider.java b/org.eclipse.xtend.ide/xtend-gen/org/eclipse/xtend/ide/contentassist/XtendImportingTypesProposalProvider.java index 71536078b8f..1e5efd3217c 100644 --- a/org.eclipse.xtend.ide/xtend-gen/org/eclipse/xtend/ide/contentassist/XtendImportingTypesProposalProvider.java +++ b/org.eclipse.xtend.ide/xtend-gen/org/eclipse/xtend/ide/contentassist/XtendImportingTypesProposalProvider.java @@ -8,8 +8,8 @@ */ package org.eclipse.xtend.ide.contentassist; -import com.google.common.base.Objects; import com.google.common.base.Predicate; +import java.util.Objects; import org.eclipse.xtend.core.scoping.XtendImportedNamespaceScopeProvider; import org.eclipse.xtext.conversion.IValueConverter; import org.eclipse.xtext.naming.IQualifiedNameConverter; @@ -30,7 +30,7 @@ public class XtendImportingTypesProposalProvider extends ImportingTypesProposalP protected ConfigurableCompletionProposal.IReplacementTextApplier createTextApplier(final ContentAssistContext context, final IScope typeScope, final IQualifiedNameConverter qualifiedNameConverter, final IValueConverter valueConverter) { final Predicate _function = (IEObjectDescription it) -> { QualifiedName _name = it.getName(); - return (!Objects.equal(_name, XtendImportedNamespaceScopeProvider.OLD_DATA_ANNOTATION)); + return (!Objects.equals(_name, XtendImportedNamespaceScopeProvider.OLD_DATA_ANNOTATION)); }; final FilteringScope scope = new FilteringScope(typeScope, _function); return super.createTextApplier(context, scope, qualifiedNameConverter, valueConverter); diff --git a/org.eclipse.xtend.ide/xtend-gen/org/eclipse/xtend/ide/macro/JdtBasedProcessorProvider.java b/org.eclipse.xtend.ide/xtend-gen/org/eclipse/xtend/ide/macro/JdtBasedProcessorProvider.java index 5e7a1500b65..1b9c801d8e9 100644 --- a/org.eclipse.xtend.ide/xtend-gen/org/eclipse/xtend/ide/macro/JdtBasedProcessorProvider.java +++ b/org.eclipse.xtend.ide/xtend-gen/org/eclipse/xtend/ide/macro/JdtBasedProcessorProvider.java @@ -8,11 +8,11 @@ */ package org.eclipse.xtend.ide.macro; -import com.google.common.base.Objects; import com.google.common.collect.Iterables; import java.net.URL; import java.net.URLClassLoader; import java.util.LinkedHashSet; +import java.util.Objects; import java.util.Set; import org.apache.log4j.Logger; import org.eclipse.core.filesystem.EFS; @@ -182,7 +182,7 @@ protected void collectClasspathURLs(final IJavaProject projectToUse, final Linke if (locationUri!=null) { _scheme=locationUri.getScheme(); } - boolean _equals = Objects.equal(EFS.SCHEME_FILE, _scheme); + boolean _equals = Objects.equals(EFS.SCHEME_FILE, _scheme); if (_equals) { java.net.URI _rawLocationURI = library.getRawLocationURI(); URL _uRL_1 = null; diff --git a/org.eclipse.xtend.ide/xtend-gen/org/eclipse/xtend/ide/outline/EclipseXtendOutlineSourceContext.java b/org.eclipse.xtend.ide/xtend-gen/org/eclipse/xtend/ide/outline/EclipseXtendOutlineSourceContext.java index 12665e9b1e7..db7448ab119 100644 --- a/org.eclipse.xtend.ide/xtend-gen/org/eclipse/xtend/ide/outline/EclipseXtendOutlineSourceContext.java +++ b/org.eclipse.xtend.ide/xtend-gen/org/eclipse/xtend/ide/outline/EclipseXtendOutlineSourceContext.java @@ -8,10 +8,10 @@ */ package org.eclipse.xtend.ide.outline; -import com.google.common.base.Objects; import com.google.common.collect.Iterables; import com.google.inject.Inject; import com.google.inject.Provider; +import java.util.Objects; import org.eclipse.emf.ecore.EObject; import org.eclipse.xtend.core.jvmmodel.IXtendJvmAssociations; import org.eclipse.xtend.core.jvmmodel.XtendJvmModelInferrer; @@ -54,7 +54,7 @@ protected void markCreateExtensionJvmFeaturesAsProcessed(final JvmMember member) boolean _tripleNotEquals = (_createExtensionInfo != null); if (_tripleNotEquals) { final Function1 _function = (JvmFeature it) -> { - return Boolean.valueOf((!Objects.equal(it, member))); + return Boolean.valueOf((!Objects.equals(it, member))); }; final Function1 _function_1 = (JvmFeature it) -> { return Boolean.valueOf((it.getSimpleName().startsWith(XtendJvmModelInferrer.CREATE_CHACHE_VARIABLE_PREFIX) || diff --git a/org.eclipse.xtend.ide/xtend-gen/org/eclipse/xtend/ide/refactoring/importer/AbstractStaticMethodImporter.java b/org.eclipse.xtend.ide/xtend-gen/org/eclipse/xtend/ide/refactoring/importer/AbstractStaticMethodImporter.java index 872ebb98ffd..4deacb0cc02 100644 --- a/org.eclipse.xtend.ide/xtend-gen/org/eclipse/xtend/ide/refactoring/importer/AbstractStaticMethodImporter.java +++ b/org.eclipse.xtend.ide/xtend-gen/org/eclipse/xtend/ide/refactoring/importer/AbstractStaticMethodImporter.java @@ -8,10 +8,10 @@ */ package org.eclipse.xtend.ide.refactoring.importer; -import com.google.common.base.Objects; import com.google.common.collect.Iterators; import com.google.inject.Inject; import java.util.List; +import java.util.Objects; import java.util.function.Consumer; import org.eclipse.emf.ecore.EObject; import org.eclipse.jface.text.DocumentRewriteSession; @@ -120,7 +120,7 @@ public boolean importStaticMethod(final IXtextDocument document, final ITextSele if ((call.isStatic() && (!call.isExtension()))) { final Pair toImport = this.computeImport(call); final Function1 _function_1 = (XMemberFeatureCall it) -> { - return Boolean.valueOf((Objects.equal(call.getFeature(), it.getFeature()) && (!it.isExtension()))); + return Boolean.valueOf((Objects.equals(call.getFeature(), it.getFeature()) && (!it.isExtension()))); }; final Function1 _function_2 = (XMemberFeatureCall it) -> { return Boolean.valueOf((it != call)); diff --git a/org.eclipse.xtend.ide/xtend-gen/org/eclipse/xtend/ide/refactoring/importer/StaticMethodImporter.java b/org.eclipse.xtend.ide/xtend-gen/org/eclipse/xtend/ide/refactoring/importer/StaticMethodImporter.java index c185bc1de26..396bf891cb0 100644 --- a/org.eclipse.xtend.ide/xtend-gen/org/eclipse/xtend/ide/refactoring/importer/StaticMethodImporter.java +++ b/org.eclipse.xtend.ide/xtend-gen/org/eclipse/xtend/ide/refactoring/importer/StaticMethodImporter.java @@ -8,7 +8,7 @@ */ package org.eclipse.xtend.ide.refactoring.importer; -import com.google.common.base.Objects; +import java.util.Objects; import org.eclipse.xtext.nodemodel.ICompositeNode; import org.eclipse.xtext.nodemodel.INode; import org.eclipse.xtext.nodemodel.util.NodeModelUtils; @@ -55,8 +55,8 @@ private INode findDot(final INode node) { INode sibling = node; while (sibling.hasNextSibling()) { { - if ((Objects.equal(sibling.getGrammarElement(), this.grammar.getXMemberFeatureCallAccess().getFullStopKeyword_1_1_0_0_1_0()) || - Objects.equal(sibling.getGrammarElement(), + if ((Objects.equals(sibling.getGrammarElement(), this.grammar.getXMemberFeatureCallAccess().getFullStopKeyword_1_1_0_0_1_0()) || + Objects.equals(sibling.getGrammarElement(), this.grammar.getXMemberFeatureCallAccess().getExplicitStaticColonColonKeyword_1_1_0_0_1_2_0()))) { return sibling; } diff --git a/org.eclipse.xtend.lib/xtend-gen/org/eclipse/xtend/lib/annotations/AccessorsProcessor.java b/org.eclipse.xtend.lib/xtend-gen/org/eclipse/xtend/lib/annotations/AccessorsProcessor.java index 54406839886..f33514ee972 100644 --- a/org.eclipse.xtend.lib/xtend-gen/org/eclipse/xtend/lib/annotations/AccessorsProcessor.java +++ b/org.eclipse.xtend.lib/xtend-gen/org/eclipse/xtend/lib/annotations/AccessorsProcessor.java @@ -9,11 +9,11 @@ package org.eclipse.xtend.lib.annotations; import com.google.common.annotations.Beta; -import com.google.common.base.Objects; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List; +import java.util.Objects; import java.util.function.Consumer; import org.eclipse.xtend.lib.annotations.FinalFieldsConstructorProcessor; import org.eclipse.xtend.lib.macro.TransformationContext; @@ -192,7 +192,7 @@ public List getPossibleGetterNames(final FieldDeclaration it) { } public boolean isBooleanType(final TypeReference it) { - return ((!it.isInferred()) && Objects.equal(it, this.context.getPrimitiveBoolean())); + return ((!it.isInferred()) && Objects.equals(it, this.context.getPrimitiveBoolean())); } public void addGetter(final MutableFieldDeclaration field, final Visibility visibility) { diff --git a/org.eclipse.xtend.lib/xtend-gen/org/eclipse/xtend/lib/annotations/DelegateProcessor.java b/org.eclipse.xtend.lib/xtend-gen/org/eclipse/xtend/lib/annotations/DelegateProcessor.java index 572e320f066..065151cff27 100644 --- a/org.eclipse.xtend.lib/xtend-gen/org/eclipse/xtend/lib/annotations/DelegateProcessor.java +++ b/org.eclipse.xtend.lib/xtend-gen/org/eclipse/xtend/lib/annotations/DelegateProcessor.java @@ -9,7 +9,6 @@ package org.eclipse.xtend.lib.annotations; import com.google.common.annotations.Beta; -import com.google.common.base.Objects; import com.google.common.collect.Iterables; import com.google.common.collect.Sets; import java.util.Arrays; @@ -18,6 +17,7 @@ import java.util.LinkedHashSet; import java.util.List; import java.util.Map; +import java.util.Objects; import java.util.Set; import java.util.function.Consumer; import org.eclipse.xtend.lib.macro.TransformationContext; @@ -108,12 +108,12 @@ public boolean hasValidSignature(final MethodDeclaration it) { }; List _list = IterableExtensions.toList(IterableExtensions.map(it.getParameters(), _function)); boolean _matched = false; - if (Objects.equal(_list, Collections.unmodifiableList(CollectionLiterals.newArrayList()))) { + if (Objects.equals(_list, Collections.unmodifiableList(CollectionLiterals.newArrayList()))) { _matched=true; } if (!_matched) { TypeReference _string = this.context.getString(); - if (Objects.equal(_list, Collections.unmodifiableList(CollectionLiterals.newArrayList(_string)))) { + if (Objects.equals(_list, Collections.unmodifiableList(CollectionLiterals.newArrayList(_string)))) { _matched=true; } } @@ -121,7 +121,7 @@ public boolean hasValidSignature(final MethodDeclaration it) { TypeReference _string_1 = this.context.getString(); TypeReference _newArrayTypeReference = this.context.newArrayTypeReference(this.context.newTypeReference(Class.class, this.context.newWildcardTypeReference())); TypeReference _newArrayTypeReference_1 = this.context.newArrayTypeReference(this.context.getObject()); - if (Objects.equal(_list, Collections.unmodifiableList(CollectionLiterals.newArrayList(_string_1, _newArrayTypeReference, _newArrayTypeReference_1)))) { + if (Objects.equals(_list, Collections.unmodifiableList(CollectionLiterals.newArrayList(_string_1, _newArrayTypeReference, _newArrayTypeReference_1)))) { _matched=true; } } @@ -171,7 +171,7 @@ public boolean hasDelegationConflicts(final MemberDeclaration delegate) { public Iterable otherDelegates(final MemberDeclaration delegate) { final Function1 _function = (MemberDeclaration it) -> { - return Boolean.valueOf((!Objects.equal(it, delegate))); + return Boolean.valueOf((!Objects.equals(it, delegate))); }; return IterableExtensions.filter(this.getDelegates(delegate.getDeclaringType()), _function); } @@ -189,7 +189,7 @@ public boolean areListedInterfacesValid(final MemberDeclaration delegate) { final Function1 _function = (TypeReference it) -> { Type _type = it.getType(); Type _type_1 = iface.getType(); - return Boolean.valueOf(Objects.equal(_type, _type_1)); + return Boolean.valueOf(Objects.equals(_type, _type_1)); }; boolean _exists = IterableExtensions.exists(availableInterfaces, _function); boolean _not = (!_exists); @@ -206,7 +206,7 @@ public boolean areListedInterfacesValid(final MemberDeclaration delegate) { final Function1 _function_1 = (TypeReference it) -> { Type _type = it.getType(); Type _type_1 = iface.getType(); - return Boolean.valueOf(Objects.equal(_type, _type_1)); + return Boolean.valueOf(Objects.equals(_type, _type_1)); }; boolean _exists_1 = IterableExtensions.exists(interfacesOfDeclaringType, _function_1); boolean _not_1 = (!_exists_1); @@ -331,7 +331,7 @@ public boolean isObjectMethod(final ResolvedMethod it) { return it_1.getResolvedType(); }; final List parameterTypes = IterableExtensions.toList(IterableExtensions.map(it.getResolvedParameters(), _function)); - _xblockexpression = (((((Objects.equal(name, "hashCode") && parameterTypes.isEmpty()) || (Objects.equal(name, "toString") && parameterTypes.isEmpty())) || (Objects.equal(name, "equals") && Objects.equal(parameterTypes, Collections.unmodifiableList(CollectionLiterals.newArrayList(this.context.getObject()))))) || (Objects.equal(name, "finalize") && parameterTypes.isEmpty())) || (Objects.equal(name, "clone") && parameterTypes.isEmpty())); + _xblockexpression = (((((Objects.equals(name, "hashCode") && parameterTypes.isEmpty()) || (Objects.equals(name, "toString") && parameterTypes.isEmpty())) || (Objects.equals(name, "equals") && Objects.equals(parameterTypes, Collections.unmodifiableList(CollectionLiterals.newArrayList(this.context.getObject()))))) || (Objects.equals(name, "finalize") && parameterTypes.isEmpty())) || (Objects.equals(name, "clone") && parameterTypes.isEmpty())); } return _xblockexpression; } @@ -402,7 +402,7 @@ public TypeReference replace(final TypeReference target, final Map _list = IterableExtensions.toList(IterableExtensions.map(it.getParameters(), _function)); boolean _matched = false; - if (Objects.equal(_list, Collections.unmodifiableList(CollectionLiterals.newArrayList()))) { + if (Objects.equals(_list, Collections.unmodifiableList(CollectionLiterals.newArrayList()))) { _matched=true; StringConcatenation _builder = new StringConcatenation(); _builder.append("this."); @@ -462,7 +462,7 @@ protected CharSequence _delegateAccess(final MethodDeclaration it, final MethodD } if (!_matched) { TypeReference _string = this.context.getString(); - if (Objects.equal(_list, Collections.unmodifiableList(CollectionLiterals.newArrayList(_string)))) { + if (Objects.equals(_list, Collections.unmodifiableList(CollectionLiterals.newArrayList(_string)))) { _matched=true; StringConcatenation _builder_1 = new StringConcatenation(); _builder_1.append("this."); @@ -479,7 +479,7 @@ protected CharSequence _delegateAccess(final MethodDeclaration it, final MethodD TypeReference _string_1 = this.context.getString(); TypeReference _newArrayTypeReference = this.context.newArrayTypeReference(this.context.newTypeReference(Class.class, this.context.newWildcardTypeReference())); TypeReference _newArrayTypeReference_1 = this.context.newArrayTypeReference(this.context.getObject()); - if (Objects.equal(_list, Collections.unmodifiableList(CollectionLiterals.newArrayList(_string_1, _newArrayTypeReference, _newArrayTypeReference_1)))) { + if (Objects.equals(_list, Collections.unmodifiableList(CollectionLiterals.newArrayList(_string_1, _newArrayTypeReference, _newArrayTypeReference_1)))) { _matched=true; StringConcatenation _builder_2 = new StringConcatenation(); _builder_2.append("this."); diff --git a/org.eclipse.xtend.lib/xtend-gen/org/eclipse/xtend/lib/annotations/EqualsHashCodeProcessor.java b/org.eclipse.xtend.lib/xtend-gen/org/eclipse/xtend/lib/annotations/EqualsHashCodeProcessor.java index a214e6504a5..cb88928e984 100644 --- a/org.eclipse.xtend.lib/xtend-gen/org/eclipse/xtend/lib/annotations/EqualsHashCodeProcessor.java +++ b/org.eclipse.xtend.lib/xtend-gen/org/eclipse/xtend/lib/annotations/EqualsHashCodeProcessor.java @@ -9,8 +9,8 @@ package org.eclipse.xtend.lib.annotations; import com.google.common.annotations.Beta; -import com.google.common.base.Objects; import java.util.Arrays; +import java.util.Objects; import org.eclipse.xtend.lib.macro.AbstractClassProcessor; import org.eclipse.xtend.lib.macro.TransformationContext; import org.eclipse.xtend.lib.macro.declaration.AnnotationReference; @@ -63,7 +63,7 @@ public boolean hasHashCode(final ClassDeclaration it) { public boolean hasEquals(final ClassDeclaration it) { final Function1 _function = (MethodDeclaration it_1) -> { - return Boolean.valueOf(((Objects.equal(it_1.getSimpleName(), "equals") && (IterableExtensions.size(it_1.getParameters()) == 1)) && Objects.equal(IterableExtensions.head(it_1.getParameters()).getType(), this.context.getObject()))); + return Boolean.valueOf(((Objects.equals(it_1.getSimpleName(), "equals") && (IterableExtensions.size(it_1.getParameters()) == 1)) && Objects.equals(IterableExtensions.head(it_1.getParameters()).getType(), this.context.getObject()))); }; return IterableExtensions.exists(it.getDeclaredMethods(), _function); } @@ -191,7 +191,7 @@ public StringConcatenationClient contributeToEquals(final FieldDeclaration it) { String _name = this.orObject(it.getType()).getName(); boolean _matched = false; String _name_1 = Double.TYPE.getName(); - if (Objects.equal(_name, _name_1)) { + if (Objects.equals(_name, _name_1)) { _matched=true; StringConcatenationClient _client = new StringConcatenationClient() { @Override @@ -217,7 +217,7 @@ protected void appendTo(StringConcatenationClient.TargetStringConcatenation _bui } if (!_matched) { String _name_2 = Float.TYPE.getName(); - if (Objects.equal(_name, _name_2)) { + if (Objects.equals(_name, _name_2)) { _matched=true; StringConcatenationClient _client_1 = new StringConcatenationClient() { @Override @@ -244,36 +244,36 @@ protected void appendTo(StringConcatenationClient.TargetStringConcatenation _bui } if (!_matched) { String _name_3 = Boolean.TYPE.getName(); - if (Objects.equal(_name, _name_3)) { + if (Objects.equals(_name, _name_3)) { _matched=true; } if (!_matched) { String _name_4 = Integer.TYPE.getName(); - if (Objects.equal(_name, _name_4)) { + if (Objects.equals(_name, _name_4)) { _matched=true; } } if (!_matched) { String _name_5 = Character.TYPE.getName(); - if (Objects.equal(_name, _name_5)) { + if (Objects.equals(_name, _name_5)) { _matched=true; } } if (!_matched) { String _name_6 = Byte.TYPE.getName(); - if (Objects.equal(_name, _name_6)) { + if (Objects.equals(_name, _name_6)) { _matched=true; } } if (!_matched) { String _name_7 = Short.TYPE.getName(); - if (Objects.equal(_name, _name_7)) { + if (Objects.equals(_name, _name_7)) { _matched=true; } } if (!_matched) { String _name_8 = Long.TYPE.getName(); - if (Objects.equal(_name, _name_8)) { + if (Objects.equals(_name, _name_8)) { _matched=true; } } @@ -461,7 +461,7 @@ public StringConcatenationClient contributeToHashCode(final FieldDeclaration it) String _name = this.orObject(it.getType()).getName(); boolean _matched = false; String _name_1 = Double.TYPE.getName(); - if (Objects.equal(_name, _name_1)) { + if (Objects.equals(_name, _name_1)) { _matched=true; StringConcatenationClient _client = new StringConcatenationClient() { @Override @@ -483,7 +483,7 @@ protected void appendTo(StringConcatenationClient.TargetStringConcatenation _bui } if (!_matched) { String _name_2 = Float.TYPE.getName(); - if (Objects.equal(_name, _name_2)) { + if (Objects.equals(_name, _name_2)) { _matched=true; StringConcatenationClient _client_1 = new StringConcatenationClient() { @Override @@ -500,7 +500,7 @@ protected void appendTo(StringConcatenationClient.TargetStringConcatenation _bui } if (!_matched) { String _name_3 = Boolean.TYPE.getName(); - if (Objects.equal(_name, _name_3)) { + if (Objects.equals(_name, _name_3)) { _matched=true; StringConcatenationClient _client_2 = new StringConcatenationClient() { @Override @@ -516,24 +516,24 @@ protected void appendTo(StringConcatenationClient.TargetStringConcatenation _bui } if (!_matched) { String _name_4 = Integer.TYPE.getName(); - if (Objects.equal(_name, _name_4)) { + if (Objects.equals(_name, _name_4)) { _matched=true; } if (!_matched) { String _name_5 = Character.TYPE.getName(); - if (Objects.equal(_name, _name_5)) { + if (Objects.equals(_name, _name_5)) { _matched=true; } } if (!_matched) { String _name_6 = Byte.TYPE.getName(); - if (Objects.equal(_name, _name_6)) { + if (Objects.equals(_name, _name_6)) { _matched=true; } } if (!_matched) { String _name_7 = Short.TYPE.getName(); - if (Objects.equal(_name, _name_7)) { + if (Objects.equals(_name, _name_7)) { _matched=true; } } @@ -551,7 +551,7 @@ protected void appendTo(StringConcatenationClient.TargetStringConcatenation _bui } if (!_matched) { String _name_8 = Long.TYPE.getName(); - if (Objects.equal(_name, _name_8)) { + if (Objects.equals(_name, _name_8)) { _matched=true; StringConcatenationClient _client_4 = new StringConcatenationClient() { @Override diff --git a/org.eclipse.xtend.lib/xtend-gen/org/eclipse/xtend/lib/annotations/FinalFieldsConstructorProcessor.java b/org.eclipse.xtend.lib/xtend-gen/org/eclipse/xtend/lib/annotations/FinalFieldsConstructorProcessor.java index 6cceae4ed4d..770bec7cfaf 100644 --- a/org.eclipse.xtend.lib/xtend-gen/org/eclipse/xtend/lib/annotations/FinalFieldsConstructorProcessor.java +++ b/org.eclipse.xtend.lib/xtend-gen/org/eclipse/xtend/lib/annotations/FinalFieldsConstructorProcessor.java @@ -9,13 +9,13 @@ package org.eclipse.xtend.lib.annotations; import com.google.common.annotations.Beta; -import com.google.common.base.Objects; import com.google.common.collect.Iterables; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.HashMap; import java.util.List; +import java.util.Objects; import java.util.function.Consumer; import java.util.regex.Pattern; import org.eclipse.xtend.lib.macro.TransformationContext; @@ -82,7 +82,7 @@ public boolean hasFinalFieldsConstructor(final MutableTypeDeclaration cls) { return it_1.getType(); }; List _list = IterableExtensions.toList(IterableExtensions.map(it.getParameters(), _function_1)); - return Boolean.valueOf(Objects.equal(_list, expectedTypes)); + return Boolean.valueOf(Objects.equals(_list, expectedTypes)); }; _xblockexpression = IterableExtensions.exists(cls.getDeclaredConstructors(), _function); } @@ -220,7 +220,7 @@ protected void appendTo(StringConcatenationClient.TargetStringConcatenation _bui public ResolvedConstructor getSuperConstructor(final TypeDeclaration it) { if ((it instanceof ClassDeclaration)) { - if ((Objects.equal(((ClassDeclaration)it).getExtendedClass(), this.context.getObject()) || (((ClassDeclaration)it).getExtendedClass() == null))) { + if ((Objects.equals(((ClassDeclaration)it).getExtendedClass(), this.context.getObject()) || (((ClassDeclaration)it).getExtendedClass() == null))) { return null; } return IterableExtensions.head(((ClassDeclaration)it).getExtendedClass().getDeclaredResolvedConstructors()); diff --git a/org.eclipse.xtend.lib/xtend-gen/org/eclipse/xtend/lib/annotations/ToStringProcessor.java b/org.eclipse.xtend.lib/xtend-gen/org/eclipse/xtend/lib/annotations/ToStringProcessor.java index 7ea3e0cbef6..d499b043230 100644 --- a/org.eclipse.xtend.lib/xtend-gen/org/eclipse/xtend/lib/annotations/ToStringProcessor.java +++ b/org.eclipse.xtend.lib/xtend-gen/org/eclipse/xtend/lib/annotations/ToStringProcessor.java @@ -9,7 +9,7 @@ package org.eclipse.xtend.lib.annotations; import com.google.common.annotations.Beta; -import com.google.common.base.Objects; +import java.util.Objects; import org.eclipse.xtend.lib.macro.AbstractClassProcessor; import org.eclipse.xtend.lib.macro.TransformationContext; import org.eclipse.xtend.lib.macro.declaration.AnnotationReference; @@ -209,7 +209,7 @@ public void doTransform(final MutableClassDeclaration it, @Extension final Trans } else { TypeReference _extendedClass = it.getExtendedClass(); TypeReference _object = context.getObject(); - boolean _notEquals = (!Objects.equal(_extendedClass, _object)); + boolean _notEquals = (!Objects.equals(_extendedClass, _object)); if (_notEquals) { util.addReflectiveToString(it, configuration); } else { diff --git a/org.eclipse.xtext.purexbase.tests/src/org/eclipse/xtext/purexbase/tests/CompilerTest.java b/org.eclipse.xtext.purexbase.tests/src/org/eclipse/xtext/purexbase/tests/CompilerTest.java index 42365ac0751..cbe95f32b93 100644 --- a/org.eclipse.xtext.purexbase.tests/src/org/eclipse/xtext/purexbase/tests/CompilerTest.java +++ b/org.eclipse.xtext.purexbase.tests/src/org/eclipse/xtext/purexbase/tests/CompilerTest.java @@ -578,9 +578,9 @@ public void switchExpression() throws Exception { " })\n" + "// [a square : size=5, a circle : diameter=4, a rectangle : width=8 height=6] (List)\n"; String expectation = - "import com.google.common.base.Objects;\n" + "import java.util.ArrayList;\n" + "import java.util.List;\n" + + "import java.util.Objects;\n" + "import org.eclipse.xtext.purexbase.tests.data.Circle;\n" + "import org.eclipse.xtext.purexbase.tests.data.Rectangle;\n" + "import org.eclipse.xtext.purexbase.tests.data.Shape;\n" + @@ -597,12 +597,12 @@ public void switchExpression() throws Exception { " final ArrayList list = CollectionLiterals.newArrayList(\"foo\", \"bar\", \"baz\");\n" + " String _head = IterableExtensions.head(list);\n" + " boolean _matched = false;\n" + - " if (Objects.equal(_head, \"foo\")) {\n" + + " if (Objects.equals(_head, \"foo\")) {\n" + " _matched=true;\n" + " /* \"it\\'s foo\" */\n" + " }\n" + " if (!_matched) {\n" + - " if (Objects.equal(_head, \"bar\")) {\n" + + " if (Objects.equals(_head, \"bar\")) {\n" + " _matched=true;\n" + " /* \"a bar\" */\n" + " }\n" + diff --git a/org.eclipse.xtext.testing/xtend-gen/org/eclipse/xtext/testing/AbstractLanguageServerTest.java b/org.eclipse.xtext.testing/xtend-gen/org/eclipse/xtext/testing/AbstractLanguageServerTest.java index 41a6a1f64ee..e1f8d04c8c2 100644 --- a/org.eclipse.xtext.testing/xtend-gen/org/eclipse/xtext/testing/AbstractLanguageServerTest.java +++ b/org.eclipse.xtext.testing/xtend-gen/org/eclipse/xtext/testing/AbstractLanguageServerTest.java @@ -9,7 +9,6 @@ package org.eclipse.xtext.testing; import com.google.common.annotations.Beta; -import com.google.common.base.Objects; import com.google.common.collect.Iterables; import com.google.inject.Binder; import com.google.inject.Guice; @@ -26,6 +25,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Objects; import java.util.Set; import java.util.concurrent.CompletableFuture; import java.util.function.Consumer; @@ -724,7 +724,7 @@ protected String _toExpectation(final CompletionItem it) { } } } else { - if (((it.getInsertText() != null) && (!Objects.equal(it.getInsertText(), it.getLabel())))) { + if (((it.getInsertText() != null) && (!Objects.equals(it.getInsertText(), it.getLabel())))) { _builder.append(" -> "); String _insertText = it.getInsertText(); _builder.append(_insertText); diff --git a/org.eclipse.xtext.xbase.lib/src/org/eclipse/xtext/xbase/lib/ObjectExtensions.java b/org.eclipse.xtext.xbase.lib/src/org/eclipse/xtext/xbase/lib/ObjectExtensions.java index 14363523282..7e64eecebf1 100644 --- a/org.eclipse.xtext.xbase.lib/src/org/eclipse/xtext/xbase/lib/ObjectExtensions.java +++ b/org.eclipse.xtext.xbase.lib/src/org/eclipse/xtext/xbase/lib/ObjectExtensions.java @@ -8,10 +8,11 @@ *******************************************************************************/ package org.eclipse.xtext.xbase.lib; +import java.util.Objects; + import org.eclipse.xtext.xbase.lib.Procedures.Procedure1; import com.google.common.annotations.GwtCompatible; -import com.google.common.base.Objects; /** * This is an extension library for all {@link Object objects}. @@ -29,9 +30,9 @@ * @return true if {@code a} and {@code b} are not equal. */ @Pure - @Inline(value="(!$3.equal($1, $2))", imported=Objects.class) + @Inline(value="(!$3.equals($1, $2))", imported=Objects.class) public static boolean operator_notEquals(Object a, Object b) { - return !Objects.equal(a, b); + return !Objects.equals(a, b); } /** @@ -45,9 +46,9 @@ public static boolean operator_notEquals(Object a, Object b) { * @return true if {@code a} and {@code b} are equal. */ @Pure - @Inline(value="$3.equal($1, $2)", imported=Objects.class) + @Inline(value="$3.equals($1, $2)", imported=Objects.class) public static boolean operator_equals(Object a, Object b) { - return Objects.equal(a, b); + return Objects.equals(a, b); } /** diff --git a/org.eclipse.xtext.xbase.tests/src/org/eclipse/xtext/xbase/tests/compiler/CompilationTestHelperTest.java b/org.eclipse.xtext.xbase.tests/src/org/eclipse/xtext/xbase/tests/compiler/CompilationTestHelperTest.java index 9113c57b88c..18698758497 100644 --- a/org.eclipse.xtext.xbase.tests/src/org/eclipse/xtext/xbase/tests/compiler/CompilationTestHelperTest.java +++ b/org.eclipse.xtext.xbase.tests/src/org/eclipse/xtext/xbase/tests/compiler/CompilationTestHelperTest.java @@ -3,7 +3,7 @@ * 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. - * + * * SPDX-License-Identifier: EPL-2.0 */ package org.eclipse.xtext.xbase.tests.compiler; @@ -55,7 +55,7 @@ public void testSwitchJavaVersion6() throws Exception { "}\n"; compilationTestHelper.compile(source, (CompilationTestHelper.Result it) -> { String expectation = - "import com.google.common.base.Objects;\n" + + "import java.util.Objects;\n" + "\n" + "@SuppressWarnings(\"all\")\n" + "public class Test {\n" + @@ -65,7 +65,7 @@ public void testSwitchJavaVersion6() throws Exception { " final String s_1 = \"\";\n" + " String _switchResult = null;\n" + " boolean _matched = false;\n" + - " if (Objects.equal(s_1, \"foo\")) {\n" + + " if (Objects.equals(s_1, \"foo\")) {\n" + " _matched=true;\n" + " _switchResult = \"foo\";\n" + " }\n" + diff --git a/org.eclipse.xtext.xbase.tests/src/org/eclipse/xtext/xbase/tests/compiler/Compiler2Tests.java b/org.eclipse.xtext.xbase.tests/src/org/eclipse/xtext/xbase/tests/compiler/Compiler2Tests.java index ecbb8d09f51..29d87be885c 100644 --- a/org.eclipse.xtext.xbase.tests/src/org/eclipse/xtext/xbase/tests/compiler/Compiler2Tests.java +++ b/org.eclipse.xtext.xbase.tests/src/org/eclipse/xtext/xbase/tests/compiler/Compiler2Tests.java @@ -3,7 +3,7 @@ * 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. - * + * * SPDX-License-Identifier: EPL-2.0 */ package org.eclipse.xtext.xbase.tests.compiler; @@ -596,16 +596,16 @@ public void testFallThroughSwitch_2() throws Exception { "String _switchResult = null;\n" + "final String x = \"lalala\";\n" + "boolean _matched = false;\n" + - "if (com.google.common.base.Objects.equal(x, \"a\")) {\n" + + "if (java.util.Objects.equals(x, \"a\")) {\n" + " _matched=true;\n" + "}\n" + "if (!_matched) {\n" + - " if (com.google.common.base.Objects.equal(x, \"b\")) {\n" + + " if (java.util.Objects.equals(x, \"b\")) {\n" + " _matched=true;\n" + " }\n" + "}\n" + "if (!_matched) {\n" + - " if (com.google.common.base.Objects.equal(x, \"c\")) {\n" + + " if (java.util.Objects.equals(x, \"c\")) {\n" + " _matched=true;\n" + " }\n" + "}\n" + @@ -654,11 +654,11 @@ public void testFallThroughSwitch_4() throws Exception { "String _switchResult = null;\n" + "final String x = \"lalala\";\n" + "boolean _matched = false;\n" + - "if (com.google.common.base.Objects.equal(x, \"a\")) {\n" + + "if (java.util.Objects.equals(x, \"a\")) {\n" + " _matched=true;\n" + "}\n" + "if (!_matched) {\n" + - " if (com.google.common.base.Objects.equal(x, \"b\")) {\n" + + " if (java.util.Objects.equals(x, \"b\")) {\n" + " _matched=true;\n" + " }\n" + "}\n" + @@ -717,19 +717,19 @@ public void testFallThroughSwitch_6() throws Exception { "final Object x = _object;\n" + "boolean _matched = false;\n" + "if (x instanceof String) {\n" + - " if (com.google.common.base.Objects.equal(x, \"a\")) {\n" + + " if (java.util.Objects.equals(x, \"a\")) {\n" + " _matched=true;\n" + " _switchResult = \"blabla\";\n" + " }\n" + "}\n" + "if (!_matched) {\n" + " if (x instanceof Integer) {\n" + - " if (com.google.common.base.Objects.equal(x, 1)) {\n" + + " if (java.util.Objects.equals(x, 1)) {\n" + " _matched=true;\n" + " }\n" + " }\n" + " if (!_matched) {\n" + - " if (com.google.common.base.Objects.equal(x, 2)) {\n" + + " if (java.util.Objects.equals(x, 2)) {\n" + " _matched=true;\n" + " }\n" + " }\n" + @@ -761,7 +761,7 @@ public void testFallThroughSwitch_7() throws Exception { "}\n" + "if (!_matched) {\n" + " if (x instanceof Integer) {\n" + - " if (com.google.common.base.Objects.equal(x, 1)) {\n" + + " if (java.util.Objects.equals(x, 1)) {\n" + " _matched=true;\n" + " }\n" + " }\n" + @@ -2100,7 +2100,7 @@ public void test406762_ValidReturnInLambdaContainedInThrow_1() throws Exception public void testObjectEqualNull() throws Exception { compilesTo( "\"Foo\" == null\n", "\n" + - "boolean _equals = com.google.common.base.Objects.equal(\"Foo\", null);\n" + + "boolean _equals = java.util.Objects.equals(\"Foo\", null);\n" + "return _equals;\n"); } @@ -2109,7 +2109,7 @@ public void testObjectNotEqualNull() throws Exception { compilesTo( "\"Foo\" != null\n", "\n" + - "boolean _notEquals = (!com.google.common.base.Objects.equal(\"Foo\", null));\n" + + "boolean _notEquals = (!java.util.Objects.equals(\"Foo\", null));\n" + "return _notEquals;\n"); } diff --git a/org.eclipse.xtext.xbase.tests/src/org/eclipse/xtext/xbase/tests/compiler/output/CompilerTraceTest.java b/org.eclipse.xtext.xbase.tests/src/org/eclipse/xtext/xbase/tests/compiler/output/CompilerTraceTest.java index bc84415c74f..117ed9de337 100644 --- a/org.eclipse.xtext.xbase.tests/src/org/eclipse/xtext/xbase/tests/compiler/output/CompilerTraceTest.java +++ b/org.eclipse.xtext.xbase.tests/src/org/eclipse/xtext/xbase/tests/compiler/output/CompilerTraceTest.java @@ -827,12 +827,12 @@ public void testSwitchExpression_01() throws Exception { "String _switchResult = null;\n" + "final String _switchValue = \"\";\n" + "boolean _matched = false;\n" + - "if (Objects.equal(_switchValue, \"\")) {\n" + + "if (Objects.equals(_switchValue, \"\")) {\n" + " _matched=true;\n" + " _switchResult = \"\";\n" + "#}#\n" + "if (!_matched) {\n" + - " if (Objects.equal(_switchValue, \" \")) {\n" + + " if (Objects.equals(_switchValue, \" \")) {\n" + " _matched=true;\n" + " _switchResult = \"\";\n" + " }\n" + @@ -848,12 +848,12 @@ public void testSwitchExpression_02() throws Exception { "String _switchResult = null;\n" + "final String _switchValue = \"\";\n" + "boolean _matched = false;\n" + - "if (Objects.equal(_switchValue, #\"\"#)) {\n" + + "if (Objects.equals(_switchValue, #\"\"#)) {\n" + " _matched=true;\n" + " _switchResult = \"\";\n" + "}\n" + "if (!_matched) {\n" + - " if (Objects.equal(_switchValue, \" \")) {\n" + + " if (Objects.equals(_switchValue, \" \")) {\n" + " _matched=true;\n" + " _switchResult = \"\";\n" + " }\n" + @@ -869,12 +869,12 @@ public void testSwitchExpression_03() throws Exception { "String _switchResult = null;\n" + "final String _switchValue = \"\";\n" + "boolean _matched = false;\n" + - "if (Objects.equal(_switchValue, \"\")) {\n" + + "if (Objects.equals(_switchValue, \"\")) {\n" + " _matched=true;\n" + " _switchResult = #\"\"#;\n" + "}\n" + "if (!_matched) {\n" + - " if (Objects.equal(_switchValue, \" \")) {\n" + + " if (Objects.equals(_switchValue, \" \")) {\n" + " _matched=true;\n" + " _switchResult = \"\";\n" + " }\n" + @@ -890,12 +890,12 @@ public void testSwitchExpression_04() throws Exception { "String _switchResult = null;\n" + "final String _switchValue = #\"\"#;\n" + "boolean _matched = false;\n" + - "if (Objects.equal(_switchValue, \"\")) {\n" + + "if (Objects.equals(_switchValue, \"\")) {\n" + " _matched=true;\n" + " _switchResult = \"\";\n" + "}\n" + "if (!_matched) {\n" + - " if (Objects.equal(_switchValue, \" \")) {\n" + + " if (Objects.equals(_switchValue, \" \")) {\n" + " _matched=true;\n" + " _switchResult = \"\";\n" + " }\n" + @@ -911,12 +911,12 @@ public void testSwitchExpression_05() throws Exception { "String _swi#tc#hResult = null;\n" + "final String _switchValue = \"\";\n" + "boolean _matched = false;\n" + - "if (Objects.equal(_switchValue, \"\")) {\n" + + "if (Objects.equals(_switchValue, \"\")) {\n" + " _matched=true;\n" + " _switchResult = \"\";\n" + "}\n" + "if (!_matched) {\n" + - " if (Objects.equal(_switchValue, \" \")) {\n" + + " if (Objects.equals(_switchValue, \" \")) {\n" + " _matched=true;\n" + " _switchResult = \"\";\n" + " }\n" + @@ -932,7 +932,7 @@ public void testSwitchExpression_06() throws Exception { "String _switchResult = null;\n" + "final String _switchValue = \"\";\n" + "boolean _matched = false;\n" + - "if (Objects.equal(_switchValue, \"\")) {\n" + + "if (Objects.equals(_switchValue, \"\")) {\n" + " _matched=true;\n" + " _switchResult = \"\";\n" + "}\n" + @@ -957,7 +957,7 @@ public void testSwitchExpression_11() throws Exception { " _switchResult = \"\";\n" + "#}#\n" + "if (!_matched) {\n" + - " if (Objects.equal(it, \"\")) {\n" + + " if (Objects.equals(it, \"\")) {\n" + " _matched=true;\n" + " _switchResult = \"\";\n" + " }\n" + @@ -980,7 +980,7 @@ public void testSwitchExpression_12() throws Exception { " _switchResult = \"\";\n" + "}\n" + "if (!_matched) {\n" + - " if (Objects.equal(it, \"\")) {\n" + + " if (Objects.equals(it, \"\")) {\n" + " _matched=true;\n" + " _switchResult = \"\";\n" + " }\n" + @@ -1042,7 +1042,7 @@ public void testSwitchExpression_31() throws Exception { "final Object it = null;\n" + "boolean _matched = false;\n" + "if (it instanceof String) {\n" + - " if (Objects.equal(it, \"\")) {\n" + + " if (Objects.equals(it, \"\")) {\n" + " _matched=true;\n" + " _switchResult = \"\";\n" + " }\n" + diff --git a/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/compiler/XbaseCompiler.java b/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/compiler/XbaseCompiler.java index d367dcf93a2..e9280d15171 100644 --- a/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/compiler/XbaseCompiler.java +++ b/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/compiler/XbaseCompiler.java @@ -18,6 +18,7 @@ import java.util.Iterator; import java.util.List; import java.util.Map; +import java.util.Objects; import org.eclipse.emf.common.util.EList; import org.eclipse.emf.common.util.TreeIterator; @@ -97,7 +98,6 @@ import org.eclipse.xtext.xbase.util.XSwitchExpressions; import org.eclipse.xtext.xbase.util.XbaseUsageCrossReferencer; -import com.google.common.base.Objects; import com.google.common.base.Preconditions; import com.google.common.collect.Lists; import com.google.inject.Inject; @@ -1601,7 +1601,7 @@ protected ITreeAppendable appendOpenIfStatement(XCasePart casePart, ITreeAppenda JvmType objectsType = findKnownType(Objects.class, casePart); if (objectsType != null) { conditionAppendable.append(objectsType); - conditionAppendable.append(".equal(").append(variableName).append(", "); + conditionAppendable.append(".equals(").append(variableName).append(", "); internalToJavaExpression(casePart.getCase(), conditionAppendable); conditionAppendable.append(")"); } else { diff --git a/org.eclipse.xtext.xbase/xtend-gen/org/eclipse/xtext/xbase/compiler/JvmModelGenerator.java b/org.eclipse.xtext.xbase/xtend-gen/org/eclipse/xtext/xbase/compiler/JvmModelGenerator.java index 0518874c29f..1897e1df081 100644 --- a/org.eclipse.xtext.xbase/xtend-gen/org/eclipse/xtext/xbase/compiler/JvmModelGenerator.java +++ b/org.eclipse.xtext.xbase/xtend-gen/org/eclipse/xtext/xbase/compiler/JvmModelGenerator.java @@ -8,7 +8,6 @@ */ package org.eclipse.xtext.xbase.compiler; -import com.google.common.base.Objects; import com.google.common.collect.Iterables; import com.google.common.collect.Maps; import com.google.inject.Inject; @@ -17,6 +16,7 @@ import java.util.LinkedHashMap; import java.util.List; import java.util.Map; +import java.util.Objects; import java.util.Set; import java.util.function.Consumer; import org.eclipse.emf.common.util.EList; @@ -307,7 +307,7 @@ public ITreeAppendable generateAnnotationsWithSyntheticSuppressWarnings(final Jv _identifier=_annotation.getIdentifier(); } String _name = SuppressWarnings.class.getName(); - return Boolean.valueOf((!Objects.equal(_identifier, _name))); + return Boolean.valueOf((!Objects.equals(_identifier, _name))); }; final Function1 noSuppressWarningsFilter = _function; this.generateAnnotations(IterableExtensions.filter(it.getAnnotations(), noSuppressWarningsFilter), appendable, true, config); @@ -654,7 +654,7 @@ public void generateExtendsClause(final JvmDeclaredType it, final ITreeAppendabl if (((it instanceof JvmAnnotationType) || ((it instanceof JvmGenericType) && ((JvmGenericType) it).isInterface()))) { final Function1 _function = (JvmTypeReference typeRef) -> { String _identifier = typeRef.getIdentifier(); - return Boolean.valueOf((!Objects.equal(_identifier, implicitSuperType))); + return Boolean.valueOf((!Objects.equals(_identifier, implicitSuperType))); }; final Iterable withoutObject = IterableExtensions.filter(it.getSuperTypes(), _function); final Procedure1 _function_1 = (LoopParams it_1) -> { @@ -669,7 +669,7 @@ public void generateExtendsClause(final JvmDeclaredType it, final ITreeAppendabl } else { final Function1 _function_3 = (JvmTypeReference typeRef) -> { String _identifier = typeRef.getIdentifier(); - return Boolean.valueOf((!Objects.equal(_identifier, implicitSuperType))); + return Boolean.valueOf((!Objects.equals(_identifier, implicitSuperType))); }; final Iterable withoutObject_1 = IterableExtensions.filter(it.getSuperTypes(), _function_3); final Function1 _function_4 = (JvmTypeReference typeRef) -> { @@ -677,7 +677,7 @@ public void generateExtendsClause(final JvmDeclaredType it, final ITreeAppendabl }; final JvmTypeReference superClazz = IterableExtensions.head(IterableExtensions.filter(withoutObject_1, _function_4)); final Function1 _function_5 = (JvmTypeReference typeRef) -> { - return Boolean.valueOf((!Objects.equal(typeRef, superClazz))); + return Boolean.valueOf((!Objects.equals(typeRef, superClazz))); }; final Iterable superInterfaces = IterableExtensions.filter(withoutObject_1, _function_5); if ((superClazz != null)) { @@ -1087,7 +1087,7 @@ private String reassignSuperType(final ITreeAppendable b, final JvmDeclaredType boolean _hasObject_1 = b.hasObject(simpleVarName); if (_hasObject_1) { final Object element_1 = b.getObject(simpleVarName); - boolean _notEquals = (!Objects.equal(element_1, interfaceRef)); + boolean _notEquals = (!Objects.equals(element_1, interfaceRef)); if (_notEquals) { String _qualifiedName = interfaze.getQualifiedName(); final String qualifiedVarName = (_qualifiedName + ".super"); @@ -1210,7 +1210,7 @@ public void addJavaDocImports(final EObject it, final ITreeAppendable appendable final JvmDeclaredType contextDeclarator = EcoreUtil2.getContainerOfType(it, JvmDeclaredType.class); String _packageName = referencedType.getPackageName(); String _packageName_1 = contextDeclarator.getPackageName(); - boolean _notEquals = (!Objects.equal(_packageName, _packageName_1)); + boolean _notEquals = (!Objects.equals(_packageName, _packageName_1)); if (_notEquals) { final ImportManager importManager = this.getImportManager(appendable); importManager.addImportFor(jvmType); @@ -1363,13 +1363,13 @@ protected void _toJavaLiteral(final JvmDoubleAnnotationValue it, final ITreeAppe _switchResult = "Double.NaN"; } if (!_matched) { - if (Objects.equal(it_1, Double.POSITIVE_INFINITY)) { + if (Objects.equals(it_1, Double.POSITIVE_INFINITY)) { _matched=true; _switchResult = "Double.POSITIVE_INFINITY"; } } if (!_matched) { - if (Objects.equal(it_1, Double.NEGATIVE_INFINITY)) { + if (Objects.equals(it_1, Double.NEGATIVE_INFINITY)) { _matched=true; _switchResult = "Double.NEGATIVE_INFINITY"; } @@ -1393,13 +1393,13 @@ protected void _toJavaLiteral(final JvmFloatAnnotationValue it, final ITreeAppen _switchResult = "Float.NaN"; } if (!_matched) { - if (Objects.equal(it_1, Float.POSITIVE_INFINITY)) { + if (Objects.equals(it_1, Float.POSITIVE_INFINITY)) { _matched=true; _switchResult = "Float.POSITIVE_INFINITY"; } } if (!_matched) { - if (Objects.equal(it_1, Float.NEGATIVE_INFINITY)) { + if (Objects.equals(it_1, Float.NEGATIVE_INFINITY)) { _matched=true; _switchResult = "Float.NEGATIVE_INFINITY"; } diff --git a/org.eclipse.xtext.xbase/xtend-gen/org/eclipse/xtext/xbase/controlflow/ConstantConditionsInterpreter.java b/org.eclipse.xtext.xbase/xtend-gen/org/eclipse/xtext/xbase/controlflow/ConstantConditionsInterpreter.java index 9c397331907..6092b7b69a5 100644 --- a/org.eclipse.xtext.xbase/xtend-gen/org/eclipse/xtext/xbase/controlflow/ConstantConditionsInterpreter.java +++ b/org.eclipse.xtext.xbase/xtend-gen/org/eclipse/xtext/xbase/controlflow/ConstantConditionsInterpreter.java @@ -8,13 +8,13 @@ */ package org.eclipse.xtext.xbase.controlflow; -import com.google.common.base.Objects; import com.google.inject.Inject; import com.google.inject.Provider; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.List; +import java.util.Objects; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.resource.Resource; import org.eclipse.xtend.lib.annotations.AccessorType; @@ -323,7 +323,7 @@ private boolean isFromXbaseLibrary(final XAbstractFeatureCall it, final Evaluati _packageName=_declaringType.getPackageName(); } String _string = XImportSectionNamespaceScopeProvider.XBASE_LIB.toString(); - _switchResult = Objects.equal(_packageName, _string); + _switchResult = Objects.equals(_packageName, _string); } if (!_matched) { _switchResult = false; @@ -343,7 +343,7 @@ protected EvaluationResult _internalEvaluate(final XUnaryOperation it, final Eva final String op = it.getConcreteSyntaxFeatureName(); EvaluationResult _switchResult = null; boolean _matched = false; - if (Objects.equal(op, "-")) { + if (Objects.equals(op, "-")) { _matched=true; try { final Object result = this.constantOperators.minus(arg.getRawValue()); @@ -358,7 +358,7 @@ protected EvaluationResult _internalEvaluate(final XUnaryOperation it, final Eva } } if (!_matched) { - if ((Objects.equal(op, "!") && (arg.getRawValue() instanceof Boolean))) { + if ((Objects.equals(op, "!") && (arg.getRawValue() instanceof Boolean))) { _matched=true; Object _rawValue = arg.getRawValue(); boolean _not = (!(((Boolean) _rawValue)).booleanValue()); @@ -367,7 +367,7 @@ protected EvaluationResult _internalEvaluate(final XUnaryOperation it, final Eva } } if (!_matched) { - if ((Objects.equal(op, "+") && (arg.getRawValue() instanceof Number))) { + if ((Objects.equals(op, "+") && (arg.getRawValue() instanceof Number))) { _matched=true; _switchResult = arg; } diff --git a/org.eclipse.xtext.xbase/xtend-gen/org/eclipse/xtext/xbase/controlflow/EvaluationResult.java b/org.eclipse.xtext.xbase/xtend-gen/org/eclipse/xtext/xbase/controlflow/EvaluationResult.java index 37e159a9ce3..b80fe10b427 100644 --- a/org.eclipse.xtext.xbase/xtend-gen/org/eclipse/xtext/xbase/controlflow/EvaluationResult.java +++ b/org.eclipse.xtext.xbase/xtend-gen/org/eclipse/xtext/xbase/controlflow/EvaluationResult.java @@ -8,9 +8,9 @@ */ package org.eclipse.xtext.xbase.controlflow; -import com.google.common.base.Objects; import com.google.common.base.Optional; import java.util.List; +import java.util.Objects; import org.eclipse.xtend.lib.annotations.Data; import org.eclipse.xtext.common.types.JvmEnumerationLiteral; import org.eclipse.xtext.common.types.JvmFormalParameter; @@ -35,7 +35,7 @@ public Object equalValue(final EvaluationResult other) { private final boolean compileTimeConstant; public boolean isNotAConstant() { - return Objects.equal(this.rawValue, EvaluationResult.NOT_A_CONSTANT.rawValue); + return Objects.equals(this.rawValue, EvaluationResult.NOT_A_CONSTANT.rawValue); } @Override @@ -48,7 +48,7 @@ public Object equalValue(final EvaluationResult other) { } private Object _equalValue(final Object myValue, final Object otherValue) { - return Boolean.valueOf(Objects.equal(myValue, otherValue)); + return Boolean.valueOf(Objects.equals(myValue, otherValue)); } private Object _equalValue(final Void myValue, final Object otherValue) { @@ -68,7 +68,7 @@ private Object _equalValue(final ThisReference myValue, final Object otherValue) } private Object _equalValue(final ThisReference myValue, final ThisReference otherValue) { - return Boolean.valueOf(Objects.equal(myValue, otherValue)); + return Boolean.valueOf(Objects.equals(myValue, otherValue)); } private Object _equalValue(final Void myValue, final JvmIdentifiableElement otherValue) { @@ -120,7 +120,7 @@ private Object _equalValue(final List myValue, final Object otherValue) { } private Object _equalValue(final List myValue, final List otherValue) { - final boolean equalLists = Objects.equal(myValue, otherValue); + final boolean equalLists = Objects.equals(myValue, otherValue); if (equalLists) { return Boolean.TRUE; } @@ -128,11 +128,11 @@ private Object _equalValue(final List myValue, final List otherValue) { } private Object _equalValue(final JvmIdentifiableElement myValue, final JvmIdentifiableElement otherValue) { - return Boolean.valueOf(Objects.equal(myValue, otherValue)); + return Boolean.valueOf(Objects.equals(myValue, otherValue)); } private Object _equalValue(final JvmFormalParameter myValue, final JvmFormalParameter otherValue) { - boolean _equals = Objects.equal(myValue, otherValue); + boolean _equals = Objects.equals(myValue, otherValue); if (_equals) { return Boolean.TRUE; } @@ -148,7 +148,7 @@ private Object _equalValue(final JvmIdentifiableElement myValue, final JvmEnumer } private Object _equalValue(final JvmEnumerationLiteral myValue, final JvmEnumerationLiteral otherValue) { - return Boolean.valueOf(Objects.equal(myValue, otherValue)); + return Boolean.valueOf(Objects.equals(myValue, otherValue)); } private Object _equalValue(final JvmType myValue, final Void otherValue) { @@ -156,15 +156,15 @@ private Object _equalValue(final JvmType myValue, final Void otherValue) { } private Object _equalValue(final XTypeLiteral myValue, final XTypeLiteral otherTypeLiteral) { - return Boolean.valueOf((Objects.equal(myValue.getType(), otherTypeLiteral.getType()) && Objects.equal(myValue.getArrayDimensions(), otherTypeLiteral.getArrayDimensions()))); + return Boolean.valueOf((Objects.equals(myValue.getType(), otherTypeLiteral.getType()) && Objects.equals(myValue.getArrayDimensions(), otherTypeLiteral.getArrayDimensions()))); } private Object _equalValue(final JvmType myValue, final XTypeLiteral otherTypeLiteral) { - return Boolean.valueOf((Objects.equal(myValue, otherTypeLiteral.getType()) && otherTypeLiteral.getArrayDimensions().isEmpty())); + return Boolean.valueOf((Objects.equals(myValue, otherTypeLiteral.getType()) && otherTypeLiteral.getArrayDimensions().isEmpty())); } private Object _equalValue(final XTypeLiteral myValue, final JvmType otherType) { - return Boolean.valueOf((Objects.equal(myValue.getType(), otherType) && myValue.getArrayDimensions().isEmpty())); + return Boolean.valueOf((Objects.equals(myValue.getType(), otherType) && myValue.getArrayDimensions().isEmpty())); } private Object _equalValue(final JvmType myValue, final ThisReference otherValue) { diff --git a/org.eclipse.xtext.xbase/xtend-gen/org/eclipse/xtext/xbase/formatting/FormattingDataFactory.java b/org.eclipse.xtext.xbase/xtend-gen/org/eclipse/xtext/xbase/formatting/FormattingDataFactory.java index 3c86e421e31..9fe7e231cd5 100644 --- a/org.eclipse.xtext.xbase/xtend-gen/org/eclipse/xtext/xbase/formatting/FormattingDataFactory.java +++ b/org.eclipse.xtext.xbase/xtend-gen/org/eclipse/xtext/xbase/formatting/FormattingDataFactory.java @@ -8,12 +8,12 @@ */ package org.eclipse.xtext.xbase.formatting; -import com.google.common.base.Objects; import com.google.common.collect.Iterables; import com.google.inject.Inject; import java.util.ArrayList; import java.util.Arrays; import java.util.List; +import java.util.Objects; import org.eclipse.xtext.formatting2.IHiddenRegionFormatter; import org.eclipse.xtext.nodemodel.INode; import org.eclipse.xtext.preferences.PreferenceKey; @@ -52,7 +52,7 @@ public class FormattingDataFactory { _elvis = Integer.valueOf(0); } final int newLines2 = (int) _elvis; - if ((((it.space == null) && (it.newLines == null)) || ((leafs.getNewLinesInComments() == 0) && ((newLines2 == 0) || Objects.equal(it.space, ""))))) { + if ((((it.space == null) && (it.newLines == null)) || ((leafs.getNewLinesInComments() == 0) && ((newLines2 == 0) || Objects.equals(it.space, ""))))) { return this.newWhitespaceData(leafs, it.space, it.increaseIndentationChange, it.decreaseIndentationChange, doc.isDebugConflicts()); } else { return this.newNewLineData(leafs, newLines2, newLines2, it.increaseIndentationChange, it.decreaseIndentationChange, doc.isDebugConflicts()); @@ -313,7 +313,7 @@ protected Iterable newNewLineData(final HiddenLeafs leafs, final WhitespaceData _whitespaceData_1 = new WhitespaceData(_offset_2, _length_1, increaseIndentationChange, decreaseIndentationChange, _xifexpression_3, _xifexpression_4); result.add(_whitespaceData_1); } else { - if ((equalIndentationChange && (!Objects.equal(IterableExtensions.lastOrNull(leafs.getLeafs()), leaf)))) { + if ((equalIndentationChange && (!Objects.equals(IterableExtensions.lastOrNull(leafs.getLeafs()), leaf)))) { int _offset_4 = ((WhitespaceInfo)leaf).getOffset(); int _length_2 = ((WhitespaceInfo)leaf).getLength(); RuntimeException _xifexpression_6 = null; @@ -356,7 +356,7 @@ protected Iterable newNewLineData(final HiddenLeafs leafs, final if (_endsWithNewLine_2) { newLines_1 = (newLines_1 - 1); } - if ((equalIndentationChange && (!Objects.equal(IterableExtensions.lastOrNull(leafs.getLeafs()), leaf)))) { + if ((equalIndentationChange && (!Objects.equals(IterableExtensions.lastOrNull(leafs.getLeafs()), leaf)))) { int _offset_6 = ((WhitespaceInfo)leaf).getOffset(); int _length_4 = ((WhitespaceInfo)leaf).getLength(); RuntimeException _xifexpression_10 = null; diff --git a/org.eclipse.xtext.xbase/xtend-gen/org/eclipse/xtext/xbase/formatting/XbaseFormatter2.java b/org.eclipse.xtext.xbase/xtend-gen/org/eclipse/xtext/xbase/formatting/XbaseFormatter2.java index eaef57de2cd..6a616d24470 100644 --- a/org.eclipse.xtext.xbase/xtend-gen/org/eclipse/xtext/xbase/formatting/XbaseFormatter2.java +++ b/org.eclipse.xtext.xbase/xtend-gen/org/eclipse/xtext/xbase/formatting/XbaseFormatter2.java @@ -8,12 +8,12 @@ */ package org.eclipse.xtext.xbase.formatting; -import com.google.common.base.Objects; import com.google.inject.Inject; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.List; +import java.util.Objects; import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EObject; import org.eclipse.xtext.AbstractElement; @@ -144,7 +144,7 @@ protected void formatCommaSeparatedList(final Collection elem for (final EObject elem : elements) { { EObject _head = IterableExtensions.head(elements); - boolean _equals = Objects.equal(elem, _head); + boolean _equals = Objects.equals(elem, _head); if (_equals) { final Procedure1 _function_1 = (FormattingDataInit it) -> { it.newLine(); @@ -162,7 +162,7 @@ protected void formatCommaSeparatedList(final Collection elem } } EObject _lastOrNull = IterableExtensions.lastOrNull(elements); - boolean _equals_1 = Objects.equal(elem, _lastOrNull); + boolean _equals_1 = Objects.equals(elem, _lastOrNull); if (_equals_1) { final Procedure1 _function_3 = (FormattingDataInit it) -> { it.newLine(); @@ -518,14 +518,14 @@ protected void formatStaticQualifier(final INode node, final FormattableDocument if ((node instanceof ICompositeNode)) { final Iterable leafs = ((ICompositeNode)node).getLeafNodes(); for (final ILeafNode n : leafs) { - if (((n.getGrammarElement() instanceof Keyword) && Objects.equal(n.getText(), "::"))) { + if (((n.getGrammarElement() instanceof Keyword) && Objects.equals(n.getText(), "::"))) { final Procedure1 _function = (FormattingDataInit it) -> { it.noSpace(); }; Function1> _prepend = this._formattingDataFactory.prepend(n, _function); document.operator_add(_prepend); ILeafNode _lastOrNull = IterableExtensions.lastOrNull(leafs); - boolean _notEquals = (!Objects.equal(n, _lastOrNull)); + boolean _notEquals = (!Objects.equals(n, _lastOrNull)); if (_notEquals) { final Procedure1 _function_1 = (FormattingDataInit it) -> { it.noSpace(); @@ -590,7 +590,7 @@ protected void formatFeatureCallParamsWrapIfNeeded(final INode open, final List< for (final XExpression arg : explicitParams) { { XExpression _head = IterableExtensions.head(explicitParams); - boolean _equals = Objects.equal(arg, _head); + boolean _equals = Objects.equals(arg, _head); if (_equals) { final INode head = this._nodeModelAccess.nodeForEObject(arg); boolean _fitsIntoLine = this.fitsIntoLine(format, arg); @@ -642,7 +642,7 @@ protected void formatFeatureCallParamsWrapIfNeeded(final INode open, final List< } } XExpression _lastOrNull = IterableExtensions.lastOrNull(explicitParams); - boolean _equals_1 = Objects.equal(arg, _lastOrNull); + boolean _equals_1 = Objects.equals(arg, _lastOrNull); if (_equals_1) { final Procedure1 _function_7 = (FormattingDataInit it) -> { it.noSpace(); @@ -692,9 +692,9 @@ protected XClosure builder(final List params) { INode _nodeForEObject = this._nodeModelAccess.nodeForEObject(IterableExtensions.lastOrNull(params)); final EObject grammarElement = ((ICompositeNode) _nodeForEObject).getFirstChild().getGrammarElement(); XClosure _xifexpression_1 = null; - if (((Objects.equal(grammarElement, this._xbaseGrammarAccess.getXMemberFeatureCallAccess().getMemberCallArgumentsXClosureParserRuleCall_1_1_4_0()) || - Objects.equal(grammarElement, this._xbaseGrammarAccess.getXFeatureCallAccess().getFeatureCallArgumentsXClosureParserRuleCall_4_0())) || - Objects.equal(grammarElement, this._xbaseGrammarAccess.getXConstructorCallAccess().getArgumentsXClosureParserRuleCall_5_0()))) { + if (((Objects.equals(grammarElement, this._xbaseGrammarAccess.getXMemberFeatureCallAccess().getMemberCallArgumentsXClosureParserRuleCall_1_1_4_0()) || + Objects.equals(grammarElement, this._xbaseGrammarAccess.getXFeatureCallAccess().getFeatureCallArgumentsXClosureParserRuleCall_4_0())) || + Objects.equals(grammarElement, this._xbaseGrammarAccess.getXConstructorCallAccess().getArgumentsXClosureParserRuleCall_5_0()))) { XExpression _lastOrNull_1 = IterableExtensions.lastOrNull(params); _xifexpression_1 = ((XClosure) _lastOrNull_1); } @@ -737,7 +737,7 @@ protected void formatFeatureCallParamsMultiline(final INode open, final Listhead(explicitParams); - boolean _equals = Objects.equal(arg, _head); + boolean _equals = Objects.equals(arg, _head); if (_equals) { final INode head = this._nodeModelAccess.nodeForEObject(arg); final Procedure1 _function_1 = (FormattingDataInit it) -> { @@ -756,7 +756,7 @@ protected void formatFeatureCallParamsMultiline(final INode open, final ListlastOrNull(explicitParams); - boolean _equals_1 = Objects.equal(arg, _lastOrNull); + boolean _equals_1 = Objects.equals(arg, _lastOrNull); if (_equals_1) { final Procedure1 _function_3 = (FormattingDataInit it) -> { it.newLine(); @@ -1180,7 +1180,7 @@ protected void _format(final XBinaryOperation expr, final FormattableDocument fo AbstractRule precendece = this.binaryOperationPrecedence(expr); EObject top = expr; ArrayList calls = CollectionLiterals.newArrayList(); - while (Objects.equal(this.binaryOperationPrecedence(top), precendece)) { + while (Objects.equals(this.binaryOperationPrecedence(top), precendece)) { { calls.add(((XBinaryOperation) top)); top = ((XBinaryOperation) top).getLeftOperand(); @@ -1582,7 +1582,7 @@ protected void _format(final XBasicForLoopExpression expr, final FormattableDocu for (final XExpression initExpression : initExpressions) { { XExpression _head = IterableExtensions.head(expr.getInitExpressions()); - boolean _equals = Objects.equal(initExpression, _head); + boolean _equals = Objects.equals(initExpression, _head); if (_equals) { INode _nodeForEObject = this._nodeModelAccess.nodeForEObject(initExpression); final Procedure1 _function_1 = (INode it) -> { @@ -1869,7 +1869,7 @@ protected void _format(final XBlockExpression expr, final FormattableDocument fo for (final XExpression child : _expressions) { { this.format(child, format); - if (((!Objects.equal(child, IterableExtensions.lastOrNull(expr.getExpressions()))) || (close != null))) { + if (((!Objects.equals(child, IterableExtensions.lastOrNull(expr.getExpressions()))) || (close != null))) { final INode childNode = this._nodeModelAccess.nodeForEObject(child); final ILeafNode sem = this._nodeModelAccess.immediatelyFollowingKeyword(childNode, ";"); if ((sem != null)) { @@ -2007,7 +2007,7 @@ protected void _format(final XTryCatchFinallyExpression expr, final FormattableD for (final XCatchClause cc : _catchClauses) { { this.format(cc, format); - if (((!Objects.equal(cc, IterableExtensions.lastOrNull(expr.getCatchClauses()))) || (expr.getFinallyExpression() != null))) { + if (((!Objects.equals(cc, IterableExtensions.lastOrNull(expr.getCatchClauses()))) || (expr.getFinallyExpression() != null))) { XExpression _expression_1 = cc.getExpression(); if ((_expression_1 instanceof XBlockExpression)) { final Procedure1 _function_4 = (FormattingDataInit it) -> { @@ -2238,7 +2238,7 @@ protected void _format(final XSwitchExpression expr, final FormattableDocument f Function1> _prepend_3 = this._formattingDataFactory.prepend(this._nodeModelAccess.nodeForEObject(c_1.getThen()), _function_12); format.operator_add(_prepend_3); XCasePart _lastOrNull = IterableExtensions.lastOrNull(expr.getCases()); - boolean _notEquals = (!Objects.equal(c_1, _lastOrNull)); + boolean _notEquals = (!Objects.equals(c_1, _lastOrNull)); if (_notEquals) { final Procedure1 _function_13 = (FormattingDataInit it) -> { it.newLine(); @@ -2308,7 +2308,7 @@ protected void _format(final XSwitchExpression expr, final FormattableDocument f }; Function1> _prepend_6 = this._formattingDataFactory.prepend(cnode_1, _function_19); format.operator_add(_prepend_6); - if (((expr.getDefault() != null) || (!Objects.equal(c_2, IterableExtensions.lastOrNull(expr.getCases()))))) { + if (((expr.getDefault() != null) || (!Objects.equals(c_2, IterableExtensions.lastOrNull(expr.getCases()))))) { final Procedure1 _function_20 = (FormattingDataInit it) -> { it.newLine(); }; @@ -2338,7 +2338,7 @@ protected void _format(final XSwitchExpression expr, final FormattableDocument f Function1> _prepend_7 = this._formattingDataFactory.prepend(cnode_1, _function_23); format.operator_add(_prepend_7); } - if (((expr.getDefault() != null) || (!Objects.equal(c_2, IterableExtensions.lastOrNull(expr.getCases()))))) { + if (((expr.getDefault() != null) || (!Objects.equals(c_2, IterableExtensions.lastOrNull(expr.getCases()))))) { final Procedure1 _function_24 = (FormattingDataInit it) -> { it.newLine(); it.decreaseIndentation(); @@ -2540,7 +2540,7 @@ protected void formatClosureMultiLine(final XClosure expr, final INode open, fin Function1> _prepend_2 = this._formattingDataFactory.prepend(semicolon, _function_5); format.operator_add(_prepend_2); XExpression _lastOrNull = IterableExtensions.lastOrNull(children); - boolean _notEquals = (!Objects.equal(c, _lastOrNull)); + boolean _notEquals = (!Objects.equals(c, _lastOrNull)); if (_notEquals) { INode _elvis = null; if (semicolon != null) { @@ -2612,7 +2612,7 @@ protected void formatClosureWrapIfNeeded(final XClosure expr, final INode open, if (_fitsIntoLine) { final Procedure1 _function_2 = (FormattingDataInit it) -> { XExpression _head = IterableExtensions.head(children); - boolean _equals = Objects.equal(_head, c); + boolean _equals = Objects.equals(_head, c); if (_equals) { it.noSpace(); } else { diff --git a/org.eclipse.xtext.xbase/xtend-gen/org/eclipse/xtext/xbase/formatting2/XbaseFormatter.java b/org.eclipse.xtext.xbase/xtend-gen/org/eclipse/xtext/xbase/formatting2/XbaseFormatter.java index b267aeb60ea..2eb20250442 100644 --- a/org.eclipse.xtext.xbase/xtend-gen/org/eclipse/xtext/xbase/formatting2/XbaseFormatter.java +++ b/org.eclipse.xtext.xbase/xtend-gen/org/eclipse/xtext/xbase/formatting2/XbaseFormatter.java @@ -8,11 +8,11 @@ */ package org.eclipse.xtext.xbase.formatting2; -import com.google.common.base.Objects; import com.google.inject.Inject; import java.util.Arrays; import java.util.Collection; import java.util.List; +import java.util.Objects; import java.util.function.Consumer; import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EObject; @@ -309,9 +309,9 @@ protected XClosure builder(final List params) { { final EObject grammarElement = this.grammarElement(IterableExtensions.lastOrNull(params)); XClosure _xifexpression_1 = null; - if (((Objects.equal(grammarElement, this.grammar.getXMemberFeatureCallAccess().getMemberCallArgumentsXClosureParserRuleCall_1_1_4_0()) || - Objects.equal(grammarElement, this.grammar.getXFeatureCallAccess().getFeatureCallArgumentsXClosureParserRuleCall_4_0())) || - Objects.equal(grammarElement, this.grammar.getXConstructorCallAccess().getArgumentsXClosureParserRuleCall_5_0()))) { + if (((Objects.equals(grammarElement, this.grammar.getXMemberFeatureCallAccess().getMemberCallArgumentsXClosureParserRuleCall_1_1_4_0()) || + Objects.equals(grammarElement, this.grammar.getXFeatureCallAccess().getFeatureCallArgumentsXClosureParserRuleCall_4_0())) || + Objects.equals(grammarElement, this.grammar.getXConstructorCallAccess().getArgumentsXClosureParserRuleCall_5_0()))) { XExpression _lastOrNull_1 = IterableExtensions.lastOrNull(params); _xifexpression_1 = ((XClosure) _lastOrNull_1); } @@ -511,7 +511,7 @@ protected void _format(final XBinaryOperation expr, @Extension final IFormattabl IEObjectRegion _regionForEObject = this.regionForEObject(expr); final SeparatorRegions calls = new SeparatorRegions(_regionForEObject); EObject top = expr; - while (Objects.equal(this.binaryOperationPrecedence(top), precendece)) { + while (Objects.equals(this.binaryOperationPrecedence(top), precendece)) { { calls.prependWithLeadingSeparator(((XBinaryOperation) top), this.regionFor(top).feature(XbasePackage.Literals.XABSTRACT_FEATURE_CALL__FEATURE)); @@ -828,7 +828,7 @@ protected void _format(final XTryCatchFinallyExpression expr, @Extension final I it.noSpace(); }; format.format(format.append(format.prepend(cc.getDeclaredParam(), _function_1), _function_2)); - if (((!Objects.equal(cc, IterableExtensions.lastOrNull(expr.getCatchClauses()))) || (expr.getFinallyExpression() != null))) { + if (((!Objects.equals(cc, IterableExtensions.lastOrNull(expr.getCatchClauses()))) || (expr.getFinallyExpression() != null))) { this.formatBodyInline(cc.getExpression(), true, format); } else { this.formatBody(cc.getExpression(), true, format); @@ -946,7 +946,7 @@ protected void _format(final XSwitchExpression expr, @Extension final IFormattab }; format.prepend(c_1.getThen(), _function_8); XCasePart _lastOrNull = IterableExtensions.lastOrNull(expr.getCases()); - boolean _notEquals = (!Objects.equal(c_1, _lastOrNull)); + boolean _notEquals = (!Objects.equals(c_1, _lastOrNull)); if (_notEquals) { final Procedure1 _function_9 = (IHiddenRegionFormatter it) -> { it.newLine(); @@ -1166,7 +1166,7 @@ protected void _format(final XClosure expr, @Extension final IFormattableDocumen }; final Procedure1 _function_7 = (IHiddenRegionFormatter it_1) -> { XExpression _lastOrNull = IterableExtensions.lastOrNull(children); - boolean _equals = Objects.equal(c, _lastOrNull); + boolean _equals = Objects.equals(c, _lastOrNull); if (_equals) { it_1.noSpace(); } else { @@ -1177,7 +1177,7 @@ protected void _format(final XClosure expr, @Extension final IFormattableDocumen } else { final Procedure1 _function_8 = (IHiddenRegionFormatter it_1) -> { XExpression _lastOrNull = IterableExtensions.lastOrNull(children); - boolean _equals = Objects.equal(c, _lastOrNull); + boolean _equals = Objects.equals(c, _lastOrNull); if (_equals) { it_1.noSpace(); } else { diff --git a/org.eclipse.xtext.xbase/xtend-gen/org/eclipse/xtext/xbase/formatting2/XtypeFormatter.java b/org.eclipse.xtext.xbase/xtend-gen/org/eclipse/xtext/xbase/formatting2/XtypeFormatter.java index 1b606d39513..072899d58c2 100644 --- a/org.eclipse.xtext.xbase/xtend-gen/org/eclipse/xtext/xbase/formatting2/XtypeFormatter.java +++ b/org.eclipse.xtext.xbase/xtend-gen/org/eclipse/xtext/xbase/formatting2/XtypeFormatter.java @@ -8,9 +8,9 @@ */ package org.eclipse.xtext.xbase.formatting2; -import com.google.common.base.Objects; import java.util.Arrays; import java.util.List; +import java.util.Objects; import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EObject; import org.eclipse.xtext.common.types.JvmParameterizedTypeReference; @@ -134,7 +134,7 @@ protected void _format(final XImportSection section, @Extension final IFormattab { format.format(imp); XImportDeclaration _lastOrNull = IterableExtensions.lastOrNull(section.getImportDeclarations()); - boolean _notEquals = (!Objects.equal(imp, _lastOrNull)); + boolean _notEquals = (!Objects.equals(imp, _lastOrNull)); if (_notEquals) { format.append(imp, XbaseFormatterPreferenceKeys.blankLinesBetweenImports); } else { diff --git a/org.eclipse.xtext.xtext.generator/xtend-gen/org/eclipse/xtext/xtext/generator/ecore/EMFGeneratorFragment2.java b/org.eclipse.xtext.xtext.generator/xtend-gen/org/eclipse/xtext/xtext/generator/ecore/EMFGeneratorFragment2.java index 41c577a5ada..248d37f02e7 100644 --- a/org.eclipse.xtext.xtext.generator/xtend-gen/org/eclipse/xtext/xtext/generator/ecore/EMFGeneratorFragment2.java +++ b/org.eclipse.xtext.xtext.generator/xtend-gen/org/eclipse/xtext/xtext/generator/ecore/EMFGeneratorFragment2.java @@ -8,7 +8,6 @@ */ package org.eclipse.xtext.xtext.generator.ecore; -import com.google.common.base.Objects; import com.google.common.collect.Iterables; import com.google.common.collect.Sets; import com.google.common.io.CharStreams; @@ -28,6 +27,7 @@ import java.util.HashSet; import java.util.List; import java.util.Map; +import java.util.Objects; import java.util.Properties; import java.util.Set; import org.apache.log4j.Logger; @@ -689,7 +689,7 @@ private GenPackage findGenPackageByNsURI(final GenModel genModel, final String n throw new RuntimeException(_plus); } String _nsURI = ecorePackage.getNsURI(); - boolean _equals = Objects.equal(nsURI, _nsURI); + boolean _equals = Objects.equals(nsURI, _nsURI); if (_equals) { return genPackage; } @@ -710,7 +710,7 @@ private Map createENamedElementMapping(final Map result, final EPackage usedEPackage, final EPackage loadedEPackage) { - if (((loadedEPackage != null) && (!Objects.equal(usedEPackage, loadedEPackage)))) { + if (((loadedEPackage != null) && (!Objects.equals(usedEPackage, loadedEPackage)))) { result.put(usedEPackage, loadedEPackage); EList _eClassifiers = usedEPackage.getEClassifiers(); for (final EClassifier usedClassifier : _eClassifiers) { @@ -733,7 +733,7 @@ private void putMappingData(final Map result, final EPackage u final Function1 _function = (EPackage it) -> { String _name = it.getName(); String _name_1 = usedNestedPackage.getName(); - return Boolean.valueOf(Objects.equal(_name, _name_1)); + return Boolean.valueOf(Objects.equals(_name, _name_1)); }; final EPackage loadedNestedPackage = IterableExtensions.findFirst(loadedEPackage.getESubpackages(), _function); if ((loadedNestedPackage != null)) { @@ -950,7 +950,7 @@ protected List getGenPackagesForPackages(final GenModel existingGenM _nsURI=_ecorePackage.getNsURI(); } String _nsURI_1 = pkg.getNsURI(); - return Boolean.valueOf(Objects.equal(_nsURI, _nsURI_1)); + return Boolean.valueOf(Objects.equals(_nsURI, _nsURI_1)); }; boolean _exists = IterableExtensions.exists(existingGenModel.getGenPackages(), _function); boolean _not = (!_exists); diff --git a/org.eclipse.xtext.xtext.generator/xtend-gen/org/eclipse/xtext/xtext/generator/grammarAccess/GrammarAccessExtensions.java b/org.eclipse.xtext.xtext.generator/xtend-gen/org/eclipse/xtext/xtext/generator/grammarAccess/GrammarAccessExtensions.java index 71f660b493c..b31e870bedb 100644 --- a/org.eclipse.xtext.xtext.generator/xtend-gen/org/eclipse/xtext/xtext/generator/grammarAccess/GrammarAccessExtensions.java +++ b/org.eclipse.xtext.xtext.generator/xtend-gen/org/eclipse/xtext/xtext/generator/grammarAccess/GrammarAccessExtensions.java @@ -8,7 +8,6 @@ */ package org.eclipse.xtext.xtext.generator.grammarAccess; -import com.google.common.base.Objects; import com.google.common.base.Strings; import com.google.common.collect.Iterables; import com.google.inject.Binder; @@ -19,6 +18,7 @@ import java.util.Iterator; import java.util.List; import java.util.Map; +import java.util.Objects; import org.eclipse.emf.ecore.EClassifier; import org.eclipse.emf.ecore.EObject; import org.eclipse.xtend.lib.annotations.FinalFieldsConstructor; @@ -785,7 +785,7 @@ public boolean isCalled(final AbstractRule rule, final Grammar grammar) { return GrammarUtil.containedRuleCalls(it); }))), ((Function1) (RuleCall ruleCall) -> { AbstractRule _rule = ruleCall.getRule(); - return Boolean.valueOf(Objects.equal(_rule, rule)); + return Boolean.valueOf(Objects.equals(_rule, rule)); }))); } return _xblockexpression; @@ -895,7 +895,7 @@ protected List _contentsAsList(final UnorderedGroup it) { public String setOrAdd(final Action it) { String _xifexpression = null; String _operator = it.getOperator(); - boolean _equals = Objects.equal(_operator, "+="); + boolean _equals = Objects.equals(_operator, "+="); if (_equals) { _xifexpression = "add"; } else { @@ -907,7 +907,7 @@ public String setOrAdd(final Action it) { public String setOrAdd(final Assignment it) { String _xifexpression = null; String _operator = it.getOperator(); - boolean _equals = Objects.equal(_operator, "+="); + boolean _equals = Objects.equals(_operator, "+="); if (_equals) { _xifexpression = "add"; } else { diff --git a/org.eclipse.xtext.xtext.generator/xtend-gen/org/eclipse/xtext/xtext/generator/grammarAccess/GrammarAccessFragment2.java b/org.eclipse.xtext.xtext.generator/xtend-gen/org/eclipse/xtext/xtext/generator/grammarAccess/GrammarAccessFragment2.java index 3b27095a588..6b06185dd9a 100644 --- a/org.eclipse.xtext.xtext.generator/xtend-gen/org/eclipse/xtext/xtext/generator/grammarAccess/GrammarAccessFragment2.java +++ b/org.eclipse.xtext.xtext.generator/xtend-gen/org/eclipse/xtext/xtext/generator/grammarAccess/GrammarAccessFragment2.java @@ -8,7 +8,6 @@ */ package org.eclipse.xtext.xtext.generator.grammarAccess; -import com.google.common.base.Objects; import com.google.common.collect.Iterables; import com.google.inject.Inject; import java.io.IOException; @@ -17,6 +16,7 @@ import java.util.HashSet; import java.util.List; import java.util.Map; +import java.util.Objects; import java.util.Set; import org.apache.log4j.Logger; import org.eclipse.emf.common.util.EList; @@ -85,7 +85,7 @@ public class GrammarAccessFragment2 extends AbstractXtextGeneratorFragment { public void generate() { final GuiceModuleAccess.BindingFactory bindingFactory = new GuiceModuleAccess.BindingFactory(); String _name = this.getLanguage().getGrammar().getName(); - boolean _notEquals = (!Objects.equal(_name, "org.eclipse.xtext.common.Terminals")); + boolean _notEquals = (!Objects.equals(_name, "org.eclipse.xtext.common.Terminals")); if (_notEquals) { TypeReference _typeRef = TypeReference.typeRef(ClassLoader.class); StringConcatenationClient _client = new StringConcatenationClient() { @@ -190,7 +190,7 @@ protected void addAllGrammarsToResource(final Resource resource, final Grammar g final Resource packResource = pack.eResource(); String _string = packResource.getURI().toString(); String _nsURI = pack.getNsURI(); - boolean _notEquals = (!Objects.equal(_string, _nsURI)); + boolean _notEquals = (!Objects.equals(_string, _nsURI)); if (_notEquals) { final ResourceSet packResourceSet = packResource.getResourceSet(); if ((packResourceSet != null)) { diff --git a/org.eclipse.xtext.xtext.generator/xtend-gen/org/eclipse/xtext/xtext/generator/junit/JUnitFragment.java b/org.eclipse.xtext.xtext.generator/xtend-gen/org/eclipse/xtext/xtext/generator/junit/JUnitFragment.java index 127fa0f4534..39b00d86919 100644 --- a/org.eclipse.xtext.xtext.generator/xtend-gen/org/eclipse/xtext/xtext/generator/junit/JUnitFragment.java +++ b/org.eclipse.xtext.xtext.generator/xtend-gen/org/eclipse/xtext/xtext/generator/junit/JUnitFragment.java @@ -8,9 +8,9 @@ */ package org.eclipse.xtext.xtext.generator.junit; -import com.google.common.base.Objects; import com.google.inject.Inject; import com.google.inject.Injector; +import java.util.Objects; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EClassifier; import org.eclipse.emf.ecore.resource.ResourceSet; @@ -213,7 +213,7 @@ protected JavaFileAccess generateExampleRuntimeTest() { @Override protected void appendTo(StringConcatenationClient.TargetStringConcatenation _builder) { { - boolean _equals = Objects.equal(JUnitFragment.this.junitVersion, JUnitVersion.JUNIT_4); + boolean _equals = Objects.equals(JUnitFragment.this.junitVersion, JUnitVersion.JUNIT_4); if (_equals) { _builder.append("@"); _builder.append(runWith); @@ -224,7 +224,7 @@ protected void appendTo(StringConcatenationClient.TargetStringConcatenation _bui } } { - boolean _equals_1 = Objects.equal(JUnitFragment.this.junitVersion, JUnitVersion.JUNIT_5); + boolean _equals_1 = Objects.equals(JUnitFragment.this.junitVersion, JUnitVersion.JUNIT_5); if (_equals_1) { _builder.append("@"); _builder.append(extendWith); @@ -284,7 +284,7 @@ protected void appendTo(StringConcatenationClient.TargetStringConcatenation _bui _builder.append("val errors = result.eResource.errors"); _builder.newLine(); { - boolean _equals_2 = Objects.equal(JUnitFragment.this.junitVersion, JUnitVersion.JUNIT_4); + boolean _equals_2 = Objects.equals(JUnitFragment.this.junitVersion, JUnitVersion.JUNIT_4); if (_equals_2) { _builder.append("\t\t"); _builder.append(assert_, "\t\t"); @@ -299,7 +299,7 @@ protected void appendTo(StringConcatenationClient.TargetStringConcatenation _bui } } { - boolean _equals_3 = Objects.equal(JUnitFragment.this.junitVersion, JUnitVersion.JUNIT_5); + boolean _equals_3 = Objects.equals(JUnitFragment.this.junitVersion, JUnitVersion.JUNIT_5); if (_equals_3) { _builder.append("\t\t"); _builder.append(assert_, "\t\t"); @@ -377,7 +377,7 @@ protected JavaFileAccess generateJavaExampleRuntimeTest() { @Override protected void appendTo(StringConcatenationClient.TargetStringConcatenation _builder) { { - boolean _equals = Objects.equal(JUnitFragment.this.junitVersion, JUnitVersion.JUNIT_4); + boolean _equals = Objects.equals(JUnitFragment.this.junitVersion, JUnitVersion.JUNIT_4); if (_equals) { _builder.append("@"); _builder.append(runWith); @@ -388,7 +388,7 @@ protected void appendTo(StringConcatenationClient.TargetStringConcatenation _bui } } { - boolean _equals_1 = Objects.equal(JUnitFragment.this.junitVersion, JUnitVersion.JUNIT_5); + boolean _equals_1 = Objects.equals(JUnitFragment.this.junitVersion, JUnitVersion.JUNIT_5); if (_equals_1) { _builder.append("@"); _builder.append(extendWith); @@ -444,7 +444,7 @@ protected void appendTo(StringConcatenationClient.TargetStringConcatenation _bui _builder.append("> errors = result.eResource().getErrors();"); _builder.newLineIfNotEmpty(); { - boolean _equals_2 = Objects.equal(JUnitFragment.this.junitVersion, JUnitVersion.JUNIT_4); + boolean _equals_2 = Objects.equals(JUnitFragment.this.junitVersion, JUnitVersion.JUNIT_4); if (_equals_2) { _builder.append("\t\t"); _builder.append(assert_, "\t\t"); @@ -455,7 +455,7 @@ protected void appendTo(StringConcatenationClient.TargetStringConcatenation _bui } } { - boolean _equals_3 = Objects.equal(JUnitFragment.this.junitVersion, JUnitVersion.JUNIT_5); + boolean _equals_3 = Objects.equals(JUnitFragment.this.junitVersion, JUnitVersion.JUNIT_5); if (_equals_3) { _builder.append("\t\t"); _builder.append(assert_, "\t\t"); diff --git a/org.eclipse.xtext.xtext.generator/xtend-gen/org/eclipse/xtext/xtext/generator/model/JavaFileAccess.java b/org.eclipse.xtext.xtext.generator/xtend-gen/org/eclipse/xtext/xtext/generator/model/JavaFileAccess.java index 6d6a756835f..fd9d5a04bcc 100644 --- a/org.eclipse.xtext.xtext.generator/xtend-gen/org/eclipse/xtext/xtext/generator/model/JavaFileAccess.java +++ b/org.eclipse.xtext.xtext.generator/xtend-gen/org/eclipse/xtext/xtext/generator/model/JavaFileAccess.java @@ -8,10 +8,10 @@ */ package org.eclipse.xtext.xtext.generator.model; -import com.google.common.base.Objects; import java.util.Collections; import java.util.List; import java.util.Map; +import java.util.Objects; import java.util.Set; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EPackage; @@ -121,7 +121,7 @@ protected String getFileExtension() { public String importType(final TypeReference typeRef) { final List simpleNames = typeRef.getSimpleNames(); String usableName = null; - if ((Objects.equal(typeRef.getPackageName(), "java.lang") || Objects.equal(typeRef.getPackageName(), this.javaType.getPackageName()))) { + if ((Objects.equals(typeRef.getPackageName(), "java.lang") || Objects.equals(typeRef.getPackageName(), this.javaType.getPackageName()))) { usableName = IterableExtensions.join(simpleNames, "."); } else { boolean found = false; @@ -143,7 +143,7 @@ public String importType(final TypeReference typeRef) { this.imports.put(usableName, importable); found = true; } else { - boolean _equals = Objects.equal(imported, importable); + boolean _equals = Objects.equals(imported, importable); if (_equals) { found = true; } diff --git a/org.eclipse.xtext.xtext.generator/xtend-gen/org/eclipse/xtext/xtext/generator/model/ManifestAccess.java b/org.eclipse.xtext.xtext.generator/xtend-gen/org/eclipse/xtext/xtext/generator/model/ManifestAccess.java index bac54e828bd..5475cf5f183 100644 --- a/org.eclipse.xtext.xtext.generator/xtend-gen/org/eclipse/xtext/xtext/generator/model/ManifestAccess.java +++ b/org.eclipse.xtext.xtext.generator/xtend-gen/org/eclipse/xtext/xtext/generator/model/ManifestAccess.java @@ -8,11 +8,11 @@ */ package org.eclipse.xtext.xtext.generator.model; -import com.google.common.base.Objects; import com.google.inject.Injector; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.util.List; +import java.util.Objects; import java.util.Set; import org.apache.log4j.Logger; import org.eclipse.xtend.lib.annotations.Accessors; @@ -67,7 +67,7 @@ public boolean merge(final ManifestAccess other) { { String _path = this.getPath(); String _path_1 = other.getPath(); - boolean _notEquals = (!Objects.equal(_path, _path_1)); + boolean _notEquals = (!Objects.equals(_path, _path_1)); if (_notEquals) { String _path_2 = this.getPath(); String _plus = ("Merging manifest files with different paths: " + _path_2); @@ -76,7 +76,7 @@ public boolean merge(final ManifestAccess other) { String _plus_2 = (_plus_1 + _path_3); ManifestAccess.LOG.warn(_plus_2); } - boolean _notEquals_1 = (!Objects.equal(this.bundleName, other.bundleName)); + boolean _notEquals_1 = (!Objects.equals(this.bundleName, other.bundleName)); if (_notEquals_1) { if ((this.bundleName == null)) { this.bundleName = other.bundleName; @@ -86,7 +86,7 @@ public boolean merge(final ManifestAccess other) { } } } - boolean _notEquals_2 = (!Objects.equal(this.symbolicName, other.symbolicName)); + boolean _notEquals_2 = (!Objects.equals(this.symbolicName, other.symbolicName)); if (_notEquals_2) { if ((this.symbolicName == null)) { this.symbolicName = other.symbolicName; @@ -96,7 +96,7 @@ public boolean merge(final ManifestAccess other) { } } } - boolean _notEquals_3 = (!Objects.equal(this.activator, other.activator)); + boolean _notEquals_3 = (!Objects.equals(this.activator, other.activator)); if (_notEquals_3) { if ((this.activator == null)) { this.activator = other.activator; @@ -106,7 +106,7 @@ public boolean merge(final ManifestAccess other) { } } } - boolean _notEquals_4 = (!Objects.equal(this.version, other.version)); + boolean _notEquals_4 = (!Objects.equals(this.version, other.version)); if (_notEquals_4) { ManifestAccess.LOG.warn(((("Merging manifest files with different versions: " + this.version) + ", ") + other.version)); } @@ -200,7 +200,7 @@ public CharSequence getContent() { { final Function1 _function = (String it) -> { String _effectiveSymbolicName = this.getEffectiveSymbolicName(); - return Boolean.valueOf((!Objects.equal(it, _effectiveSymbolicName))); + return Boolean.valueOf((!Objects.equals(it, _effectiveSymbolicName))); }; Iterable _filter = IterableExtensions.filter(IterableExtensions.sort(this.requiredBundles), _function); boolean _hasElements_1 = false; diff --git a/org.eclipse.xtext.xtext.generator/xtend-gen/org/eclipse/xtext/xtext/generator/model/PluginXmlAccess.java b/org.eclipse.xtext.xtext.generator/xtend-gen/org/eclipse/xtext/xtext/generator/model/PluginXmlAccess.java index 827f5d857cc..7253367c4c5 100644 --- a/org.eclipse.xtext.xtext.generator/xtend-gen/org/eclipse/xtext/xtext/generator/model/PluginXmlAccess.java +++ b/org.eclipse.xtext.xtext.generator/xtend-gen/org/eclipse/xtext/xtext/generator/model/PluginXmlAccess.java @@ -8,10 +8,10 @@ */ package org.eclipse.xtext.xtext.generator.model; -import com.google.common.base.Objects; import com.google.inject.Inject; import com.google.inject.Injector; import java.util.List; +import java.util.Objects; import org.apache.log4j.Logger; import org.eclipse.xtend.lib.annotations.Accessors; import org.eclipse.xtend2.lib.StringConcatenation; @@ -82,7 +82,7 @@ public boolean merge(final PluginXmlAccess other) { { String _path = this.getPath(); String _path_1 = other.getPath(); - boolean _notEquals = (!Objects.equal(_path, _path_1)); + boolean _notEquals = (!Objects.equals(_path, _path_1)); if (_notEquals) { String _path_2 = this.getPath(); String _plus = ("Merging plugin.xml files with different paths: " + _path_2); diff --git a/org.eclipse.xtext.xtext.generator/xtend-gen/org/eclipse/xtext/xtext/generator/parser/antlr/XtextAntlrGeneratorFragment2.java b/org.eclipse.xtext.xtext.generator/xtend-gen/org/eclipse/xtext/xtext/generator/parser/antlr/XtextAntlrGeneratorFragment2.java index 7c4291bb1b8..8533ac82a9f 100644 --- a/org.eclipse.xtext.xtext.generator/xtend-gen/org/eclipse/xtext/xtext/generator/parser/antlr/XtextAntlrGeneratorFragment2.java +++ b/org.eclipse.xtext.xtext.generator/xtend-gen/org/eclipse/xtext/xtext/generator/parser/antlr/XtextAntlrGeneratorFragment2.java @@ -8,7 +8,6 @@ */ package org.eclipse.xtext.xtext.generator.parser.antlr; -import com.google.common.base.Objects; import com.google.common.collect.ImmutableMap; import com.google.common.collect.Iterables; import com.google.common.collect.Lists; @@ -21,6 +20,7 @@ import java.util.Collections; import java.util.List; import java.util.Map; +import java.util.Objects; import java.util.Set; import org.antlr.runtime.CharStream; import org.antlr.runtime.Token; @@ -542,7 +542,7 @@ protected void appendTo(StringConcatenationClient.TargetStringConcatenation _bui }; final Function1 _function_1 = (TerminalRule it) -> { String _upperCase = it.getName().toUpperCase(); - return Boolean.valueOf(Objects.equal(_upperCase, "WS")); + return Boolean.valueOf(Objects.equals(_upperCase, "WS")); }; boolean _exists = IterableExtensions.exists(ListExtensions.map(GrammarUtil.allTerminalRules(XtextAntlrGeneratorFragment2.this.getGrammar()), _function), _function_1); if (_exists) { @@ -1107,7 +1107,7 @@ protected void appendTo(StringConcatenationClient.TargetStringConcatenation _bui }; final Function1 _function_1 = (TerminalRule it) -> { String _upperCase = it.getName().toUpperCase(); - return Boolean.valueOf(Objects.equal(_upperCase, "WS")); + return Boolean.valueOf(Objects.equals(_upperCase, "WS")); }; boolean _exists = IterableExtensions.exists(ListExtensions.map(GrammarUtil.allTerminalRules(XtextAntlrGeneratorFragment2.this.getGrammar()), _function), _function_1); if (_exists) { diff --git a/org.eclipse.xtext.xtext.generator/xtend-gen/org/eclipse/xtext/xtext/generator/scoping/ImportNamespacesScopingFragment2.java b/org.eclipse.xtext.xtext.generator/xtend-gen/org/eclipse/xtext/xtext/generator/scoping/ImportNamespacesScopingFragment2.java index 1d97d2b79ea..fd27622597a 100644 --- a/org.eclipse.xtext.xtext.generator/xtend-gen/org/eclipse/xtext/xtext/generator/scoping/ImportNamespacesScopingFragment2.java +++ b/org.eclipse.xtext.xtext.generator/xtend-gen/org/eclipse/xtext/xtext/generator/scoping/ImportNamespacesScopingFragment2.java @@ -8,9 +8,9 @@ */ package org.eclipse.xtext.xtext.generator.scoping; -import com.google.common.base.Objects; import com.google.inject.Inject; import com.google.inject.name.Names; +import java.util.Objects; import java.util.Set; import org.eclipse.xtend.lib.annotations.AccessorType; import org.eclipse.xtend.lib.annotations.Accessors; @@ -54,12 +54,12 @@ public class ImportNamespacesScopingFragment2 extends AbstractInheritingFragment protected TypeReference getScopeProviderClass(final Grammar grammar) { String _name = grammar.getName(); - boolean _equals = Objects.equal(_name, "org.eclipse.xtext.xbase.Xbase"); + boolean _equals = Objects.equals(_name, "org.eclipse.xtext.xbase.Xbase"); if (_equals) { return TypeReference.typeRef("org.eclipse.xtext.xbase.scoping.batch.XbaseBatchScopeProvider"); } String _name_1 = grammar.getName(); - boolean _equals_1 = Objects.equal(_name_1, "org.eclipse.xtext.xbase.annotations.XbaseWithAnnotations"); + boolean _equals_1 = Objects.equals(_name_1, "org.eclipse.xtext.xbase.annotations.XbaseWithAnnotations"); if (_equals_1) { return TypeReference.typeRef("org.eclipse.xtext.xbase.annotations.typesystem.XbaseWithAnnotationsBatchScopeProvider"); } diff --git a/org.eclipse.xtext.xtext.generator/xtend-gen/org/eclipse/xtext/xtext/generator/serializer/SerializerFragment2.java b/org.eclipse.xtext.xtext.generator/xtend-gen/org/eclipse/xtext/xtext/generator/serializer/SerializerFragment2.java index d0ff253ae60..bd68cd4d131 100644 --- a/org.eclipse.xtext.xtext.generator/xtend-gen/org/eclipse/xtext/xtext/generator/serializer/SerializerFragment2.java +++ b/org.eclipse.xtext.xtext.generator/xtend-gen/org/eclipse/xtext/xtext/generator/serializer/SerializerFragment2.java @@ -8,7 +8,6 @@ */ package org.eclipse.xtext.xtext.generator.serializer; -import com.google.common.base.Objects; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Iterables; import com.google.common.collect.LinkedHashMultimap; @@ -19,6 +18,7 @@ import java.util.LinkedHashMap; import java.util.List; import java.util.Map; +import java.util.Objects; import java.util.Set; import java.util.function.Consumer; import org.apache.log4j.Logger; @@ -536,7 +536,7 @@ private Iterable getAccessedClasses(final EPackage pkg) { return it.getType(); }; final Function1 _function_1 = (EClass it) -> { - return Boolean.valueOf(((it != null) && Objects.equal(it.getEPackage(), pkg))); + return Boolean.valueOf(((it != null) && Objects.equals(it.getEPackage(), pkg))); }; final Function1 _function_2 = (EClass it) -> { return it.getName(); diff --git a/org.eclipse.xtext.xtext.generator/xtend-gen/org/eclipse/xtext/xtext/generator/ui/contentAssist/ContentAssistFragment2.java b/org.eclipse.xtext.xtext.generator/xtend-gen/org/eclipse/xtext/xtext/generator/ui/contentAssist/ContentAssistFragment2.java index 195cf578b11..f9294b4abaa 100644 --- a/org.eclipse.xtext.xtext.generator/xtend-gen/org/eclipse/xtext/xtext/generator/ui/contentAssist/ContentAssistFragment2.java +++ b/org.eclipse.xtext.xtext.generator/xtend-gen/org/eclipse/xtext/xtext/generator/ui/contentAssist/ContentAssistFragment2.java @@ -8,7 +8,6 @@ */ package org.eclipse.xtext.xtext.generator.ui.contentAssist; -import com.google.common.base.Objects; import com.google.common.collect.Iterables; import com.google.common.collect.Sets; import com.google.inject.Inject; @@ -16,6 +15,7 @@ import java.util.Arrays; import java.util.HashSet; import java.util.List; +import java.util.Objects; import java.util.Set; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EObject; @@ -376,7 +376,7 @@ private StringConcatenationClient handleAssignment(final Assignment assignment) final Function1 _function = (Assignment it) -> { String _feature = it.getFeature(); String _feature_1 = assignment.getFeature(); - return Boolean.valueOf(Objects.equal(_feature, _feature_1)); + return Boolean.valueOf(Objects.equals(_feature, _feature_1)); }; final Function1 _function_1 = (Assignment it) -> { return it.getTerminal(); diff --git a/org.eclipse.xtext.xtext.generator/xtend-gen/org/eclipse/xtext/xtext/generator/web/WebIntegrationFragment.java b/org.eclipse.xtext.xtext.generator/xtend-gen/org/eclipse/xtext/xtext/generator/web/WebIntegrationFragment.java index fed12ebbe0e..9094bbc3dbf 100644 --- a/org.eclipse.xtext.xtext.generator/xtend-gen/org/eclipse/xtext/xtext/generator/web/WebIntegrationFragment.java +++ b/org.eclipse.xtext.xtext.generator/xtend-gen/org/eclipse/xtext/xtext/generator/web/WebIntegrationFragment.java @@ -8,7 +8,6 @@ */ package org.eclipse.xtext.xtext.generator.web; -import com.google.common.base.Objects; import com.google.common.collect.LinkedHashMultimap; import com.google.common.collect.Multimap; import com.google.inject.Inject; @@ -17,6 +16,7 @@ import java.util.Collections; import java.util.HashSet; import java.util.List; +import java.util.Objects; import java.util.Set; import java.util.function.Consumer; import java.util.regex.Pattern; @@ -630,7 +630,7 @@ protected void appendTo(StringConcatenationClient.TargetStringConcatenation _bui _builder.append(state, "\t\t"); _builder.append(": "); { - boolean _equals = Objects.equal(state, "meta"); + boolean _equals = Objects.equals(state, "meta"); if (_equals) { _builder.append("{"); } else { @@ -655,7 +655,7 @@ protected void appendTo(StringConcatenationClient.TargetStringConcatenation _bui _builder.newLineIfNotEmpty(); _builder.append("\t\t"); { - boolean _equals_1 = Objects.equal(state, "meta"); + boolean _equals_1 = Objects.equals(state, "meta"); if (_equals_1) { _builder.append("}"); } else { @@ -696,7 +696,7 @@ protected CharSequence generateKeywords(final List wordKeywords, final L } else { _builder.appendImmediate("|", ""); } - String _regexpString = RegexpExtensions.toRegexpString(kw, ((!Objects.equal(this.framework.get(), WebIntegrationFragment.Framework.CODEMIRROR)) && this.ignoreCase)); + String _regexpString = RegexpExtensions.toRegexpString(kw, ((!Objects.equals(this.framework.get(), WebIntegrationFragment.Framework.CODEMIRROR)) && this.ignoreCase)); _builder.append(_regexpString); } } @@ -717,7 +717,7 @@ protected CharSequence generateKeywords(final List wordKeywords, final L } else { _builder.appendImmediate("|", ""); } - String _regexpString_1 = RegexpExtensions.toRegexpString(kw_1, ((!Objects.equal(this.framework.get(), WebIntegrationFragment.Framework.CODEMIRROR)) && this.ignoreCase)); + String _regexpString_1 = RegexpExtensions.toRegexpString(kw_1, ((!Objects.equals(this.framework.get(), WebIntegrationFragment.Framework.CODEMIRROR)) && this.ignoreCase)); _builder.append(_regexpString_1); } } @@ -730,7 +730,7 @@ protected CharSequence generateKeywords(final List wordKeywords, final L protected CharSequence generateKeywordsRegExp() { CharSequence _xifexpression = null; - if ((Objects.equal(this.framework.get(), WebIntegrationFragment.Framework.CODEMIRROR) && this.ignoreCase)) { + if ((Objects.equals(this.framework.get(), WebIntegrationFragment.Framework.CODEMIRROR) && this.ignoreCase)) { StringConcatenation _builder = new StringConcatenation(); _builder.append("new RegExp(\"\\\\b(?:\" + keywords + \")\\\\b\", \"gi\")"); _xifexpression = _builder; @@ -744,7 +744,7 @@ protected CharSequence generateKeywordsRegExp() { protected CharSequence generateExtraKeywordsRegExp() { CharSequence _xifexpression = null; - if ((Objects.equal(this.framework.get(), WebIntegrationFragment.Framework.CODEMIRROR) && this.ignoreCase)) { + if ((Objects.equals(this.framework.get(), WebIntegrationFragment.Framework.CODEMIRROR) && this.ignoreCase)) { StringConcatenation _builder = new StringConcatenation(); _builder.append("new RegExp(\"(?:^|\\\\s)(?:\" + extraKeywords + \")(?="); _builder.append(WebIntegrationFragment.DELIMITERS_PATTERN); @@ -896,12 +896,12 @@ protected Multimap createCodeMirrorPatterns(final String langId, _builder_9.append("]\"}"); patterns.put("start", _builder_9.toString()); } - if ((Objects.equal(this.framework.get(), WebIntegrationFragment.Framework.CODEMIRROR) && patterns.containsKey("comment"))) { + if ((Objects.equals(this.framework.get(), WebIntegrationFragment.Framework.CODEMIRROR) && patterns.containsKey("comment"))) { StringConcatenation _builder_10 = new StringConcatenation(); _builder_10.append("dontIndentStates: [\"comment\"]"); patterns.put("meta", _builder_10.toString()); } - if ((Objects.equal(this.framework.get(), WebIntegrationFragment.Framework.CODEMIRROR) && hasSingleLineComment)) { + if ((Objects.equals(this.framework.get(), WebIntegrationFragment.Framework.CODEMIRROR) && hasSingleLineComment)) { StringConcatenation _builder_11 = new StringConcatenation(); _builder_11.append("lineComment: \"//\""); patterns.put("meta", _builder_11.toString()); @@ -934,7 +934,7 @@ protected void appendTo(StringConcatenationClient.TargetStringConcatenation _bui _builder.newLine(); { WebIntegrationFragment.Framework _get = WebIntegrationFragment.this.framework.get(); - boolean _equals = Objects.equal(_get, WebIntegrationFragment.Framework.ORION); + boolean _equals = Objects.equals(_get, WebIntegrationFragment.Framework.ORION); if (_equals) { _builder.append("\t"); _builder.append(""); @@ -947,7 +947,7 @@ protected void appendTo(StringConcatenationClient.TargetStringConcatenation _bui _builder.newLineIfNotEmpty(); } else { WebIntegrationFragment.Framework _get_1 = WebIntegrationFragment.this.framework.get(); - boolean _equals_1 = Objects.equal(_get_1, WebIntegrationFragment.Framework.ACE); + boolean _equals_1 = Objects.equals(_get_1, WebIntegrationFragment.Framework.ACE); if (_equals_1) { _builder.append("\t"); _builder.append("lastOrNull(expr.getExpressions()); - boolean _notEquals = (!Objects.equal(child, _lastOrNull)); + boolean _notEquals = (!Objects.equals(child, _lastOrNull)); if (_notEquals) { final Procedure1 _function_2 = (IHiddenRegionFormatter it) -> { it.newLine(); @@ -141,7 +141,7 @@ protected void _format(final XBlockExpression expr, @Extension final IFormattabl } } else { XExpression _lastOrNull_1 = IterableExtensions.lastOrNull(expr.getExpressions()); - boolean _notEquals_1 = (!Objects.equal(child, _lastOrNull_1)); + boolean _notEquals_1 = (!Objects.equals(child, _lastOrNull_1)); if (_notEquals_1) { final Procedure1 _function_3 = (IHiddenRegionFormatter it) -> { it.newLine(); @@ -210,7 +210,7 @@ protected void _format(final XSwitchExpression expr, @Extension final IFormattab }; document.append(document.prepend(this.regionFor(c).feature(XbasePackage.Literals.XCASE_PART__FALL_THROUGH), _function_8), _function_9); document.format(c.getCase()); - if ((Objects.equal(c, IterableExtensions.lastOrNull(expr.getCases())) && (expr.getDefault() == null))) { + if ((Objects.equals(c, IterableExtensions.lastOrNull(expr.getCases())) && (expr.getDefault() == null))) { this.formatBody(c.getThen(), true, document); } else { this.formatBodyParagraph(c.getThen(), document); diff --git a/org.eclipse.xtext.xtext.wizard/xtend-gen/org/eclipse/xtext/xtext/wizard/IdeProjectDescriptor.java b/org.eclipse.xtext.xtext.wizard/xtend-gen/org/eclipse/xtext/xtext/wizard/IdeProjectDescriptor.java index 72cba8097b7..9ee5e01a8b1 100644 --- a/org.eclipse.xtext.xtext.wizard/xtend-gen/org/eclipse/xtext/xtext/wizard/IdeProjectDescriptor.java +++ b/org.eclipse.xtext.xtext.wizard/xtend-gen/org/eclipse/xtext/xtext/wizard/IdeProjectDescriptor.java @@ -8,10 +8,10 @@ */ package org.eclipse.xtext.xtext.wizard; -import com.google.common.base.Objects; import com.google.common.collect.Iterables; import java.util.Collections; import java.util.LinkedHashSet; +import java.util.Objects; import java.util.Set; import org.eclipse.xtend.lib.annotations.FinalFieldsConstructor; import org.eclipse.xtend2.lib.StringConcatenation; @@ -35,7 +35,7 @@ public Set getUpstreamProjects() { @Override public boolean isEclipsePluginProject() { - return (Objects.equal(this.getConfig().getPreferredBuildSystem(), BuildSystem.NONE) || this.getConfig().getUiProject().isEnabled()); + return (Objects.equals(this.getConfig().getPreferredBuildSystem(), BuildSystem.NONE) || this.getConfig().getUiProject().isEnabled()); } @Override @@ -70,7 +70,7 @@ public PomFile pom() { final Procedure1 _function = (PomFile it) -> { StringConcatenation _builder = new StringConcatenation(); { - if (((!Objects.equal(this.getConfig().getLanguageServer(), LanguageServer.NONE)) && this.isEclipsePluginProject())) { + if (((!Objects.equals(this.getConfig().getLanguageServer(), LanguageServer.NONE)) && this.isEclipsePluginProject())) { _builder.append(""); _builder.newLine(); _builder.append("\t"); @@ -116,7 +116,7 @@ public PomFile pom() { _builder.append(""); _builder.newLine(); { - if (((!this.isEclipsePluginProject()) && Objects.equal(this.getConfig().getSourceLayout(), SourceLayout.PLAIN))) { + if (((!this.isEclipsePluginProject()) && Objects.equals(this.getConfig().getSourceLayout(), SourceLayout.PLAIN))) { _builder.append("\t"); _builder.append(""); String _sourceFolder = this.sourceFolder(Outlet.MAIN_JAVA); @@ -305,7 +305,7 @@ public PomFile pom() { } { LanguageServer _languageServer = this.getConfig().getLanguageServer(); - boolean _notEquals = (!Objects.equal(_languageServer, LanguageServer.NONE)); + boolean _notEquals = (!Objects.equals(_languageServer, LanguageServer.NONE)); if (_notEquals) { { boolean _isEclipsePluginProject_1 = this.isEclipsePluginProject(); @@ -616,7 +616,7 @@ public PomFile pom() { } { LanguageServer _languageServer_1 = this.getConfig().getLanguageServer(); - boolean _equals = Objects.equal(_languageServer_1, LanguageServer.FATJAR); + boolean _equals = Objects.equals(_languageServer_1, LanguageServer.FATJAR); if (_equals) { _builder.append("\t\t"); _builder.append(""); @@ -937,7 +937,7 @@ public PomFile pom() { } { LanguageServer _languageServer_2 = this.getConfig().getLanguageServer(); - boolean _equals_1 = Objects.equal(_languageServer_2, LanguageServer.APP); + boolean _equals_1 = Objects.equals(_languageServer_2, LanguageServer.APP); if (_equals_1) { _builder.append("\t\t"); _builder.append(""); diff --git a/org.eclipse.xtext.xtext.wizard/xtend-gen/org/eclipse/xtext/xtext/wizard/ParentProjectDescriptor.java b/org.eclipse.xtext.xtext.wizard/xtend-gen/org/eclipse/xtext/xtext/wizard/ParentProjectDescriptor.java index e35504c79f5..9a5b46c05b6 100644 --- a/org.eclipse.xtext.xtext.wizard/xtend-gen/org/eclipse/xtext/xtext/wizard/ParentProjectDescriptor.java +++ b/org.eclipse.xtext.xtext.wizard/xtend-gen/org/eclipse/xtext/xtext/wizard/ParentProjectDescriptor.java @@ -9,12 +9,12 @@ package org.eclipse.xtext.xtext.wizard; import com.google.common.base.Charsets; -import com.google.common.base.Objects; import com.google.common.collect.Iterables; import com.google.common.io.Resources; import java.nio.charset.Charset; import java.util.ArrayList; import java.util.Collections; +import java.util.Objects; import java.util.Set; import org.eclipse.xtend.lib.annotations.FinalFieldsConstructor; import org.eclipse.xtend2.lib.StringConcatenation; @@ -44,7 +44,7 @@ public void setNameQualifier(final String nameQualifier) { @Override public boolean isEnabled() { - return ((this.getConfig().needsGradleBuild() || this.getConfig().needsMavenBuild()) || Objects.equal(this.getConfig().getProjectLayout(), ProjectLayout.HIERARCHICAL)); + return ((this.getConfig().needsGradleBuild() || this.getConfig().needsMavenBuild()) || Objects.equals(this.getConfig().getProjectLayout(), ProjectLayout.HIERARCHICAL)); } @Override @@ -258,13 +258,13 @@ public CharSequence settingsGradle() { StringConcatenation _builder = new StringConcatenation(); { final Function1 _function = (ProjectDescriptor it) -> { - return Boolean.valueOf(((!Objects.equal(it, this)) && it.isPartOfGradleBuild())); + return Boolean.valueOf(((!Objects.equals(it, this)) && it.isPartOfGradleBuild())); }; Iterable _filter = IterableExtensions.filter(this.getConfig().getEnabledProjects(), _function); for(final ProjectDescriptor p : _filter) { { ProjectLayout _projectLayout = this.getConfig().getProjectLayout(); - boolean _equals = Objects.equal(_projectLayout, ProjectLayout.FLAT); + boolean _equals = Objects.equals(_projectLayout, ProjectLayout.FLAT); if (_equals) { _builder.append("includeFlat"); } else { @@ -285,7 +285,7 @@ public CharSequence sourceLayoutGradle() { StringConcatenation _builder = new StringConcatenation(); { SourceLayout _sourceLayout = this.getConfig().getSourceLayout(); - boolean _equals = Objects.equal(_sourceLayout, SourceLayout.PLAIN); + boolean _equals = Objects.equals(_sourceLayout, SourceLayout.PLAIN); if (_equals) { _builder.append("if (name.endsWith(\".tests\")) {"); _builder.newLine(); @@ -472,7 +472,7 @@ public CharSequence sourceLayoutGradle() { _builder.newLine(); { SourceLayout _sourceLayout_1 = this.getConfig().getSourceLayout(); - boolean _notEquals = (!Objects.equal(_sourceLayout_1, SourceLayout.PLAIN)); + boolean _notEquals = (!Objects.equals(_sourceLayout_1, SourceLayout.PLAIN)); if (_notEquals) { _builder.append("\t"); _builder.append("from(sourceSets.main.allSource) {"); @@ -608,7 +608,7 @@ public PomFile pom() { _builder.newLine(); { final Function1 _function_1 = (ProjectDescriptor it_1) -> { - return Boolean.valueOf(((!Objects.equal(it_1, this)) && it_1.isPartOfMavenBuild())); + return Boolean.valueOf(((!Objects.equals(it_1, this)) && it_1.isPartOfMavenBuild())); }; Iterable _filter = IterableExtensions.filter(this.getConfig().getEnabledProjects(), _function_1); for(final ProjectDescriptor p : _filter) { @@ -616,7 +616,7 @@ public PomFile pom() { _builder.append(""); { ProjectLayout _projectLayout = this.getConfig().getProjectLayout(); - boolean _equals = Objects.equal(_projectLayout, ProjectLayout.FLAT); + boolean _equals = Objects.equals(_projectLayout, ProjectLayout.FLAT); if (_equals) { _builder.append("../"); } diff --git a/org.eclipse.xtext.xtext.wizard/xtend-gen/org/eclipse/xtext/xtext/wizard/PomFile.java b/org.eclipse.xtext.xtext.wizard/xtend-gen/org/eclipse/xtext/xtext/wizard/PomFile.java index 99997af4f1c..9a24f365e69 100644 --- a/org.eclipse.xtext.xtext.wizard/xtend-gen/org/eclipse/xtext/xtext/wizard/PomFile.java +++ b/org.eclipse.xtext.xtext.wizard/xtend-gen/org/eclipse/xtext/xtext/wizard/PomFile.java @@ -8,7 +8,7 @@ */ package org.eclipse.xtext.xtext.wizard; -import com.google.common.base.Objects; +import java.util.Objects; import java.util.Set; import org.eclipse.xtend.lib.annotations.Accessors; import org.eclipse.xtend2.lib.StringConcatenation; @@ -45,7 +45,7 @@ public String getContent() { { ProjectDescriptor _project = this.getProject(); ParentProjectDescriptor _parentProject = this.getProject().getConfig().getParentProject(); - boolean _notEquals = (!Objects.equal(_project, _parentProject)); + boolean _notEquals = (!Objects.equals(_project, _parentProject)); if (_notEquals) { _builder.append("\t"); _builder.append(""); @@ -70,7 +70,7 @@ public String getContent() { _builder.newLine(); { ProjectLayout _projectLayout = this.getProject().getConfig().getProjectLayout(); - boolean _equals = Objects.equal(_projectLayout, ProjectLayout.FLAT); + boolean _equals = Objects.equals(_projectLayout, ProjectLayout.FLAT); if (_equals) { _builder.append("\t"); _builder.append("\t"); @@ -200,7 +200,7 @@ public String getContent() { } { Scope _scope = dep.getScope(); - boolean _notEquals_1 = (!Objects.equal(_scope, Scope.COMPILE)); + boolean _notEquals_1 = (!Objects.equals(_scope, Scope.COMPILE)); if (_notEquals_1) { _builder.append("\t"); _builder.append("\t"); diff --git a/org.eclipse.xtext.xtext.wizard/xtend-gen/org/eclipse/xtext/xtext/wizard/ProjectDescriptor.java b/org.eclipse.xtext.xtext.wizard/xtend-gen/org/eclipse/xtext/xtext/wizard/ProjectDescriptor.java index 92acc9bed81..e15c9737922 100644 --- a/org.eclipse.xtext.xtext.wizard/xtend-gen/org/eclipse/xtext/xtext/wizard/ProjectDescriptor.java +++ b/org.eclipse.xtext.xtext.wizard/xtend-gen/org/eclipse/xtext/xtext/wizard/ProjectDescriptor.java @@ -8,7 +8,6 @@ */ package org.eclipse.xtext.xtext.wizard; -import com.google.common.base.Objects; import com.google.common.base.Strings; import com.google.common.collect.Iterables; import java.net.URL; @@ -16,6 +15,7 @@ import java.util.Collections; import java.util.LinkedHashSet; import java.util.List; +import java.util.Objects; import java.util.Set; import org.eclipse.xtend.lib.annotations.Accessors; import org.eclipse.xtend.lib.annotations.FinalFieldsConstructor; @@ -46,7 +46,7 @@ public String getName() { public String getLocation() { String _xifexpression = null; ProjectLayout _projectLayout = this.config.getProjectLayout(); - boolean _equals = Objects.equal(_projectLayout, ProjectLayout.FLAT); + boolean _equals = Objects.equals(_projectLayout, ProjectLayout.FLAT); if (_equals) { String _rootLocation = this.config.getRootLocation(); String _plus = (_rootLocation + "/"); diff --git a/org.eclipse.xtext.xtext.wizard/xtend-gen/org/eclipse/xtext/xtext/wizard/RuntimeProjectDescriptor.java b/org.eclipse.xtext.xtext.wizard/xtend-gen/org/eclipse/xtext/xtext/wizard/RuntimeProjectDescriptor.java index 035beb2f485..00afd5d86b4 100644 --- a/org.eclipse.xtext.xtext.wizard/xtend-gen/org/eclipse/xtext/xtext/wizard/RuntimeProjectDescriptor.java +++ b/org.eclipse.xtext.xtext.wizard/xtend-gen/org/eclipse/xtext/xtext/wizard/RuntimeProjectDescriptor.java @@ -8,12 +8,12 @@ */ package org.eclipse.xtext.xtext.wizard; -import com.google.common.base.Objects; import com.google.common.collect.Iterables; import java.nio.charset.Charset; import java.util.ArrayList; import java.util.Collections; import java.util.LinkedHashSet; +import java.util.Objects; import java.util.Set; import org.eclipse.xtend.lib.annotations.Accessors; import org.eclipse.xtend2.lib.StringConcatenation; @@ -77,7 +77,7 @@ public void setNameQualifier(final String nameQualifier) { @Override public boolean isEclipsePluginProject() { - return (Objects.equal(this.getConfig().getPreferredBuildSystem(), BuildSystem.NONE) || this.getConfig().getUiProject().isEnabled()); + return (Objects.equals(this.getConfig().getPreferredBuildSystem(), BuildSystem.NONE) || this.getConfig().getUiProject().isEnabled()); } @Override @@ -169,7 +169,7 @@ public Set getDevelopmentBundles() { if (_isFromExistingEcoreModels) { final Function1 _function = (EPackageInfo it) -> { String _fileExtension = it.getGenmodelURI().fileExtension(); - return Boolean.valueOf(Objects.equal(_fileExtension, "xcore")); + return Boolean.valueOf(Objects.equals(_fileExtension, "xcore")); }; boolean _exists = IterableExtensions.exists(this.getConfig().getEcore2Xtext().getEPackageInfos(), _function); if (_exists) { @@ -409,7 +409,7 @@ public CharSequence workflow() { } { SourceLayout _sourceLayout = this.getConfig().getSourceLayout(); - boolean _equals = Objects.equal(_sourceLayout, SourceLayout.MAVEN); + boolean _equals = Objects.equals(_sourceLayout, SourceLayout.MAVEN); if (_equals) { _builder.append("\t\t\t\t"); _builder.append("mavenLayout = true"); @@ -549,7 +549,7 @@ public CharSequence workflow() { _builder.newLine(); { JUnitVersion _junitVersion = this.getConfig().getJunitVersion(); - boolean _equals_1 = Objects.equal(_junitVersion, JUnitVersion.JUNIT_5); + boolean _equals_1 = Objects.equals(_junitVersion, JUnitVersion.JUNIT_5); if (_equals_1) { _builder.append("\t\t\t"); _builder.append("junitSupport = {"); @@ -697,7 +697,7 @@ public PomFile pom() { _builder.append(""); _builder.newLine(); { - if (((!this.isEclipsePluginProject()) && Objects.equal(this.getConfig().getSourceLayout(), SourceLayout.PLAIN))) { + if (((!this.isEclipsePluginProject()) && Objects.equals(this.getConfig().getSourceLayout(), SourceLayout.PLAIN))) { _builder.append("\t"); _builder.append(""); String _sourceFolder = this.sourceFolder(Outlet.MAIN_JAVA); @@ -1598,7 +1598,7 @@ private CharSequence workflowLaunchConfig() { _builder_1.newLine(); } else { BuildSystem _preferredBuildSystem = this.getConfig().getPreferredBuildSystem(); - boolean _equals = Objects.equal(_preferredBuildSystem, BuildSystem.MAVEN); + boolean _equals = Objects.equals(_preferredBuildSystem, BuildSystem.MAVEN); if (_equals) { _builder_1.append(""); _builder_1.newLine(); @@ -1641,7 +1641,7 @@ private CharSequence workflowLaunchConfig() { _builder_1.newLine(); } else { BuildSystem _preferredBuildSystem_1 = this.getConfig().getPreferredBuildSystem(); - boolean _equals_1 = Objects.equal(_preferredBuildSystem_1, BuildSystem.GRADLE); + boolean _equals_1 = Objects.equals(_preferredBuildSystem_1, BuildSystem.GRADLE); if (_equals_1) { _builder_1.append(""); _builder_1.newLine(); diff --git a/org.eclipse.xtext.xtext.wizard/xtend-gen/org/eclipse/xtext/xtext/wizard/TargetPlatformProject.java b/org.eclipse.xtext.xtext.wizard/xtend-gen/org/eclipse/xtext/xtext/wizard/TargetPlatformProject.java index 1f796b40eba..7577cf58cdc 100644 --- a/org.eclipse.xtext.xtext.wizard/xtend-gen/org/eclipse/xtext/xtext/wizard/TargetPlatformProject.java +++ b/org.eclipse.xtext.xtext.wizard/xtend-gen/org/eclipse/xtext/xtext/wizard/TargetPlatformProject.java @@ -8,10 +8,10 @@ */ package org.eclipse.xtext.xtext.wizard; -import com.google.common.base.Objects; import com.google.common.collect.Iterables; import java.util.ArrayList; import java.util.Collections; +import java.util.Objects; import java.util.Set; import org.eclipse.xtend.lib.annotations.FinalFieldsConstructor; import org.eclipse.xtend2.lib.StringConcatenation; @@ -210,7 +210,7 @@ public CharSequence target() { _builder.newLine(); { JUnitVersion _junitVersion = this.getConfig().getJunitVersion(); - boolean _equals = Objects.equal(_junitVersion, JUnitVersion.JUNIT_5); + boolean _equals = Objects.equals(_junitVersion, JUnitVersion.JUNIT_5); if (_equals) { _builder.append("\t\t\t"); _builder.append(""); diff --git a/org.eclipse.xtext.xtext.wizard/xtend-gen/org/eclipse/xtext/xtext/wizard/TestProjectDescriptor.java b/org.eclipse.xtext.xtext.wizard/xtend-gen/org/eclipse/xtext/xtext/wizard/TestProjectDescriptor.java index ba3e0422252..927c27b8acc 100644 --- a/org.eclipse.xtext.xtext.wizard/xtend-gen/org/eclipse/xtext/xtext/wizard/TestProjectDescriptor.java +++ b/org.eclipse.xtext.xtext.wizard/xtend-gen/org/eclipse/xtext/xtext/wizard/TestProjectDescriptor.java @@ -8,11 +8,11 @@ */ package org.eclipse.xtext.xtext.wizard; -import com.google.common.base.Objects; import com.google.common.collect.Iterables; import com.google.common.collect.Sets; import java.util.Collections; import java.util.LinkedHashSet; +import java.util.Objects; import java.util.Set; import org.eclipse.xtend.lib.annotations.Accessors; import org.eclipse.xtend2.lib.StringConcatenation; @@ -46,11 +46,11 @@ public Set getSourceFolders() { } public boolean isInlined() { - return (this.isEnabled() && (!Objects.equal(this.getConfig().getSourceLayout(), SourceLayout.PLAIN))); + return (this.isEnabled() && (!Objects.equals(this.getConfig().getSourceLayout(), SourceLayout.PLAIN))); } public boolean isSeparate() { - return (this.isEnabled() && Objects.equal(this.getConfig().getSourceLayout(), SourceLayout.PLAIN)); + return (this.isEnabled() && Objects.equals(this.getConfig().getSourceLayout(), SourceLayout.PLAIN)); } @Override @@ -75,7 +75,7 @@ public Set getExternalDependencies() { Set _externalDependencies = super.getExternalDependencies(); Iterables.addAll(deps, _externalDependencies); JUnitVersion _junitVersion = this.getConfig().getJunitVersion(); - boolean _equals = Objects.equal(_junitVersion, JUnitVersion.JUNIT_4); + boolean _equals = Objects.equals(_junitVersion, JUnitVersion.JUNIT_4); if (_equals) { ExternalDependency _externalDependency = new ExternalDependency(); final Procedure1 _function = (ExternalDependency it) -> { @@ -94,7 +94,7 @@ public Set getExternalDependencies() { deps.add(_doubleArrow); } JUnitVersion _junitVersion_1 = this.getConfig().getJunitVersion(); - boolean _equals_1 = Objects.equal(_junitVersion_1, JUnitVersion.JUNIT_5); + boolean _equals_1 = Objects.equals(_junitVersion_1, JUnitVersion.JUNIT_5); if (_equals_1) { ExternalDependency _externalDependency_1 = new ExternalDependency(); final Procedure1 _function_1 = (ExternalDependency it) -> { @@ -161,7 +161,7 @@ public PomFile pom() { _builder.append(""); _builder.newLine(); { - if (((!this.isEclipsePluginProject()) && Objects.equal(this.getConfig().getSourceLayout(), SourceLayout.PLAIN))) { + if (((!this.isEclipsePluginProject()) && Objects.equals(this.getConfig().getSourceLayout(), SourceLayout.PLAIN))) { _builder.append("\t"); _builder.append(""); String _sourceFolder = this.sourceFolder(Outlet.TEST_JAVA); @@ -393,7 +393,7 @@ public GradleBuildFile buildGradle() { GradleBuildFile _buildGradle = super.buildGradle(); final Procedure1 _function = (GradleBuildFile it) -> { JUnitVersion _junitVersion = this.getConfig().getJunitVersion(); - boolean _equals = Objects.equal(_junitVersion, JUnitVersion.JUNIT_5); + boolean _equals = Objects.equals(_junitVersion, JUnitVersion.JUNIT_5); if (_equals) { StringConcatenation _builder = new StringConcatenation(); _builder.append("test {"); diff --git a/org.eclipse.xtext.xtext.wizard/xtend-gen/org/eclipse/xtext/xtext/wizard/WebProjectDescriptor.java b/org.eclipse.xtext.xtext.wizard/xtend-gen/org/eclipse/xtext/xtext/wizard/WebProjectDescriptor.java index 8ddf69b828f..17da1471efb 100644 --- a/org.eclipse.xtext.xtext.wizard/xtend-gen/org/eclipse/xtext/xtext/wizard/WebProjectDescriptor.java +++ b/org.eclipse.xtext.xtext.wizard/xtend-gen/org/eclipse/xtext/xtext/wizard/WebProjectDescriptor.java @@ -8,9 +8,9 @@ */ package org.eclipse.xtext.xtext.wizard; -import com.google.common.base.Objects; import com.google.common.collect.Iterables; import java.util.LinkedHashSet; +import java.util.Objects; import java.util.Set; import org.eclipse.xtend.lib.annotations.FinalFieldsConstructor; import org.eclipse.xtend2.lib.StringConcatenation; @@ -49,13 +49,13 @@ public boolean isEclipsePluginProject() { @Override public boolean isPartOfGradleBuild() { BuildSystem _preferredBuildSystem = this.getConfig().getPreferredBuildSystem(); - return Objects.equal(_preferredBuildSystem, BuildSystem.GRADLE); + return Objects.equals(_preferredBuildSystem, BuildSystem.GRADLE); } @Override public boolean isPartOfMavenBuild() { BuildSystem _preferredBuildSystem = this.getConfig().getPreferredBuildSystem(); - return Objects.equal(_preferredBuildSystem, BuildSystem.MAVEN); + return Objects.equals(_preferredBuildSystem, BuildSystem.MAVEN); } @Override @@ -146,7 +146,7 @@ public PomFile pom() { _builder.newLine(); { SourceLayout _sourceLayout = this.getConfig().getSourceLayout(); - boolean _equals = Objects.equal(_sourceLayout, SourceLayout.PLAIN); + boolean _equals = Objects.equals(_sourceLayout, SourceLayout.PLAIN); if (_equals) { _builder.append("\t"); _builder.append(""); diff --git a/org.eclipse.xtext.xtext.wizard/xtend-gen/org/eclipse/xtext/xtext/wizard/ecore2xtext/Ecore2XtextGrammarCreator.java b/org.eclipse.xtext.xtext.wizard/xtend-gen/org/eclipse/xtext/xtext/wizard/ecore2xtext/Ecore2XtextGrammarCreator.java index d364cd7df78..372d3c6ac50 100644 --- a/org.eclipse.xtext.xtext.wizard/xtend-gen/org/eclipse/xtext/xtext/wizard/ecore2xtext/Ecore2XtextGrammarCreator.java +++ b/org.eclipse.xtext.xtext.wizard/xtend-gen/org/eclipse/xtext/xtext/wizard/ecore2xtext/Ecore2XtextGrammarCreator.java @@ -8,11 +8,11 @@ */ package org.eclipse.xtext.xtext.wizard.ecore2xtext; -import com.google.common.base.Objects; import com.google.common.collect.Iterables; import java.util.ArrayList; import java.util.Collection; import java.util.List; +import java.util.Objects; import org.eclipse.emf.ecore.EAttribute; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EClassifier; @@ -54,7 +54,7 @@ public CharSequence grammar(final WizardConfiguration config) { _builder.append(_nsURI); _builder.append("\" "); { - if (((UniqueNameUtil.uniqueName(it_1) != null) && (!Objects.equal(UniqueNameUtil.uniqueName(it_1), "")))) { + if (((UniqueNameUtil.uniqueName(it_1) != null) && (!Objects.equals(UniqueNameUtil.uniqueName(it_1), "")))) { _builder.append("as "); String _uniqueName = UniqueNameUtil.uniqueName(it_1); _builder.append(_uniqueName);