From da743972b2e9ae016af0c8819ff61f8dca861ef3 Mon Sep 17 00:00:00 2001 From: Radek Felcman Date: Thu, 7 Sep 2023 14:21:31 +0200 Subject: [PATCH] Replace deprecated constructors by valueOf for Byte(),Double()... Remove compiler warnings (valueOf instead of constructors/new Byte(),Double()... ) (#1940) Signed-off-by: Radek Felcman --- .../PerformanceComparisonTestResult.java | 14 +- .../PerformanceRegressionTestCase.java | 10 +- .../SybaseTransactionIsolationListener.java | 4 +- .../testing/framework/TestVariation.java | 6 +- .../framework/ui/LoadBuildDisplayPanel.java | 36 ++--- .../models/aggregate/AggregateProject.java | 6 +- .../testing/models/aggregate/House.java | 4 +- .../testing/models/aggregate/SingleHouse.java | 6 +- .../testing/models/aggregate/TownHouse.java | 6 +- .../testing/models/collections/MenuItem.java | 4 +- .../models/collections/map/MapPopulator.java | 30 ++--- .../conversion/ConversionDataObject.java | 50 +++---- ...ConversionDataObjectForSupportedTypes.java | 22 ++-- .../models/employee/domain/Employee.java | 4 +- .../models/employee/domain/LargeProject.java | 4 +- .../testing/models/inheritance/Bicycle.java | 10 +- .../testing/models/inheritance/Boat.java | 8 +- .../testing/models/inheritance/Bus.java | 14 +- .../testing/models/inheritance/Car.java | 18 +-- .../models/inheritance/FueledVehicle.java | 8 +- .../models/inheritance/ImaginaryCar.java | 18 +-- .../models/inheritance/NonFueledVehicle.java | 4 +- .../testing/models/inheritance/SportsCar.java | 6 +- .../models/insurance/InsuranceProject.java | 14 +- .../testing/models/interfaces/Commercial.java | 4 +- .../models/interfaces/CourseDeveloper.java | 8 +- .../interfaces/InterfaceWithTablesSystem.java | 6 +- .../InterfaceWithoutTablesProject.java | 12 +- .../models/interfaces/PersonnelManager.java | 8 +- .../models/interfaces/ProductDeveloper.java | 8 +- .../models/interfaces/ProductManager.java | 8 +- .../models/interfaces/Receptionist.java | 20 +-- .../testing/models/interfaces/Secretary.java | 14 +- .../testing/models/interfaces/Show.java | 8 +- .../testing/models/mapping/Computer.java | 6 +- .../testing/models/mapping/Employee.java | 8 +- .../testing/models/mapping/Employee2.java | 10 +- .../models/mapping/MappingProject.java | 12 +- .../models/onetoonejointable/Employee.java | 4 +- .../onetoonejointable/LargeProject.java | 4 +- .../GamesConsoleProject.java | 8 +- .../models/orderedlist/LargeProject.java | 4 +- .../relationshipmaintenance/FieldOffice.java | 4 +- .../RelationshipsSystem.java | 12 +- .../relationshipmaintenance/Resource.java | 4 +- .../transparentindirection/AbstractOrder.java | 6 +- .../models/transparentindirection/Player.java | 4 +- .../testing/models/vehicle/EngineType.java | 6 +- .../testing/models/vehicle/FuelType.java | 6 +- .../testing/models/vehicle/SportsCar.java | 6 +- .../aggregate/AggregateCollectionUoWTest.java | 4 +- .../aggregate/UnitOfWorkCommitResumeTest.java | 4 +- .../tests/clientserver/AnotherClient.java | 4 +- .../ClientServerSequenceDeadlockTest2.java | 4 +- .../EmployeeSeqDeadlockClient.java | 6 +- .../EmployeeSeqDeadlockClient2.java | 6 +- .../TestReadAggregateDirectMapMapping.java | 6 +- .../TestReadDirectAggregateMapMapping.java | 8 +- .../map/TestReadDirectDirectMapMapping.java | 6 +- .../map/TestReadDirectEntity1MMapMapping.java | 8 +- .../map/TestReadDirectEntityMapMapping.java | 8 +- .../TestReadDirectEntityU1MMapMapping.java | 8 +- .../map/TestReadEntityDirectMapMapping.java | 6 +- .../TestUpdateAggregateDirectMapMapping.java | 4 +- .../TestUpdateDirectAggregateMapMapping.java | 10 +- .../map/TestUpdateDirectDirectMapMapping.java | 10 +- .../TestUpdateDirectEntity1MMapMapping.java | 10 +- .../map/TestUpdateDirectEntityMapMapping.java | 12 +- .../TestUpdateDirectEntityU1MMapMapping.java | 10 +- .../map/TestUpdateEntityDirectMapMapping.java | 4 +- .../ConversionManagerTestModel.java | 52 ++++---- .../DataReadQueryTest.java | 6 +- .../EmployeeCustomSQLSystem.java | 6 +- ...dProcWithOutputParamsAndResultSetTest.java | 12 +- ...edProcedureObjectRelationalParameters.java | 6 +- .../StoredProcedureTest.java | 4 +- .../StoredProcedureTest2.java | 4 +- .../StoredProcedureTest_Inout_Out_In.java | 12 +- .../DirectMapMappingBatchReadTest.java | 10 +- .../directmap/DirectMapMappingDeleteTest.java | 8 +- .../DirectMapMappingHashMapTest.java | 10 +- .../DirectMapMappingIndirectionTest.java | 6 +- ...apMappingsSerializedConverterTestCase.java | 8 +- .../directmap/DirectMapUnitOfWorkTest.java | 20 +-- ...ergeChangeSetWithDirectMapMappingTest.java | 20 +-- ...geSetWithIndirectDirectMapMappingTest.java | 20 +-- .../distributedcache/DirectMapMergeTest.java | 6 +- .../rcm/ChangeObjectNotSentTest.java | 4 +- .../ConfigurableCacheSyncDistributedTest.java | 4 +- .../ConfigurableUpdateChangeObjectTest.java | 4 +- .../rcm/DeleteObjectNotSentTest.java | 4 +- .../rcm/InvalidCacheSyncTypeTest.java | 4 +- ...alidateObjectWithMissingReferenceTest.java | 8 +- .../rcm/MultipleCacheSyncTypeTest.java | 14 +- .../NewObjectWithOptimisticLockingTest.java | 6 +- .../rcm/OrderedListNewObjectTest.java | 6 +- .../rcm/RCMDistributedServersModel.java | 16 +-- .../rcm/RelatedNewObjectCacheSyncTest.java | 4 +- .../rcm/RelatedNewObjectNotSentTest.java | 8 +- .../rcm/SendNewObjectCacheSyncTest.java | 6 +- .../rcm/UpdateObjectInvalidationTest.java | 4 +- .../rcm/broadcast/BroadcastSetupHelper.java | 4 +- .../dynamic/simple/SimpleTypeTestSuite.java | 4 +- .../simple/SimpleTypeWithEnumTestSuite.java | 4 +- .../events/PreInsertModifyChangeSetTest.java | 4 +- .../ExpressionInMemoryTestSuite.java | 16 +-- .../ExpressionOperatorUnitTestSuite.java | 16 +-- .../expressions/ExpressionTestSuite.java | 32 ++--- .../expressions/ExpressionUnitTestSuite.java | 6 +- .../FeatureTestModelWithoutBinding.java | 6 +- .../testing/tests/feature/NullValueTest.java | 4 +- .../flashback/FlashbackUnitTestSuite.java | 6 +- .../ConcurrentReadBigBadObjectTest.java | 6 +- .../identitymaps/IdentityMapTestSuite.java | 6 +- .../cache/ConcurrentReadBigBadObjectTest.java | 6 +- .../BindingWithShallowInsertTest.java | 4 +- .../OverrideInheritedMappingTest.java | 4 +- .../inheritance/SingleInheritanceTest.java | 4 +- .../TranslatedKeyInheritanceTestCase.java | 8 +- .../UnitOfWorkCommitResumeTest.java | 6 +- .../tests/interfaces/DescriptorInitTest.java | 6 +- .../VariableOneToOneInsertTest.java | 6 +- .../tests/jpql/BinaryOperatorTest.java | 26 ++-- .../jpql/BinaryOperatorWithParameterTest.java | 50 +++---- .../tests/jpql/ComplexReverseSqrtTest.java | 6 +- .../testing/tests/jpql/ComplexSqrtTest.java | 6 +- .../jpql/SelectComplexReverseSqrtTest.java | 6 +- .../tests/jpql/SelectComplexSqrtTest.java | 6 +- .../tests/jpql/SelectSimpleBooleanTest.java | 10 +- .../jpql/SelectSimpleReverseSqrtTest.java | 4 +- .../tests/jpql/SelectSimpleSqrtTest.java | 4 +- .../tests/jpql/SimpleReverseSqrtTest.java | 4 +- .../testing/tests/jpql/SimpleSqrtTest.java | 4 +- .../tests/junit/helper/HelperTest.java | 22 ++-- .../testing/tests/mapping/SameNamePKTest.java | 4 +- .../tests/performance/PerformanceTest.java | 4 +- .../ConcurrentHashMapGetConcurrentTest.java | 6 +- .../ConcurrentHashMapPutConcurrentTest.java | 6 +- .../java/HashMapGetConcurrentTest.java | 6 +- .../java/HashMapPutConcurrentTest.java | 6 +- .../java/HashtableGetConcurrentTest.java | 6 +- .../java/HashtablePutConcurrentTest.java | 6 +- .../tests/performance/java/ListTest.java | 8 +- .../testing/tests/plsql/PLSQLTestModel.java | 74 +++++------ .../queries/PredefinedInQueryReadAllTest.java | 14 +- .../tests/queries/QBEExcludedValues.java | 4 +- .../QueryTimeoutConnectionReleasedTest.java | 4 +- .../tests/queries/QueryTimeoutTest.java | 4 +- .../UpdateAllQueryExpressionMathTest.java | 10 +- .../queries/UpdateAllQueryRollbackTest.java | 4 +- .../CacheHitAndInMemoryTestSuite.java | 6 +- .../report/ParallelBuilderReportItemTest.java | 6 +- .../tests/queries/report/Scenario1_2.java | 4 +- .../tests/queries/report/Scenario1_5a.java | 4 +- .../tests/queries/report/Scenario1_5b.java | 4 +- .../tests/queries/report/Scenario2_2c.java | 12 +- .../ReadOnlyClassOneToManyTestCase.java | 4 +- .../DeepMergeCloneSerializedNewTest.java | 4 +- .../RemoteConnectionExceptionsTest.java | 18 +-- .../tests/returning/model/BaseClass.java | 12 +- .../SPGExecuteStoredProcedureTest.java | 20 +-- .../SessionsXMLSchemaWriteTest.java | 22 ++-- .../simplepojoclient/PojoEmployeeProject.java | 6 +- .../AddDescriptorsMultithreadedTest.java | 6 +- .../tests/simultaneous/ConcurrencyTest.java | 4 +- .../testing/tests/stress/ClientThread.java | 4 +- .../testing/tests/types/BooleanTester.java | 8 +- .../testing/tests/types/NumericTester.java | 38 +++--- .../tests/unitofwork/ConcurrentAddress.java | 14 +- .../unitofwork/NoIdentityMergeCloneTest.java | 4 +- .../changeflag/TransparentMapTest.java | 4 +- .../ChangeTrackedWeakReferenceTest.java | 4 +- .../DeferredChangeWeakReferenceTest.java | 4 +- .../ForceWeakReferenceTest.java | 4 +- .../referencesettings/HardReferenceTest.java | 4 +- .../referencesettings/WeakReferenceTest.java | 4 +- ...ValueThruInstanceVariableAccessorTest.java | 4 +- .../tests/validation/PrintStackTraceTest.java | 4 +- ...eryParameterForOneToOneValidationTest.java | 4 +- .../CMWorkbenchIntegrationSystem.java | 6 +- .../EmployeeCustomSQLMWIntegrationSystem.java | 10 +- .../ProjectXMLStoredFunctionCallTest.java | 12 +- .../ProjectXMLStoredProcedureCallTest.java | 8 +- .../tests/writing/ComplexUpdateTest.java | 4 +- .../tools/beans/ExpressionNode.java | 38 +++--- .../tools/history/HistoryFacade.java | 4 +- .../sessionconsole/LoginEditorPanel.java | 4 +- .../sessionconsole/ProfileBrowserPanel.java | 16 +-- .../sessionconsole/SessionConsolePanel.java | 4 +- .../tests/eis/xmlfile/EmployeeSystem.java | 6 +- .../StructConverterTestSuite.java | 10 +- .../testing/tests/lob/ImageSimulator.java | 4 +- .../testing/tests/nchar/CharNchar.java | 10 +- .../testing/tests/nchar/ReadNcharTest.java | 10 +- .../plsqlrecord/PLSQLrecordInOutTestSet.java | 6 +- .../plsqlrecord/PLSQLrecordOutTestSet.java | 6 +- ...LrecordWithCompatibleTypeInOutTestSet.java | 6 +- ...SQLrecordWithCompatibleTypeOutTestSet.java | 6 +- .../expressions/ExpressionOperator.java | 4 +- .../databaseaccess/DatasourcePlatform.java | 4 +- .../expressions/ExpressionJavaPrinter.java | 6 +- .../persistence/internal/oxm/Context.java | 6 +- .../internal/oxm/XMLConversionManager.java | 6 +- .../eclipse/persistence/oxm/XMLContext.java | 6 +- .../persistence/queries/ReadAllQuery.java | 6 +- .../persistence/sessions/DatabaseLogin.java | 4 +- .../persistence/sessions/DatasourceLogin.java | 4 +- .../eclipse/persistence/sessions/Project.java | 2 +- .../factories/ProjectClassGenerator.java | 4 +- .../oracle/DMSPerformanceProfiler.java | 6 +- .../jpa/collection/model/NodeHolder.java | 4 +- .../jpa/compositeid/TestCompositeId.java | 10 +- .../jpa/converter/TestAutoApplyConverter.java | 62 ++++----- .../jpa/test/basic/TestBasicPersistence.java | 4 +- .../jpa/test/jpql/TestAggregateFunctions.java | 32 ++--- .../test/mapping/TestAttributeOverride.java | 4 +- .../property/TestConvertResultToBoolean.java | 8 +- .../test/property/TestParameterBinding.java | 8 +- .../jpa/test/query/TestQueryCase.java | 60 ++++----- .../jpa/test/query/TestQueryIN.java | 42 +++--- .../jpa/test/query/model/Dto01.java | 4 +- .../testing/models/jpa/advanced/Buyer.java | 18 +-- .../models/jpa/advanced/Customizer.java | 6 +- .../jpa/composite/advanced/Customizer.java | 6 +- .../jpa/fieldaccess/advanced/Buyer.java | 10 +- .../jpa/fieldaccess/advanced/Customizer.java | 6 +- .../models/jpa/inheritance/Bicycle.java | 4 +- .../models/jpa/inheritance/FueledVehicle.java | 4 +- .../inheritance/InheritanceModelExamples.java | 68 +++++----- .../models/jpa/inherited/Birthday.java | 4 +- .../models/jpa/lob/ImageSimulator.java | 16 +-- .../jpa/sessionbean/EmployeeServiceBean.java | 6 +- .../models/jpa/xml/advanced/Employee.java | 18 +-- .../composite/advanced/member_2/Employee.java | 18 +-- .../models/jpa/xml/inheritance/Bicycle.java | 4 +- .../jpa/xml/inheritance/FueledVehicle.java | 4 +- .../inheritance/InheritanceModelExamples.java | 68 +++++----- .../models/jpa/xml/inherited/Birthday.java | 4 +- .../jpa21/advanced/EmployeePopulator.java | 32 ++--- .../converters/LongToStringConverter.java | 4 +- .../jpa21/advanced/xml/EmployeePopulator.java | 32 ++--- .../converters/LongToStringConverter.java | 4 +- .../jpa/advanced/AdvancedJPAJunitTest.java | 18 +-- .../tests/jpa/advanced/AdvancedJunitTest.java | 4 +- .../jpa/advanced/CacheImplJUnitTest.java | 22 ++-- .../advanced/EntityManagerJUnitTestSuite.java | 38 +++--- .../SQLResultSetMappingTestSuite.java | 6 +- .../UpdateAllQueryAdvancedJunitTest.java | 12 +- .../AdvancedCompositePKJunitTest.java | 6 +- .../advanced/concurrency/ConcurrencyTest.java | 6 +- .../advanced/EntityManagerJUnitTestSuite.java | 40 +++--- .../criteria/JUnitCriteriaUnitTestSuite.java | 4 +- .../jpa/datatypes/BooleanJUnitTestCase.java | 18 +-- .../datatypes/NullBindingJUnitTestCase.java | 6 +- .../DDLGenerationJUnitTestSuite.java | 8 +- .../dynamic/simple/SimpleTypeTestSuite.java | 4 +- .../advanced/EntityManagerJUnitTestSuite.java | 32 ++--- .../EntityManagerTLRJUnitTestSuite.java | 32 ++--- .../SQLResultSetMappingTestSuite.java | 6 +- .../UpdateAllQueryAdvancedJunitTest.java | 12 +- .../ExpressionJUnitTestSuite.java | 6 +- .../RelationshipModelJUnitTestSuite.java | 10 +- .../LifecycleCallbackJunitTest.java | 22 ++-- .../MixedInheritanceJUnitTestCase.java | 6 +- .../MultipleTableInheritanceCreateTest.java | 6 +- .../TablePerClassInheritanceJUnitTest.java | 12 +- .../inherited/InheritedModelJunitTest.java | 8 +- .../jpa/jpql/AdvancedQueryTestSuite.java | 18 +-- .../jpa/jpql/JUnitJPQLComplexTestSuite.java | 18 +-- .../jpa/jpql/JUnitJPQLExamplesTestSuite.java | 4 +- .../jpa/jpql/JUnitJPQLSimpleTestSuite.java | 16 +-- .../jpa/jpql/JUnitJPQLUnitTestSuite.java | 4 +- .../jpql/JUnitJPQLValidationTestSuite.java | 4 +- .../JPAPerformanceRegressionModel.java | 10 +- ...telyEmployeePerformanceComparisonTest.java | 4 +- ...letelyJoinedPerformanceComparisonTest.java | 8 +- ...eeCompletelyPerformanceComparisonTest.java | 8 +- ...bjectAddressPerformanceComparisonTest.java | 4 +- ...telyEmployeePerformanceComparisonTest.java | 4 +- ...jectEmployeePerformanceComparisonTest.java | 4 +- ...ctGetAddressPerformanceComparisonTest.java | 4 +- ...dateEmployeePerformanceComparisonTest.java | 6 +- ...leteEmployeePerformanceComparisonTest.java | 6 +- ...dateEmployeePerformanceComparisonTest.java | 6 +- ...dateEmployeePerformanceComparisonTest.java | 6 +- ...eleteAddressPerformanceComparisonTest.java | 6 +- ...leteEmployeePerformanceComparisonTest.java | 6 +- ...pdateAddressPerformanceComparisonTest.java | 4 +- ...dateEmployeePerformanceComparisonTest.java | 6 +- .../relationships/EMQueryJUnitTestSuite.java | 4 +- .../ExpressionJUnitTestSuite.java | 8 +- .../RelationshipModelJUnitTestSuite.java | 10 +- .../EntityMappingsAdvancedJUnitTestCase.java | 22 ++-- .../EntityMappingsAdvancedJUnitTestCase.java | 22 ++-- ...ntityMappingsInheritanceJUnitTestCase.java | 6 +- .../jpa21/advanced/ConverterTestSuite.java | 8 +- .../tests/jpa21/advanced/DDLTestSuite.java | 4 +- .../jpa21/advanced/ForeignKeyTestSuite.java | 4 +- .../StoredProcedureQueryTestSuite.java | 12 +- .../jpa21/advanced/XMLConverterTestSuite.java | 4 +- .../advanced/XMLForeignKeyTestSuite.java | 4 +- .../tests/jpa22/advanced/DDLTestSuite.java | 4 +- .../jpa22/advanced/ForeignKeyTestSuite.java | 4 +- .../StoredProcedureQueryTestSuite.java | 10 +- .../jpa22/advanced/XMLConverterTestSuite.java | 4 +- .../advanced/XMLForeignKeyTestSuite.java | 4 +- .../models/wdf/jpa1/employee/Cubicle.java | 4 +- .../wdf/jpa1/types/BasicTypesFieldAccess.java | 32 ++--- .../jpa1/types/BasicTypesPropertyAccess.java | 32 ++--- .../TestEmbeddingWithFieldAccess.java | 6 +- .../TestEmbeddingWithPropertyAccess.java | 6 +- .../jpa1/entitymanager/TestCascadeFlush.java | 8 +- .../jpa1/entitymanager/TestCascadeMerge.java | 32 ++--- .../entitymanager/TestCascadePersist.java | 8 +- .../entitymanager/TestCascadeRefresh.java | 16 +-- .../jpa1/entitymanager/TestCascadeRemove.java | 52 ++++---- .../wdf/jpa1/entitymanager/TestClear.java | 10 +- .../wdf/jpa1/entitymanager/TestClose.java | 8 +- .../wdf/jpa1/entitymanager/TestContains.java | 10 +- .../TestEntityManagerFactory.java | 4 +- .../TestExtendedPersistenceContext.java | 14 +- .../wdf/jpa1/entitymanager/TestFind.java | 24 ++-- .../wdf/jpa1/entitymanager/TestFlush.java | 32 ++--- .../jpa1/entitymanager/TestGetReference.java | 38 +++--- .../wdf/jpa1/entitymanager/TestMerge.java | 36 ++--- .../wdf/jpa1/entitymanager/TestPersist.java | 16 +-- .../wdf/jpa1/entitymanager/TestRefresh.java | 26 ++-- .../wdf/jpa1/entitymanager/TestRemove.java | 16 +-- .../wdf/jpa1/entitymanager/TestUpdate.java | 12 +- .../tests/wdf/jpa1/lock/TestLockMethod.java | 6 +- .../tests/wdf/jpa1/lock/TestOptimistic.java | 42 +++--- .../tests/wdf/jpa1/query/TestArguments.java | 22 ++-- .../wdf/jpa1/query/TestExtendedQueries.java | 8 +- .../wdf/jpa1/query/TestParameterTypes.java | 18 +-- .../tests/wdf/jpa1/query/TestQueryAPI.java | 6 +- .../wdf/jpa1/query/TestSelectListTypes.java | 4 +- .../tests/wdf/jpa1/query/TestSimpleQuery.java | 8 +- .../relation/TestBidirectionalManyToMany.java | 10 +- .../relation/TestBidirectionalOneToOne.java | 10 +- .../wdf/jpa1/relation/TestEmployeePatent.java | 6 +- .../jpa1/relation/TestEmployee_Cubicle.java | 6 +- .../jpa1/relation/TestEmployee_Review.java | 16 +-- .../relation/TestMultipleRelationships.java | 4 +- .../tests/wdf/jpa1/relation/TestNode.java | 20 +-- .../relation/TestUnidirectionalOneToMany.java | 6 +- .../relation/TestUnidirectionalOneToOne.java | 6 +- .../tests/wdf/jpa1/simple/SimpleTest.java | 14 +- .../wdf/jpa1/simple/TestBasicFieldTypes.java | 104 +++++++-------- .../jpa1/simple/TestBasicPropertyTypes.java | 104 +++++++-------- .../wdf/jpa1/simple/TestEmbeddedField.java | 8 +- .../jpa1/simple/TestTemporalFieldTypes.java | 28 ++-- .../internal/jpa/weaving/ClassWeaver.java | 10 +- .../internal/jpa/weaving/MethodWeaver.java | 6 +- .../testing/jaxb/JAXBTestCases.java | 8 +- .../xmlpaths/XmlPathsTestCases.java | 4 +- .../override/XmlPathsOverrideTestCases.java | 4 +- .../xmlproperty/XmlPropertyTestCases.java | 4 +- .../testing/jaxb/cycle/Employee.java | 4 +- .../DynamicJAXBFromSessionsXMLTestCases.java | 6 +- .../jaxb/events/JAXBElementTestCases.java | 4 +- .../jaxb/events/JAXBMarshalListenerImpl.java | 14 +- .../events/JAXBUnmarshalListenerImpl.java | 14 +- .../ExceptionHandlingTestCases.java | 4 +- .../ChoiceMappingEmployeeTestCases.java | 12 +- .../ChoiceCollectionMappingTestCases.java | 24 ++-- .../xmlelementrefs/ObjectFactory.java | 4 +- .../XMLElementsWithWrapperTestCases.java | 6 +- .../xmlelements/XmlElementsTestCases.java | 6 +- .../XmlSchemaTypesTestCases.java | 4 +- .../xmlvalue/XmlValueTestCases.java | 4 +- .../xmlvalue/adapter/MyValueAdapter.java | 4 +- .../JAXBInheritanceNSSeparatorTestCases.java | 4 +- .../XmlElementsListOfElementTest.java | 6 +- .../XmlElementsListOfElementWrappedTest.java | 6 +- .../simple/JAXBElementCharacterTestCases.java | 4 +- .../characters/EscapeCharactersTestCases.java | 48 +++---- ...eRootFalseWithXMLRootElementTestCases.java | 4 +- .../JAXBEmployeesAndIntegersTestCases.java | 10 +- .../JAXBIntegerLinkedListTestCases.java | 10 +- .../JAXBIntegerListTestCases.java | 10 +- .../JAXBIntegerMyListTestCases.java | 10 +- .../JAXBListOfObjectsNoJSONTestCases.java | 6 +- .../JAXBListOfObjectsNonRootTestCases.java | 34 ++--- .../JAXBListOfObjectsTestCases.java | 6 +- .../JAXBStringIntegerHashMapTestCases.java | 8 +- .../JAXBMultipleMapsNamespaceTestCases.java | 6 +- .../JAXBMultipleMapsTestCases.java | 6 +- .../InheritanceRootChoiceOnlyTestCases.java | 6 +- ...positeCollectionObjectOnlyNSTestCases.java | 4 +- ...ompositeCollectionObjectOnlyTestCases.java | 4 +- ...ositeCollectionObjectOnlyXMLTestCases.java | 4 +- ...ackagesBackwardCompatibilityTestCases.java | 6 +- ...itanceWithMultiplePackagesNSTestCases.java | 6 +- ...eritanceWithMultiplePackagesTestCases.java | 6 +- ...tanceWithMultiplePackagesXMLTestCases.java | 6 +- .../PrefixMapperContextTestCases.java | 4 +- .../SimpleDocumentByteArrayTestCases.java | 4 +- .../SimpleDocumentIntegerTestCases.java | 4 +- ...StreamWriterDefaultNamespaceTestCases.java | 6 +- .../MapStringIntegerTestCases.java | 4 +- .../typemappinginfo/MultipleMapTestCases.java | 4 +- .../TypeMappingInfoTestCases.java | 6 +- .../AutoDetectMediaTypeTestCases.java | 10 +- .../autodetect/TestObjectFactory.java | 4 +- .../choice/AdapterWithElementsTestCases.java | 4 +- .../enumeration/ByteToExampleEnumAdapter.java | 4 +- .../ns2/DefaultNamespace2TestCases.java | 6 +- .../EmployeeCollectionTestCases.java | 10 +- .../EmployeeSingleTestCases.java | 4 +- .../jaxb/xmlelementref/TestObjectFactory.java | 4 +- .../duplicatename/ObjectFactory.java | 4 +- .../XmlElementsArrayTestCases.java | 10 +- .../XmlElementsCollectionTestCases.java | 10 +- .../XmlElementsInheritanceTestCases.java | 10 +- .../XmlElementsIntegerTestCases.java | 4 +- .../xmlmarshaller/MarshallerEncodingTest.java | 4 +- .../MarshallerFormattingTestCases.java | 6 +- .../MarshallerFragmentTestCases.java | 4 +- .../oxm/events/MarshalListenerImpl.java | 14 +- .../oxm/events/UnmarshalListenerImpl.java | 14 +- .../descriptor/PostBuildEventTestCases.java | 6 +- .../oxm/mappings/XMLMappingTestCases.java | 6 +- ...ctionWithGroupingWithXMLRootTestCases.java | 6 +- ...onWithoutGroupingWithXMLRootTestCases.java | 4 +- .../BinaryDataByteObjectArrayTestCases.java | 4 +- .../EmployeeWithByteObjectArray.java | 4 +- .../EmployeeWithByteArrayObject.java | 4 +- ...ataCollectionByteObjectArrayTestCases.java | 4 +- ...LChoiceMappingNonStringValueTestCases.java | 4 +- ...ChoiceCollectionMappingMixedTestCases.java | 14 +- ...ollectionWithGroupingElementTestCases.java | 10 +- .../reuse/ChoiceCollectionReuseTestCases.java | 10 +- ...teCollectionWithGroupingTextTestCases.java | 4 +- ...ementIdentifiedByNameIntegerTestCases.java | 8 +- ...pingElementIntegerSingleNodeTestCases.java | 8 +- ...ementIdentifiedByNameIntegerTestCases.java | 8 +- ...ngElementIntegerWithCommentsTestCases.java | 8 +- ...ementIdentifiedByNameIntegerTestCases.java | 8 +- ...ementIdentifiedByNameIntegerTestCases.java | 8 +- .../UnionWithTypeAttributeTestCases.java | 4 +- .../DefaultNullValueAttributeProject.java | 4 +- .../DefaultNullValueElementProject.java | 6 +- .../DirectToFieldDoubleTestCases.java | 4 +- .../DirectToFieldFloatTestCases.java | 4 +- ...ctToXMLElementIdentifiedByNameProject.java | 4 +- ...ntIsSetAbsentFalseWithParamsTestCases.java | 4 +- .../schematype/SchemaTypeBase64TestCases.java | 4 +- .../schematype/SchemaTypeHexTestCases.java | 4 +- .../singleattribute/Employee.java | 4 +- .../TypeAttributeCustomAddTestCases.java | 4 +- .../TypeAttributeDoubleTestCases.java | 4 +- .../TypeAttributeFloatTestCases.java | 4 +- .../TypeAttributeIntegerTestCases.java | 4 +- .../TypeAttributeNonXsiPrefixTestCases.java | 4 +- .../TypeAttributeNullTestCases.java | 4 +- ...buteUserTypeNamespaceOnChildTestCases.java | 4 +- ...uteUserTypeNamespaceOnParentTestCases.java | 4 +- .../UnionWithTypeAttributeTestCases.java | 4 +- .../childelement/TypeTranslatorTestCases.java | 4 +- .../rootelement/TypeTranslatorTestCases.java | 4 +- .../xmlconversionmanager/Base64TestCases.java | 4 +- .../DoubleToBigDecimalTestCases.java | 16 +-- .../xmlconversionmanager/NumberTestCases.java | 10 +- .../xmlconversionmanager/QNameTestCases.java | 6 +- .../XMLRootComplexInheritanceProject.java | 4 +- .../runtime/LegacyCommonTokenStream.java | 2 +- .../antlr/runtime/tree/TreeWizard.java | 8 +- .../testing/sdo/server/DeptImpl.java | 4 +- .../DataHelperConvertFromStringTest.java | 8 +- .../DataHelperConvertValueTest.java | 4 +- .../xmlhelper/SDOXMLHelperTestCases.java | 4 +- .../LoadAndSaveNestedSchemaTypeTestCases.java | 4 +- .../XSDHelperAttributeTestCases.java | 8 +- .../elements/XSDHelperElementTestCases.java | 8 +- .../DefineAndGenerateNillableTestCases.java | 10 +- ...aObjectGetBooleanByPositionalPathTest.java | 20 +-- ...SDODataObjectGetBooleanConversionTest.java | 32 ++--- ...bjectGetBooleanConversionWithPathTest.java | 20 +-- ...jectGetBooleanWithIndexConversionTest.java | 14 +- ...DataObjectGetByteByPositionalPathTest.java | 4 +- .../SDODataObjectGetByteConversionTest.java | 4 +- ...taObjectGetByteConversionWithPathTest.java | 4 +- ...aObjectGetByteWithIndexConversionTest.java | 4 +- ...bjectGetCharacterByPositionalPathTest.java | 4 +- ...ODataObjectGetCharacterConversionTest.java | 16 +-- ...ectGetCharacterConversionWithPathTest.java | 4 +- ...ctGetCharacterWithIndexConversionTest.java | 4 +- ...jectGetDataObjectByPositionalPathTest.java | 4 +- ...ctGetDataObjectConversionWithPathTest.java | 4 +- .../SDODataObjectGetDateConversionTest.java | 4 +- ...taObjectGetDateConversionWithPathTest.java | 4 +- ...aObjectGetDateWithIndexConversionTest.java | 4 +- ...SDODataObjectGetDecimalConversionTest.java | 4 +- ...jectGetDecimalWithIndexConversionTest.java | 4 +- ...taObjectGetDoubleByPositionalPathTest.java | 4 +- .../SDODataObjectGetDoubleConversionTest.java | 4 +- ...ObjectGetDoubleConversionWithPathTest.java | 4 +- ...bjectGetDoubleWithIndexConversionTest.java | 4 +- ...ataObjectGetFloatByPositionalPathTest.java | 4 +- .../SDODataObjectGetFloatConversionTest.java | 6 +- ...aObjectGetFloatConversionWithPathTest.java | 4 +- ...ObjectGetFloatWithIndexConversionTest.java | 4 +- ...ODataObjectGetIntByPositionalPathTest.java | 4 +- .../SDODataObjectGetIntConversionTest.java | 4 +- ...ataObjectGetIntConversionWithPathTest.java | 4 +- ...taObjectGetIntWithIndexConversionTest.java | 4 +- ...DataObjectGetListByPositionalPathTest.java | 6 +- ...DataObjectGetLongByPositionalPathTest.java | 4 +- .../SDODataObjectGetLongConversionTest.java | 6 +- ...taObjectGetLongConversionWithPathTest.java | 4 +- ...aObjectGetLongWithIndexConversionTest.java | 4 +- ...ataObjectGetShortByPositionalPathTest.java | 4 +- .../SDODataObjectGetShortConversionTest.java | 8 +- ...aObjectGetShortConversionWithPathTest.java | 4 +- ...ObjectGetShortWithIndexConversionTest.java | 4 +- ...taObjectGetStringByPositionalPathTest.java | 4 +- .../SDODataObjectGetStringConversion.java | 4 +- ...ObjectGetStringConversionWithPathTest.java | 4 +- ...bjectGetStringWithIndexConversionTest.java | 4 +- .../SDODataObjectGetWithPathTest.java | 16 +-- ...aObjectOpenContentBug6011530TestCases.java | 4 +- .../SetAndGetWithManyPropertyTestCases.java | 38 +++--- ...ndGetWithManyPropertyViaPathTestCases.java | 38 +++--- .../xpathengine/XPathHelperTestCases.java | 10 +- ...aObjectGetBooleanByPositionalPathTest.java | 32 ++--- ...DataObjectGetByteByPositionalPathTest.java | 4 +- ...bjectGetCharacterByPositionalPathTest.java | 4 +- ...jectGetDataObjectByPositionalPathTest.java | 4 +- ...taObjectGetDoubleByPositionalPathTest.java | 4 +- ...ataObjectGetFloatByPositionalPathTest.java | 4 +- ...ODataObjectGetIntByPositionalPathTest.java | 4 +- ...DataObjectGetListByPositionalPathTest.java | 6 +- ...DataObjectGetLongByPositionalPathTest.java | 4 +- ...ataObjectGetShortByPositionalPathTest.java | 4 +- ...taObjectGetStringByPositionalPathTest.java | 4 +- ...tGetBooleanConversionByXPathQueryTest.java | 14 +- ...SDODataObjectGetByXPathQueryTestCases.java | 10 +- ...jectGetByteConversionByXPathQueryTest.java | 8 +- ...etCharacterConversionByXPathQueryTest.java | 6 +- ...ataObjectConversionWithXPathQueryTest.java | 4 +- ...jectGetDateConversionByXPathQueryTest.java | 4 +- ...ctGetDoubleConversionByXPathQueryTest.java | 8 +- ...ectGetFloatConversionByXPathQueryTest.java | 10 +- ...bjectGetIntConversionByXPathQueryTest.java | 10 +- ...jectGetListConversionByXPathQueryTest.java | 6 +- ...jectGetLongConversionByXPathQueryTest.java | 10 +- ...ectGetShortConversionByXPathQueryTest.java | 10 +- .../testing/tabletype/TableTypeTestSuite.java | 4 +- .../dbws/testing/types/TypesTestSuite.java | 8 +- .../resources/StringRepositoryTests.java | 18 +-- .../test/ant/EisProjectExporterTests.java | 4 +- .../test/ant/OXProjectExporterTests.java | 4 +- .../test/ant/ProjectExporterTests.java | 4 +- .../xml/SchemaContextAndXpathChooserTest.java | 8 +- .../models/complexinheritance/Bicycle.java | 10 +- .../test/models/complexinheritance/Boat.java | 8 +- .../test/models/complexinheritance/Bus.java | 14 +- .../test/models/complexinheritance/Car.java | 18 +-- .../complexinheritance/FueledVehicle.java | 8 +- .../complexinheritance/NonFueledVehicle.java | 4 +- .../models/complexinheritance/SportsCar.java | 6 +- .../test/models/complexmapping/Computer.java | 6 +- .../test/models/complexmapping/Employee.java | 8 +- .../projects/IdentityPolicyProject.java | 4 +- .../projects/InsuranceRuntimeProject.java | 6 +- .../projects/LegacyPhoneCompanyProject.java | 4 +- .../projects/PhoneCompanyRuntimeProject.java | 8 +- .../test/models/projects/QueryProject.java | 14 +- .../test/models/simpleaggregate/Person.java | 4 +- .../model/write/DatabaseSessionWriteTest.java | 6 +- .../test/scplugin/ui/AbstractPanelTest.java | 8 +- .../app/BufferedPropertyValueModelTests.java | 34 ++--- .../PreferencePropertyValueModelTests.java | 14 +- .../swing/NumberSpinnerModelAdapterTests.java | 26 ++-- .../app/swing/SpinnerModelAdapterTests.java | 14 +- .../app/swing/SpinnerModelAdapterUITest.java | 4 +- .../app/swing/TableModelAdapterTests.java | 8 +- .../app/swing/TableModelAdapterUITest.java | 6 +- .../uitools/cell/TreeCellEditorUITest.java | 10 +- .../test/utility/AbstractModelTests.java | 6 +- .../test/utility/ClassToolsTests.java | 12 +- .../SimpleExceptionBroadcasterTests.java | 4 +- .../utility/classfile/ClassFileTests.java | 24 ++-- .../diff/AbstractReflectiveDiffTests.java | 20 +-- .../test/utility/diff/EqualityDiffTests.java | 12 +- .../diff/InheritanceReflectiveDiffTests.java | 6 +- .../test/utility/diff/NullDiffTests.java | 12 +- ...ReflectivePropertyChangeListenerTests.java | 6 +- .../test/utility/filters/ANDFilterTests.java | 48 +++---- .../test/utility/filters/NOTFilterTests.java | 14 +- .../test/utility/filters/ORFilterTests.java | 76 +++++------ .../test/utility/filters/XORFilterTests.java | 48 +++---- .../test/utility/io/FileToolsTests.java | 4 +- .../TransformationIteratorTests.java | 6 +- .../TransformationListIteratorTests.java | 6 +- .../action/AbstractFrameworkAction.java | 4 +- .../internal/GeneralPreferencesPage.java | 8 +- .../internal/OpenRecentFileAction.java | 4 +- .../framework/uitools/ComponentAligner.java | 4 +- .../workbench/mappingsmodel/db/MWColumn.java | 6 +- .../descriptor/MWCacheExpiry.java | 4 +- .../descriptor/MWCachingPolicy.java | 6 +- .../descriptor/MWDescriptorCachingPolicy.java | 4 +- .../relational/MWJoinFetchableMapping.java | 4 +- .../xml/MWAbstractCompositeMapping.java | 4 +- .../workbench/mappingsmodel/meta/MWClass.java | 6 +- .../mappingsmodel/meta/MWClassAttribute.java | 4 +- .../mappingsmodel/meta/MWMethod.java | 4 +- .../mappingsmodel/meta/MWTypeDeclaration.java | 8 +- .../MWTransactionalProjectCachingPolicy.java | 4 +- .../query/MWAbstractProcedureArgument.java | 124 +++++++++--------- .../mappingsmodel/query/MWAbstractQuery.java | 14 +- .../mappingsmodel/query/MWQuery.java | 8 +- .../mappingsmodel/query/MWQueryManager.java | 8 +- .../MWAbstractRelationalReadQuery.java | 6 +- .../query/relational/MWBasicExpression.java | 22 ++-- .../query/relational/MWBatchReadItem.java | 4 +- .../relational/MWCompoundExpression.java | 12 +- .../query/relational/MWGroupingItem.java | 4 +- .../query/relational/MWJoinedItem.java | 4 +- .../query/relational/MWOrderingItem.java | 4 +- .../relational/MWReportOrderingItem.java | 4 +- .../schema/AbstractParticle.java | 6 +- .../schema/ExplicitElementDeclaration.java | 6 +- .../mappingsmodel/schema/MWNamespace.java | 4 +- .../schema/ReferencedElementDeclaration.java | 6 +- .../mappingsmodel/xml/MWXpathStep.java | 4 +- .../ant/taskdefs/ExportDeploymentXMLTask.java | 4 +- .../AddOrRefreshClassesAction.java | 6 +- .../mappingsplugin/RefreshClassesAction.java | 6 +- .../ui/db/ColumnsPropertiesPage.java | 12 +- .../ui/descriptor/CacheExpiryPanel.java | 10 +- .../CachingPolicyPropertiesPage.java | 6 +- .../ClassAttributeAccessorsPanel.java | 4 +- .../descriptor/ClassAttributeTypesPanel.java | 6 +- .../ui/descriptor/MethodParametersPanel.java | 6 +- .../ui/descriptor/MethodPropertiesPanel.java | 8 +- .../ui/mapping/ConverterPanel.java | 6 +- .../ui/mapping/ObjectTypeConverterPanel.java | 26 ++-- .../ui/project/ProjectCacheExpiryPanel.java | 10 +- .../ui/project/ProjectCachingPolicyPanel.java | 12 +- .../project/ZeroArgConstructorPreference.java | 4 +- ...tionalProjectSequencingPropertiesPage.java | 6 +- .../ui/query/QueryAdvancedOptionsDialog.java | 32 ++--- .../ui/query/QueryGeneralPanel.java | 4 +- .../query/relational/AddArgumentDialog.java | 6 +- .../query/relational/AttributeItemDialog.java | 4 +- .../CustomQuerySelectionCriteriaPanel.java | 4 +- .../QuerySelectionCriteriaPanel.java | 4 +- .../query/relational/QueryableEditDialog.java | 4 +- ...lationalDescriptorQueriesSettingsPage.java | 8 +- .../RelationalQueryComponentFactory.java | 6 +- .../AttributeDeclarationNodeStructure.java | 4 +- .../ComplexTypeDefinitionNodeStructure.java | 4 +- .../ElementDeclarationNodeStructure.java | 4 +- .../ModelGroupDefinitionNodeStructure.java | 4 +- .../ui/schema/SchemaNamespacesPanel.java | 4 +- .../SimpleTypeDefinitionNodeStructure.java | 4 +- .../ui/type/DatabaseTypePropertiesPage.java | 8 +- .../model/adapter/ConnectionPoolAdapter.java | 6 +- .../model/adapter/DatabaseLoginAdapter.java | 10 +- .../model/adapter/DatabaseSessionAdapter.java | 4 +- .../model/adapter/SequenceAdapter.java | 6 +- .../meta/SCSessionsPropertiesManager.java | 4 +- .../ui/login/AbstractRdbmsLoginPane.java | 8 +- .../ui/pool/basic/ConnectionCountPane.java | 6 +- .../ui/session/clustering/RCMRMIPane.java | 8 +- .../login/RdbmsOptionsPropertiesPage.java | 4 +- .../session/login/SequencePropertyPane.java | 8 +- .../scplugin/ui/tools/IPAddress.java | 4 +- .../workbench/uitools/SimpleDisplayable.java | 30 ++--- .../PreferencePropertyValueModel.java | 4 +- .../app/swing/NumberSpinnerModelAdapter.java | 8 +- .../cell/SpinnerTableCellRenderer.java | 4 +- .../utility/classfile/DoubleConstant.java | 4 +- .../utility/classfile/FloatConstant.java | 4 +- .../utility/classfile/IntegerConstant.java | 4 +- .../utility/classfile/LongConstant.java | 4 +- .../utility/events/ChangeSupport.java | 6 +- ...trippingPartialStringComparatorEngine.java | 4 +- 680 files changed, 3335 insertions(+), 3335 deletions(-) diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/framework/PerformanceComparisonTestResult.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/framework/PerformanceComparisonTestResult.java index c58e03eac1b..1f0f0e1ab86 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/framework/PerformanceComparisonTestResult.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/framework/PerformanceComparisonTestResult.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -171,10 +171,10 @@ public void computeResults() { // Set the test average count as the test time. this.setAverageTestCount((long)testAverage); - this.testAverages.add(new Double(testAverage)); + this.testAverages.add(Double.valueOf(testAverage)); this.testMins.add(PerformanceComparisonTestResult.minResults(times)); this.testMaxs.add(PerformanceComparisonTestResult.maxResults(times)); - this.testStandardDeviations.add(new Double(testStandardDeviation)); + this.testStandardDeviations.add(Double.valueOf(testStandardDeviation)); if (testIndex > 0) { double testBaseLineAverage = ((Number)this.testAverages.get(0)).doubleValue(); @@ -182,7 +182,7 @@ public void computeResults() { // Difference double percentageDifference = PerformanceComparisonTestResult.percentageDifference(testAverage, testBaseLineAverage); - this.percentageDifferences.add(new Double(percentageDifference)); + this.percentageDifferences.add(Double.valueOf(percentageDifference)); } } } @@ -215,7 +215,7 @@ public void addTestCount(long time, int test) { if (getTestCounts().size() <= test) { getTestCounts().add(new ArrayList()); } - ((List)getTestCounts().get(test)).add(new Long(time)); + ((List)getTestCounts().get(test)).add(Long.valueOf(time)); } /** @@ -295,7 +295,7 @@ public void logResult(Writer log) { * Compute the max of the results. */ public static Number maxResults(List times) { - Number testMax = new Double(0); + Number testMax = Double.valueOf(0); for (int index = 0; index < times.size(); index++) { Number time = (Number)times.get(index); if (time.doubleValue() > testMax.doubleValue()) { @@ -309,7 +309,7 @@ public static Number maxResults(List times) { * Compute the min of the results. */ public static Number minResults(List times) { - Number testMin = new Double(0); + Number testMin = Double.valueOf(0); for (int index = 0; index < times.size(); index++) { Number time = (Number)times.get(index); if ((testMin.doubleValue() == 0) || (time.doubleValue() < testMin.doubleValue())) { diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/framework/PerformanceRegressionTestCase.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/framework/PerformanceRegressionTestCase.java index 58e8460a1d7..0e3feee0351 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/framework/PerformanceRegressionTestCase.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/framework/PerformanceRegressionTestCase.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -92,12 +92,12 @@ public static void verify(PerformanceRegressionTest test) { TestResult lastResult = (TestResult)stream.nextElement(); double lastCount = lastResult.getTestTime(); PerformanceComparisonTestResult testResult = (PerformanceComparisonTestResult)((TestCase)test).getTestResult(); - testResult.getBaselineVersionResults().add(new Double(lastCount)); + testResult.getBaselineVersionResults().add(Double.valueOf(lastCount)); // Average last 5 runs. int numberOfRuns = 0; while (stream.hasMoreElements() && (numberOfRuns < 4)) { TestResult nextResult = (TestResult)stream.nextElement(); - testResult.getBaselineVersionResults().add(new Double(nextResult.getTestTime())); + testResult.getBaselineVersionResults().add(Double.valueOf(nextResult.getTestTime())); numberOfRuns++; } stream.close(); @@ -115,11 +115,11 @@ public static void verify(PerformanceRegressionTest test) { query.useCursoredStream(1, 1); stream = (CursoredStream)session.executeQuery(query); // Average last 5 runs. - testResult.getCurrentVersionResults().add(new Double(currentCount)); + testResult.getCurrentVersionResults().add(Double.valueOf(currentCount)); numberOfRuns = 0; while (stream.hasMoreElements() && (numberOfRuns < 4)) { TestResult nextResult = (TestResult)stream.nextElement(); - testResult.getCurrentVersionResults().add(new Double(nextResult.getTestTime())); + testResult.getCurrentVersionResults().add(Double.valueOf(nextResult.getTestTime())); numberOfRuns++; } stream.close(); diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/framework/SybaseTransactionIsolationListener.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/framework/SybaseTransactionIsolationListener.java index d160a3dd178..45bf11fffec 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/framework/SybaseTransactionIsolationListener.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/framework/SybaseTransactionIsolationListener.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -91,7 +91,7 @@ public void postAcquireConnection(SessionEvent event) { stmt1 = conn.createStatement(); result = stmt1.executeQuery("select @@isolation"); result.next(); - isolationLevel = new Integer(result.getInt(1)); + isolationLevel = Integer.valueOf(result.getInt(1)); if(isolationLevel > 0) { // If conn1 began transaction and updated the row (but hasn't committed the transaction yet), // then conn2 should be able to read the original (not updated) state of the row. diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/framework/TestVariation.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/framework/TestVariation.java index e05b82536c8..b18a45ed79f 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/framework/TestVariation.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/framework/TestVariation.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -252,7 +252,7 @@ protected void setup() throws Throwable { } if (setters[i] != null) { - Object[] args = { new Boolean(required[i]) }; + Object[] args = { Boolean.valueOf(required[i]) }; setters[i].invoke(object, args); } else { fields[i].setBoolean(object, required[i]); @@ -265,7 +265,7 @@ public void reset() throws Throwable { super.reset(); for (int i = required.length - 1; i >= 0; i--) { if (setters[i] != null) { - Object[] args = { new Boolean(original[i]) }; + Object[] args = { Boolean.valueOf(original[i]) }; setters[i].invoke(object, args); } else { fields[i].setBoolean(object, original[i]); diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/framework/ui/LoadBuildDisplayPanel.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/framework/ui/LoadBuildDisplayPanel.java index d88ed33897b..9f9d22b180c 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/framework/ui/LoadBuildDisplayPanel.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/framework/ui/LoadBuildDisplayPanel.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -873,12 +873,12 @@ public void poppulateLoadBuildTable(Vector summaries) { row.addElement(summary.getLoadBuildSummary().jvm); row.addElement(summary.getLoadBuildSummary().machine); row.addElement(summary.getLoadBuildSummary().toplinkVersion); - row.addElement(new Integer(summary.getTotalTests())); - row.addElement(new Integer(summary.getSetupFailures())); - row.addElement(new Integer(summary.getErrors())); - row.addElement(new Integer(summary.getFatalErrors())); - row.addElement(new Integer(summary.getProblems())); - row.addElement(new Long(summary.getTotalTime())); + row.addElement(Integer.valueOf(summary.getTotalTests())); + row.addElement(Integer.valueOf(summary.getSetupFailures())); + row.addElement(Integer.valueOf(summary.getErrors())); + row.addElement(Integer.valueOf(summary.getFatalErrors())); + row.addElement(Integer.valueOf(summary.getProblems())); + row.addElement(Long.valueOf(summary.getTotalTime())); tableModel.addRow(row); } getSelectedTable().setModel(tableModel); @@ -900,9 +900,9 @@ public void poppulateTestResultTable(Vector results) { Vector row = new Vector(); row.addElement(result.getName()); row.addElement(result.getOutcome()); - row.addElement(new Long(result.getTestTime())); - row.addElement(new Long(result.getTotalTime())); - row.addElement(new Boolean(result.getException() != null)); + row.addElement(Long.valueOf(result.getTestTime())); + row.addElement(Long.valueOf(result.getTotalTime())); + row.addElement(Boolean.valueOf(result.getException() != null)); row.addElement(result.getLoadBuildSummary().timestamp); row.addElement(result.getLoadBuildSummary().loginChoice); row.addElement(result.getLoadBuildSummary().os); @@ -929,14 +929,14 @@ public void poppulateTestSummaryTable(Vector summaries) { TestResultsSummary summary = (TestResultsSummary)enumtr.nextElement(); Vector row = new Vector(); row.addElement(summary.getName()); - row.addElement(new Integer(summary.getTotalTests())); - row.addElement(new Integer(summary.getSetupFailures())); - row.addElement(new Integer(summary.getPassed())); - row.addElement(new Integer(summary.getErrors())); - row.addElement(new Integer(summary.getFatalErrors())); - row.addElement(new Integer(summary.getProblems())); - row.addElement(new Integer(summary.getWarnings())); - row.addElement(new Long(summary.getTotalTime())); + row.addElement(Integer.valueOf(summary.getTotalTests())); + row.addElement(Integer.valueOf(summary.getSetupFailures())); + row.addElement(Integer.valueOf(summary.getPassed())); + row.addElement(Integer.valueOf(summary.getErrors())); + row.addElement(Integer.valueOf(summary.getFatalErrors())); + row.addElement(Integer.valueOf(summary.getProblems())); + row.addElement(Integer.valueOf(summary.getWarnings())); + row.addElement(Long.valueOf(summary.getTotalTime())); tableModel.addRow(row); } getSelectedTable().setModel(tableModel); diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/aggregate/AggregateProject.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/aggregate/AggregateProject.java index 53c89f30c21..c5124916489 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/aggregate/AggregateProject.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/aggregate/AggregateProject.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -1532,8 +1532,8 @@ public void buildVehicleDescriptor() { descriptor.getDescriptorInheritancePolicy().setShouldReadSubclasses(true); descriptor.getDescriptorInheritancePolicy().setClassIndicatorFieldName("TYPE"); descriptor.getDescriptorInheritancePolicy().setShouldUseClassNameAsIndicator(false); - descriptor.getDescriptorInheritancePolicy().addClassIndicator(org.eclipse.persistence.testing.models.aggregate.Car.class, new java.lang.Integer(1)); - descriptor.getDescriptorInheritancePolicy().addClassIndicator(org.eclipse.persistence.testing.models.aggregate.Bicycle.class, new java.lang.Integer(2)); + descriptor.getDescriptorInheritancePolicy().addClassIndicator(org.eclipse.persistence.testing.models.aggregate.Car.class, Integer.valueOf(1)); + descriptor.getDescriptorInheritancePolicy().addClassIndicator(org.eclipse.persistence.testing.models.aggregate.Bicycle.class, Integer.valueOf(2)); // SECTION: COPY POLICY descriptor.createCopyPolicy("constructor"); diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/aggregate/House.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/aggregate/House.java index 9203eff0f26..cb87ff7848a 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/aggregate/House.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/aggregate/House.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -29,7 +29,7 @@ public House() { super(); sellingPoints = new Vector(); insuranceId = new Oid(); - insuranceId.setOid(new Integer(0)); + insuranceId.setOid(Integer.valueOf(0)); } public java.lang.String getDescriptions() { diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/aggregate/SingleHouse.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/aggregate/SingleHouse.java index aa1144272d2..cdd1a4c13f2 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/aggregate/SingleHouse.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/aggregate/SingleHouse.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -31,7 +31,7 @@ public static SingleHouse example1() { SingleHouse example1 = new SingleHouse(); Oid insurancePolicyId = new Oid(); - insurancePolicyId.setOid(new Integer(15)); + insurancePolicyId.setOid(Integer.valueOf(15)); example1.setInsuranceId(insurancePolicyId); example1.setDescriptions("beautiful 4 bedroom single house"); example1.setLocation("435 Carling Ave."); @@ -48,7 +48,7 @@ public static SingleHouse example2() { SingleHouse example2 = new SingleHouse(); Oid insurancePolicyId = new Oid(); - insurancePolicyId.setOid(new Integer(27)); + insurancePolicyId.setOid(Integer.valueOf(27)); example2.setInsuranceId(insurancePolicyId); example2.setDescriptions("spacious 5 bedroom banglow"); example2.setLocation("33D King Edward Street"); diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/aggregate/TownHouse.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/aggregate/TownHouse.java index 841fe9b490a..2edebde852a 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/aggregate/TownHouse.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/aggregate/TownHouse.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -23,7 +23,7 @@ public static TownHouse example3() { TownHouse example3 = new TownHouse(); Oid insurancePolicyId = new Oid(); - insurancePolicyId.setOid(new Integer(333)); + insurancePolicyId.setOid(Integer.valueOf(333)); example3.setInsuranceId(insurancePolicyId); example3.setDescriptions("renovated 3-bedroom gardon house"); example3.setLocation("2236 Baseline Rd"); @@ -34,7 +34,7 @@ public static TownHouse example4() { TownHouse example4 = new TownHouse(); Oid insurancePolicyId = new Oid(); - insurancePolicyId.setOid(new Integer(4444)); + insurancePolicyId.setOid(Integer.valueOf(4444)); example4.setInsuranceId(insurancePolicyId); example4.setDescriptions("two bedroom luxury townhouse"); example4.setLocation("790C Bank Street"); diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/collections/MenuItem.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/collections/MenuItem.java index 13878e7be36..b855ba708f5 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/collections/MenuItem.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/collections/MenuItem.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -244,7 +244,7 @@ public void setName(String newValue) { } public void setPrice(float newValue) { - propertyChange("price", new Float(this.price), new Float(newValue)); + propertyChange("price", Float.valueOf(this.price), Float.valueOf(newValue)); this.price = newValue; } diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/collections/map/MapPopulator.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/collections/map/MapPopulator.java index 7e37f304ef4..ca76c93de04 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/collections/map/MapPopulator.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/collections/map/MapPopulator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -114,9 +114,9 @@ public AggregateAggregateMapHolder getAggregateAggregateMapHolder(){ public AggregateDirectMapHolder getAggregateDirectMapHolder(){ AggregateDirectMapHolder holder = new AggregateDirectMapHolder(); AggregateMapKey mapKey = getAggregateMapKey1(); - holder.addAggregateToDirectMapItem(mapKey, new Integer(1)); + holder.addAggregateToDirectMapItem(mapKey, Integer.valueOf(1)); AggregateMapKey mapKey2 = getAggregateMapKey2(); - holder.addAggregateToDirectMapItem(mapKey2, new Integer(2)); + holder.addAggregateToDirectMapItem(mapKey2, Integer.valueOf(2)); return holder; } @@ -161,16 +161,16 @@ public AggregateEntityU1MMapHolder getAggregateEntityU1MMapHolder(){ public DirectAggregateMapHolder getDirectAggregateMapHolder(){ DirectAggregateMapHolder holder = new DirectAggregateMapHolder(); AggregateMapValue value = getAggregateMapValue1(); - holder.addDirectToAggregateMapItem(new Integer(1), value); + holder.addDirectToAggregateMapItem(Integer.valueOf(1), value); value = getAggregateMapValue2(); - holder.addDirectToAggregateMapItem(new Integer(2), value); + holder.addDirectToAggregateMapItem(Integer.valueOf(2), value); return holder; } public DirectDirectMapHolder getDirectDirectMapHolder(){ DirectDirectMapHolder holder = new DirectDirectMapHolder(); - holder.addDirectToDirectMapItem(new Integer(1), new Integer(1)); - holder.addDirectToDirectMapItem(new Integer(2), new Integer(2)); + holder.addDirectToDirectMapItem(Integer.valueOf(1), Integer.valueOf(1)); + holder.addDirectToDirectMapItem(Integer.valueOf(2), Integer.valueOf(2)); return holder; } @@ -178,31 +178,31 @@ public DirectEntity1MMapHolder getDirectEntity1MMapHolder(){ DirectEntity1MMapHolder initialHolder = new DirectEntity1MMapHolder(); DEOTMMapValue value = getDEOTMMapValue1(); value.getHolder().setValue(initialHolder); - initialHolder.addDirectToEntityMapItem(new Integer(11), value); + initialHolder.addDirectToEntityMapItem(Integer.valueOf(11), value); DEOTMMapValue value2 = getDEOTMMapValue2(); value2.getHolder().setValue(initialHolder); - initialHolder.addDirectToEntityMapItem(new Integer(22), value2); + initialHolder.addDirectToEntityMapItem(Integer.valueOf(22), value2); return initialHolder; } public DirectEntityMapHolder getDirectEntityMapHolder(){ DirectEntityMapHolder holder = new DirectEntityMapHolder(); EntityMapValue value = getEntityMapValue1(); - holder.addDirectToEntityMapItem(new Integer(11), value); + holder.addDirectToEntityMapItem(Integer.valueOf(11), value); EntityMapValue value2 = getEntityMapValue2(); - holder.addDirectToEntityMapItem(new Integer(22), value2); + holder.addDirectToEntityMapItem(Integer.valueOf(22), value2); return holder; } public DirectEntityU1MMapHolder getDirectEntityU1MMapHolder(){ DirectEntityU1MMapHolder holder = new DirectEntityU1MMapHolder(); EntityMapValue value = getEntityMapValue3(); - holder.addDirectToEntityMapItem(new Integer(11), value); + holder.addDirectToEntityMapItem(Integer.valueOf(11), value); EntityMapValue value2 = getEntityMapValue4(); - holder.addDirectToEntityMapItem(new Integer(22), value2); + holder.addDirectToEntityMapItem(Integer.valueOf(22), value2); return holder; } @@ -220,9 +220,9 @@ public EntityAggregateMapHolder getEntityAggregateMapHolder(){ public EntityDirectMapHolder getEntityDirectMapHolder(){ EntityDirectMapHolder holder = new EntityDirectMapHolder(); EntityMapKey mapKey = getEntityMapKey3(); - holder.addEntityDirectMapItem(mapKey, new Integer(1)); + holder.addEntityDirectMapItem(mapKey, Integer.valueOf(1)); EntityMapKey mapKey2 = getEntityMapKey4(); - holder.addEntityDirectMapItem(mapKey2, new Integer(2)); + holder.addEntityDirectMapItem(mapKey2, Integer.valueOf(2)); return holder; } diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/conversion/ConversionDataObject.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/conversion/ConversionDataObject.java index 7ea82e2acba..f2ee1ff2447 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/conversion/ConversionDataObject.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/conversion/ConversionDataObject.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -96,14 +96,14 @@ public static ConversionDataObject example1() { example.aPByte = 1; example.setAPByteArray(new byte[] { 1, 2, 3 }); example.aPShort = 1; - example.aCharacter = new Character('a'); - example.anInteger = new Integer(1); - example.aFloat = new Float(1.0); - example.aBoolean = new Boolean(false); - example.aLong = new Long(1L); - example.aDouble = new Double(1.0); - example.aByte = new Byte((byte)1); - example.aShort = new Short((short)1); + example.aCharacter = 'a'; + example.anInteger = 1; + example.aFloat = 1.0f; + example.aBoolean = Boolean.FALSE; + example.aLong = 1L; + example.aDouble = 1.0; + example.aByte = (byte) 1; + example.aShort = (short) 1; example.aBigDecimal = new java.math.BigDecimal(1.0); example.aBigInteger = new java.math.BigInteger("1"); example.aNumber = example.aBigDecimal; @@ -155,14 +155,14 @@ public static ConversionDataObject example2() { example.aPByte = 2; example.setAPByteArray(new byte[] { 4, 5, 6 }); example.aPShort = 2; - example.aCharacter = new Character('b'); - example.anInteger = new Integer(2); - example.aFloat = new Float(2.0); - example.aBoolean = new Boolean(true); - example.aLong = new Long(2L); - example.aDouble = new Double(2.0); - example.aByte = new Byte((byte)2); - example.aShort = new Short((short)2); + example.aCharacter = 'b'; + example.anInteger = 2; + example.aFloat = 2.0f; + example.aBoolean = Boolean.TRUE; + example.aLong = 2L; + example.aDouble = 2.0; + example.aByte = (byte) 2; + example.aShort = (short) 2; example.aBigDecimal = new java.math.BigDecimal(2.0); example.aBigInteger = new java.math.BigInteger("2"); example.aNumber = example.aBigDecimal; @@ -213,14 +213,14 @@ public static ConversionDataObject example3() { example.aPByte = 3; example.setAPByteArray(new byte[] { 7, 8, 9 }); example.aPShort = 3; - example.aCharacter = new Character('c'); - example.anInteger = new Integer(3); - example.aFloat = new Float(3.0); - example.aBoolean = new Boolean(true); - example.aLong = new Long(3L); - example.aDouble = new Double(3.0); - example.aByte = new Byte((byte)3); - example.aShort = new Short((short)3); + example.aCharacter = 'c'; + example.anInteger = 3; + example.aFloat = 3.0f; + example.aBoolean = Boolean.TRUE; + example.aLong = 3L; + example.aDouble = 3.0; + example.aByte = (byte) 3; + example.aShort = (short) 3; example.aBigDecimal = new java.math.BigDecimal(3.0); example.aBigInteger = new java.math.BigInteger("3"); example.aNumber = example.aBigDecimal; diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/conversion/ConversionDataObjectForSupportedTypes.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/conversion/ConversionDataObjectForSupportedTypes.java index 756ddc74d3f..571f432c095 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/conversion/ConversionDataObjectForSupportedTypes.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/conversion/ConversionDataObjectForSupportedTypes.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -28,14 +28,14 @@ public static ConversionDataObjectForSupportedTypes example() { example.setAPCharArray(new char[] { 'a', 'b', 'c' }); example.setAPByteArray(new byte[] { 1, 2, 3 }); - example.aCharacter = new Character('t'); - example.anInteger = new Integer(1); - example.aFloat = new Float(1.0); - example.aBoolean = new Boolean(false); - example.aLong = new Long(1L); - example.aDouble = new Double(1.0); - example.aByte = new Byte((byte)1); - example.aShort = new Short((short)1); + example.aCharacter = 't'; + example.anInteger = 1; + example.aFloat = 1.0f; + example.aBoolean = Boolean.FALSE; + example.aLong = 1L; + example.aDouble = 1.0; + example.aByte = (byte) 1; + example.aShort = (short)1; example.aBigDecimal = new java.math.BigDecimal(1.0); example.aBigInteger = new java.math.BigInteger("1"); example.aNumber = example.aBigDecimal; @@ -52,8 +52,8 @@ public static ConversionDataObjectForSupportedTypes example() { example.aString = new String("Conversion Managaer Test Example 1"); example.stringToInt = new String("111"); example.stringToTimestamp = new String("2003/11/23 23:45:56"); - example.aByteArray = new Byte[] { new Byte("4"), new Byte("5"), new Byte("6") }; - example.aCharacterArray = new Character[] { new Character('C'), new Character('H'), new Character('A') }; + example.aByteArray = new Byte[] { Byte.valueOf("4"), Byte.valueOf("5"), Byte.valueOf("6") }; + example.aCharacterArray = new Character[] { Character.valueOf('C'), Character.valueOf('H'), Character.valueOf('A') }; return example; } diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/employee/domain/Employee.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/employee/domain/Employee.java index af97de693da..6ce91b7bd95 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/employee/domain/Employee.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/employee/domain/Employee.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -468,7 +468,7 @@ public void setResponsibilitiesList(Vector responsibilitiesList) { } public void setSalary(int salary) { - propertyChange("salary", new Integer(this.salary), new Integer(salary)); + propertyChange("salary", Integer.valueOf(this.salary), Integer.valueOf(salary)); this.salary = salary; } diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/employee/domain/LargeProject.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/employee/domain/LargeProject.java index 0fdf0a5f0e3..ccdd39d6b7a 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/employee/domain/LargeProject.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/employee/domain/LargeProject.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -41,7 +41,7 @@ public Timestamp getMilestoneVersion() { } public void setBudget(double budget) { - propertyChange("budget", new Double(this.budget), new Double(budget)); + propertyChange("budget", Double.valueOf(this.budget), Double.valueOf(budget)); this.budget = budget; } diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/inheritance/Bicycle.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/inheritance/Bicycle.java index 8aff6db2e0f..e49512999e8 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/inheritance/Bicycle.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/inheritance/Bicycle.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -18,7 +18,7 @@ public class Bicycle extends NonFueledVehicle { public String description; public void change() { - this.setPassengerCapacity(new Integer(100)); + this.setPassengerCapacity(Integer.valueOf(100)); this.addPartNumber("NEWBIKEPART 1"); this.setDescription("This Bike is easy to handle"); @@ -27,7 +27,7 @@ public void change() { public static Bicycle example1(Company company) { Bicycle example = new Bicycle(); - example.setPassengerCapacity(new Integer(1)); + example.setPassengerCapacity(Integer.valueOf(1)); example.getOwner().setValue(company); example.setDescription("Hercules"); example.addPartNumber("1288H8HH-f"); @@ -38,7 +38,7 @@ public static Bicycle example1(Company company) { public static Bicycle example2(Company company) { Bicycle example = new Bicycle(); - example.setPassengerCapacity(new Integer(2)); + example.setPassengerCapacity(Integer.valueOf(2)); example.getOwner().setValue(company); example.setDescription("Atlas"); example.addPartNumber("176339GT-a"); @@ -50,7 +50,7 @@ public static Bicycle example2(Company company) { public static Bicycle example3(Company company) { Bicycle example = new Bicycle(); - example.setPassengerCapacity(new Integer(3)); + example.setPassengerCapacity(Integer.valueOf(3)); example.getOwner().setValue(company); example.setDescription("Aone"); example.addPartNumber("188181TT-a"); diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/inheritance/Boat.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/inheritance/Boat.java index 9e565eced80..c5cca01ff4a 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/inheritance/Boat.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/inheritance/Boat.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -18,7 +18,7 @@ public class Boat extends NonFueledVehicle { public static Boat example1(Company company) { Boat example = new Boat(); - example.setPassengerCapacity(new Integer(10)); + example.setPassengerCapacity(Integer.valueOf(10)); example.getOwner().setValue(company); return example; } @@ -26,7 +26,7 @@ public static Boat example1(Company company) { public static Boat example2(Company company) { Boat example = new Boat(); - example.setPassengerCapacity(new Integer(20)); + example.setPassengerCapacity(Integer.valueOf(20)); example.getOwner().setValue(company); return example; } @@ -34,7 +34,7 @@ public static Boat example2(Company company) { public static Boat example3(Company company) { Boat example = new Boat(); - example.setPassengerCapacity(new Integer(30)); + example.setPassengerCapacity(Integer.valueOf(30)); example.getOwner().setValue(company); return example; } diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/inheritance/Bus.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/inheritance/Bus.java index ee126f5ed34..6741c74ac3b 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/inheritance/Bus.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/inheritance/Bus.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -20,8 +20,8 @@ public class Bus extends FueledVehicle { public static Bus example2(Company company) { Bus example = new Bus(); - example.setPassengerCapacity(new Integer(30)); - example.setFuelCapacity(new Integer(100)); + example.setPassengerCapacity(Integer.valueOf(30)); + example.setFuelCapacity(Integer.valueOf(100)); example.setDescription("SCHOOL BUS"); example.setFuelType("Petrol"); example.getOwner().setValue(company); @@ -35,8 +35,8 @@ public static Bus example2(Company company) { public static Bus example3(Company company) { Bus example = new Bus(); - example.setPassengerCapacity(new Integer(30)); - example.setFuelCapacity(new Integer(100)); + example.setPassengerCapacity(Integer.valueOf(30)); + example.setFuelCapacity(Integer.valueOf(100)); example.setDescription("TOUR BUS"); example.setFuelType("Petrol"); example.getOwner().setValue(company); @@ -50,8 +50,8 @@ public static Bus example3(Company company) { public static Bus example4(Company company) { Bus example = new Bus(); - example.setPassengerCapacity(new Integer(30)); - example.setFuelCapacity(new Integer(100)); + example.setPassengerCapacity(Integer.valueOf(30)); + example.setFuelCapacity(Integer.valueOf(100)); example.setDescription("TRANSIT BUS"); example.setFuelType("Gas"); example.getOwner().setValue(company); diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/inheritance/Car.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/inheritance/Car.java index ab5a3dae132..5f93ad5af0b 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/inheritance/Car.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/inheritance/Car.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -22,8 +22,8 @@ public Car() { public static Car example1() { Car example = new Car(); - example.setPassengerCapacity(new Integer(2)); - example.setFuelCapacity(new Integer(30)); + example.setPassengerCapacity(Integer.valueOf(2)); + example.setFuelCapacity(Integer.valueOf(30)); example.setDescription("PONTIAC"); example.setFuelType("Petrol"); example.addPartNumber("021776RM-b"); @@ -35,8 +35,8 @@ public static Car example1() { public static Car example2() { Car example = new Car(); - example.setPassengerCapacity(new Integer(4)); - example.setFuelCapacity(new Integer(50)); + example.setPassengerCapacity(Integer.valueOf(4)); + example.setFuelCapacity(Integer.valueOf(50)); example.setDescription("TOYOTA"); example.setFuelType("Petrol"); example.addPartNumber("021776TT-a"); @@ -48,8 +48,8 @@ public static Car example2() { public static Car example3() { Car example = new Car(); - example.setPassengerCapacity(new Integer(5)); - example.setFuelCapacity(new Integer(60)); + example.setPassengerCapacity(Integer.valueOf(5)); + example.setFuelCapacity(Integer.valueOf(60)); example.setDescription("BMW"); example.setFuelType("Disel"); example.addPartNumber("021776KM-k"); @@ -61,8 +61,8 @@ public static Car example3() { public static Car example4() { Car example = new Car(); - example.setPassengerCapacity(new Integer(8)); - example.setFuelCapacity(new Integer(100)); + example.setPassengerCapacity(Integer.valueOf(8)); + example.setFuelCapacity(Integer.valueOf(100)); example.setDescription("Mazda"); example.setFuelType("Coca-Cola"); example.addPartNumber("021776KM-k"); diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/inheritance/FueledVehicle.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/inheritance/FueledVehicle.java index 8deb2afcf1c..77129ff29d5 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/inheritance/FueledVehicle.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/inheritance/FueledVehicle.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -20,7 +20,7 @@ public class FueledVehicle extends Vehicle { public String fuelType; public void change() { - this.setPassengerCapacity(new Integer(100)); + this.setPassengerCapacity(Integer.valueOf(100)); this.addPartNumber("NEWPART 1"); this.setFuelType("HOT AIR"); @@ -29,8 +29,8 @@ public void change() { public static FueledVehicle example1(Company company) { FueledVehicle example = new FueledVehicle(); - example.setPassengerCapacity(new Integer(1)); - example.setFuelCapacity(new Integer(10)); + example.setPassengerCapacity(Integer.valueOf(1)); + example.setFuelCapacity(Integer.valueOf(10)); example.setDescription("Motercycle"); example.getOwner().setValue(company); return example; diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/inheritance/ImaginaryCar.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/inheritance/ImaginaryCar.java index 6f348346f38..2247d2a2a2f 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/inheritance/ImaginaryCar.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/inheritance/ImaginaryCar.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -25,8 +25,8 @@ public static Car example1() { ImaginaryCar example = new ImaginaryCar(); - example.setPassengerCapacity(new Integer(2)); - example.setFuelCapacity(new Integer(30)); + example.setPassengerCapacity(Integer.valueOf(2)); + example.setFuelCapacity(Integer.valueOf(30)); example.setDescription("PONTIAC"); example.setFuelType("Petrol"); example.addPartNumber("021776RM-b"); @@ -38,8 +38,8 @@ public static Car example2() { ImaginaryCar example = new ImaginaryCar(); - example.setPassengerCapacity(new Integer(4)); - example.setFuelCapacity(new Integer(50)); + example.setPassengerCapacity(Integer.valueOf(4)); + example.setFuelCapacity(Integer.valueOf(50)); example.setDescription("TOYOTA"); example.setFuelType("Petrol"); example.addPartNumber("021776TT-a"); @@ -51,8 +51,8 @@ public static Car example3() { ImaginaryCar example = new ImaginaryCar(); - example.setPassengerCapacity(new Integer(5)); - example.setFuelCapacity(new Integer(60)); + example.setPassengerCapacity(Integer.valueOf(5)); + example.setFuelCapacity(Integer.valueOf(60)); example.setDescription("BMW"); example.setFuelType("Disel"); example.addPartNumber("021776KM-k"); @@ -64,8 +64,8 @@ public static Car example4() { Car example = new Car(); - example.setPassengerCapacity(new Integer(8)); - example.setFuelCapacity(new Integer(100)); + example.setPassengerCapacity(Integer.valueOf(8)); + example.setFuelCapacity(Integer.valueOf(100)); example.setDescription("Mazda"); example.setFuelType("Coca-Cola"); example.addPartNumber("021776KM-k"); diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/inheritance/NonFueledVehicle.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/inheritance/NonFueledVehicle.java index 0638c16aae6..76a168d5ae3 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/inheritance/NonFueledVehicle.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/inheritance/NonFueledVehicle.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -18,7 +18,7 @@ public class NonFueledVehicle extends Vehicle { public static NonFueledVehicle example4(Company company) { NonFueledVehicle example = new NonFueledVehicle(); - example.setPassengerCapacity(new Integer(1)); + example.setPassengerCapacity(Integer.valueOf(1)); example.getOwner().setValue(company); return example; } diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/inheritance/SportsCar.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/inheritance/SportsCar.java index 17db5d2f53c..c2bbbbec8c7 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/inheritance/SportsCar.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/inheritance/SportsCar.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -18,8 +18,8 @@ public class SportsCar extends Car { public static Car example1() { SportsCar example = new SportsCar(); - example.setPassengerCapacity(new Integer(2)); - example.setFuelCapacity(new Integer(60)); + example.setPassengerCapacity(Integer.valueOf(2)); + example.setFuelCapacity(Integer.valueOf(60)); example.setDescription("Corvet"); example.setFuelType("Disel"); return example; diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/insurance/InsuranceProject.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/insurance/InsuranceProject.java index 4d58c8bd2d6..d56dd5064b3 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/insurance/InsuranceProject.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/insurance/InsuranceProject.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -281,10 +281,10 @@ public RelationalDescriptor buildPolicyDescriptor() { // Inheritance properties. descriptor.getDescriptorInheritancePolicy().setClassIndicatorFieldName("POLICY.POL_TYPE"); - descriptor.getDescriptorInheritancePolicy().addClassIndicator(org.eclipse.persistence.testing.models.insurance.HousePolicy.class, new Long(3)); - descriptor.getDescriptorInheritancePolicy().addClassIndicator(org.eclipse.persistence.testing.models.insurance.HealthPolicy.class, new Long(2)); - descriptor.getDescriptorInheritancePolicy().addClassIndicator(org.eclipse.persistence.testing.models.insurance.VehiclePolicy.class, new Long(1)); - descriptor.getDescriptorInheritancePolicy().addClassIndicator(org.eclipse.persistence.testing.models.insurance.BicyclePolicy.class, new Long(0)); + descriptor.getDescriptorInheritancePolicy().addClassIndicator(org.eclipse.persistence.testing.models.insurance.HousePolicy.class, Long.valueOf(3)); + descriptor.getDescriptorInheritancePolicy().addClassIndicator(org.eclipse.persistence.testing.models.insurance.HealthPolicy.class, Long.valueOf(2)); + descriptor.getDescriptorInheritancePolicy().addClassIndicator(org.eclipse.persistence.testing.models.insurance.VehiclePolicy.class, Long.valueOf(1)); + descriptor.getDescriptorInheritancePolicy().addClassIndicator(org.eclipse.persistence.testing.models.insurance.BicyclePolicy.class, Long.valueOf(0)); // Mappings. DirectToFieldMapping policyNumberMapping = new DirectToFieldMapping(); @@ -380,8 +380,8 @@ public RelationalDescriptor buildPolicyHolderDescriptor() { sexMapping.setSetMethodName("setSex"); sexMapping.setFieldName("HOLDER.SEX"); ObjectTypeConverter sexConverter = new ObjectTypeConverter(); - sexConverter.addConversionValue(new Character('F'), "Female"); - sexConverter.addConversionValue(new Character('M'), "Male"); + sexConverter.addConversionValue(Character.valueOf('F'), "Female"); + sexConverter.addConversionValue(Character.valueOf('M'), "Male"); sexMapping.setConverter(sexConverter); descriptor.addMapping(sexMapping); diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/interfaces/Commercial.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/interfaces/Commercial.java index 312d9ed6535..a8480adae9c 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/interfaces/Commercial.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/interfaces/Commercial.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -39,7 +39,7 @@ public void setDescription(String description) { } public void setDuration(float duration) { - this.duration = new Float(duration); + this.duration = Float.valueOf(duration); } public void setDuration(Number duration) { diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/interfaces/CourseDeveloper.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/interfaces/CourseDeveloper.java index e8e18f73e82..9b9961971e5 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/interfaces/CourseDeveloper.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/interfaces/CourseDeveloper.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -33,7 +33,7 @@ public static CourseDeveloper example1() { CourseDeveloper example = new CourseDeveloper(); example.setCourse("Intro to Quake 2 Map Design using Qoole"); - example.setSalary(new Float(52000.00)); + example.setSalary(52000.00f); return example; } @@ -42,7 +42,7 @@ public static CourseDeveloper example2() { CourseDeveloper example = new CourseDeveloper(); example.setCourse("Introduction to Synthesis"); - example.setSalary(new Float(51000.00)); + example.setSalary(51000.00f); return example; } @@ -51,7 +51,7 @@ public static CourseDeveloper example3() { CourseDeveloper example = new CourseDeveloper(); example.setCourse("Welcome to Ada!"); - example.setSalary(new Float(56000.00)); + example.setSalary(56000.00f); return example; } diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/interfaces/InterfaceWithTablesSystem.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/interfaces/InterfaceWithTablesSystem.java index 189b165a8ac..f4b5da8dd2f 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/interfaces/InterfaceWithTablesSystem.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/interfaces/InterfaceWithTablesSystem.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -84,12 +84,12 @@ public void populate(DatabaseSession session) { Commercial eatYourWeaties = new Commercial(); eatYourWeaties.setName("Eat Your Weaties"); eatYourWeaties.setDescription("Mikey says that he likes it."); - eatYourWeaties.setDuration(new Float(0.5)); + eatYourWeaties.setDuration(0.5); Show zena = new Show(); zena.setName("Zena"); zena.setDescription("Zena the worrier princess"); - zena.setDuration(new Float(20)); + zena.setDuration(Float.valueOf(20)); schedule.segments.addElement(eatYourWeaties); schedule.segments.addElement(zena); diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/interfaces/InterfaceWithoutTablesProject.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/interfaces/InterfaceWithoutTablesProject.java index 8dc7bd6e30d..e57bf9576f6 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/interfaces/InterfaceWithoutTablesProject.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/interfaces/InterfaceWithoutTablesProject.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -279,7 +279,7 @@ protected void buildCompanyDescriptor() { // SECTION: VARIABLEONETOONEMAPPING org.eclipse.persistence.mappings.VariableOneToOneMapping variableonetoonemapping = new org.eclipse.persistence.mappings.VariableOneToOneMapping(); - variableonetoonemapping.setWeight(new Integer(3)); + variableonetoonemapping.setWeight(Integer.valueOf(3)); variableonetoonemapping.setAttributeName("contact"); variableonetoonemapping.setIsReadOnly(false); variableonetoonemapping.setUsesIndirection(false); @@ -664,8 +664,8 @@ protected void buildEmployeeDescriptor() { //variableonetoonemapping.addClassIndicator(Email.class, "E"); //variableonetoonemapping.addClassIndicator(Phone.class, "P"); variableonetoonemapping.addClassIndicator(Email.class, - new Float(1)); // TO TEST NUMERIC TYPE INDICATOR - variableonetoonemapping.addClassIndicator(Phone.class, new Float(2)); + Float.valueOf(1)); // TO TEST NUMERIC TYPE INDICATOR + variableonetoonemapping.addClassIndicator(Phone.class, Float.valueOf(2)); descriptor.addMapping(variableonetoonemapping); // SECTION: VARIABLEONETOONEMAPPING @@ -681,8 +681,8 @@ protected void buildEmployeeDescriptor() { //variableonetoonemapping2.addClassIndicator(Email.class, "E"); //variableonetoonemapping2.addClassIndicator(Phone.class, "P"); variableonetoonemapping2.addClassIndicator(Email.class, - new Float(1)); // TO TEST NUMERIC TYPE INDICATOR - variableonetoonemapping2.addClassIndicator(Phone.class, new Float(2)); + Float.valueOf(1)); // TO TEST NUMERIC TYPE INDICATOR + variableonetoonemapping2.addClassIndicator(Phone.class, Float.valueOf(2)); descriptor.addMapping(variableonetoonemapping2); Employee.addToDescriptor(descriptor); diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/interfaces/PersonnelManager.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/interfaces/PersonnelManager.java index 65aa60bed35..45295ab8aa5 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/interfaces/PersonnelManager.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/interfaces/PersonnelManager.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -33,7 +33,7 @@ public static PersonnelManager example1() { PersonnelManager example = new PersonnelManager(); example.setDepartment("Division A"); - example.setSalary(new Float(77235.00)); + example.setSalary(77235.00f); Vector employees = new Vector(5); employees.addElement(CourseDeveloper.example1()); @@ -51,7 +51,7 @@ public static PersonnelManager example2() { PersonnelManager example = new PersonnelManager(); example.setDepartment("Division B"); - example.setSalary(new Float(97235.00)); + example.setSalary(97235.00f); Vector employees = new Vector(5); employees.addElement(CourseDeveloper.example2()); @@ -69,7 +69,7 @@ public static PersonnelManager example3() { PersonnelManager example = new PersonnelManager(); example.setDepartment("Division C"); - example.setSalary(new Float(87265.00)); + example.setSalary(87265.00f); Vector employees = new Vector(5); employees.addElement(CourseDeveloper.example3()); diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/interfaces/ProductDeveloper.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/interfaces/ProductDeveloper.java index b85258e28a0..978e3d3cffc 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/interfaces/ProductDeveloper.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/interfaces/ProductDeveloper.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -23,7 +23,7 @@ public static ProductDeveloper example1() { ProductDeveloper example = new ProductDeveloper(); example.setProduct("Quake 2 Maps"); - example.setSalary(new Float(145000.00)); + example.setSalary(145000.00f); return example; } @@ -32,7 +32,7 @@ public static ProductDeveloper example2() { ProductDeveloper example = new ProductDeveloper(); example.setProduct("Trinity Operating System"); - example.setSalary(new Float(85000.00)); + example.setSalary(85000.00f); return example; } @@ -41,7 +41,7 @@ public static ProductDeveloper example3() { ProductDeveloper example = new ProductDeveloper(); example.setProduct("Ada For Dummies"); - example.setSalary(new Float(80000.00)); + example.setSalary(80000.00f); return example; } diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/interfaces/ProductManager.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/interfaces/ProductManager.java index 3790f758091..ca3a8d49426 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/interfaces/ProductManager.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/interfaces/ProductManager.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -34,7 +34,7 @@ public static ProductManager example1() { ProductManager example = new ProductManager(); example.setProduct("Quake 2 Maps"); - example.setSalary(new Float(88000.00)); + example.setSalary(88000.00f); example.setGoldCardNumber(new BigInteger("482122381872")); Vector employees = new Vector(1); @@ -49,7 +49,7 @@ public static ProductManager example2() { ProductManager example = new ProductManager(); example.setProduct("Trinity Operating System"); - example.setSalary(new Float(84000.00)); + example.setSalary(84000.00f); example.setGoldCardNumber(new BigInteger("998128762878")); Vector employees = new Vector(1); @@ -64,7 +64,7 @@ public static ProductManager example3() { ProductManager example = new ProductManager(); example.setProduct("Ada For Dummies"); - example.setSalary(new Float(84000.00)); + example.setSalary(84000.00f); example.setGoldCardNumber(new BigInteger("144173389267")); Vector employees = new Vector(1); diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/interfaces/Receptionist.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/interfaces/Receptionist.java index face151145f..4664ef8ca48 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/interfaces/Receptionist.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/interfaces/Receptionist.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -22,9 +22,9 @@ public class Receptionist extends AdministrativeJob { public static Receptionist example1() { Receptionist example = new Receptionist(); - example.setWordsPerMinute(new Integer(50)); - example.setSalary(new Float(22500.00)); - example.setMinimumSalary(new Float(22000.00)); + example.setWordsPerMinute(50); + example.setSalary(22500.00f); + example.setMinimumSalary(22000.00f); return example; } @@ -32,9 +32,9 @@ public static Receptionist example1() { public static Receptionist example2() { Receptionist example = new Receptionist(); - example.setWordsPerMinute(new Integer(50)); - example.setSalary(new Float(23450.00)); - example.setMinimumSalary(new Float(22000.00)); + example.setWordsPerMinute(50); + example.setSalary(23450.00f); + example.setMinimumSalary(22000.00f); return example; } @@ -42,9 +42,9 @@ public static Receptionist example2() { public static Receptionist example3() { Receptionist example = new Receptionist(); - example.setWordsPerMinute(new Integer(60)); - example.setSalary(new Float(26450.00)); - example.setMinimumSalary(new Float(22000.00)); + example.setWordsPerMinute(Integer.valueOf(60)); + example.setSalary(26450.00f); + example.setMinimumSalary(22000.00f); return example; } diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/interfaces/Secretary.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/interfaces/Secretary.java index e103067f345..a42884b250c 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/interfaces/Secretary.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/interfaces/Secretary.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -23,8 +23,8 @@ public static Secretary example1() { Secretary example = new Secretary(); example.setDepartment("Finance"); - example.setSalary(new Float(33500.00)); - example.setMinimumSalary(new Float(31000.00)); + example.setSalary(33500.00f); + example.setMinimumSalary(31000.00f); return example; } @@ -33,8 +33,8 @@ public static Secretary example2() { Secretary example = new Secretary(); example.setDepartment("Employment"); - example.setSalary(new Float(33500.00)); - example.setMinimumSalary(new Float(31000.00)); + example.setSalary(33500.00f); + example.setMinimumSalary(31000.00f); return example; } @@ -43,8 +43,8 @@ public static Secretary example3() { Secretary example = new Secretary(); example.setDepartment("Public Relations"); - example.setSalary(new Float(35000.00)); - example.setMinimumSalary(new Float(31000.00)); + example.setSalary(35000.00f); + example.setMinimumSalary(31000.00f); return example; } diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/interfaces/Show.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/interfaces/Show.java index be75e42ae45..d9863d65391 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/interfaces/Show.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/interfaces/Show.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -20,7 +20,7 @@ public class Show implements Program, java.io.Serializable { public String name; public String description; - public Number duration = new Float(0); + public Number duration = Float.valueOf(0); public String getDescription() { return description; @@ -39,11 +39,11 @@ public void setDescription(String description) { } public void setDuration(double duration) { - this.duration = new Double(duration); + this.duration = Double.valueOf(duration); } public void setDuration(float duration) { - this.duration = new Float(duration); + this.duration = Float.valueOf(duration); } public void setDuration(Number duration) { diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/mapping/Computer.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/mapping/Computer.java index 512c84f4f78..aa2b6e9d6e7 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/mapping/Computer.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/mapping/Computer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -146,11 +146,11 @@ public int hashCode() { } public void isMacintosh() { - isMacintosh = new Boolean(true); + isMacintosh = Boolean.valueOf(true); } public void notMacintosh() { - isMacintosh = new Boolean(false); + isMacintosh = Boolean.valueOf(false); } public void setDescription(String aDescription) { diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/mapping/Employee.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/mapping/Employee.java index ffee549c81a..6b6815bd489 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/mapping/Employee.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/mapping/Employee.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -483,10 +483,10 @@ public Integer getRankFromObject() { } if (getDesignation().getValue().equals("Executive")) { - rank = new Integer(1); + rank = Integer.valueOf(1); } if (getDesignation().getValue().equals("Non-Executive")) { - rank = new Integer(2); + rank = Integer.valueOf(2); } return rank; } @@ -495,7 +495,7 @@ public String getRankFromRow(org.eclipse.persistence.sessions.Record row, Sessio if (row.get("ERANK") == null) { return null; } - Integer value = new Integer(((Number)row.get("ERANK")).intValue()); + Integer value = Integer.valueOf(((Number)row.get("ERANK")).intValue()); String rank = null; Employee employee = new Employee(); diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/mapping/Employee2.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/mapping/Employee2.java index 2c05714ed30..3fdd869369a 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/mapping/Employee2.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/mapping/Employee2.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -30,8 +30,8 @@ public Employee2() { public static Employee2 example1() { Employee2 example = new Employee2(); - example.setId(new Integer(1)); - example.setEmployeeNumber(new Integer(2)); + example.setId(Integer.valueOf(1)); + example.setEmployeeNumber(Integer.valueOf(2)); example.setEmployeeNumberB(example.getEmployeeNumber()); example.setExtraInfo("Extra info string"); example.setFirstName("Jan"); @@ -42,8 +42,8 @@ public static Employee2 example1() { public static Employee2 example2() { Employee2 example = new Employee2(); - example.setId(new Integer(4)); - example.setEmployeeNumber(new Integer(8)); + example.setId(Integer.valueOf(4)); + example.setEmployeeNumber(Integer.valueOf(8)); example.setEmployeeNumberB(example.getEmployeeNumber()); example.setExtraInfo("Whatever"); example.setFirstName("Ursula"); diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/mapping/MappingProject.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/mapping/MappingProject.java index 2be0193137c..b6ab6eb8b1a 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/mapping/MappingProject.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/mapping/MappingProject.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -205,9 +205,9 @@ protected void buildComputerDescriptor() { objecttypemapping.setAttributeName("isMacintosh"); objecttypemapping.setIsReadOnly(false); objecttypemapping.setFieldName("MAP_COM.IS_MAC"); - objecttypeconverter.addConversionValue("No", new Boolean(false)); - objecttypeconverter.addConversionValue("Yes", new Boolean(true)); - objecttypemapping.setNullValue(new Boolean(false)); + objecttypeconverter.addConversionValue("No", Boolean.valueOf(false)); + objecttypeconverter.addConversionValue("Yes", Boolean.valueOf(true)); + objecttypemapping.setNullValue(Boolean.valueOf(false)); objecttypemapping.setConverter(objecttypeconverter); descriptor.addMapping(objecttypemapping); @@ -807,8 +807,8 @@ public void buildPeripheralDescriptor() { validMapping.setAttributeName("valid"); validMapping.setFieldName("MAP_PERIPHERAL.VALID"); ObjectTypeConverter validMappingConverter = new ObjectTypeConverter(); - validMappingConverter.addConversionValue(new Character('N'), new java.lang.Boolean("false")); - validMappingConverter.addConversionValue(new Character('Y'), new java.lang.Boolean("true")); + validMappingConverter.addConversionValue(Character.valueOf('N'), Boolean.valueOf(false)); + validMappingConverter.addConversionValue(Character.valueOf('Y'), Boolean.valueOf(true)); validMapping.setConverter(validMappingConverter); descriptor.addMapping(validMapping); diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/onetoonejointable/Employee.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/onetoonejointable/Employee.java index bc6c8fc015c..25b5540879c 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/onetoonejointable/Employee.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/onetoonejointable/Employee.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -309,7 +309,7 @@ public void setResponsibilitiesList(Vector responsibilitiesList) { } public void setSalary(int salary) { - propertyChange("salary", new Integer(this.salary), new Integer(salary)); + propertyChange("salary", Integer.valueOf(this.salary), Integer.valueOf(salary)); this.salary = salary; } diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/onetoonejointable/LargeProject.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/onetoonejointable/LargeProject.java index aba3037a96e..2ad8e61339b 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/onetoonejointable/LargeProject.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/onetoonejointable/LargeProject.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -46,7 +46,7 @@ public Timestamp getMilestoneVersion() { } public void setBudget(double budget) { - propertyChange("budget", new Double(this.budget), new Double(budget)); + propertyChange("budget", Double.valueOf(this.budget), Double.valueOf(budget)); this.budget = budget; } diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/optimisticlocking/GamesConsoleProject.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/optimisticlocking/GamesConsoleProject.java index 5f5046841c8..38da23d6b36 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/optimisticlocking/GamesConsoleProject.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/optimisticlocking/GamesConsoleProject.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -381,9 +381,9 @@ public ClassDescriptor buildPowerSupplyUnitClassDescriptor() { onMapping.setAttributeName("on"); onMapping.setFieldName("on->DIRECT"); ObjectTypeConverter onMappingConverter = new ObjectTypeConverter(); - onMappingConverter.setDefaultAttributeValue(new java.lang.Boolean("false")); - onMappingConverter.addConversionValue(new Character('F'), new java.lang.Boolean("false")); - onMappingConverter.addConversionValue(new Character('T'), new java.lang.Boolean("true")); + onMappingConverter.setDefaultAttributeValue(Boolean.valueOf("false")); + onMappingConverter.addConversionValue(Character.valueOf('F'),Boolean.valueOf("false")); + onMappingConverter.addConversionValue(Character.valueOf('T'),Boolean.valueOf("true")); onMapping.setConverter(onMappingConverter); descriptor.addMapping(onMapping); diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/orderedlist/LargeProject.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/orderedlist/LargeProject.java index 8ff3f6cf868..821e4c73ad4 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/orderedlist/LargeProject.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/orderedlist/LargeProject.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -48,7 +48,7 @@ public Timestamp getMilestoneVersion() { } public void setBudget(double budget) { - propertyChange("budget", new Double(this.budget), new Double(budget)); + propertyChange("budget", Double.valueOf(this.budget), Double.valueOf(budget)); this.budget = budget; } diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/relationshipmaintenance/FieldOffice.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/relationshipmaintenance/FieldOffice.java index 2f44b9d4e26..250c19b7e36 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/relationshipmaintenance/FieldOffice.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/relationshipmaintenance/FieldOffice.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -56,7 +56,7 @@ public Collection getSalespeople() { } public void setId(int newId) { - propertyChange("id", new Integer(this.id), new Integer(newId)); + propertyChange("id", Integer.valueOf(this.id), Integer.valueOf(newId)); id = newId; } diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/relationshipmaintenance/RelationshipsSystem.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/relationshipmaintenance/RelationshipsSystem.java index 25c3ed0ceb5..fe008ef9da0 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/relationshipmaintenance/RelationshipsSystem.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/relationshipmaintenance/RelationshipsSystem.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -118,26 +118,26 @@ public void populate(DatabaseSession session) { uow.registerObject(fieldOffice2); Dept dept = new Dept(); - dept.setDeptno(new Double(5.0)); + dept.setDeptno(Double.valueOf(5.0)); dept.setDname("Goofs"); Emp emp = new Emp(); - emp.setEmpno(new Double(5.0)); + emp.setEmpno(Double.valueOf(5.0)); emp.setEname("Anthony"); emp.setDeptno(dept); Emp emp1 = new Emp(); - emp1.setEmpno(new Double(6.0)); + emp1.setEmpno(Double.valueOf(6.0)); emp1.setEname("Bob"); emp1.setDeptno(dept); Emp emp2 = new Emp(); - emp2.setEmpno(new Double(7.0)); + emp2.setEmpno(Double.valueOf(7.0)); emp2.setEname("Fargo"); emp2.setDeptno(dept); Emp emp3 = new Emp(); - emp3.setEmpno(new Double(8.0)); + emp3.setEmpno(Double.valueOf(8.0)); emp3.setEname("Oneder"); emp3.setDeptno(dept); diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/relationshipmaintenance/Resource.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/relationshipmaintenance/Resource.java index 8e6c560348d..fb0498f3a02 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/relationshipmaintenance/Resource.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/relationshipmaintenance/Resource.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -55,7 +55,7 @@ public String getName() { * @param newId int */ public void setId(int newId) { - propertyChange("id", new Integer(this.id), new Integer(newId)); + propertyChange("id", Integer.valueOf(this.id), Integer.valueOf(newId)); id = newId; } diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/transparentindirection/AbstractOrder.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/transparentindirection/AbstractOrder.java index 421511c23e1..b6880ac03b3 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/transparentindirection/AbstractOrder.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/transparentindirection/AbstractOrder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -187,7 +187,7 @@ public int getTotalTens2() { protected void initialize() { this.contacts2 = new Stack(); this.salesReps2 = new TestHashtable(); - this.total = new ValueHolder(new Integer(1)); + this.total = new ValueHolder(Integer.valueOf(1)); this.total2 = 0; } @@ -214,7 +214,7 @@ public void removeSalesRep2(AbstractSalesRep salesRep) { } public void setTotal(int total) { - this.total.setValue(new Integer(total)); + this.total.setValue(Integer.valueOf(total)); } public String toString() { diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/transparentindirection/Player.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/transparentindirection/Player.java index 11f4aa866b7..1c27082df90 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/transparentindirection/Player.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/transparentindirection/Player.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -27,7 +27,7 @@ public Player() { } public Integer getId() { - return new Integer(new Long(m_id).intValue()); + return Integer.valueOf(Long.valueOf(m_id).intValue()); } public Team getTeam() { diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/vehicle/EngineType.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/vehicle/EngineType.java index 59056c0f310..77b74a026f1 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/vehicle/EngineType.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/vehicle/EngineType.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -36,14 +36,14 @@ public String getType() { public static EngineType example1() { EngineType example = new EngineType(); - example.setId(new Integer(1)); + example.setId(Integer.valueOf(1)); example.setType("Steel"); return example; } public static EngineType example2() { EngineType example = new EngineType(); - example.setId(new Integer(2)); + example.setId(Integer.valueOf(2)); example.setType("AlumSteel"); return example; } diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/vehicle/FuelType.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/vehicle/FuelType.java index 005adba6962..bf9ea4d5250 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/vehicle/FuelType.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/vehicle/FuelType.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -43,14 +43,14 @@ public String toString() { public static FuelType example1() { FuelType example = new FuelType(); - example.setFuelId(new Integer(1)); + example.setFuelId(Integer.valueOf(1)); example.setFuelDescription("Petrol"); return example; } public static FuelType example2() { FuelType example = new FuelType(); - example.setFuelId(new Integer(2)); + example.setFuelId(Integer.valueOf(2)); example.setFuelDescription("Diesel"); return example; } diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/vehicle/SportsCar.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/vehicle/SportsCar.java index afe865eac12..35d8e616b40 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/vehicle/SportsCar.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/models/vehicle/SportsCar.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -68,7 +68,7 @@ public static SportsCar example1() { SportsCar example = new SportsCar(); example.setId(10); - example.setFuelCapacity(new Integer(30)); + example.setFuelCapacity(Integer.valueOf(30)); example.setDescription("TOYOTA"); example.setFuelType(FuelType.example1()); example.setEngineType(EngineType.example1()); @@ -79,7 +79,7 @@ public static SportsCar example2() { SportsCar example = new SportsCar(); example.setId(20); - example.setFuelCapacity(new Integer(50)); + example.setFuelCapacity(Integer.valueOf(50)); example.setDescription("TATA INDICA"); example.setFuelType(FuelType.example2()); example.setEngineType(EngineType.example2()); diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/aggregate/AggregateCollectionUoWTest.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/aggregate/AggregateCollectionUoWTest.java index 356edc392f7..f8b4761fb4c 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/aggregate/AggregateCollectionUoWTest.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/aggregate/AggregateCollectionUoWTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -51,7 +51,7 @@ protected void changeUnitOfWorkWorkingCopy() { House house2 = (House)houses.get(houses.size()-1); house2.setDescriptions("do not buy it, it collapses -:)"); Oid newInsurancePolicyId = new Oid(); - newInsurancePolicyId.setOid(new Integer(893453)); + newInsurancePolicyId.setOid(Integer.valueOf(893453)); house2.setInsuranceId(newInsurancePolicyId); House newHouse = new House(); newHouse.setLocation("123 Slater Street"); diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/aggregate/UnitOfWorkCommitResumeTest.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/aggregate/UnitOfWorkCommitResumeTest.java index b265a0b60e1..e2541a7bdfe 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/aggregate/UnitOfWorkCommitResumeTest.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/aggregate/UnitOfWorkCommitResumeTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -90,7 +90,7 @@ protected void changeUnitOfWorkWorkingCopy() { Vector responsibilities; Vector languages; Language language; - String suffix = (new Integer(changeVersion)).toString(); + String suffix = (Integer.valueOf(changeVersion)).toString(); //Root object changed employee.setFirstName("First " + suffix); diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/clientserver/AnotherClient.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/clientserver/AnotherClient.java index 0461272930a..c046ca2d5a1 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/clientserver/AnotherClient.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/clientserver/AnotherClient.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -44,7 +44,7 @@ public void run() { raq.setReferenceClass(org.eclipse.persistence.testing.models.employee.domain.Project.class); Vector projects = (Vector)unitOfWork.executeQuery(raq); org.eclipse.persistence.testing.models.employee.domain.Project project = (org.eclipse.persistence.testing.models.employee.domain.Project)projects.elementAt(this.index); - project.setName(new Integer(this.index).toString()); + project.setName(Integer.valueOf(this.index).toString()); this.unitOfWork.commit(); } catch (Exception exception) { diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/clientserver/ClientServerSequenceDeadlockTest2.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/clientserver/ClientServerSequenceDeadlockTest2.java index 2678edfec10..13ddd233a78 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/clientserver/ClientServerSequenceDeadlockTest2.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/clientserver/ClientServerSequenceDeadlockTest2.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -100,7 +100,7 @@ public void test() { } if (firstHalfDoneForAll) { for (int j = 0; j < NUM_CLIENTS; j++) { - fifoInArray[j].insertTail(new Boolean(true)); + fifoInArray[j].insertTail(Boolean.valueOf(true)); } } } diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/clientserver/EmployeeSeqDeadlockClient.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/clientserver/EmployeeSeqDeadlockClient.java index 3b35cc72374..9ac135e7691 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/clientserver/EmployeeSeqDeadlockClient.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/clientserver/EmployeeSeqDeadlockClient.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -47,7 +47,7 @@ public void run() { uow.commit(); if (fifoOut != null) { - fifoOut.insertTail(new Integer(i)); + fifoOut.insertTail(Integer.valueOf(i)); } } } catch (Exception e) { @@ -63,7 +63,7 @@ public void run() { this.server = null; if (fifoOut != null) { - fifoOut.insertTail(new Integer(-1)); + fifoOut.insertTail(Integer.valueOf(-1)); } } } diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/clientserver/EmployeeSeqDeadlockClient2.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/clientserver/EmployeeSeqDeadlockClient2.java index 571be9b0bf7..c13f77c74af 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/clientserver/EmployeeSeqDeadlockClient2.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/clientserver/EmployeeSeqDeadlockClient2.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -42,7 +42,7 @@ public void run() { ((ClientSession)clientSession).getSequencing().getNextValue(SmallProject.class); } if (fifoOut != null) { - fifoOut.insertTail(new Integer(i)); + fifoOut.insertTail(Integer.valueOf(i)); } // System.out.println(getName() + " " + i); @@ -80,7 +80,7 @@ public void run() { this.server = null; if (fifoOut != null) { - fifoOut.insertTail(new Integer(-1)); + fifoOut.insertTail(Integer.valueOf(-1)); } } diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/collections/map/TestReadAggregateDirectMapMapping.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/collections/map/TestReadAggregateDirectMapMapping.java index b409a197d52..a5cd2aff1b1 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/collections/map/TestReadAggregateDirectMapMapping.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/collections/map/TestReadAggregateDirectMapMapping.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -54,10 +54,10 @@ public void setup(){ AggregateDirectMapHolder holder = new AggregateDirectMapHolder(); AggregateMapKey mapKey = new AggregateMapKey(); mapKey.setKey(1); - holder.addAggregateToDirectMapItem(mapKey, new Integer(1)); + holder.addAggregateToDirectMapItem(mapKey, Integer.valueOf(1)); AggregateMapKey mapKey2 = new AggregateMapKey(); mapKey2.setKey(2); - holder.addAggregateToDirectMapItem(mapKey2, new Integer(2)); + holder.addAggregateToDirectMapItem(mapKey2, Integer.valueOf(2)); uow.registerObject(holder); uow.commit(); holderExp = (new ExpressionBuilder()).get("id").equal(holder.getId()); diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/collections/map/TestReadDirectAggregateMapMapping.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/collections/map/TestReadDirectAggregateMapMapping.java index b021c64d001..8fadb6b912d 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/collections/map/TestReadDirectAggregateMapMapping.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/collections/map/TestReadDirectAggregateMapMapping.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -54,10 +54,10 @@ public void setup(){ DirectAggregateMapHolder holder = new DirectAggregateMapHolder(); AggregateMapValue value = new AggregateMapValue(); value.setValue(1); - holder.addDirectToAggregateMapItem(new Integer(1), value); + holder.addDirectToAggregateMapItem(Integer.valueOf(1), value); value = new AggregateMapValue(); value.setValue(2); - holder.addDirectToAggregateMapItem(new Integer(2), value); + holder.addDirectToAggregateMapItem(Integer.valueOf(2), value); uow.registerObject(holder); uow.commit(); holderExp = (new ExpressionBuilder()).get("id").equal(holder.getId()); @@ -80,7 +80,7 @@ public void verify(){ if (holder.getDirectToAggregateMap().size() != 2){ throw new TestErrorException("Incorrect Number of Map values was read."); } - AggregateMapValue value = (AggregateMapValue)holder.getDirectToAggregateMap().get(new Integer(1)); + AggregateMapValue value = (AggregateMapValue)holder.getDirectToAggregateMap().get(Integer.valueOf(1)); if (value.getValue() != 1){ throw new TestErrorException("Incorrect map value was read."); } diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/collections/map/TestReadDirectDirectMapMapping.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/collections/map/TestReadDirectDirectMapMapping.java index daafb1b5bde..0274006b58a 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/collections/map/TestReadDirectDirectMapMapping.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/collections/map/TestReadDirectDirectMapMapping.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -51,8 +51,8 @@ public void setup(){ UnitOfWork uow = getSession().acquireUnitOfWork(); DirectDirectMapHolder holder = new DirectDirectMapHolder(); - holder.addDirectToDirectMapItem(new Integer(1), new Integer(1)); - holder.addDirectToDirectMapItem(new Integer(2), new Integer(2)); + holder.addDirectToDirectMapItem(Integer.valueOf(1), Integer.valueOf(1)); + holder.addDirectToDirectMapItem(Integer.valueOf(2), Integer.valueOf(2)); uow.registerObject(holder); uow.commit(); holderExp = (new ExpressionBuilder()).get("id").equal(holder.getId()); diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/collections/map/TestReadDirectEntity1MMapMapping.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/collections/map/TestReadDirectEntity1MMapMapping.java index 4eb7f83c8f8..3606cd23e52 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/collections/map/TestReadDirectEntity1MMapMapping.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/collections/map/TestReadDirectEntity1MMapMapping.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -57,12 +57,12 @@ public void setup(){ DEOTMMapValue value = new DEOTMMapValue(); value.setId(1); value.getHolder().setValue(initialHolder); - initialHolder.addDirectToEntityMapItem(new Integer(11), value); + initialHolder.addDirectToEntityMapItem(Integer.valueOf(11), value); DEOTMMapValue value2 = new DEOTMMapValue(); value2.setId(2); value2.getHolder().setValue(initialHolder); - initialHolder.addDirectToEntityMapItem(new Integer(22), value2); + initialHolder.addDirectToEntityMapItem(Integer.valueOf(22), value2); uow.registerObject(initialHolder); uow.registerObject(value); uow.registerObject(value2); @@ -87,7 +87,7 @@ public void verify(){ if (holder.getDirectToEntityMap().size() != 2){ throw new TestErrorException("Incorrect Number of MapEntityValues was read."); } - DEOTMMapValue value = (DEOTMMapValue)holder.getDirectToEntityMap().get(new Integer(11)); + DEOTMMapValue value = (DEOTMMapValue)holder.getDirectToEntityMap().get(Integer.valueOf(11)); if (value.getId() != 1){ throw new TestErrorException("Incorrect MapEntityValues was read."); } diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/collections/map/TestReadDirectEntityMapMapping.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/collections/map/TestReadDirectEntityMapMapping.java index d961a785d99..1fd139991b1 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/collections/map/TestReadDirectEntityMapMapping.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/collections/map/TestReadDirectEntityMapMapping.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -56,12 +56,12 @@ public void setup(){ DirectEntityMapHolder holder = new DirectEntityMapHolder(); EntityMapValue value = new EntityMapValue(); value.setId(1); - holder.addDirectToEntityMapItem(new Integer(11), value); + holder.addDirectToEntityMapItem(Integer.valueOf(11), value); EntityMapValue value2 = new EntityMapValue(); value2.setId(2); - holder.addDirectToEntityMapItem(new Integer(22), value2); + holder.addDirectToEntityMapItem(Integer.valueOf(22), value2); uow.registerObject(holder); uow.registerObject(value); uow.registerObject(value2); @@ -87,7 +87,7 @@ public void verify(){ if (holder.getDirectToEntityMap().size() != 2){ throw new TestErrorException("Incorrect Number of MapEntityValues was read."); } - EntityMapValue value = (EntityMapValue)holder.getDirectToEntityMap().get(new Integer(11)); + EntityMapValue value = (EntityMapValue)holder.getDirectToEntityMap().get(Integer.valueOf(11)); if (value.getId() != 1){ throw new TestErrorException("Incorrect MapEntityValues was read."); } diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/collections/map/TestReadDirectEntityU1MMapMapping.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/collections/map/TestReadDirectEntityU1MMapMapping.java index 29f99e9e305..3ec4df8f825 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/collections/map/TestReadDirectEntityU1MMapMapping.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/collections/map/TestReadDirectEntityU1MMapMapping.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -57,12 +57,12 @@ public void setup(){ DirectEntityU1MMapHolder holder = new DirectEntityU1MMapHolder(); EntityMapValue value = new EntityMapValue(); value.setId(1); - holder.addDirectToEntityMapItem(new Integer(11), value); + holder.addDirectToEntityMapItem(Integer.valueOf(11), value); EntityMapValue value2 = new EntityMapValue(); value2.setId(2); - holder.addDirectToEntityMapItem(new Integer(22), value2); + holder.addDirectToEntityMapItem(Integer.valueOf(22), value2); uow.registerObject(holder); uow.registerObject(value); uow.registerObject(value2); @@ -88,7 +88,7 @@ public void verify(){ if (holder.getDirectToEntityMap().size() != 2){ throw new TestErrorException("Incorrect Number of MapEntityValues was read."); } - EntityMapValue value = (EntityMapValue)holder.getDirectToEntityMap().get(new Integer(11)); + EntityMapValue value = (EntityMapValue)holder.getDirectToEntityMap().get(Integer.valueOf(11)); if (value.getId() != 1){ throw new TestErrorException("Incorrect MapEntityValues was read."); } diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/collections/map/TestReadEntityDirectMapMapping.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/collections/map/TestReadEntityDirectMapMapping.java index 8110ae5db61..351a90baad3 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/collections/map/TestReadEntityDirectMapMapping.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/collections/map/TestReadEntityDirectMapMapping.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -57,12 +57,12 @@ public void setup(){ mapKey.setId(1); mapKey.setData("11"); uow.registerObject(mapKey); - holder.addEntityDirectMapItem(mapKey, new Integer(1)); + holder.addEntityDirectMapItem(mapKey, Integer.valueOf(1)); EntityMapKey mapKey2 = new EntityMapKey(); mapKey2.setId(2); mapKey2.setData("22"); uow.registerObject(mapKey2); - holder.addEntityDirectMapItem(mapKey2, new Integer(2)); + holder.addEntityDirectMapItem(mapKey2, Integer.valueOf(2)); uow.registerObject(holder); uow.commit(); diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/collections/map/TestUpdateAggregateDirectMapMapping.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/collections/map/TestUpdateAggregateDirectMapMapping.java index 71b0c4193fe..07553d938e6 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/collections/map/TestUpdateAggregateDirectMapMapping.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/collections/map/TestUpdateAggregateDirectMapMapping.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -30,7 +30,7 @@ public void test(){ holder.removeAggregateToDirectMapItem(mapKey); mapKey = new AggregateMapKey(); mapKey.setKey(3); - holder.addAggregateToDirectMapItem(mapKey, new Integer(3)); + holder.addAggregateToDirectMapItem(mapKey, Integer.valueOf(3)); uow.commit(); Object holderForComparison = uow.readObject(holder); if (!compareObjects(holder, holderForComparison)){ diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/collections/map/TestUpdateDirectAggregateMapMapping.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/collections/map/TestUpdateDirectAggregateMapMapping.java index 12672485097..ff7b1a0e62b 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/collections/map/TestUpdateDirectAggregateMapMapping.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/collections/map/TestUpdateDirectAggregateMapMapping.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -27,10 +27,10 @@ public void test(){ UnitOfWork uow = getSession().acquireUnitOfWork(); holders = uow.readAllObjects(DirectAggregateMapHolder.class, holderExp); changedHolder = (DirectAggregateMapHolder)holders.get(0); - changedHolder.removeDirectToAggregateMapItem(new Integer(1)); + changedHolder.removeDirectToAggregateMapItem(Integer.valueOf(1)); AggregateMapValue mapValue = new AggregateMapValue(); mapValue.setValue(3); - changedHolder.addDirectToAggregateMapItem(new Integer(3), mapValue); + changedHolder.addDirectToAggregateMapItem(Integer.valueOf(3), mapValue); uow.commit(); Object holderForComparison = uow.readObject(changedHolder); if (!compareObjects(changedHolder, holderForComparison)){ @@ -46,10 +46,10 @@ public void verify(){ if (!compareObjects(holder, changedHolder)){ throw new TestErrorException("Objects do not match reinitialize"); } - if (holder.getDirectToAggregateMap().containsKey(new Integer(1))){ + if (holder.getDirectToAggregateMap().containsKey(Integer.valueOf(1))){ throw new TestErrorException("Item that was removed is still present in map."); } - AggregateMapValue value = (AggregateMapValue)holder.getDirectToAggregateMap().get(new Integer(3)); + AggregateMapValue value = (AggregateMapValue)holder.getDirectToAggregateMap().get(Integer.valueOf(3)); if (value.getValue() != 3){ throw new TestErrorException("Item was not correctly added to map"); } diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/collections/map/TestUpdateDirectDirectMapMapping.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/collections/map/TestUpdateDirectDirectMapMapping.java index dad31ec79e3..96d28df3698 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/collections/map/TestUpdateDirectDirectMapMapping.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/collections/map/TestUpdateDirectDirectMapMapping.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -26,8 +26,8 @@ public void test(){ UnitOfWork uow = getSession().acquireUnitOfWork(); holders = uow.readAllObjects(DirectDirectMapHolder.class, holderExp); changedHolder = (DirectDirectMapHolder)holders.get(0); - changedHolder.removeDirectToDirectMapItem(new Integer(1)); - changedHolder.addDirectToDirectMapItem(new Integer(3), new Integer(3)); + changedHolder.removeDirectToDirectMapItem(Integer.valueOf(1)); + changedHolder.addDirectToDirectMapItem(Integer.valueOf(3), Integer.valueOf(3)); uow.commit(); Object holderForComparison = uow.readObject(changedHolder); if (!compareObjects(changedHolder, holderForComparison)){ @@ -43,10 +43,10 @@ public void verify(){ if (!compareObjects(holder, changedHolder)){ throw new TestErrorException("Objects do not match reinitialize"); } - if (holder.getDirectToDirectMap().containsKey(new Integer(1))){ + if (holder.getDirectToDirectMap().containsKey(Integer.valueOf(1))){ throw new TestErrorException("Item that was removed is still present in map."); } - Integer value = (Integer)holder.getDirectToDirectMap().get(new Integer(3)); + Integer value = (Integer)holder.getDirectToDirectMap().get(Integer.valueOf(3)); if (value.intValue() != 3){ throw new TestErrorException("Item was not correctly added to map"); } diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/collections/map/TestUpdateDirectEntity1MMapMapping.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/collections/map/TestUpdateDirectEntity1MMapMapping.java index 1fa563458fe..1060c0de2a1 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/collections/map/TestUpdateDirectEntity1MMapMapping.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/collections/map/TestUpdateDirectEntity1MMapMapping.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -52,12 +52,12 @@ public void test(){ UnitOfWork uow = getSession().acquireUnitOfWork(); holders = uow.readAllObjects(DirectEntity1MMapHolder.class, holderExp); changedHolder = (DirectEntity1MMapHolder)holders.get(0); - changedHolder.removeDirectToEntityMapItem(new Integer(11)); + changedHolder.removeDirectToEntityMapItem(Integer.valueOf(11)); DEOTMMapValue mapValue = new DEOTMMapValue(); mapValue.setId(3); mapValue = (DEOTMMapValue)uow.registerObject(mapValue); mapValue.getHolder().setValue(changedHolder); - changedHolder.addDirectToEntityMapItem(new Integer(33), mapValue); + changedHolder.addDirectToEntityMapItem(Integer.valueOf(33), mapValue); uow.commit(); } @@ -68,10 +68,10 @@ public void verify(){ if (!compareObjects(holder, changedHolder)){ throw new TestErrorException("Objects do not match reinitialize"); } - if (holder.getDirectToEntityMap().containsKey(new Integer(1))){ + if (holder.getDirectToEntityMap().containsKey(Integer.valueOf(1))){ throw new TestErrorException("Item that was removed is still present in map."); } - DEOTMMapValue value = (DEOTMMapValue)holder.getDirectToEntityMap().get(new Integer(33)); + DEOTMMapValue value = (DEOTMMapValue)holder.getDirectToEntityMap().get(Integer.valueOf(33)); if (value.getId() != 3){ throw new TestErrorException("Item was not correctly added to map"); } diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/collections/map/TestUpdateDirectEntityMapMapping.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/collections/map/TestUpdateDirectEntityMapMapping.java index 31326948758..335cb8d8aa9 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/collections/map/TestUpdateDirectEntityMapMapping.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/collections/map/TestUpdateDirectEntityMapMapping.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -54,12 +54,12 @@ public void setup(){ holder = new DirectEntityMapHolder(); EntityMapValue value = new EntityMapValue(); value.setId(1); - holder.addDirectToEntityMapItem(new Integer(11), value); + holder.addDirectToEntityMapItem(Integer.valueOf(11), value); EntityMapValue value2 = new EntityMapValue(); value2.setId(2); - holder.addDirectToEntityMapItem(new Integer(22), value2); + holder.addDirectToEntityMapItem(Integer.valueOf(22), value2); uow.registerObject(holder); uow.registerObject(value); uow.registerObject(value2); @@ -76,9 +76,9 @@ public void test(){ changedHolder = (DirectEntityMapHolder)uow.readObject(holder); EntityMapValue value = new EntityMapValue(); value.setId(3); - changedHolder.addDirectToEntityMapItem(new Integer(33), value); + changedHolder.addDirectToEntityMapItem(Integer.valueOf(33), value); - changedHolder.getDirectToEntityMap().remove(new Integer(11)); + changedHolder.getDirectToEntityMap().remove(Integer.valueOf(11)); uow.commit(); Object holderForComparison = uow.readObject(holder); if (!compareObjects(changedHolder, holderForComparison)){ @@ -95,7 +95,7 @@ public void verify(){ if (holder.getDirectToEntityMap().size() != 2){ throw new TestErrorException("Incorrect Number of MapEntityValues was read."); } - EntityMapValue value = (EntityMapValue)holder.getDirectToEntityMap().get(new Integer(33)); + EntityMapValue value = (EntityMapValue)holder.getDirectToEntityMap().get(Integer.valueOf(33)); if (value.getId() != 3){ throw new TestErrorException("MapEntityValue was not added properly."); } diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/collections/map/TestUpdateDirectEntityU1MMapMapping.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/collections/map/TestUpdateDirectEntityU1MMapMapping.java index 7f4d08a92ef..c7e7cdc8a91 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/collections/map/TestUpdateDirectEntityU1MMapMapping.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/collections/map/TestUpdateDirectEntityU1MMapMapping.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -51,11 +51,11 @@ public void test(){ UnitOfWork uow = getSession().acquireUnitOfWork(); holders = uow.readAllObjects(DirectEntityU1MMapHolder.class, holderExp); changedHolder = (DirectEntityU1MMapHolder)holders.get(0); - changedHolder.removeDirectToEntityMapItem(new Integer(11)); + changedHolder.removeDirectToEntityMapItem(Integer.valueOf(11)); EntityMapValue mapValue = new EntityMapValue(); mapValue.setId(3); mapValue = (EntityMapValue)uow.registerObject(mapValue); - changedHolder.addDirectToEntityMapItem(new Integer(33), mapValue); + changedHolder.addDirectToEntityMapItem(Integer.valueOf(33), mapValue); uow.commit(); Object holderForComparison = uow.readObject(changedHolder); if (!compareObjects(changedHolder, holderForComparison)){ @@ -70,10 +70,10 @@ public void verify(){ if (!compareObjects(holder, changedHolder)){ throw new TestErrorException("Objects do not match reinitialize"); } - if (holder.getDirectToEntityMap().containsKey(new Integer(1))){ + if (holder.getDirectToEntityMap().containsKey(Integer.valueOf(1))){ throw new TestErrorException("Item that was removed is still present in map."); } - EntityMapValue value = (EntityMapValue)holder.getDirectToEntityMap().get(new Integer(33)); + EntityMapValue value = (EntityMapValue)holder.getDirectToEntityMap().get(Integer.valueOf(33)); if (value.getId() != 3){ throw new TestErrorException("Item was not correctly added to map"); } diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/collections/map/TestUpdateEntityDirectMapMapping.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/collections/map/TestUpdateEntityDirectMapMapping.java index 99f39fd73b0..28d89dd1c01 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/collections/map/TestUpdateEntityDirectMapMapping.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/collections/map/TestUpdateEntityDirectMapMapping.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -61,7 +61,7 @@ public void test(){ mapKey.setId(3); mapKey.setData("testData"); mapKey = (EntityMapKey)uow.registerObject(mapKey); - changedHolder.addEntityDirectMapItem(mapKey, new Integer(3)); + changedHolder.addEntityDirectMapItem(mapKey, Integer.valueOf(3)); uow.commit(); Object holderForComparison = uow.readObject(changedHolder); if (!compareObjects(changedHolder, holderForComparison)){ diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/conversion/ConversionManagerTestModel.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/conversion/ConversionManagerTestModel.java index 9e51551261d..e73aad0ad97 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/conversion/ConversionManagerTestModel.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/conversion/ConversionManagerTestModel.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -164,51 +164,51 @@ public TestSuite getConvertObjectTestSuite() { suite.addTest(new ConvertObjectTest(new java.math.BigInteger("100"), ClassConstants.BIGDECIMAL)); suite.addTest(new ConvertObjectTest(new java.math.BigInteger("100"), ClassConstants.BIGINTEGER)); suite.addTest(new ConvertObjectTest(new String("100"), ClassConstants.BIGINTEGER)); - suite.addTest(new ConvertObjectTest(new Integer(100), ClassConstants.BIGINTEGER)); - suite.addTest(new ConvertObjectTest(new Character('1'), ClassConstants.BOOLEAN)); - suite.addTest(new ConvertObjectTest(new Character('t'), ClassConstants.BOOLEAN)); - suite.addTest(new ConvertObjectTest(new Character('0'), ClassConstants.BOOLEAN)); - suite.addTest(new ConvertObjectTest(new Character('f'), ClassConstants.BOOLEAN)); + suite.addTest(new ConvertObjectTest(Integer.valueOf(100), ClassConstants.BIGINTEGER)); + suite.addTest(new ConvertObjectTest(Character.valueOf('1'), ClassConstants.BOOLEAN)); + suite.addTest(new ConvertObjectTest(Character.valueOf('t'), ClassConstants.BOOLEAN)); + suite.addTest(new ConvertObjectTest(Character.valueOf('0'), ClassConstants.BOOLEAN)); + suite.addTest(new ConvertObjectTest(Character.valueOf('f'), ClassConstants.BOOLEAN)); suite.addTest(new ConvertObjectTest(Helper.buildHexStringFromBytes(new byte[] { 4 }), ClassConstants.PBYTE)); - suite.addTest(new ConvertObjectTest(new Integer(100), ClassConstants.CHAR)); + suite.addTest(new ConvertObjectTest(Integer.valueOf(100), ClassConstants.CHAR)); //suite.addTest(new ConvertObjectTest(new org.eclipse.persistence.internal.helper.Date(1), ClassConstants.SQLDATE)); suite.addTest(new ConvertObjectTest(new java.util.GregorianCalendar(), ClassConstants.SQLDATE)); - suite.addTest(new ConvertObjectTest(new Long(100), ClassConstants.SQLDATE)); - suite.addTest(new ConvertObjectTest(new Boolean("true"), ClassConstants.LONG)); - suite.addTest(new ConvertObjectTest(new Boolean("false"), ClassConstants.LONG)); + suite.addTest(new ConvertObjectTest(Long.valueOf(100), ClassConstants.SQLDATE)); + suite.addTest(new ConvertObjectTest(Boolean.valueOf("true"), ClassConstants.LONG)); + suite.addTest(new ConvertObjectTest(Boolean.valueOf("false"), ClassConstants.LONG)); suite.addTest(new ConvertObjectTest(new String("1"), ClassConstants.NUMBER)); - suite.addTest(new ConvertObjectTest(new Boolean("true"), ClassConstants.NUMBER)); - suite.addTest(new ConvertObjectTest(new Boolean("false"), ClassConstants.NUMBER)); - suite.addTest(new ConvertObjectTest(new Integer(1), ClassConstants.SHORT)); - suite.addTest(new ConvertObjectTest(new Boolean("true"), ClassConstants.SHORT)); - suite.addTest(new ConvertObjectTest(new Boolean("false"), ClassConstants.SHORT)); + suite.addTest(new ConvertObjectTest(Boolean.valueOf("true"), ClassConstants.NUMBER)); + suite.addTest(new ConvertObjectTest(Boolean.valueOf("false"), ClassConstants.NUMBER)); + suite.addTest(new ConvertObjectTest(Integer.valueOf(1), ClassConstants.SHORT)); + suite.addTest(new ConvertObjectTest(Boolean.valueOf("true"), ClassConstants.SHORT)); + suite.addTest(new ConvertObjectTest(Boolean.valueOf("false"), ClassConstants.SHORT)); //suite.addTest(new ConvertObjectTest(new org.eclipse.persistence.internal.helper.Time(100), ClassConstants.TIME)); suite.addTest(new ConvertObjectTest(new String("12:00:00"), ClassConstants.TIME)); suite.addTest(new ConvertObjectTest(new java.util.Date(100), ClassConstants.TIME)); suite.addTest(new ConvertObjectTest(new java.util.GregorianCalendar(), ClassConstants.TIME)); - suite.addTest(new ConvertObjectTest(new Long(100), ClassConstants.TIME)); + suite.addTest(new ConvertObjectTest(Long.valueOf(100), ClassConstants.TIME)); //suite.addTest(new ConvertObjectTest(new org.eclipse.persistence.internal.helper.Timestamp(100), ClassConstants.TIMESTAMP)); suite.addTest(new ConvertObjectTest(new String("12:00:00"), ClassConstants.TIMESTAMP)); suite.addTest(new ConvertObjectTest(new java.util.Date(100), ClassConstants.TIMESTAMP)); suite.addTest(new ConvertObjectTest(new java.util.GregorianCalendar(), ClassConstants.TIMESTAMP)); suite.addTest(new ConvertObjectTest(new java.util.GregorianCalendar(), ClassConstants.UTILDATE)); - suite.addTest(new ConvertObjectTest(new Long(100), ClassConstants.UTILDATE)); + suite.addTest(new ConvertObjectTest(Long.valueOf(100), ClassConstants.UTILDATE)); // test exception handling - suite.addTest(new ConvertObjectTest(new Character('1'), ClassConstants.BIGDECIMAL, true)); - suite.addTest(new ConvertObjectTest(new Character('1'), ClassConstants.BIGINTEGER, true)); + suite.addTest(new ConvertObjectTest(Character.valueOf('1'), ClassConstants.BIGDECIMAL, true)); + suite.addTest(new ConvertObjectTest(Character.valueOf('1'), ClassConstants.BIGINTEGER, true)); suite.addTest(new ConvertObjectTest(new String("a"), ClassConstants.BIGINTEGER, true)); suite.addTest(new ConvertObjectTest(new java.sql.Date(1), ClassConstants.BOOLEAN, true)); suite.addTest(new ConvertObjectTest(new java.sql.Date(1), ClassConstants.BYTE, true)); suite.addTest(new ConvertObjectTest(new String("a"), ClassConstants.BYTE, true)); suite.addTest(new ConvertObjectTest(new char[] { 'a' }, ClassConstants.APBYTE, true)); suite.addTest(new ConvertObjectTest(new java.util.GregorianCalendar(), ClassConstants.CHAR, true)); - suite.addTest(new ConvertObjectTest(new Boolean("true"), ClassConstants.SQLDATE, true)); + suite.addTest(new ConvertObjectTest(Boolean.valueOf("true"), ClassConstants.SQLDATE, true)); suite.addTest(new ConvertObjectTest(new String("a"), ClassConstants.DOUBLE, true)); - suite.addTest(new ConvertObjectTest(new Boolean("true"), ClassConstants.DOUBLE, true)); + suite.addTest(new ConvertObjectTest(Boolean.valueOf("true"), ClassConstants.DOUBLE, true)); suite.addTest(new ConvertObjectTest(new String("a"), ClassConstants.FLOAT, true)); - suite.addTest(new ConvertObjectTest(new Boolean("true"), ClassConstants.FLOAT, true)); + suite.addTest(new ConvertObjectTest(Boolean.valueOf("true"), ClassConstants.FLOAT, true)); suite.addTest(new ConvertObjectTest(new java.sql.Date(1), ClassConstants.INTEGER, true)); suite.addTest(new ConvertObjectTest(new String("a"), ClassConstants.LONG, true)); suite.addTest(new ConvertObjectTest(new java.util.GregorianCalendar(), ClassConstants.LONG, true)); @@ -216,10 +216,10 @@ public TestSuite getConvertObjectTestSuite() { suite.addTest(new ConvertObjectTest(new java.util.GregorianCalendar(), ClassConstants.NUMBER, true)); suite.addTest(new ConvertObjectTest(new String("a"), ClassConstants.SHORT, true)); suite.addTest(new ConvertObjectTest(new java.util.GregorianCalendar(), ClassConstants.SHORT, true)); - suite.addTest(new ConvertObjectTest(new Boolean("true"), ClassConstants.TIME, true)); - suite.addTest(new ConvertObjectTest(new Boolean("true"), ClassConstants.TIMESTAMP, true)); - suite.addTest(new ConvertObjectTest(new Boolean("true"), ClassConstants.UTILDATE, true)); - suite.addTest(new ConvertObjectTest(new Integer(1), ConversionManager.class, true)); + suite.addTest(new ConvertObjectTest(Boolean.valueOf("true"), ClassConstants.TIME, true)); + suite.addTest(new ConvertObjectTest(Boolean.valueOf("true"), ClassConstants.TIMESTAMP, true)); + suite.addTest(new ConvertObjectTest(Boolean.valueOf("true"), ClassConstants.UTILDATE, true)); + suite.addTest(new ConvertObjectTest(Integer.valueOf(1), ConversionManager.class, true)); suite.addTest(new ConvertByteCharArrayToStringTest()); diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/customsqlstoredprocedures/DataReadQueryTest.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/customsqlstoredprocedures/DataReadQueryTest.java index 733f88b7da9..c8c11289f4b 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/customsqlstoredprocedures/DataReadQueryTest.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/customsqlstoredprocedures/DataReadQueryTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -42,7 +42,7 @@ public void test() { getSession().removeQuery("dblogin"); getSession().addQuery("dblogin", readQuery); Vector args = new Vector(1); - args.addElement(new Integer(1)); + args.addElement(Integer.valueOf(1)); try { Vector vResult = (Vector)getSession().executeQuery("dblogin", args); } catch (ClassCastException e) { @@ -52,7 +52,7 @@ public void test() { readQuery = new DataReadQuery(); call = new StoredProcedureCall(); call.setProcedureName("Select_Employee_using_Output"); - call.addNamedArgumentValue("ARG1", new Integer(1)); + call.addNamedArgumentValue("ARG1", Integer.valueOf(1)); call.addNamedOutputArgument("VERSION", "VERSION", java.math.BigDecimal.class); readQuery.setCall(call); try { diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/customsqlstoredprocedures/EmployeeCustomSQLSystem.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/customsqlstoredprocedures/EmployeeCustomSQLSystem.java index a2c9eb4bd87..f7964a52a0f 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/customsqlstoredprocedures/EmployeeCustomSQLSystem.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/customsqlstoredprocedures/EmployeeCustomSQLSystem.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -1094,7 +1094,7 @@ protected void setSybaseSQL(Session session) { call.addNamedArgument("VERSION"); call.addNamedArgument("START_TIME"); call.addNamedArgument("END_TIME"); - call.addNamedInOutputArgumentValue("OUT_VERSION", new Long(0), "EMPLOYEE.VERSION", Long.class); + call.addNamedInOutputArgumentValue("OUT_VERSION", Long.valueOf(0), "EMPLOYEE.VERSION", Long.class); insertQuery.setCall(call); empDescriptor.getQueryManager().setInsertQuery(insertQuery); @@ -1167,7 +1167,7 @@ private static void setSQLAnywhereSQL(final Session session) { // After this is fixed (m.b. in SQLAnywhere 11?) the order of the attributes should be returned to original // (where it does NOT follow the order of sp parameters). insertEmployeeCall.addNamedArgument("_VERSION", "VERSION"); - insertEmployeeCall.addNamedInOutputArgumentValue("_OUT_VERSION", new Long(0), "EMPLOYEE.VERSION", Long.class); + insertEmployeeCall.addNamedInOutputArgumentValue("_OUT_VERSION", Long.valueOf(0), "EMPLOYEE.VERSION", Long.class); employeeDescriptor.getQueryManager().setInsertQuery(new InsertObjectQuery(insertEmployeeCall)); final StoredProcedureCall updateEmployeeCall = new StoredProcedureCall(); diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/customsqlstoredprocedures/StoredProcWithOutputParamsAndResultSetTest.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/customsqlstoredprocedures/StoredProcWithOutputParamsAndResultSetTest.java index bb75c375bd8..d6c12014fa3 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/customsqlstoredprocedures/StoredProcWithOutputParamsAndResultSetTest.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/customsqlstoredprocedures/StoredProcWithOutputParamsAndResultSetTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -78,7 +78,7 @@ public void test() { spCall.setProcedureName("Select_Output_and_ResultSet"); spCall.addNamedArgument("ARG1", "argument"); if (useInOut) { - spCall.addNamedInOutputArgumentValue("VERSION", new Long(0), "VERSION", java.math.BigDecimal.class); + spCall.addNamedInOutputArgumentValue("VERSION", Long.valueOf(0), "VERSION", java.math.BigDecimal.class); } else { spCall.addNamedOutputArgument("VERSION", "VERSION", BigDecimal.class); } @@ -93,9 +93,9 @@ public void test() { getSession().removeQuery("dblogin"); getSession().addQuery("dblogin", readQuery); Vector args = new Vector(2); - args.addElement(new Integer(1)); + args.addElement(Integer.valueOf(1)); if (useCustomSQL && useInOut) { - args.addElement(new Long(0)); + args.addElement(Long.valueOf(0)); } try { Vector vResult = (Vector)getSession().executeQuery("dblogin", args); @@ -109,9 +109,9 @@ public void test() { } else { spCall = new StoredProcedureCall(); spCall.setProcedureName("Select_Output_and_ResultSet"); - spCall.addNamedArgumentValue("ARG1", new Integer(1)); + spCall.addNamedArgumentValue("ARG1", Integer.valueOf(1)); if (useInOut) { - spCall.addNamedInOutputArgumentValue("VERSION", new Long(0), "VERSION", java.math.BigDecimal.class); + spCall.addNamedInOutputArgumentValue("VERSION", Long.valueOf(0), "VERSION", java.math.BigDecimal.class); } else { spCall.addNamedOutputArgument("VERSION", "VERSION", BigDecimal.class); } diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/customsqlstoredprocedures/StoredProcedureObjectRelationalParameters.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/customsqlstoredprocedures/StoredProcedureObjectRelationalParameters.java index 684cd6afbdb..20b9e7ea03c 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/customsqlstoredprocedures/StoredProcedureObjectRelationalParameters.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/customsqlstoredprocedures/StoredProcedureObjectRelationalParameters.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -38,7 +38,7 @@ public class StoredProcedureObjectRelationalParameters extends TestCase{ Object result = null; Vector results2, results3 = null; Address originalAddress; - Long policyHolderIdToUse = new Long(12345); + Long policyHolderIdToUse = Long.valueOf(12345); boolean useCustomSQL; public StoredProcedureObjectRelationalParameters() { @@ -73,7 +73,7 @@ public void test() { Vector args = new Vector(); args.addElement(policyHolderIdToUse);//ssn args.addElement(null);//occupation - args.addElement(new Character('M'));//sex + args.addElement(Character.valueOf('M'));//sex args.addElement("Chris");//firstName args.addElement(null);//birthDate args.addElement("Random");//lastName diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/customsqlstoredprocedures/StoredProcedureTest.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/customsqlstoredprocedures/StoredProcedureTest.java index 343801b1c1d..30bebc844c7 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/customsqlstoredprocedures/StoredProcedureTest.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/customsqlstoredprocedures/StoredProcedureTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -41,7 +41,7 @@ public void setup() { } public void test() { - Integer id = new Integer(12); + Integer id = Integer.valueOf(12); String name = "James"; StoredProcedureCall call = new StoredProcedureCall(); diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/customsqlstoredprocedures/StoredProcedureTest2.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/customsqlstoredprocedures/StoredProcedureTest2.java index fc8b9645e31..01dbeedbdac 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/customsqlstoredprocedures/StoredProcedureTest2.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/customsqlstoredprocedures/StoredProcedureTest2.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -53,7 +53,7 @@ public void test() { query.addArgument("P_ID"); Vector args = new Vector(1); - args.addElement(new Integer(id)); + args.addElement(Integer.valueOf(id)); row = (DatabaseRecord)((Vector)getSession().executeQuery(query, args)).firstElement(); } diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/customsqlstoredprocedures/StoredProcedureTest_Inout_Out_In.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/customsqlstoredprocedures/StoredProcedureTest_Inout_Out_In.java index 194b218659f..25e303eaa2c 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/customsqlstoredprocedures/StoredProcedureTest_Inout_Out_In.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/customsqlstoredprocedures/StoredProcedureTest_Inout_Out_In.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -26,8 +26,8 @@ public class StoredProcedureTest_Inout_Out_In extends TestCase { boolean useCustomSQL; boolean useArgumentNames; boolean shouldBindAllParameters; - Integer in = new Integer(1); - Integer inout = new Integer(2); + Integer in = Integer.valueOf(1); + Integer inout = Integer.valueOf(2); static final int PROC = 0; static final int FUNC = 1; @@ -144,8 +144,8 @@ public void verify() { Number inoutExpected = in; Number outExpected = inout; - Integer inoutReturned = new Integer(((Number)row.get("P_INOUT")).intValue()); - Integer outReturned = new Integer(((Number)row.get("P_OUT")).intValue()); + Integer inoutReturned = Integer.valueOf(((Number)row.get("P_INOUT")).intValue()); + Integer outReturned = Integer.valueOf(((Number)row.get("P_OUT")).intValue()); if (!inoutExpected.equals(inoutReturned)) { throw new TestErrorException("Invalid value P_INOUT = " + inoutReturned + "; should be " + inoutExpected); @@ -155,7 +155,7 @@ public void verify() { } if (mode == FUNC) { - Integer result = new Integer(((Number)row.get("RESULT")).intValue()); + Integer result = Integer.valueOf(((Number)row.get("RESULT")).intValue()); if (!result.equals(outReturned)) { throw new TestErrorException("Invalid value RESULT = " + result + "; should be " + outReturned); diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/directmap/DirectMapMappingBatchReadTest.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/directmap/DirectMapMappingBatchReadTest.java index da231371911..3ac9f5888dd 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/directmap/DirectMapMappingBatchReadTest.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/directmap/DirectMapMappingBatchReadTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -54,12 +54,12 @@ public void postExecuteQuery(SessionEvent event) { // Create a directmapmapping with a few items in it UnitOfWork uow = getSession().acquireUnitOfWork(); DirectMapMappings maps1 = (DirectMapMappings)uow.registerObject(new DirectMapMappings()); - maps1.directMap.put(new Integer(1), "guy"); - maps1.directMap.put(new Integer(2), "axemen"); + maps1.directMap.put(Integer.valueOf(1), "guy"); + maps1.directMap.put(Integer.valueOf(2), "axemen"); DirectMapMappings maps2 = (DirectMapMappings)uow.registerObject(new DirectMapMappings()); - maps2.directMap.put(new Integer(1), "steve"); - maps2.directMap.put(new Integer(2), "superman"); + maps2.directMap.put(Integer.valueOf(1), "steve"); + maps2.directMap.put(Integer.valueOf(2), "superman"); uow.commit(); } diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/directmap/DirectMapMappingDeleteTest.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/directmap/DirectMapMappingDeleteTest.java index cc07352b2d3..f650459d879 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/directmap/DirectMapMappingDeleteTest.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/directmap/DirectMapMappingDeleteTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -50,14 +50,14 @@ public void test() throws Exception { // Create a directmapmapping with a few items in it UnitOfWork uow = getSession().acquireUnitOfWork(); DirectMapMappings maps1 = (DirectMapMappings)uow.registerObject(new DirectMapMappings()); - maps1.directMap.put(new Integer(1), "guy"); - maps1.directMap.put(new Integer(2), "axemen"); + maps1.directMap.put(Integer.valueOf(1), "guy"); + maps1.directMap.put(Integer.valueOf(2), "axemen"); uow.commit(); // Read the same directmapping back and delete an item from it UnitOfWork uow2 = getSession().acquireUnitOfWork(); DirectMapMappings maps2 = (DirectMapMappings)uow2.readObject(DirectMapMappings.class); - maps2.directMap.remove(new Integer(2)); + maps2.directMap.remove(Integer.valueOf(2)); uow2.commit(); // Clear the cache diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/directmap/DirectMapMappingHashMapTest.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/directmap/DirectMapMappingHashMapTest.java index 83395e0d68e..6f7fa3f6327 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/directmap/DirectMapMappingHashMapTest.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/directmap/DirectMapMappingHashMapTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -51,9 +51,9 @@ public void test() throws Exception { // Create a hashmap with a null in it. UnitOfWork uow = getSession().acquireUnitOfWork(); DirectMapMappings maps = (DirectMapMappings)uow.registerObject(new DirectMapMappings()); - maps.directHashMap.put(new Integer(1), "item1"); - maps.directHashMap.put(new Integer(2), "item2"); - maps.directHashMap.put(new Integer(3), null); + maps.directHashMap.put(Integer.valueOf(1), "item1"); + maps.directHashMap.put(Integer.valueOf(2), "item2"); + maps.directHashMap.put(Integer.valueOf(3), null); try { uow.commit(); @@ -77,7 +77,7 @@ public void verify() throws Exception { throw new TestErrorException("Incorrect amount of items in the hashmap."); } - if (queryResult.directHashMap.get(new Integer(3)) != null) { + if (queryResult.directHashMap.get(Integer.valueOf(3)) != null) { throw new TestErrorException("The null value was not read back in correctly."); } } diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/directmap/DirectMapMappingIndirectionTest.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/directmap/DirectMapMappingIndirectionTest.java index 55f4b64409c..467b6905bcf 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/directmap/DirectMapMappingIndirectionTest.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/directmap/DirectMapMappingIndirectionTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -45,8 +45,8 @@ public void test() throws Exception { // Create a directmapmapping with a few items in it UnitOfWork uow = getSession().acquireUnitOfWork(); DirectMapMappings maps1 = (DirectMapMappings)uow.registerObject(new DirectMapMappings()); - maps1.indirectionDirectMap.put(new Integer(1), "guy"); - maps1.indirectionDirectMap.put(new Integer(2), "axemen"); + maps1.indirectionDirectMap.put(Integer.valueOf(1), "guy"); + maps1.indirectionDirectMap.put(Integer.valueOf(2), "axemen"); uow.commit(); getSession().getIdentityMapAccessor().initializeAllIdentityMaps(); diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/directmap/DirectMapMappingsSerializedConverterTestCase.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/directmap/DirectMapMappingsSerializedConverterTestCase.java index a8ac8ba5135..1b9dac06f23 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/directmap/DirectMapMappingsSerializedConverterTestCase.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/directmap/DirectMapMappingsSerializedConverterTestCase.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -36,8 +36,8 @@ public void test() { // Create a directmapmapping with a few items in it UnitOfWork uow = getSession().acquireUnitOfWork(); DirectMapMappings m1 = new DirectMapMappings(); - m1.blobDirectMap.put(new Integer(1), new Integer(1)); - m1.blobDirectMap.put(new Integer(2), new Integer(2)); + m1.blobDirectMap.put(Integer.valueOf(1), Integer.valueOf(1)); + m1.blobDirectMap.put(Integer.valueOf(2), Integer.valueOf(2)); DirectMapMappings maps1 = (DirectMapMappings)uow.registerObject(m1); uow.commit(); @@ -47,7 +47,7 @@ public void verify() { getSession().getIdentityMapAccessor().initializeIdentityMaps(); UnitOfWork uow = getSession().acquireUnitOfWork(); DirectMapMappings maps = (DirectMapMappings)uow.readObject(DirectMapMappings.class); - if (!maps.blobDirectMap.get(new Integer(1)).equals(new Integer(1))) { + if (!maps.blobDirectMap.get(Integer.valueOf(1)).equals(Integer.valueOf(1))) { throw new TestErrorException("The cloned direct map does not maintain the proper type when used with a SerializedObjectConverter."); } } diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/directmap/DirectMapUnitOfWorkTest.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/directmap/DirectMapUnitOfWorkTest.java index 7fdaf012018..3cd45289841 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/directmap/DirectMapUnitOfWorkTest.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/directmap/DirectMapUnitOfWorkTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -48,14 +48,14 @@ public void test() throws Exception { // put a new value in, will now be in the cache UnitOfWork uow1 = getSession().acquireUnitOfWork(); DirectMapMappings maps = (DirectMapMappings)uow1.registerObject(new DirectMapMappings()); - maps.directMap.put(new Integer(1), "bogus"); - maps.directMap.put(new Integer(3), "third"); + maps.directMap.put(Integer.valueOf(1), "bogus"); + maps.directMap.put(Integer.valueOf(3), "third"); uow1.commit(); UnitOfWork uow2 = getSession().acquireUnitOfWork(); DirectMapMappings mapsClone = (DirectMapMappings)uow2.registerObject(maps); - mapsClone.directMap.put(new Integer(2), "axemen"); - mapsClone.directMap.put(new Integer(1), "guy"); + mapsClone.directMap.put(Integer.valueOf(2), "axemen"); + mapsClone.directMap.put(Integer.valueOf(1), "guy"); UnitOfWorkChangeSet changes = uow2.getCurrentChanges(); uow2.commit(); @@ -66,15 +66,15 @@ public void test() throws Exception { public void verify() throws Exception { // Some checks to ensure it actually worked as expected - if (!mapsQueryResult.directMap.containsKey(new Integer(1))) { + if (!mapsQueryResult.directMap.containsKey(Integer.valueOf(1))) { throw new TestErrorException("Change set did not merge into cache properly"); - } else if (!mapsQueryResult.directMap.get(new Integer(1)).equals("guy")) { + } else if (!mapsQueryResult.directMap.get(Integer.valueOf(1)).equals("guy")) { throw new TestErrorException("Change set did not merge into cache properly"); - } else if (!mapsQueryResult.directMap.containsKey(new Integer(2))) { + } else if (!mapsQueryResult.directMap.containsKey(Integer.valueOf(2))) { throw new TestErrorException("Change set did not merge into cache properly"); - } else if (!mapsQueryResult.directMap.get(new Integer(2)).equals("axemen")) { + } else if (!mapsQueryResult.directMap.get(Integer.valueOf(2)).equals("axemen")) { throw new TestErrorException("Change set did not merge into cache properly"); - } else if (!mapsQueryResult.directMap.containsKey(new Integer(3))) { + } else if (!mapsQueryResult.directMap.containsKey(Integer.valueOf(3))) { throw new TestErrorException("Change set did not merge into cache properly"); } } diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/directmap/MergeChangeSetWithDirectMapMappingTest.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/directmap/MergeChangeSetWithDirectMapMappingTest.java index 7305840654e..70a0c25ab8a 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/directmap/MergeChangeSetWithDirectMapMappingTest.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/directmap/MergeChangeSetWithDirectMapMappingTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -47,14 +47,14 @@ public void test() throws Exception { // put a new value in, will now be in the cache UnitOfWork uow1 = getSession().acquireUnitOfWork(); DirectMapMappings maps = (DirectMapMappings)uow1.registerObject(new DirectMapMappings()); - maps.directMap.put(new Integer(1), "bogus"); - maps.directMap.put(new Integer(3), "third"); + maps.directMap.put(Integer.valueOf(1), "bogus"); + maps.directMap.put(Integer.valueOf(3), "third"); uow1.commit(); UnitOfWork uow2 = getSession().acquireUnitOfWork(); DirectMapMappings mapsClone = (DirectMapMappings)uow2.registerObject(maps); - mapsClone.directMap.put(new Integer(2), "axemen"); - mapsClone.directMap.put(new Integer(1), "guy"); + mapsClone.directMap.put(Integer.valueOf(2), "axemen"); + mapsClone.directMap.put(Integer.valueOf(1), "guy"); UnitOfWorkChangeSet changes = (UnitOfWorkChangeSet)uow2.getCurrentChanges(); uow2.release(); @@ -79,15 +79,15 @@ public void verify() throws Exception { // Some checks to ensure it actually worked as expected - if (!mapsQueryResult.directMap.containsKey(new Integer(1))) { + if (!mapsQueryResult.directMap.containsKey(Integer.valueOf(1))) { throw new TestErrorException("Change set did not merge into cache properly"); - } else if (!mapsQueryResult.directMap.get(new Integer(1)).equals("guy")) { + } else if (!mapsQueryResult.directMap.get(Integer.valueOf(1)).equals("guy")) { throw new TestErrorException("Change set did not merge into cache properly"); - } else if (!mapsQueryResult.directMap.containsKey(new Integer(2))) { + } else if (!mapsQueryResult.directMap.containsKey(Integer.valueOf(2))) { throw new TestErrorException("Change set did not merge into cache properly"); - } else if (!mapsQueryResult.directMap.get(new Integer(2)).equals("axemen")) { + } else if (!mapsQueryResult.directMap.get(Integer.valueOf(2)).equals("axemen")) { throw new TestErrorException("Change set did not merge into cache properly"); - } else if (!mapsQueryResult.directMap.containsKey(new Integer(3))) { + } else if (!mapsQueryResult.directMap.containsKey(Integer.valueOf(3))) { throw new TestErrorException("Change set did not merge into cache properly"); } } diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/directmap/MergeChangeSetWithIndirectDirectMapMappingTest.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/directmap/MergeChangeSetWithIndirectDirectMapMappingTest.java index d075bed6fca..ce34e75ba70 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/directmap/MergeChangeSetWithIndirectDirectMapMappingTest.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/directmap/MergeChangeSetWithIndirectDirectMapMappingTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -45,14 +45,14 @@ public void test() throws Exception { // put a new value in, will now be in the cache UnitOfWork uow1 = getSession().acquireUnitOfWork(); DirectMapMappings maps = (DirectMapMappings)uow1.registerObject(new DirectMapMappings()); - maps.indirectionDirectMap.put(new Integer(1), "bogus"); - maps.indirectionDirectMap.put(new Integer(3), "third"); + maps.indirectionDirectMap.put(Integer.valueOf(1), "bogus"); + maps.indirectionDirectMap.put(Integer.valueOf(3), "third"); uow1.commit(); UnitOfWork uow2 = getSession().acquireUnitOfWork(); DirectMapMappings mapsClone = (DirectMapMappings)uow2.registerObject(maps); - mapsClone.indirectionDirectMap.put(new Integer(2), "axemen"); - mapsClone.indirectionDirectMap.put(new Integer(1), "guy"); + mapsClone.indirectionDirectMap.put(Integer.valueOf(2), "axemen"); + mapsClone.indirectionDirectMap.put(Integer.valueOf(1), "guy"); UnitOfWorkChangeSet changes = (UnitOfWorkChangeSet)uow2.getCurrentChanges(); @@ -71,15 +71,15 @@ public void verify() throws Exception { // Some checks to ensure it actually worked as expected - if (!mapsQueryResult.indirectionDirectMap.containsKey(new Integer(1))) { + if (!mapsQueryResult.indirectionDirectMap.containsKey(Integer.valueOf(1))) { throw new TestErrorException("Change set did not merge into cache properly"); - } else if (!mapsQueryResult.indirectionDirectMap.get(new Integer(1)).equals("guy")) { + } else if (!mapsQueryResult.indirectionDirectMap.get(Integer.valueOf(1)).equals("guy")) { throw new TestErrorException("Change set did not merge into cache properly"); - } else if (!mapsQueryResult.indirectionDirectMap.containsKey(new Integer(2))) { + } else if (!mapsQueryResult.indirectionDirectMap.containsKey(Integer.valueOf(2))) { throw new TestErrorException("Change set did not merge into cache properly"); - } else if (!mapsQueryResult.indirectionDirectMap.get(new Integer(2)).equals("axemen")) { + } else if (!mapsQueryResult.indirectionDirectMap.get(Integer.valueOf(2)).equals("axemen")) { throw new TestErrorException("Change set did not merge into cache properly"); - } else if (!mapsQueryResult.indirectionDirectMap.containsKey(new Integer(3))) { + } else if (!mapsQueryResult.indirectionDirectMap.containsKey(Integer.valueOf(3))) { throw new TestErrorException("Change set did not merge into cache properly"); } } diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/distributedcache/DirectMapMergeTest.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/distributedcache/DirectMapMergeTest.java index 7090c3e647f..84d32368a00 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/distributedcache/DirectMapMergeTest.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/distributedcache/DirectMapMergeTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -26,7 +26,7 @@ public DirectMapMergeTest() { } protected void modifyCollection(UnitOfWork uow, Object objectToModify) { - ((DirectMapMappings)objectToModify).directMap.put(new Integer(11), newItemForCollection()); + ((DirectMapMappings)objectToModify).directMap.put(Integer.valueOf(11), newItemForCollection()); } protected int getCollectionSize(Object rootObject) { @@ -46,7 +46,7 @@ protected Project getNewProject() { protected Object buildOriginalObject() { DirectMapMappings dm = new DirectMapMappings(); - dm.directMap.put(new Integer("1"), "first value"); + dm.directMap.put(Integer.valueOf("1"), "first value"); return dm; } diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/distributedservers/rcm/ChangeObjectNotSentTest.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/distributedservers/rcm/ChangeObjectNotSentTest.java index 2f5bccbfd61..dde1472a2a3 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/distributedservers/rcm/ChangeObjectNotSentTest.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/distributedservers/rcm/ChangeObjectNotSentTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -36,7 +36,7 @@ public class ChangeObjectNotSentTest extends ConfigurableCacheSyncDistributedTes public ChangeObjectNotSentTest() { super(); - cacheSyncConfigValues.put(Employee.class, new Integer(ClassDescriptor.DO_NOT_SEND_CHANGES)); + cacheSyncConfigValues.put(Employee.class, Integer.valueOf(ClassDescriptor.DO_NOT_SEND_CHANGES)); } public void setup() { diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/distributedservers/rcm/ConfigurableCacheSyncDistributedTest.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/distributedservers/rcm/ConfigurableCacheSyncDistributedTest.java index 66002c68717..7eea302ce28 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/distributedservers/rcm/ConfigurableCacheSyncDistributedTest.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/distributedservers/rcm/ConfigurableCacheSyncDistributedTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -125,7 +125,7 @@ public void setup() { int cacheSyncType = descriptor.getCacheSynchronizationType(); Object newCacheSyncType = cacheSyncConfigValues.get(keyClass); if (newCacheSyncType != null) { - oldCacheSyncConfigValues.put(keyClass, new Integer(cacheSyncType)); + oldCacheSyncConfigValues.put(keyClass, Integer.valueOf(cacheSyncType)); descriptor.setCacheSynchronizationType(((Integer)newCacheSyncType).intValue()); } } diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/distributedservers/rcm/ConfigurableUpdateChangeObjectTest.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/distributedservers/rcm/ConfigurableUpdateChangeObjectTest.java index 7da6ad5547c..e8a9e5502e9 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/distributedservers/rcm/ConfigurableUpdateChangeObjectTest.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/distributedservers/rcm/ConfigurableUpdateChangeObjectTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -62,7 +62,7 @@ public void setup() { int cacheSyncType = descriptor.getCacheSynchronizationType(); Object newCacheSyncType = cacheSyncConfigValues.get(keyClass); if (newCacheSyncType != null) { - oldCacheSyncConfigValues.put(keyClass, new Integer(cacheSyncType)); + oldCacheSyncConfigValues.put(keyClass, Integer.valueOf(cacheSyncType)); descriptor.setCacheSynchronizationType(((Integer)newCacheSyncType).intValue()); } } diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/distributedservers/rcm/DeleteObjectNotSentTest.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/distributedservers/rcm/DeleteObjectNotSentTest.java index fa749b106a9..d09e8dbd5bb 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/distributedservers/rcm/DeleteObjectNotSentTest.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/distributedservers/rcm/DeleteObjectNotSentTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -37,7 +37,7 @@ public class DeleteObjectNotSentTest extends ConfigurableCacheSyncDistributedTes public DeleteObjectNotSentTest() { super(); - cacheSyncConfigValues.put(Employee.class, new Integer(ClassDescriptor.DO_NOT_SEND_CHANGES)); + cacheSyncConfigValues.put(Employee.class, Integer.valueOf(ClassDescriptor.DO_NOT_SEND_CHANGES)); } public void setup() { diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/distributedservers/rcm/InvalidCacheSyncTypeTest.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/distributedservers/rcm/InvalidCacheSyncTypeTest.java index 911b07e6e0e..e75b3d25dea 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/distributedservers/rcm/InvalidCacheSyncTypeTest.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/distributedservers/rcm/InvalidCacheSyncTypeTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -30,7 +30,7 @@ public InvalidCacheSyncTypeTest(int type) { super(); setName("InvalidCacheSyncTypeTest(" + type + ")"); cacheSyncType = type; - cacheSyncConfigValues.put(Employee.class, new Integer(type)); + cacheSyncConfigValues.put(Employee.class, Integer.valueOf(type)); } public void setup() { diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/distributedservers/rcm/InvalidateObjectWithMissingReferenceTest.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/distributedservers/rcm/InvalidateObjectWithMissingReferenceTest.java index 6fb71f45ded..241914bce0f 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/distributedservers/rcm/InvalidateObjectWithMissingReferenceTest.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/distributedservers/rcm/InvalidateObjectWithMissingReferenceTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -44,8 +44,8 @@ public class InvalidateObjectWithMissingReferenceTest extends ConfigurableCacheS public InvalidateObjectWithMissingReferenceTest() { super(); setName("InvalidateObjectWithMissingReferenceTest"); - cacheSyncConfigValues.put(Employee.class, new Integer(ClassDescriptor.SEND_OBJECT_CHANGES)); - cacheSyncConfigValues.put(Address.class, new Integer(ClassDescriptor.DO_NOT_SEND_CHANGES)); + cacheSyncConfigValues.put(Employee.class, Integer.valueOf(ClassDescriptor.SEND_OBJECT_CHANGES)); + cacheSyncConfigValues.put(Address.class, Integer.valueOf(ClassDescriptor.DO_NOT_SEND_CHANGES)); } public void reset() { @@ -74,7 +74,7 @@ public void setup() { int cacheSyncType = descriptor.getCacheSynchronizationType(); Object newCacheSyncType = cacheSyncConfigValues.get(keyClass); if (newCacheSyncType != null) { - oldCacheSyncConfigValues.put(keyClass, new Integer(cacheSyncType)); + oldCacheSyncConfigValues.put(keyClass, Integer.valueOf(cacheSyncType)); descriptor.setCacheSynchronizationType(((Integer)newCacheSyncType).intValue()); } } diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/distributedservers/rcm/MultipleCacheSyncTypeTest.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/distributedservers/rcm/MultipleCacheSyncTypeTest.java index 4fb6ce0112e..a9d5ee46445 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/distributedservers/rcm/MultipleCacheSyncTypeTest.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/distributedservers/rcm/MultipleCacheSyncTypeTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -41,12 +41,12 @@ public class MultipleCacheSyncTypeTest extends ConfigurableCacheSyncDistributedT public MultipleCacheSyncTypeTest() { super(); - cacheSyncConfigValues.put(Employee.class, new Integer(ClassDescriptor.SEND_NEW_OBJECTS_WITH_CHANGES)); - cacheSyncConfigValues.put(Project.class, new Integer(ClassDescriptor.INVALIDATE_CHANGED_OBJECTS)); - cacheSyncConfigValues.put(SmallProject.class, new Integer(ClassDescriptor.INVALIDATE_CHANGED_OBJECTS)); - cacheSyncConfigValues.put(LargeProject.class, new Integer(ClassDescriptor.INVALIDATE_CHANGED_OBJECTS)); - cacheSyncConfigValues.put(Address.class, new Integer(ClassDescriptor.DO_NOT_SEND_CHANGES)); - cacheSyncConfigValues.put(PhoneNumber.class, new Integer(ClassDescriptor.SEND_OBJECT_CHANGES)); + cacheSyncConfigValues.put(Employee.class, Integer.valueOf(ClassDescriptor.SEND_NEW_OBJECTS_WITH_CHANGES)); + cacheSyncConfigValues.put(Project.class, Integer.valueOf(ClassDescriptor.INVALIDATE_CHANGED_OBJECTS)); + cacheSyncConfigValues.put(SmallProject.class, Integer.valueOf(ClassDescriptor.INVALIDATE_CHANGED_OBJECTS)); + cacheSyncConfigValues.put(LargeProject.class, Integer.valueOf(ClassDescriptor.INVALIDATE_CHANGED_OBJECTS)); + cacheSyncConfigValues.put(Address.class, Integer.valueOf(ClassDescriptor.DO_NOT_SEND_CHANGES)); + cacheSyncConfigValues.put(PhoneNumber.class, Integer.valueOf(ClassDescriptor.SEND_OBJECT_CHANGES)); } /** diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/distributedservers/rcm/NewObjectWithOptimisticLockingTest.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/distributedservers/rcm/NewObjectWithOptimisticLockingTest.java index 7f5ebd1ce9c..09c4a1d864a 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/distributedservers/rcm/NewObjectWithOptimisticLockingTest.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/distributedservers/rcm/NewObjectWithOptimisticLockingTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -29,8 +29,8 @@ public class NewObjectWithOptimisticLockingTest extends ConfigurableCacheSyncDis public NewObjectWithOptimisticLockingTest(){ super(); - cacheSyncConfigValues.put(ListHolder.class, new Integer(ClassDescriptor.SEND_OBJECT_CHANGES)); - cacheSyncConfigValues.put(ListItem.class, new Integer(ClassDescriptor.SEND_OBJECT_CHANGES)); + cacheSyncConfigValues.put(ListHolder.class, Integer.valueOf(ClassDescriptor.SEND_OBJECT_CHANGES)); + cacheSyncConfigValues.put(ListItem.class, Integer.valueOf(ClassDescriptor.SEND_OBJECT_CHANGES)); } public void setup(){ diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/distributedservers/rcm/OrderedListNewObjectTest.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/distributedservers/rcm/OrderedListNewObjectTest.java index 54bca77b949..6990570d0ee 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/distributedservers/rcm/OrderedListNewObjectTest.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/distributedservers/rcm/OrderedListNewObjectTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -27,8 +27,8 @@ public class OrderedListNewObjectTest extends ConfigurableCacheSyncDistributedTe public OrderedListNewObjectTest(){ super(); - cacheSyncConfigValues.put(ListHolder.class, new Integer(ClassDescriptor.SEND_NEW_OBJECTS_WITH_CHANGES)); - cacheSyncConfigValues.put(ListItem.class, new Integer(ClassDescriptor.SEND_NEW_OBJECTS_WITH_CHANGES)); + cacheSyncConfigValues.put(ListHolder.class, Integer.valueOf(ClassDescriptor.SEND_NEW_OBJECTS_WITH_CHANGES)); + cacheSyncConfigValues.put(ListItem.class, Integer.valueOf(ClassDescriptor.SEND_NEW_OBJECTS_WITH_CHANGES)); } public void setup(){ diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/distributedservers/rcm/RCMDistributedServersModel.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/distributedservers/rcm/RCMDistributedServersModel.java index 7fe0313d736..660f362d236 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/distributedservers/rcm/RCMDistributedServersModel.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/distributedservers/rcm/RCMDistributedServersModel.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -56,15 +56,15 @@ public void addTests() { Employee employee = (Employee)manager.getObject(Employee.class, "0001"); Hashtable configurationHashtable = new Hashtable(); - configurationHashtable.put(Employee.class, new Integer(ClassDescriptor.INVALIDATE_CHANGED_OBJECTS)); + configurationHashtable.put(Employee.class, Integer.valueOf(ClassDescriptor.INVALIDATE_CHANGED_OBJECTS)); ConfigurableUpdateChangeObjectTest test = new ConfigurableUpdateChangeObjectTest(employee, configurationHashtable); test.setName("Update Change Employee - Invalidate Employee"); test.setDescription("Test the invalidation setting on cache synchronization for Employee"); addTest(test); configurationHashtable = new Hashtable(); - configurationHashtable.put(PhoneNumber.class, new Integer(ClassDescriptor.INVALIDATE_CHANGED_OBJECTS)); - configurationHashtable.put(Employee.class, new Integer(ClassDescriptor.INVALIDATE_CHANGED_OBJECTS)); + configurationHashtable.put(PhoneNumber.class, Integer.valueOf(ClassDescriptor.INVALIDATE_CHANGED_OBJECTS)); + configurationHashtable.put(Employee.class, Integer.valueOf(ClassDescriptor.INVALIDATE_CHANGED_OBJECTS)); test = new ConfigurableUpdateChangeObjectTest(employee, configurationHashtable); test.setName("Update Change Employee - Invalidate Employee, Phone Number"); test.setDescription("Test the invalidation setting on cache synchronization for Phone Number"); @@ -83,25 +83,25 @@ public void addTests() { addTest(new IsolatedObjectNotSentTest()); configurationHashtable = new Hashtable(); - configurationHashtable.put(IsolatedEmployee.class, new Integer(ClassDescriptor.SEND_OBJECT_CHANGES)); + configurationHashtable.put(IsolatedEmployee.class, Integer.valueOf(ClassDescriptor.SEND_OBJECT_CHANGES)); IsolatedObjectNotSentTest atest = new IsolatedObjectNotSentTest(configurationHashtable); atest.setName("IsolatedObjectNotSentTest - SEND_OBJECT_CHANGES"); addTest(atest); configurationHashtable = new Hashtable(); - configurationHashtable.put(IsolatedEmployee.class, new Integer(ClassDescriptor.INVALIDATE_CHANGED_OBJECTS)); + configurationHashtable.put(IsolatedEmployee.class, Integer.valueOf(ClassDescriptor.INVALIDATE_CHANGED_OBJECTS)); atest = new IsolatedObjectNotSentTest(configurationHashtable); atest.setName("IsolatedObjectNotSentTest - INVALIDATE_CHANGED_OBJECTS"); addTest(atest); configurationHashtable = new Hashtable(); - configurationHashtable.put(IsolatedEmployee.class, new Integer(ClassDescriptor.SEND_NEW_OBJECTS_WITH_CHANGES)); + configurationHashtable.put(IsolatedEmployee.class, Integer.valueOf(ClassDescriptor.SEND_NEW_OBJECTS_WITH_CHANGES)); atest = new IsolatedObjectNotSentTest(configurationHashtable); atest.setName("IsolatedObjectNotSentTest - SEND_NEW_OBJECTS_WITH_CHANGES"); addTest(atest); configurationHashtable = new Hashtable(); - configurationHashtable.put(IsolatedEmployee.class, new Integer(ClassDescriptor.DO_NOT_SEND_CHANGES)); + configurationHashtable.put(IsolatedEmployee.class, Integer.valueOf(ClassDescriptor.DO_NOT_SEND_CHANGES)); atest = new IsolatedObjectNotSentTest(configurationHashtable); atest.setName("IsolatedObjectNotSentTest - DO_NOT_SEND_CHANGES"); addTest(atest); diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/distributedservers/rcm/RelatedNewObjectCacheSyncTest.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/distributedservers/rcm/RelatedNewObjectCacheSyncTest.java index 0890818cc42..60af4aaec0e 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/distributedservers/rcm/RelatedNewObjectCacheSyncTest.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/distributedservers/rcm/RelatedNewObjectCacheSyncTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -32,7 +32,7 @@ public class RelatedNewObjectCacheSyncTest extends ConfigurableCacheSyncDistribu protected Expression expression = null; public RelatedNewObjectCacheSyncTest() { - cacheSyncConfigValues.put(Employee.class, new Integer(ClassDescriptor.SEND_NEW_OBJECTS_WITH_CHANGES)); + cacheSyncConfigValues.put(Employee.class, Integer.valueOf(ClassDescriptor.SEND_NEW_OBJECTS_WITH_CHANGES)); } public void setup() { diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/distributedservers/rcm/RelatedNewObjectNotSentTest.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/distributedservers/rcm/RelatedNewObjectNotSentTest.java index 6c9de723d7b..e638e9ce755 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/distributedservers/rcm/RelatedNewObjectNotSentTest.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/distributedservers/rcm/RelatedNewObjectNotSentTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -42,9 +42,9 @@ public class RelatedNewObjectNotSentTest extends ConfigurableCacheSyncDistribute protected Expression expression = null; public RelatedNewObjectNotSentTest() { - cacheSyncConfigValues.put(Employee.class, new Integer(ClassDescriptor.SEND_NEW_OBJECTS_WITH_CHANGES)); - cacheSyncConfigValues.put(Address.class, new Integer(ClassDescriptor.DO_NOT_SEND_CHANGES)); - cacheSyncConfigValues.put(SmallProject.class, new Integer(ClassDescriptor.DO_NOT_SEND_CHANGES)); + cacheSyncConfigValues.put(Employee.class, Integer.valueOf(ClassDescriptor.SEND_NEW_OBJECTS_WITH_CHANGES)); + cacheSyncConfigValues.put(Address.class, Integer.valueOf(ClassDescriptor.DO_NOT_SEND_CHANGES)); + cacheSyncConfigValues.put(SmallProject.class, Integer.valueOf(ClassDescriptor.DO_NOT_SEND_CHANGES)); } public void setup() { diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/distributedservers/rcm/SendNewObjectCacheSyncTest.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/distributedservers/rcm/SendNewObjectCacheSyncTest.java index f1db9043b36..0d1c509c6fb 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/distributedservers/rcm/SendNewObjectCacheSyncTest.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/distributedservers/rcm/SendNewObjectCacheSyncTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -39,10 +39,10 @@ public SendNewObjectCacheSyncTest(boolean shouldSendObject) { this.shouldSendObject = shouldSendObject; if (shouldSendObject) { setName("SendNewObjectCacheSyncTest - SEND_NEW_OBJECTS_WITH_CHANGES"); - cacheSyncConfigValues.put(Employee.class, new Integer(ClassDescriptor.SEND_NEW_OBJECTS_WITH_CHANGES)); + cacheSyncConfigValues.put(Employee.class, Integer.valueOf(ClassDescriptor.SEND_NEW_OBJECTS_WITH_CHANGES)); } else { setName("SendNewObjectCacheSyncTest - SEND_OBJECT_CHANGES"); - cacheSyncConfigValues.put(Employee.class, new Integer(ClassDescriptor.SEND_OBJECT_CHANGES)); + cacheSyncConfigValues.put(Employee.class, Integer.valueOf(ClassDescriptor.SEND_OBJECT_CHANGES)); } } diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/distributedservers/rcm/UpdateObjectInvalidationTest.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/distributedservers/rcm/UpdateObjectInvalidationTest.java index 306b0c5a884..652ac00ed56 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/distributedservers/rcm/UpdateObjectInvalidationTest.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/distributedservers/rcm/UpdateObjectInvalidationTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -35,7 +35,7 @@ public class UpdateObjectInvalidationTest extends ConfigurableCacheSyncDistribut public UpdateObjectInvalidationTest() { super(); setDescription("Ensure a remote object is invalidated when its descriptor is set to INVALIDATE_CHANGED_OBJECTS"); - cacheSyncConfigValues.put(Employee.class, new Integer(ClassDescriptor.INVALIDATE_CHANGED_OBJECTS)); + cacheSyncConfigValues.put(Employee.class, Integer.valueOf(ClassDescriptor.INVALIDATE_CHANGED_OBJECTS)); } public void setup() { diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/distributedservers/rcm/broadcast/BroadcastSetupHelper.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/distributedservers/rcm/broadcast/BroadcastSetupHelper.java index 47de31ba4c5..c93de133a81 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/distributedservers/rcm/broadcast/BroadcastSetupHelper.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/distributedservers/rcm/broadcast/BroadcastSetupHelper.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -235,7 +235,7 @@ public void destroyFactory() throws Exception { public void startCacheSynchronization(AbstractSession session, boolean isSource) { try { - sessions.put(session, new Boolean(isSource)); + sessions.put(session, Boolean.valueOf(isSource)); if (sessions.size() == 1) { createFactory(); startFactory(); diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/dynamic/simple/SimpleTypeTestSuite.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/dynamic/simple/SimpleTypeTestSuite.java index 9a2ab752b04..a262ba8c399 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/dynamic/simple/SimpleTypeTestSuite.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/dynamic/simple/SimpleTypeTestSuite.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -112,7 +112,7 @@ public void find() { DynamicEntity simpleInstance = find(dynamicHelper, session, 1); assertNotNull("Could not find simple instance with id = 1", simpleInstance); - simpleInstance = find(dynamicHelper, session, new Integer(1)); + simpleInstance = find(dynamicHelper, session, Integer.valueOf(1)); assertNotNull("Could not find simple instance with id = Integer(1)", simpleInstance); } diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/dynamic/simple/SimpleTypeWithEnumTestSuite.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/dynamic/simple/SimpleTypeWithEnumTestSuite.java index b0f9b13c078..d42d56bcda1 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/dynamic/simple/SimpleTypeWithEnumTestSuite.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/dynamic/simple/SimpleTypeWithEnumTestSuite.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -122,7 +122,7 @@ public void find() { DynamicEntity simpleInstance = find(dynamicHelper, session, 1); assertNotNull("Could not find simple instance with id = 1", simpleInstance); - simpleInstance = find(dynamicHelper, session, new Integer(1)); + simpleInstance = find(dynamicHelper, session, Integer.valueOf(1)); assertNotNull("Could not find simple instance with id = Integer(1)", simpleInstance); } diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/events/PreInsertModifyChangeSetTest.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/events/PreInsertModifyChangeSetTest.java index 8001d824e29..6f26fc9c2b2 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/events/PreInsertModifyChangeSetTest.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/events/PreInsertModifyChangeSetTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -35,7 +35,7 @@ public class PreInsertModifyChangeSetTest extends AutoVerifyTestCase { protected DescriptorEventAdapter eventAdapter = new DescriptorEventAdapter() { public void preInsert(DescriptorEvent event) { if (event.getQuery().getDescriptor() != null) { - event.updateAttributeWithObject("salary", new Integer(callCount)); + event.updateAttributeWithObject("salary", Integer.valueOf(callCount)); ++callCount; } } diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/expressions/ExpressionInMemoryTestSuite.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/expressions/ExpressionInMemoryTestSuite.java index 166e5a244e8..d3665e3466d 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/expressions/ExpressionInMemoryTestSuite.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/expressions/ExpressionInMemoryTestSuite.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -42,15 +42,15 @@ private void _addAdvancedInMemoryExpressionMathTest() { Expression expression = builder.get("salary").greaterThanEqual(1000); //expression = expression.and((ExpressionMath.ln(builder.get("salary"))).lessThan(10)); - //expression = expression.and((ExpressionMath.mod(builder.get("salary"), new Integer(107)).lessThan(10))); + //expression = expression.and((ExpressionMath.mod(builder.get("salary"), Integer.valueOf(107)).lessThan(10))); expression = expression.and((ExpressionMath.floor(builder.get("salary"))).lessThan(45000)); expression = expression.and((ExpressionMath.ceil(builder.get("salary"))).lessThan(10000)); expression = expression.and(ExpressionMath.round(builder.get("salary"), 2).equal(40000)); - expression = expression.and(ExpressionMath.min(builder.get("salary"), new Integer(30000)).greaterThan(30000)); - expression = expression.and(ExpressionMath.max(builder.get("salary"), new Integer(30000)).lessThan(50000)); - //expression = expression.and((ExpressionMath.sinh(ExpressionMath.divide(builder.get("salary"),new Integer(10000000))).lessThanEqual(100))); - //expression = expression.and((ExpressionMath.cosh(ExpressionMath.divide(builder.get("salary"),new Integer(10000000))).lessThanEqual(100))); - //expression = expression.and((ExpressionMath.tanh(ExpressionMath.divide(builder.get("salary"),new Integer(10000000))).lessThanEqual(1))); + expression = expression.and(ExpressionMath.min(builder.get("salary"), Integer.valueOf(30000)).greaterThan(30000)); + expression = expression.and(ExpressionMath.max(builder.get("salary"), Integer.valueOf(30000)).lessThan(50000)); + //expression = expression.and((ExpressionMath.sinh(ExpressionMath.divide(builder.get("salary"),Integer.valueOf(10000000))).lessThanEqual(100))); + //expression = expression.and((ExpressionMath.cosh(ExpressionMath.divide(builder.get("salary"),Integer.valueOf(10000000))).lessThanEqual(100))); + //expression = expression.and((ExpressionMath.tanh(ExpressionMath.divide(builder.get("salary"),Integer.valueOf(10000000))).lessThanEqual(1))); expression = expression.and((ExpressionMath.acos(ExpressionMath.power(builder.get("salary"), 0)).lessThanEqual(100))); expression = expression.and((ExpressionMath.asin(ExpressionMath.power(builder.get("salary"), 0)).lessThanEqual(100))); expression = expression.and((ExpressionMath.atan(ExpressionMath.power(builder.get("salary"), 0)).lessThanEqual(100))); @@ -62,7 +62,7 @@ private void _addAdvancedInMemoryExpressionMathTest() { //expression = expression.and((ExpressionMath.sign(builder.get("salary"))).greaterThan(0)); expression = expression.and((ExpressionMath.exp(ExpressionMath.min(builder.get("salary"), 5))).lessThan(1000000)); // Test sqrt. - expression = expression.and(ExpressionMath.power(builder.get("salary"), new Double(0.5)).greaterThan(0)); + expression = expression.and(ExpressionMath.power(builder.get("salary"), Double.valueOf(0.5)).greaterThan(0)); ReadAllExpressionTest test = new ReadAllExpressionTest(Employee.class, 0); test.setExpression(expression); diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/expressions/ExpressionOperatorUnitTestSuite.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/expressions/ExpressionOperatorUnitTestSuite.java index 6fa4a284632..1e70bde6d64 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/expressions/ExpressionOperatorUnitTestSuite.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/expressions/ExpressionOperatorUnitTestSuite.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2022 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2022 IBM Corporation. All rights reserved. * * This program and the accompanying materials are made available under the @@ -28,7 +28,7 @@ public ExpressionOperatorUnitTestSuite() { } public void _testEquals$nullTest() { - ExpressionOperator operator = Expression.getOperator(new Integer(ExpressionOperator.Between)); + ExpressionOperator operator = Expression.getOperator(Integer.valueOf(ExpressionOperator.Between)); ExpressionOperator operator2 = null; if (operator.equals(operator2)) { throw new TestErrorException("Equals() must handle null case."); @@ -36,15 +36,15 @@ public ExpressionOperatorUnitTestSuite() { } public void _testEquals$ObjectTest() { - ExpressionOperator operator = Expression.getOperator(new Integer(ExpressionOperator.Between)); - Object operator2 = new Integer(5); + ExpressionOperator operator = Expression.getOperator(Integer.valueOf(ExpressionOperator.Between)); + Object operator2 = Integer.valueOf(5); if (operator.equals(operator2)) { throw new TestErrorException("Equals() must handle other class case."); } } public void _testEqualsTest() { - ExpressionOperator operator = Expression.getOperator(new Integer(ExpressionOperator.Between)); + ExpressionOperator operator = Expression.getOperator(Integer.valueOf(ExpressionOperator.Between)); ExpressionOperator operator2 = new ExpressionOperator(ExpressionOperator.Between, new Vector()); if (!operator.equals(operator2)) { throw new TestErrorException("Equals() must do comparison by selector only."); @@ -65,21 +65,21 @@ public void _testEqualsArrayTest() { } public void _testIsComparisonOperatorTest() { - ExpressionOperator operator = Expression.getOperator(new Integer(ExpressionOperator.Between)); + ExpressionOperator operator = Expression.getOperator(Integer.valueOf(ExpressionOperator.Between)); if (!operator.isComparisonOperator()) { throw new TestErrorException("IsComparisonOperator() invalid."); } } public void _testIsFunctionOperatorTest() { - ExpressionOperator operator = Expression.getOperator(new Integer(ExpressionOperator.Not)); + ExpressionOperator operator = Expression.getOperator(Integer.valueOf(ExpressionOperator.Not)); if (!operator.isFunctionOperator()) { throw new TestErrorException("IsFunctionOperator() invalid."); } } public void _testIsLogicalOperatorTest() { - ExpressionOperator operator = Expression.getOperator(new Integer(ExpressionOperator.And)); + ExpressionOperator operator = Expression.getOperator(Integer.valueOf(ExpressionOperator.And)); if (!operator.isLogicalOperator()) { throw new TestErrorException("IsLogicalOperator() invalid."); } diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/expressions/ExpressionTestSuite.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/expressions/ExpressionTestSuite.java index 1308827d6d3..3762bdc23b0 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/expressions/ExpressionTestSuite.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/expressions/ExpressionTestSuite.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -134,15 +134,15 @@ private void addAdvancedExpressionMathTest() { ExpressionBuilder builder = new ExpressionBuilder(); Expression expression = builder.get("salary").greaterThanEqual(1000); expression = expression.and((ExpressionMath.ln(builder.get("salary"))).lessThan(10)); - expression = expression.and((ExpressionMath.mod(builder.get("salary"), new Integer(107)).lessThan(10))); + expression = expression.and((ExpressionMath.mod(builder.get("salary"), Integer.valueOf(107)).lessThan(10))); expression = expression.and((ExpressionMath.floor(builder.get("salary"))).lessThan(45000)); expression = expression.and((ExpressionMath.ceil(builder.get("salary"))).lessThan(10000)); expression = expression.and(ExpressionMath.round(builder.get("salary"), 2).equal(40000)); - expression = expression.and(ExpressionMath.min(builder.get("salary"), new Integer(30000)).greaterThan(30000)); - expression = expression.and(ExpressionMath.max(builder.get("salary"), new Integer(30000)).lessThan(50000)); - expression = expression.and((ExpressionMath.sinh(ExpressionMath.divide(builder.get("salary"), new Integer(10000000))).lessThanEqual(100))); - expression = expression.and((ExpressionMath.cosh(ExpressionMath.divide(builder.get("salary"), new Integer(10000000))).lessThanEqual(100))); - expression = expression.and((ExpressionMath.tanh(ExpressionMath.divide(builder.get("salary"), new Integer(10000000))).lessThanEqual(1))); + expression = expression.and(ExpressionMath.min(builder.get("salary"), Integer.valueOf(30000)).greaterThan(30000)); + expression = expression.and(ExpressionMath.max(builder.get("salary"), Integer.valueOf(30000)).lessThan(50000)); + expression = expression.and((ExpressionMath.sinh(ExpressionMath.divide(builder.get("salary"), Integer.valueOf(10000000))).lessThanEqual(100))); + expression = expression.and((ExpressionMath.cosh(ExpressionMath.divide(builder.get("salary"), Integer.valueOf(10000000))).lessThanEqual(100))); + expression = expression.and((ExpressionMath.tanh(ExpressionMath.divide(builder.get("salary"), Integer.valueOf(10000000))).lessThanEqual(1))); expression = expression.and((ExpressionMath.acos(ExpressionMath.power(builder.get("salary"), 0)).lessThanEqual(100))); expression = expression.and((ExpressionMath.asin(ExpressionMath.power(builder.get("salary"), 0)).lessThanEqual(100))); expression = expression.and((ExpressionMath.atan(ExpressionMath.power(builder.get("salary"), 0)).lessThanEqual(100))); @@ -321,7 +321,7 @@ private void addBetweenTest() { private void addBetweenTest2() { ExpressionBuilder builder = new ExpressionBuilder(); - Expression expression = builder.get("salary").between(builder.get("manager").get("salary"), new Integer(500000)); + Expression expression = builder.get("salary").between(builder.get("manager").get("salary"), Integer.valueOf(500000)); ReadAllExpressionTest test = new ReadAllExpressionTest(Employee.class, 5); test.setExpression(expression); @@ -417,7 +417,7 @@ private void addConstantEqualConstantTest() { ReadAllExpressionTest test = new ReadAllExpressionTest(Employee.class, 12); test.setExpression(expression); test.setQuery(query); - test.getArguments().add(new Integer(1)); + test.getArguments().add(Integer.valueOf(1)); test.setName("ConstantEqualConstantTest"); test.setDescription("Test meaningless selection criteria like 1 == 1."); @@ -548,10 +548,10 @@ private void addExpressionFunctionTest() { private void addExpressionMathTest() { ExpressionBuilder builder = new ExpressionBuilder(); Expression expression = builder.get("salary").greaterThanEqual(1000); - expression = expression.and((ExpressionMath.add(builder.get("salary"), new Integer(3000))).lessThan(90000)); - expression = expression.and((ExpressionMath.subtract(builder.get("salary"), new Integer(1000))).greaterThan(1000)); - expression = expression.and((ExpressionMath.multiply(builder.get("salary"), new Integer(3))).greaterThan(50000)); - expression = expression.and((ExpressionMath.divide(builder.get("salary"), new Integer(3))).lessThan(100000)); + expression = expression.and((ExpressionMath.add(builder.get("salary"), Integer.valueOf(3000))).lessThan(90000)); + expression = expression.and((ExpressionMath.subtract(builder.get("salary"), Integer.valueOf(1000))).greaterThan(1000)); + expression = expression.and((ExpressionMath.multiply(builder.get("salary"), Integer.valueOf(3))).greaterThan(50000)); + expression = expression.and((ExpressionMath.divide(builder.get("salary"), Integer.valueOf(3))).lessThan(100000)); expression = expression.and((ExpressionMath.abs(builder.get("salary"))).lessThan(100000)); expression = expression.and((ExpressionMath.cos(builder.get("salary")).lessThanEqual(1))); expression = expression.and((ExpressionMath.sin(builder.get("salary")).lessThanEqual(1))); @@ -1036,7 +1036,7 @@ private void addMultiPlatformTest() { caseTable.put("Eldrick", "Tiger"); Expression expression = builder.get("firstName").ifNull("Bob").caseStatement(caseTable, "No-Nickname").equal("Bobby"); - expression = expression.and((ExpressionMath.mod(builder.get("salary"), new Integer(10)).equal(0))); + expression = expression.and((ExpressionMath.mod(builder.get("salary"), Integer.valueOf(10)).equal(0))); expression = expression.and((ExpressionMath.ceil(builder.get("salary")).equal(35000))); expression = expression.and(builder.get("firstName").length().equal(3)); @@ -1088,7 +1088,7 @@ private void addMultiPlatformTest3() { caseTable.put(builder.get("firstName").equal("Eldrick"), "Tiger"); Expression expression = builder.caseConditionStatement(caseTable, "No-Nickname").equal("Bobby"); - expression = expression.and((ExpressionMath.mod(builder.get("salary"), new Integer(10)).equal(0))); + expression = expression.and((ExpressionMath.mod(builder.get("salary"), Integer.valueOf(10)).equal(0))); expression = expression.and((ExpressionMath.ceil(builder.get("salary")).equal(35000))); expression = expression.and(builder.get("firstName").length().equal(3)); @@ -1636,7 +1636,7 @@ private void addParameterIsNullTest() { test.setExpression(expression); test.setQuery(query); test.getArguments().add(null); - test.getArguments().add(new Integer(1)); + test.getArguments().add(Integer.valueOf(1)); test.getArguments().add(new String("String")); test.setName("ParameterIsNullTest"); test.setDescription("For bug 3107049 tests parameterExp.isNull."); diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/expressions/ExpressionUnitTestSuite.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/expressions/ExpressionUnitTestSuite.java index 66f3523e34a..bf1f1072705 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/expressions/ExpressionUnitTestSuite.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/expressions/ExpressionUnitTestSuite.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -317,7 +317,7 @@ protected void _addDifferenceTest() { // The following query will select all employees who will still have a salary under // $50,000 after a 15% raise. Vector arguments = new Vector(); - arguments.addElement(new Integer(15)); + arguments.addElement(Integer.valueOf(15)); ExpressionBuilder builder = new ExpressionBuilder(); Expression expression = builder.get("salary").getFunction(applyRaiseSelector, arguments).lessThan(50000); @@ -912,7 +912,7 @@ protected void _addNoneOfTest() { protected void _addNotBetween$ObjectTest() { ExpressionBuilder builder = new ExpressionBuilder(); - Expression expression = builder.get("salary").notBetween(builder.get("manager").get("salary"), new Integer(500000)); + Expression expression = builder.get("salary").notBetween(builder.get("manager").get("salary"), Integer.valueOf(500000)); ReadAllExpressionTest test = new ReadAllExpressionTest(Employee.class, 3); test.setExpression(expression); diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/feature/FeatureTestModelWithoutBinding.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/feature/FeatureTestModelWithoutBinding.java index c7a5ed2e955..55370d599a9 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/feature/FeatureTestModelWithoutBinding.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/feature/FeatureTestModelWithoutBinding.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -42,8 +42,8 @@ public void reset() { } public void setup() { - this.origionalBindingState = new Boolean(this.getSession().getPlatform().shouldBindAllParameters()); - this.origionalStatementCachingState = new Boolean(this.getSession().getPlatform().shouldCacheAllStatements()); + this.origionalBindingState = Boolean.valueOf(this.getSession().getPlatform().shouldBindAllParameters()); + this.origionalStatementCachingState = Boolean.valueOf(this.getSession().getPlatform().shouldCacheAllStatements()); this.getSession().getPlatform().setShouldBindAllParameters(false); this.getSession().getPlatform().setShouldCacheAllStatements(false); } diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/feature/NullValueTest.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/feature/NullValueTest.java index c2184bc8679..c0a8a9d8b3e 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/feature/NullValueTest.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/feature/NullValueTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -40,7 +40,7 @@ protected void setup() { saveDefaultNullValues = getSession().getLogin().getPlatform().getConversionManager().getDefaultNullValues(); getSession().getLogin().getPlatform().getConversionManager().setDefaultNullValues(new Hashtable()); getSession().getLogin().setDefaultNullValue(String.class, "null"); - getSession().getLogin().setDefaultNullValue(int.class, new Integer(-1)); + getSession().getLogin().setDefaultNullValue(int.class, Integer.valueOf(-1)); // Reinit mappings. for (DatabaseMapping mapping : getSession().getDescriptor(Address.class).getMappings()) { if (mapping.isDirectToFieldMapping()) { diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/flashback/FlashbackUnitTestSuite.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/flashback/FlashbackUnitTestSuite.java index 36d0de2d38f..f9c6554073c 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/flashback/FlashbackUnitTestSuite.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/flashback/FlashbackUnitTestSuite.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -129,7 +129,7 @@ public void _testAsOfCurrentTimeMillisParameterTest() { query.setAsOfClause(clause); query.addArgument("TIME"); Vector arguments = new Vector(); - arguments.add(new Long(value)); + arguments.add(Long.valueOf(value)); Vector employees = (Vector)getSession().executeQuery(query, arguments); if (employees.size() != 0) { @@ -491,7 +491,7 @@ void internalOuterJoinTest(boolean withAsOf) { public void _testHistoricalQueriesMustPreserveGlobalCacheExceptionTest() { ReadAllQuery query = new ReadAllQuery(Employee.class); query.setSelectionCriteria(query.getExpressionBuilder().get("firstName").equal("Bob")); - query.setAsOfClause(new AsOfSCNClause(new Long(0))); + query.setAsOfClause(new AsOfSCNClause(Long.valueOf(0))); try { getSession().executeQuery(query); getSession().getIdentityMapAccessor().initializeIdentityMaps(); diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/identitymaps/ConcurrentReadBigBadObjectTest.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/identitymaps/ConcurrentReadBigBadObjectTest.java index ab82c8a6d69..ba1d94866c3 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/identitymaps/ConcurrentReadBigBadObjectTest.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/identitymaps/ConcurrentReadBigBadObjectTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -60,12 +60,12 @@ public void setup() throws Exception { int i = 0; while (i < mappings) { m = (DatabaseMapping)v.get(i); - m.setWeight(new Integer(Integer.MAX_VALUE - 1)); + m.setWeight(Integer.valueOf(Integer.MAX_VALUE - 1)); i++; } m = d.getMappingForAttributeName("number02"); - m.setWeight(new Integer(Integer.MAX_VALUE)); + m.setWeight(Integer.valueOf(Integer.MAX_VALUE)); server.login(); server.serverSession.setLogLevel(getSession().getLogLevel()); diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/identitymaps/IdentityMapTestSuite.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/identitymaps/IdentityMapTestSuite.java index 20133082171..05714e67982 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/identitymaps/IdentityMapTestSuite.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/identitymaps/IdentityMapTestSuite.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -42,9 +42,9 @@ protected void addMultipleIdentityTests(TestSuite suite, IdentityMap identityMap employees.addElement(employee1); employees.addElement(employee2); primaryKey1 = new Vector(); - primaryKey1.addElement(new Integer(99)); + primaryKey1.addElement(Integer.valueOf(99)); primaryKey2 = new Vector(); - primaryKey2.addElement(new Integer(88)); + primaryKey2.addElement(Integer.valueOf(88)); primaryKeys.addElement(primaryKey1); primaryKeys.addElement(primaryKey2); diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/identitymaps/cache/ConcurrentReadBigBadObjectTest.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/identitymaps/cache/ConcurrentReadBigBadObjectTest.java index 4c67428c640..65c8ee447d2 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/identitymaps/cache/ConcurrentReadBigBadObjectTest.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/identitymaps/cache/ConcurrentReadBigBadObjectTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -60,12 +60,12 @@ public void setup() throws Exception{ int i =0; while (i 4000) { Object[] result = new Object[2]; result[0] = project.getName(); - result[1] = new Double(project.getBudget()); + result[1] = Double.valueOf(project.getBudget()); addResult(result, null); } } diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/queries/report/Scenario2_2c.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/queries/report/Scenario2_2c.java index e25171959c9..85c4e308b41 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/queries/report/Scenario2_2c.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/queries/report/Scenario2_2c.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -41,20 +41,20 @@ protected void buildExpectedResults() throws Exception { if (getSession().getPlatform().isOracle() || getSession().getPlatform().isTimesTen7() || getSession().getPlatform().isMaxDB()) { result[1] = new java.math.BigDecimal(3); } else if (getSession().getPlatform().isMySQL()) { - result[1] = new java.lang.Long(3); + result[1] = 3L; } else if (getSession().getPlatform().isSymfoware()) { - result[1] = new java.lang.Short((short)3); + result[1] = (short) 3; } else if (getSession().getPlatform().isHANA()) { String driverVersion = getAbstractSession().getAccessor().getConnection().getMetaData().getDriverVersion(); if (driverVersion.equals("1.0")) { // up to version 1.00.35 driver version is returned as "1.0" // and numeric constant is returned as Long - result[1] = new java.lang.Long(3); + result[1] = 3L; } else { - result[1] = new java.lang.Integer(3); + result[1] = 3; } } else { - result[1] = new java.lang.Integer(3); + result[1] = 3; } addResult(result, null); diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/readonly/ReadOnlyClassOneToManyTestCase.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/readonly/ReadOnlyClassOneToManyTestCase.java index b206a98ce96..f1780c5e468 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/readonly/ReadOnlyClassOneToManyTestCase.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/readonly/ReadOnlyClassOneToManyTestCase.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -74,7 +74,7 @@ protected void setup() { Company cloneCompany = (Company)uow.registerObject(originalCompany); // Change the one of the Company's Vehicles - ((Vehicle)((Vector)cloneCompany.getVehicles().getValue()).firstElement()).setPassengerCapacity(new Integer(origCapacity.intValue() + 1)); + ((Vehicle)((Vector)cloneCompany.getVehicles().getValue()).firstElement()).setPassengerCapacity(Integer.valueOf(origCapacity.intValue() + 1)); } protected void test() { diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/relationshipmaintenance/DeepMergeCloneSerializedNewTest.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/relationshipmaintenance/DeepMergeCloneSerializedNewTest.java index 0b8a101db62..e32b8a9a744 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/relationshipmaintenance/DeepMergeCloneSerializedNewTest.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/relationshipmaintenance/DeepMergeCloneSerializedNewTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -90,7 +90,7 @@ public void test() { //add a new manager, test 1-m's Emp newEmp = new Emp(); - newEmp.setEmpno(new Double((double)(System.currentTimeMillis()) % 10000)); + newEmp.setEmpno(Double.valueOf((double)(System.currentTimeMillis()) % 10000)); newEmp.setEname("THe New Guy" + System.currentTimeMillis()); if ((deserialDept.getEmpCollection() != null) && (deserialDept.getEmpCollection().size() > 1)) { deserialDept.getEmpCollection().remove(deserialDept.getEmpCollection().iterator().next()); diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/remote/RemoteConnectionExceptionsTest.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/remote/RemoteConnectionExceptionsTest.java index 0e7c352ce5d..394b3004d43 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/remote/RemoteConnectionExceptionsTest.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/remote/RemoteConnectionExceptionsTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -222,23 +222,23 @@ public void verify() { public static Object getWrapperClassInstance(Class cls) { if (Integer.TYPE.equals(cls)) { - return new Integer(0); + return Integer.valueOf(0); } else if (Boolean.TYPE.equals(cls)) { - return new Boolean(false); + return Boolean.valueOf(false); } else if (Character.TYPE.equals(cls)) { - return new Character(' '); + return Character.valueOf(' '); } else if (Byte.TYPE.equals(cls)) { byte b = 0; - return new Byte(b); + return Byte.valueOf(b); } else if (Short.TYPE.equals(cls)) { short s = 0; - return new Short(s); + return Short.valueOf(s); } else if (Long.TYPE.equals(cls)) { - return new Long(0); + return Long.valueOf(0); } else if (Float.TYPE.equals(cls)) { - return new Float(0); + return Float.valueOf(0); } else if (Double.TYPE.equals(cls)) { - return new Double(0); + return Double.valueOf(0); } else { return null; } diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/returning/model/BaseClass.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/returning/model/BaseClass.java index 81d89251b45..e0780bba2f7 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/returning/model/BaseClass.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/returning/model/BaseClass.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -56,12 +56,12 @@ protected void setAB(BigDecimal a, BigDecimal b) { a_plus_minus_b_BigDecimal[1] = null; } if (a != null) { - a_Integer = new Integer(a.intValue()); + a_Integer = Integer.valueOf(a.intValue()); } else { a_Integer = null; } if (b != null) { - b_Integer = new Integer(b.intValue()); + b_Integer = Integer.valueOf(b.intValue()); } else { b_Integer = null; } @@ -70,7 +70,7 @@ protected void setAB(BigDecimal a, BigDecimal b) { protected void setC(BigDecimal c) { if (c != null) { c_BigDecimal = c; - c_Integer = new Integer(c_BigDecimal.intValue()); + c_Integer = Integer.valueOf(c_BigDecimal.intValue()); } else { c_BigDecimal = null; c_Integer = null; @@ -102,8 +102,8 @@ public BigDecimal[] build_a_plus_minus_b_BigDecimal(org.eclipse.persistence.sess } else { BigDecimal a_plus_b = a.add(b); BigDecimal a_minus_b = a.subtract(b); - a_plus_minus_b_Integer[0] = new Integer(a_plus_b.intValue()); - a_plus_minus_b_Integer[1] = new Integer(a_minus_b.intValue()); + a_plus_minus_b_Integer[0] = Integer.valueOf(a_plus_b.intValue()); + a_plus_minus_b_Integer[1] = Integer.valueOf(a_minus_b.intValue()); } return a_plus_minus_b_Integer; }*/ diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/schemaframework/SPGExecuteStoredProcedureTest.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/schemaframework/SPGExecuteStoredProcedureTest.java index 8dab2422bd2..53114a394b5 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/schemaframework/SPGExecuteStoredProcedureTest.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/schemaframework/SPGExecuteStoredProcedureTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -29,13 +29,13 @@ public class SPGExecuteStoredProcedureTest extends TestCase { int deleteSuccess = 1; String parameterNamePrefix; boolean shouldUseNamedArguments; - static final Integer menuID = new Integer(99); - static final Integer restaurantID = new Integer(100); - static final Integer dinerID = new Integer(101); - static final Integer personID = new Integer(102); - static final Integer locationID = new Integer(103); - static final Integer waiterID = new Integer(104); - static final Integer menuItemID = new Integer(105); + static final Integer menuID = Integer.valueOf(99); + static final Integer restaurantID = Integer.valueOf(100); + static final Integer dinerID = Integer.valueOf(101); + static final Integer personID = Integer.valueOf(102); + static final Integer locationID = Integer.valueOf(103); + static final Integer waiterID = Integer.valueOf(104); + static final Integer menuItemID = Integer.valueOf(105); static final String menuType = "Lunch"; static final String menuTypeUpdate = "Dinner"; static final String dinerFirstName = "Steve"; @@ -55,8 +55,8 @@ public class SPGExecuteStoredProcedureTest extends TestCase { static final String waiterSpecialityUpdate = "Speaking Spanish and Italian"; static final String waiterClass = "A"; static final String menuItemName = "Roasted beef and potato"; - static final Float menuItemPrice = new Float(20.99f); - static final Float menuItemPriceUpdate = new Float(22.99f); + static final Float menuItemPrice = Float.valueOf(20.99f); + static final Float menuItemPriceUpdate = Float.valueOf(22.99f); static final String restaurantName = "May Flower"; static final String restaurantNameUpdate = "Great Wall Restaurant"; diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/sessionsxml/SessionsXMLSchemaWriteTest.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/sessionsxml/SessionsXMLSchemaWriteTest.java index c0c13e134a8..37768e04306 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/sessionsxml/SessionsXMLSchemaWriteTest.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/sessionsxml/SessionsXMLSchemaWriteTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -91,7 +91,7 @@ protected void setup() throws Exception { loginConfig.setExternalTransactionController(false); loginConfig.setForceFieldNamesToUppercase(false); loginConfig.setJdbcBatchWriting(false); - loginConfig.setMaxBatchWritingSize(new Integer(5)); + loginConfig.setMaxBatchWritingSize(Integer.valueOf(5)); loginConfig.setNativeSequencing(false); loginConfig.setNativeSQL(false); loginConfig.setOptimizeDataConversion(true); @@ -99,7 +99,7 @@ protected void setup() throws Exception { loginConfig.setPlatformClass("platform"); loginConfig.setSequenceCounterField("SEQ_COUNT"); loginConfig.setSequenceNameField("SEQ_NAME"); - loginConfig.setSequencePreallocationSize(new Integer(99)); + loginConfig.setSequencePreallocationSize(Integer.valueOf(99)); loginConfig.setSequenceTable("\"SEQUENCE\""); loginConfig.setStreamsForBinding(false); loginConfig.setStringBinding(false); @@ -161,16 +161,16 @@ protected void setup() throws Exception { ServerSessionConfig serverSessionConfig = new ServerSessionConfig(); serverSessionConfig.setPoolsConfig(new PoolsConfig()); ReadConnectionPoolConfig readPool = new ReadConnectionPoolConfig(); - readPool.setMaxConnections(new Integer(2)); - readPool.setMinConnections(new Integer(2)); + readPool.setMaxConnections(Integer.valueOf(2)); + readPool.setMinConnections(Integer.valueOf(2)); serverSessionConfig.getPoolsConfig().setReadConnectionPoolConfig(readPool); WriteConnectionPoolConfig writePool = new WriteConnectionPoolConfig(); - writePool.setMaxConnections(new Integer(10)); - writePool.setMinConnections(new Integer(5)); + writePool.setMaxConnections(Integer.valueOf(10)); + writePool.setMinConnections(Integer.valueOf(5)); serverSessionConfig.getPoolsConfig().setWriteConnectionPoolConfig(writePool); WriteConnectionPoolConfig userPool = new WriteConnectionPoolConfig(); - userPool.setMaxConnections(new Integer(5)); - userPool.setMinConnections(new Integer(0)); + userPool.setMaxConnections(Integer.valueOf(5)); + userPool.setMinConnections(Integer.valueOf(0)); serverSessionConfig.getPoolsConfig().addConnectionPoolConfig(userPool); sessions.addSessionConfig(serverSessionConfig); FileWriter writer = new FileWriter(m_resource); @@ -253,7 +253,7 @@ protected void verify() { checkBoolean("ExternalTransactionController", loginConfig.getExternalTransactionController(), false); checkBoolean("ForceFieldNamesToUppercase", loginConfig.getForceFieldNamesToUppercase(), false); checkBoolean("JdbcBatchWriting", loginConfig.getJdbcBatchWriting(), false); - check("MaxBatchWritingSize", loginConfig.getMaxBatchWritingSize(), new Integer(5)); + check("MaxBatchWritingSize", loginConfig.getMaxBatchWritingSize(), Integer.valueOf(5)); checkBoolean("NativeSequencing", loginConfig.getNativeSequencing(), false); checkBoolean("NativeSQL", loginConfig.getNativeSQL(), false); checkBoolean("OptimizeDataConversion", loginConfig.getOptimizeDataConversion(), true); @@ -261,7 +261,7 @@ protected void verify() { check("PlatformClass", loginConfig.getPlatformClass(), "platform"); check("SequenceCounterField", loginConfig.getSequenceCounterField(), "SEQ_COUNT"); check("SequenceNameField", loginConfig.getSequenceNameField(), "SEQ_NAME"); - check("SequencePreallocationSize", loginConfig.getSequencePreallocationSize(), new Integer(99)); + check("SequencePreallocationSize", loginConfig.getSequencePreallocationSize(), Integer.valueOf(99)); check("SequenceTable", loginConfig.getSequenceTable(), "\"SEQUENCE\""); checkBoolean("StreamsForBinding", loginConfig.getStreamsForBinding(), false); checkBoolean("StringBinding", loginConfig.getStringBinding(), false); diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/simplepojoclient/PojoEmployeeProject.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/simplepojoclient/PojoEmployeeProject.java index 9ce82a9832f..d99cbb2be43 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/simplepojoclient/PojoEmployeeProject.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/simplepojoclient/PojoEmployeeProject.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -91,8 +91,8 @@ public ClassDescriptor buildPojoEmployeeDescriptor() { genderMapping.setSetMethodName("setGender"); genderMapping.setFieldName("POJO_EMPLOYEE.GENDER"); ObjectTypeConverter genderMappingConverter = new ObjectTypeConverter(); - genderMappingConverter.addConversionValue(new Character('F'), "Female"); - genderMappingConverter.addConversionValue(new Character('M'), "Male"); + genderMappingConverter.addConversionValue(Character.valueOf('F'), "Female"); + genderMappingConverter.addConversionValue(Character.valueOf('M'), "Male"); genderMapping.setConverter(genderMappingConverter); descriptor.addMapping(genderMapping); diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/simultaneous/AddDescriptorsMultithreadedTest.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/simultaneous/AddDescriptorsMultithreadedTest.java index 0c255c741e1..ff08b1e3801 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/simultaneous/AddDescriptorsMultithreadedTest.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/simultaneous/AddDescriptorsMultithreadedTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -147,7 +147,7 @@ public AddDescriptorsTest(int testNumber, int numberOfTests, long timeToSleepBet long timeToSleepBetweenAddingDescriptors; InterfaceHashtableProject project; static int numberOfCompletedTests = 0; - static Object lock = new Boolean(true); + static Object lock = Boolean.valueOf(true); public void test() { DatabaseSession dbSession; if (getSession().isDatabaseSession()) { @@ -320,7 +320,7 @@ public InsertTest(int testNumber, int numberOfTests) { int testNumber; int numberOfTests; static int numberOfCompletedTests = 0; - static Object lock = new Boolean(true); + static Object lock = Boolean.valueOf(true); public void test() { // Test execution causes deadlock on SQL Server if (getAbstractSession().getParent().getPlatform().isSQLServer()) { diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/simultaneous/ConcurrencyTest.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/simultaneous/ConcurrencyTest.java index b301696906c..4cbf66a20e8 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/simultaneous/ConcurrencyTest.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/simultaneous/ConcurrencyTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -46,7 +46,7 @@ protected void setup() throws Throwable { protected void test() throws Throwable { // TODO Auto-generated method stub super.test(); - Integer i = new Integer(5); + Integer i = Integer.valueOf(5); Thread thread1 = new Thread(new Runner1(i, emp.getId(),project.getId(),getSession())); thread1.setName("Runner1"); Thread thread2 = new Thread(new Runner2(i, emp.getId(),project.getId(),getSession())); diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/stress/ClientThread.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/stress/ClientThread.java index d4bd0dda7a8..2f9dbd0eb99 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/stress/ClientThread.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/stress/ClientThread.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -38,7 +38,7 @@ public void run() { UnitOfWork uow = client.acquireUnitOfWork(); uow.readAllObjects(SmallProject.class); edit = (org.eclipse.persistence.testing.models.employee.domain.Project)uow.registerObject(edit); - edit.setName((new Long(System.currentTimeMillis())).toString()); + edit.setName((Long.valueOf(System.currentTimeMillis())).toString()); try { uow.commit(); } catch (OptimisticLockException exception) { diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/types/BooleanTester.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/types/BooleanTester.java index 2669056604d..33313a4eb66 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/types/BooleanTester.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/types/BooleanTester.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -32,9 +32,9 @@ public BooleanTester() { } public BooleanTester(boolean testValue) { - super(new Boolean(testValue).toString()); + super(Boolean.valueOf(testValue).toString()); booleanValue = testValue; - booleanClassValue = new Boolean(testValue); + booleanClassValue = Boolean.valueOf(testValue); } public static RelationalDescriptor descriptor() { @@ -83,7 +83,7 @@ public void setBooleanClassValue(Boolean boolValue) { } public void setBooleanClassValue(boolean boolValue) { - booleanClassValue = new Boolean(boolValue); + booleanClassValue = Boolean.valueOf(boolValue); } public void setBooleanValue(Boolean boolValue) { diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/types/NumericTester.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/types/NumericTester.java index 0c5be1fa7e6..3607c251fb1 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/types/NumericTester.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/types/NumericTester.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -44,17 +44,17 @@ public class NumericTester extends TypeTester { public NumericTester() { super("ZERO"); intValue = 0; - integerClassValue = new Integer(0); + integerClassValue = Integer.valueOf(0); floatValue = 0; - floatClassValue = new Float(0); + floatClassValue = Float.valueOf(0); longValue = 0; - longClassValue = new Long(0); + longClassValue = Long.valueOf(0); doubleValue = 0; - doubleClassValue = new Double(0); + doubleClassValue = Double.valueOf(0); shortValue = (short)0; - shortClassValue = new Short((short)0); + shortClassValue = Short.valueOf((short)0); byteValue = (byte)0; - byteClassValue = new Byte((byte)0); + byteClassValue = Byte.valueOf((byte)0); bigIntegerValue = new BigInteger("0"); bigDecimalValue = new BigDecimal(bigIntegerValue, 19); } @@ -274,7 +274,7 @@ public void setBigIntegerValue(BigInteger aBigInteger) { } public void setByteClassValue(byte aByte) { - byteClassValue = new Byte(aByte); + byteClassValue = Byte.valueOf(aByte); } public void setByteClassValue(Byte aByte) { @@ -286,7 +286,7 @@ public void setByteValue(byte aByte) { } public void setDoubleClassValue(double aDouble) { - doubleClassValue = new Double(aDouble); + doubleClassValue = Double.valueOf(aDouble); } public void setDoubleClassValue(Double aDouble) { @@ -298,7 +298,7 @@ public void setDoubleValue(double aDouble) { } public void setFloatClassValue(float aFloat) { - floatClassValue = new Float(aFloat); + floatClassValue = Float.valueOf(aFloat); } public void setFloatClassValue(Float aFloat) { @@ -310,7 +310,7 @@ public void setFloatValue(float newFloat) { } public void setIntegerClassValue(int anInteger) { - integerClassValue = new Integer(anInteger); + integerClassValue = Integer.valueOf(anInteger); } public void setIntegerClassValue(Integer anInteger) { @@ -322,7 +322,7 @@ public void setIntegerValue(int anInt) { } public void setLongClassValue(long aLong) { - longClassValue = new Long(aLong); + longClassValue = Long.valueOf(aLong); } public void setLongClassValue(Long aLong) { @@ -338,7 +338,7 @@ public void setShortClassValue(Short aShort) { } public void setShortClassValue(short aShort) { - shortClassValue = new Short(aShort); + shortClassValue = Short.valueOf(aShort); } public void setShortValue(short aShort) { @@ -402,17 +402,17 @@ protected static NumericTester zeroValues(DatabasePlatform platform) { NumericTester tester = new NumericTester("ZERO"); tester.setIntegerValue(0); - tester.setIntegerClassValue(new Integer(0)); + tester.setIntegerClassValue(Integer.valueOf(0)); tester.setFloatValue(0); - tester.setFloatClassValue(new Float(0)); + tester.setFloatClassValue(Float.valueOf(0)); tester.setLongValue(0); - tester.setLongClassValue(new Long(0)); + tester.setLongClassValue(Long.valueOf(0)); tester.setDoubleValue(0); - tester.setDoubleClassValue(new Double(0)); + tester.setDoubleClassValue(Double.valueOf(0)); tester.setShortValue((short)0); - tester.setShortClassValue(new Short((short)0)); + tester.setShortClassValue(Short.valueOf((short)0)); tester.setByteValue((byte)0); - tester.setByteClassValue(new Byte((byte)0)); + tester.setByteClassValue(Byte.valueOf((byte)0)); tester.setBigIntegerValue(new BigInteger("0")); tester.setBigDecimalValue(new BigDecimal("0")); diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/unitofwork/ConcurrentAddress.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/unitofwork/ConcurrentAddress.java index b39c1c89365..5cd1c71e1cb 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/unitofwork/ConcurrentAddress.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/unitofwork/ConcurrentAddress.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -311,7 +311,7 @@ public static RelationalDescriptor descriptor() { DirectToFieldMapping cityMapping = new DirectToFieldMapping(); cityMapping.setAttributeName("city"); cityMapping.setFieldName("CONCURRENT_ADDRESS.CITY"); - cityMapping.setWeight(new Integer(10)); + cityMapping.setWeight(Integer.valueOf(10)); descriptor.addMapping(cityMapping); DirectToFieldMapping countryMapping = new DirectToFieldMapping(); @@ -319,7 +319,7 @@ public static RelationalDescriptor descriptor() { countryMapping.setFieldName("CONCURRENT_ADDRESS.COUNTRY"); countryMapping.setSetMethodName("setCountry"); countryMapping.setGetMethodName("getCountry"); - countryMapping.setWeight(new Integer(9)); + countryMapping.setWeight(Integer.valueOf(9)); descriptor.addMapping(countryMapping); DirectToFieldMapping idMapping = new DirectToFieldMapping(); @@ -327,13 +327,13 @@ public static RelationalDescriptor descriptor() { idMapping.setFieldName("CONCURRENT_ADDRESS.ADDRESS_ID"); idMapping.setSetMethodName("setId"); idMapping.setGetMethodName("getId"); - idMapping.setWeight(new Integer(8)); + idMapping.setWeight(Integer.valueOf(8)); descriptor.addMapping(idMapping); DirectToFieldMapping postalCodeMapping = new DirectToFieldMapping(); postalCodeMapping.setAttributeName("postalCode"); postalCodeMapping.setFieldName("CONCURRENT_ADDRESS.P_CODE"); - postalCodeMapping.setWeight(new Integer(7)); + postalCodeMapping.setWeight(Integer.valueOf(7)); descriptor.addMapping(postalCodeMapping); DirectToFieldMapping provinceMapping = new DirectToFieldMapping(); @@ -341,13 +341,13 @@ public static RelationalDescriptor descriptor() { provinceMapping.setFieldName("CONCURRENT_ADDRESS.PROVINCE"); provinceMapping.setSetMethodName("setProvince"); provinceMapping.setGetMethodName("getProvince"); - provinceMapping.setWeight(new Integer(6)); + provinceMapping.setWeight(Integer.valueOf(6)); descriptor.addMapping(provinceMapping); DirectToFieldMapping streetMapping = new DirectToFieldMapping(); streetMapping.setAttributeName("street"); streetMapping.setFieldName("CONCURRENT_ADDRESS.STREET"); - streetMapping.setWeight(new Integer(5)); + streetMapping.setWeight(Integer.valueOf(5)); descriptor.addMapping(streetMapping); return descriptor; diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/unitofwork/NoIdentityMergeCloneTest.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/unitofwork/NoIdentityMergeCloneTest.java index f15ad4f496f..3c62e982164 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/unitofwork/NoIdentityMergeCloneTest.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/unitofwork/NoIdentityMergeCloneTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -68,7 +68,7 @@ public void setup() { while (iterator.hasNext()) { ClassDescriptor descriptor = (ClassDescriptor)iterator.next(); checkCacheState.put(descriptor, - new Integer(descriptor.getQueryManager().getDoesExistQuery().getExistencePolicy())); + Integer.valueOf(descriptor.getQueryManager().getDoesExistQuery().getExistencePolicy())); if(descriptor.requiresInitialization((AbstractSession) getSession())) { // identityMapClass is null for AggregateObject, AggregateMapping and Interface descriptors. identityMapTypes.put(descriptor, descriptor.getIdentityMapClass()); diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/unitofwork/changeflag/TransparentMapTest.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/unitofwork/changeflag/TransparentMapTest.java index 7b08abc651a..1a011229478 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/unitofwork/changeflag/TransparentMapTest.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/unitofwork/changeflag/TransparentMapTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -112,7 +112,7 @@ public void test() { //test update this.licenceType = "Alcohol License"; this.licenceValue = (Boolean)clone.getLicenses().get(licenceType); - clone.getLicenses().put(licenceType, new Boolean((!(this.licenceValue).booleanValue()))); + clone.getLicenses().put(licenceType, Boolean.valueOf((!(this.licenceValue).booleanValue()))); uow.commit(); } diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/unitofwork/referencesettings/ChangeTrackedWeakReferenceTest.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/unitofwork/referencesettings/ChangeTrackedWeakReferenceTest.java index 86add111d07..74bbf0fb63f 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/unitofwork/referencesettings/ChangeTrackedWeakReferenceTest.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/unitofwork/referencesettings/ChangeTrackedWeakReferenceTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -34,7 +34,7 @@ public void test(){ try{ Long[] arr = new Long[100000]; for (int i = 0; i< 100000; ++i){ - arr[i] = new Long(i); + arr[i] = Long.valueOf(i); } }catch (Error er){ //ignore diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/unitofwork/referencesettings/DeferredChangeWeakReferenceTest.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/unitofwork/referencesettings/DeferredChangeWeakReferenceTest.java index be4eb27d201..a8e8fcb9e3c 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/unitofwork/referencesettings/DeferredChangeWeakReferenceTest.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/unitofwork/referencesettings/DeferredChangeWeakReferenceTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -26,7 +26,7 @@ public void test(){ try{ Long[] arr = new Long[100000]; for (int i = 0; i< 100000; ++i){ - arr[i] = new Long(i); + arr[i] = Long.valueOf(i); } }catch (Error er){ //ignore diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/unitofwork/referencesettings/ForceWeakReferenceTest.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/unitofwork/referencesettings/ForceWeakReferenceTest.java index 3ab2a979234..c1651b8f005 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/unitofwork/referencesettings/ForceWeakReferenceTest.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/unitofwork/referencesettings/ForceWeakReferenceTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -27,7 +27,7 @@ public void test(){ try{ Long[] arr = new Long[10000000]; for (int i = 0; i< 10000000; ++i){ - arr[i] = new Long(i); + arr[i] = Long.valueOf(i); } System.gc(); try{ diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/unitofwork/referencesettings/HardReferenceTest.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/unitofwork/referencesettings/HardReferenceTest.java index 39b229dacdb..d9dd75ecdd5 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/unitofwork/referencesettings/HardReferenceTest.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/unitofwork/referencesettings/HardReferenceTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -26,7 +26,7 @@ public void test(){ try{ Long[] arr = new Long[100000]; for (int i = 0; i< 100000; ++i){ - arr[i] = new Long(i); + arr[i] = Long.valueOf(i); } }catch (Error er){ //ignore diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/unitofwork/referencesettings/WeakReferenceTest.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/unitofwork/referencesettings/WeakReferenceTest.java index 760694b4d2f..a383d9c4279 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/unitofwork/referencesettings/WeakReferenceTest.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/unitofwork/referencesettings/WeakReferenceTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -36,7 +36,7 @@ public void test(){ try{ Long[] arr = new Long[10000000]; for (int i = 0; i< 10000000; ++i){ - arr[i] = new Long(i); + arr[i] = Long.valueOf(i); } System.gc(); try{ diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/validation/NullPointerWhileSettingValueThruInstanceVariableAccessorTest.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/validation/NullPointerWhileSettingValueThruInstanceVariableAccessorTest.java index 813f068f726..9153a714ac0 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/validation/NullPointerWhileSettingValueThruInstanceVariableAccessorTest.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/validation/NullPointerWhileSettingValueThruInstanceVariableAccessorTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -41,7 +41,7 @@ protected void setup() { public void test() { try { - mapping.setAttributeValueInObject(null, new Integer(0)); + mapping.setAttributeValueInObject(null, Integer.valueOf(0)); } catch (EclipseLinkException exception) { caughtException = exception; } diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/validation/PrintStackTraceTest.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/validation/PrintStackTraceTest.java index d8e07712faf..9fd4a7a5127 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/validation/PrintStackTraceTest.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/validation/PrintStackTraceTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -37,7 +37,7 @@ public PrintStackTraceTest() { public void test() { // do not use logMessages(), which has been already set up for the session - Integer integer = new Integer(1); + Integer integer = Integer.valueOf(1); try { UnitOfWork uow = getSession().acquireUnitOfWork(); uow.registerObject(integer); diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/validation/QueryParameterForOneToOneValidationTest.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/validation/QueryParameterForOneToOneValidationTest.java index fac0049aa2b..08a9464f281 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/validation/QueryParameterForOneToOneValidationTest.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/validation/QueryParameterForOneToOneValidationTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -78,7 +78,7 @@ public void test() { try { // doesn't matter what id is queried Vector params = new Vector(); - params.add(new Integer(id)); + params.add(Integer.valueOf(id)); // special case for conforming if (this.shouldConform) { diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/workbenchintegration/CMWorkbenchIntegrationSystem.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/workbenchintegration/CMWorkbenchIntegrationSystem.java index bc6f371889c..d09682c695d 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/workbenchintegration/CMWorkbenchIntegrationSystem.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/workbenchintegration/CMWorkbenchIntegrationSystem.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -139,7 +139,7 @@ public static DatabaseQuery buildPersistenceTestEqualPCharQuery() { public static DatabaseQuery buildPersistenceTestEqualCharacterQuery() { ExpressionBuilder builder = new ExpressionBuilder(ConversionDataObject.class); - Expression expression = builder.get("aCharacter").equal(new Character('b')); + Expression expression = builder.get("aCharacter").equal(Character.valueOf('b')); ReadObjectQuery query = new ReadObjectQuery(ConversionDataObject.class); query.setSelectionCriteria(expression); return query; @@ -171,7 +171,7 @@ public static DatabaseQuery buildPersistenceTestEqualPByteArrayQuery() { public static DatabaseQuery buildPersistenceTestEqualByteQuery() { ExpressionBuilder builder = new ExpressionBuilder(ConversionDataObject.class); - Expression expression = builder.get("aByte").equal(new Byte((byte)3)); + Expression expression = builder.get("aByte").equal(Byte.valueOf((byte)3)); ReadObjectQuery query = new ReadObjectQuery(ConversionDataObject.class); query.setSelectionCriteria(expression); return query; diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/workbenchintegration/EmployeeCustomSQLMWIntegrationSystem.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/workbenchintegration/EmployeeCustomSQLMWIntegrationSystem.java index fc2c38cf471..10f52a2e902 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/workbenchintegration/EmployeeCustomSQLMWIntegrationSystem.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/workbenchintegration/EmployeeCustomSQLMWIntegrationSystem.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -99,9 +99,9 @@ public void buildStoredProcedureCallInQueryIntoDescriptor() { StoredProcedureCall call = new StoredProcedureCall(); call.setProcedureName("StoredProcedure_InOut_Out_In"); - call.addNamedInOutputArgumentValue("P_INOUT", new Integer(100), "P_INOUT_FIELD_NAME", Integer.class); + call.addNamedInOutputArgumentValue("P_INOUT", Integer.valueOf(100), "P_INOUT_FIELD_NAME", Integer.class); call.addNamedOutputArgument("P_OUT", "P_OUT_FIELD_NAME", Integer.class); - call.addNamedArgumentValue("P_IN", new Integer(1000)); + call.addNamedArgumentValue("P_IN", Integer.valueOf(1000)); //Set stored procedure to Named query. DataReadQuery dataReadQuery = new DataReadQuery(); @@ -115,9 +115,9 @@ public void buildUNamedStoredProcedureCallInQueryIntoDescriptor() { StoredProcedureCall unamedcall = new StoredProcedureCall(); unamedcall.setProcedureName("StoredProcedure_InOut_Out_In"); - unamedcall.addUnamedInOutputArgumentValue(new Integer(100), "P_INOUT_FIELD_NAME", Integer.class); + unamedcall.addUnamedInOutputArgumentValue(Integer.valueOf(100), "P_INOUT_FIELD_NAME", Integer.class); unamedcall.addUnamedOutputArgument("P_OUT_FIELD_NAME", Integer.class); - unamedcall.addUnamedArgumentValue(new Integer(1000)); + unamedcall.addUnamedArgumentValue(Integer.valueOf(1000)); //Set stored procedure to Named query DataReadQuery unameddataReadQuery = new DataReadQuery(); diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/workbenchintegration/ProjectXMLStoredFunctionCallTest.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/workbenchintegration/ProjectXMLStoredFunctionCallTest.java index 6e929edf0c2..4a90022c1cc 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/workbenchintegration/ProjectXMLStoredFunctionCallTest.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/workbenchintegration/ProjectXMLStoredFunctionCallTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -60,8 +60,8 @@ public void setup() { public void test() { Vector parameters = new Vector(); - Long p_inout = new Long(99); - Long p_in = new Long(100); + Long p_inout = Long.valueOf(99); + Long p_in = Long.valueOf(100); parameters.add(p_inout); parameters.add(p_in); result = getSession().executeQuery(query, parameters); @@ -70,17 +70,17 @@ public void test() { public void verify() { DatabaseRecord row = (DatabaseRecord)((Vector)result).firstElement(); Long p_inout = (Long)row.get("P_INOUT"); - if (!p_inout.equals(new Long(100))) { + if (!p_inout.equals(Long.valueOf(100))) { throw new TestErrorException( "The stored function did not execute correctly. Expected: [P_INOUT = 100]"); } Long p_out = (Long)row.get("P_OUT"); - if (!p_out.equals(new Long(99))) { + if (!p_out.equals(Long.valueOf(99))) { throw new TestErrorException( "The stored function did not execute correctly. Expected: [P_OUT = 99]"); } Long returnValue = (Long)row.getValues().firstElement(); - if (!returnValue.equals(new Long(99))) { + if (!returnValue.equals(Long.valueOf(99))) { throw new TestErrorException( "The stored function did not execute correctly. Expected: [return value = 99]"); } diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/workbenchintegration/ProjectXMLStoredProcedureCallTest.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/workbenchintegration/ProjectXMLStoredProcedureCallTest.java index b516c4e40a1..b134ecaa538 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/workbenchintegration/ProjectXMLStoredProcedureCallTest.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/workbenchintegration/ProjectXMLStoredProcedureCallTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -89,7 +89,7 @@ private void verifyNamedArgumentStoredProcedureCall() { Integer P_INOUT_FIELD_NAME = (Integer)row.get("P_INOUT_FIELD_NAME"); Integer P_OUT_FIELD_NAME = (Integer)row.get("P_OUT_FIELD_NAME"); - if (!P_INOUT_FIELD_NAME.equals(new Integer(1000)) || !P_OUT_FIELD_NAME.equals(new Integer(100))) { + if (!P_INOUT_FIELD_NAME.equals(Integer.valueOf(1000)) || !P_OUT_FIELD_NAME.equals(Integer.valueOf(100))) { throw new TestErrorException("Stored Procedure which write to or read from XML does not execute as expected."); } } @@ -109,8 +109,8 @@ private void verifyUNamedArgumentStoredProcedureCall() { Integer UNAMED_P_INOUT_FIELD_NAME = (Integer)unamedrow.get("P_INOUT_FIELD_NAME"); Integer UNAMED_P_OUT_FIELD_NAME = (Integer)unamedrow.get("P_OUT_FIELD_NAME"); - if (!UNAMED_P_INOUT_FIELD_NAME.equals(new Integer(1000)) || - !UNAMED_P_OUT_FIELD_NAME.equals(new Integer(100))) { + if (!UNAMED_P_INOUT_FIELD_NAME.equals(Integer.valueOf(1000)) || + !UNAMED_P_OUT_FIELD_NAME.equals(Integer.valueOf(100))) { throw new TestErrorException("UNnamed Stored Procedure which write to or read from XML dose not execute as expected."); } } diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/writing/ComplexUpdateTest.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/writing/ComplexUpdateTest.java index 52ee42e63ee..0eb6ee198f3 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/writing/ComplexUpdateTest.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/writing/ComplexUpdateTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -51,7 +51,7 @@ public void commitParentUnitOfWork() { } public String getName() { - return super.getName() + new Boolean(usesUnitOfWork) + new Boolean(usesNestedUnitOfWork); + return super.getName() + Boolean.valueOf(usesUnitOfWork) + Boolean.valueOf(usesNestedUnitOfWork); } public void reset() { diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/tools/beans/ExpressionNode.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/tools/beans/ExpressionNode.java index 7742e2af721..d8e4ba7ed49 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/tools/beans/ExpressionNode.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/tools/beans/ExpressionNode.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -86,33 +86,33 @@ public static Hashtable getMethods() { } public static String getOperator(int anOperator) { - return (String)getOperators().get(new Integer(anOperator)); + return (String)getOperators().get(Integer.valueOf(anOperator)); } public static Hashtable getOperators() { if (operators == null) { operators = new Hashtable(); - operators.put(new Integer(ExpressionOperator.Equal), Equals); - operators.put(new Integer(ExpressionOperator.NotEqual), NotEquals); - operators.put(new Integer(ExpressionOperator.LessThan), LessThan); - operators.put(new Integer(ExpressionOperator.LessThanEqual), + operators.put(Integer.valueOf(ExpressionOperator.Equal), Equals); + operators.put(Integer.valueOf(ExpressionOperator.NotEqual), NotEquals); + operators.put(Integer.valueOf(ExpressionOperator.LessThan), LessThan); + operators.put(Integer.valueOf(ExpressionOperator.LessThanEqual), LessThanEqual); - operators.put(new Integer(ExpressionOperator.GreaterThan), + operators.put(Integer.valueOf(ExpressionOperator.GreaterThan), GreaterThan); - operators.put(new Integer(ExpressionOperator.GreaterThanEqual), + operators.put(Integer.valueOf(ExpressionOperator.GreaterThanEqual), GreaterThanEqual); - operators.put(new Integer(ExpressionOperator.Like), Like); - operators.put(new Integer(ExpressionOperator.NotLike), NotLike); - operators.put(new Integer(ExpressionOperator.In), In); - operators.put(new Integer(ExpressionOperator.NotIn), NotIn); - operators.put(new Integer(ExpressionOperator.Between), Between); - operators.put(new Integer(ExpressionOperator.NotBetween), + operators.put(Integer.valueOf(ExpressionOperator.Like), Like); + operators.put(Integer.valueOf(ExpressionOperator.NotLike), NotLike); + operators.put(Integer.valueOf(ExpressionOperator.In), In); + operators.put(Integer.valueOf(ExpressionOperator.NotIn), NotIn); + operators.put(Integer.valueOf(ExpressionOperator.Between), Between); + operators.put(Integer.valueOf(ExpressionOperator.NotBetween), NotBetween); - operators.put(new Integer(ExpressionOperator.Or), Or); - operators.put(new Integer(ExpressionOperator.And), And); - operators.put(new Integer(ExpressionOperator.Not), Not); - operators.put(new Integer(ExpressionOperator.ToLowerCase), Lower); - operators.put(new Integer(ExpressionOperator.ToUpperCase), Upper); + operators.put(Integer.valueOf(ExpressionOperator.Or), Or); + operators.put(Integer.valueOf(ExpressionOperator.And), And); + operators.put(Integer.valueOf(ExpressionOperator.Not), Not); + operators.put(Integer.valueOf(ExpressionOperator.ToLowerCase), Lower); + operators.put(Integer.valueOf(ExpressionOperator.ToUpperCase), Upper); } return operators; diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/tools/history/HistoryFacade.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/tools/history/HistoryFacade.java index 3b25c4983bf..0e45f75aace 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/tools/history/HistoryFacade.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/tools/history/HistoryFacade.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -118,7 +118,7 @@ public static long currentDatabaseTimeMillis(org.eclipse.persistence.sessions.Se long endTime = System.currentTimeMillis(); long jvmTime = (endTime - startTime) / 2 + startTime; long offset = databaseTime.getTime() - jvmTime; - timeOffsetsMap.put(rootSession, new Long(offset)); + timeOffsetsMap.put(rootSession, Long.valueOf(offset)); return jvmTime + offset; } } diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/tools/sessionconsole/LoginEditorPanel.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/tools/sessionconsole/LoginEditorPanel.java index 8efdd8af3d7..6d964c98316 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/tools/sessionconsole/LoginEditorPanel.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/tools/sessionconsole/LoginEditorPanel.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -3078,7 +3078,7 @@ public void resetSequenceButtons() { getSequenceCounterNameText().setEnabled(!getNativeSequencingCheckbox().isSelected()); getSequenceFieldNameText().setEnabled(!getNativeSequencingCheckbox().isSelected()); getSequenceTableNameText().setEnabled(!getNativeSequencingCheckbox().isSelected()); - getSequencePreallocationSizeText().setText(new Integer(getLogin().getDefaultSequence().getPreallocationSize()).toString()); + getSequencePreallocationSizeText().setText(Integer.valueOf(getLogin().getDefaultSequence().getPreallocationSize()).toString()); } public void resetStringButtons() { diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/tools/sessionconsole/ProfileBrowserPanel.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/tools/sessionconsole/ProfileBrowserPanel.java index 7319c771cf5..cb934b38630 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/tools/sessionconsole/ProfileBrowserPanel.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/tools/sessionconsole/ProfileBrowserPanel.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -122,7 +122,7 @@ public Vector buildProfileSummaryByClass() { } else { newTime = oldTime.longValue() + profileTime; } - summary.getOperationTimings().put(name, new Long(newTime)); + summary.getOperationTimings().put(name, Long.valueOf(newTime)); } } @@ -173,7 +173,7 @@ public Vector buildProfileSummaryByQuery() { } else { newTime = oldTime.longValue() + profileTime; } - summary.getOperationTimings().put(name, new Long(newTime)); + summary.getOperationTimings().put(name, Long.valueOf(newTime)); } } @@ -236,7 +236,7 @@ public Vector buildProfileSummaryByQueryAndClass() { } else { newTime = oldTime.longValue() + profileTime; } - summary.getOperationTimings().put(name, new Long(newTime)); + summary.getOperationTimings().put(name, Long.valueOf(newTime)); } } @@ -519,11 +519,11 @@ public void resetProfiles() { Helper.getShortClassName(profile.getDomainClass()); } } - items[2] = new Long(profile.getTotalTime()).toString(); - items[3] = new Long(profile.getLocalTime()).toString(); + items[2] = Long.valueOf(profile.getTotalTime()).toString(); + items[3] = Long.valueOf(profile.getLocalTime()).toString(); items[4] = - new Long(profile.getNumberOfInstancesEffected()).toString(); - items[5] = new Long(profile.getObjectsPerSecond()).toString(); + Long.valueOf(profile.getNumberOfInstancesEffected()).toString(); + items[5] = Long.valueOf(profile.getObjectsPerSecond()).toString(); if (profile.getOperationTimings().containsKey(SessionProfiler.SqlPrepare)) { items[6] = profile.getOperationTimings().get(SessionProfiler.SqlPrepare).toString(); diff --git a/foundation/eclipselink.core.test/src/org/eclipse/persistence/tools/sessionconsole/SessionConsolePanel.java b/foundation/eclipselink.core.test/src/org/eclipse/persistence/tools/sessionconsole/SessionConsolePanel.java index 1a525788f05..19636b25d5c 100644 --- a/foundation/eclipselink.core.test/src/org/eclipse/persistence/tools/sessionconsole/SessionConsolePanel.java +++ b/foundation/eclipselink.core.test/src/org/eclipse/persistence/tools/sessionconsole/SessionConsolePanel.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -3418,7 +3418,7 @@ public void resetCache() { CacheKey key = (CacheKey) cacheEnumeration.nextElement(); String[] values = new String[4]; values[0] = key.getKey().toString(); - values[1] = new Integer(key.getObject().hashCode()).toString(); + values[1] = Integer.valueOf(key.getObject().hashCode()).toString(); values[2] = String.valueOf(key.getWriteLockValue()); values[3] = key.getObject().toString(); model.addRow(values); diff --git a/foundation/eclipselink.extension.nosql.test/src/org/eclipse/persistence/testing/tests/eis/xmlfile/EmployeeSystem.java b/foundation/eclipselink.extension.nosql.test/src/org/eclipse/persistence/testing/tests/eis/xmlfile/EmployeeSystem.java index f710f182094..b4395a8381b 100644 --- a/foundation/eclipselink.extension.nosql.test/src/org/eclipse/persistence/testing/tests/eis/xmlfile/EmployeeSystem.java +++ b/foundation/eclipselink.extension.nosql.test/src/org/eclipse/persistence/testing/tests/eis/xmlfile/EmployeeSystem.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -100,12 +100,12 @@ public void createTables(DatabaseSession session) { Vector arguments = new Vector(2); arguments.add("EMP_SEQ"); - arguments.add(new Integer(0)); + arguments.add(Integer.valueOf(0)); session.executeQuery(query, arguments); arguments = new Vector(2); arguments.add("PROJ_SEQ"); - arguments.add(new Integer(0)); + arguments.add(Integer.valueOf(0)); session.executeQuery(query, arguments); } diff --git a/foundation/eclipselink.extension.oracle.spatial.test/src/org/eclipse/persistence/testing/tests/jpa/structconverter/StructConverterTestSuite.java b/foundation/eclipselink.extension.oracle.spatial.test/src/org/eclipse/persistence/testing/tests/jpa/structconverter/StructConverterTestSuite.java index a8bf2d394a0..a7de0b437d5 100644 --- a/foundation/eclipselink.extension.oracle.spatial.test/src/org/eclipse/persistence/testing/tests/jpa/structconverter/StructConverterTestSuite.java +++ b/foundation/eclipselink.extension.oracle.spatial.test/src/org/eclipse/persistence/testing/tests/jpa/structconverter/StructConverterTestSuite.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -91,7 +91,7 @@ public void testPlatform() { EntityManager em = createEntityManager(STRUCT_CONVERTER_PU); try{ // trigger deploy - em.find(SimpleSpatial.class, new Long(1)); + em.find(SimpleSpatial.class, Long.valueOf(1)); } catch (Exception e){}; StructConverter converter = getServerSession(STRUCT_CONVERTER_PU).getPlatform().getTypeConverters().get(JGeometry.class); @@ -112,7 +112,7 @@ public void testXMLPlatform() { EntityManager em = createEntityManager(XML_STRUCT_CONVERTER_PU); try { // trigger deploy - em.find(SimpleXMLSpatial.class, new Long(1)); + em.find(SimpleXMLSpatial.class, Long.valueOf(1)); } catch (Exception e){}; StructConverter converter = getServerSession(XML_STRUCT_CONVERTER_PU).getPlatform().getTypeConverters().get(JGeometry.class); @@ -140,7 +140,7 @@ public void testSimpleSpatialWrite(){ em.clear(); - simpleSpatial = em.find(SimpleSpatial.class, new Long(1000)); + simpleSpatial = em.find(SimpleSpatial.class, Long.valueOf(1000)); assertNotNull("JGeometry was not properly read in.", simpleSpatial.getJGeometry()); rollbackTransaction(em); @@ -162,7 +162,7 @@ public void testSimpleXMLSpatialWrite() { em.clear(); - simpleSpatial = em.find(SimpleXMLSpatial.class, new Long(1000)); + simpleSpatial = em.find(SimpleXMLSpatial.class, Long.valueOf(1000)); assertNotNull("JGeometry was not properly read in.", simpleSpatial.getJGeometry()); rollbackTransaction(em); diff --git a/foundation/eclipselink.extension.oracle.test/src/org/eclipse/persistence/testing/tests/lob/ImageSimulator.java b/foundation/eclipselink.extension.oracle.test/src/org/eclipse/persistence/testing/tests/lob/ImageSimulator.java index 12978b8757a..95f7a0b9459 100644 --- a/foundation/eclipselink.extension.oracle.test/src/org/eclipse/persistence/testing/tests/lob/ImageSimulator.java +++ b/foundation/eclipselink.extension.oracle.test/src/org/eclipse/persistence/testing/tests/lob/ImageSimulator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -73,7 +73,7 @@ public static Byte[] initObjectByteBase(int cycle) { new Random().nextBytes(pictures); Byte[] pics = new Byte[cycle]; for (int x = 0; x < cycle; x++) { - pics[x] = new Byte(pictures[x]); + pics[x] = Byte.valueOf(pictures[x]); } return pics; } diff --git a/foundation/eclipselink.extension.oracle.test/src/org/eclipse/persistence/testing/tests/nchar/CharNchar.java b/foundation/eclipselink.extension.oracle.test/src/org/eclipse/persistence/testing/tests/nchar/CharNchar.java index f6b225e37d4..701be342f3a 100644 --- a/foundation/eclipselink.extension.oracle.test/src/org/eclipse/persistence/testing/tests/nchar/CharNchar.java +++ b/foundation/eclipselink.extension.oracle.test/src/org/eclipse/persistence/testing/tests/nchar/CharNchar.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -44,12 +44,12 @@ public void copy(CharNchar obj) { public void copyAllButId(CharNchar obj) { setChar(null); if (obj.getChar() != null) { - setChar(new Character(obj.getChar().charValue())); + setChar(Character.valueOf(obj.getChar().charValue())); } setNchar(null); if (obj.getNchar() != null) { - setNchar(new Character(obj.getNchar().charValue())); + setNchar(Character.valueOf(obj.getNchar().charValue())); } setStr(null); @@ -89,8 +89,8 @@ public void copyAllButId(CharNchar obj) { } public void setAll(char ch, char nCh, int sizeStr, int sizeClob, int sizeClob2) { - this.ch = new Character(ch); - this.nCh = new Character(nCh); + this.ch = Character.valueOf(ch); + this.nCh = Character.valueOf(nCh); char[] chArray = new char[sizeStr]; char[] nchArray = new char[sizeStr]; diff --git a/foundation/eclipselink.extension.oracle.test/src/org/eclipse/persistence/testing/tests/nchar/ReadNcharTest.java b/foundation/eclipselink.extension.oracle.test/src/org/eclipse/persistence/testing/tests/nchar/ReadNcharTest.java index cc23349dcb5..d9176a0daf1 100644 --- a/foundation/eclipselink.extension.oracle.test/src/org/eclipse/persistence/testing/tests/nchar/ReadNcharTest.java +++ b/foundation/eclipselink.extension.oracle.test/src/org/eclipse/persistence/testing/tests/nchar/ReadNcharTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -169,10 +169,10 @@ protected void test() { pstmt.setInt(1, controlObject.getId()); - pstmt.setObject(2, (new Character(controlObject.getChar())).toString()); + pstmt.setObject(2, (Character.valueOf(controlObject.getChar())).toString()); pstmt.setFormOfUse(3, oracle.jdbc.OraclePreparedStatement.FORM_NCHAR); - pstmt.setObject(3, (new Character(controlObject.getNchar())).toString()); + pstmt.setObject(3, (Character.valueOf(controlObject.getNchar())).toString()); pstmt.setObject(4, controlObject.getStr()); @@ -200,10 +200,10 @@ protected void insertBigCLOB() throws java.sql.SQLException, java.io.IOException pstmt.setInt(1, controlObject.getId()); - pstmt.setObject(2, (new Character(controlObject.getChar())).toString()); + pstmt.setObject(2, (Character.valueOf(controlObject.getChar())).toString()); pstmt.setFormOfUse(3, oracle.jdbc.OraclePreparedStatement.FORM_NCHAR); - pstmt.setObject(3, (new Character(controlObject.getNchar())).toString()); + pstmt.setObject(3, (Character.valueOf(controlObject.getNchar())).toString()); pstmt.setObject(4, controlObject.getStr()); diff --git a/foundation/eclipselink.extension.oracle.test/src/org/eclipse/persistence/testing/tests/plsqlrecord/PLSQLrecordInOutTestSet.java b/foundation/eclipselink.extension.oracle.test/src/org/eclipse/persistence/testing/tests/plsqlrecord/PLSQLrecordInOutTestSet.java index a859fe42c0d..30515c9a410 100644 --- a/foundation/eclipselink.extension.oracle.test/src/org/eclipse/persistence/testing/tests/plsqlrecord/PLSQLrecordInOutTestSet.java +++ b/foundation/eclipselink.extension.oracle.test/src/org/eclipse/persistence/testing/tests/plsqlrecord/PLSQLrecordInOutTestSet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -10,7 +10,7 @@ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause */ -// Copyright (c) 2011, 2015 Oracle and/or its affiliates. All rights reserved. +// Copyright (c) 2011, 2023 Oracle and/or its affiliates. All rights reserved. package org.eclipse.persistence.testing.tests.plsqlrecord; @@ -309,7 +309,7 @@ public void runQuery() { assertTrue("incorrect ENAME" , result.name.equals("GOOFY")); assertTrue("incorrect JOB" , result.job.equals("ACTOR")); assertNull("MGR is supposed to be null", result.manager); - assertTrue("incorrect SAL" , result.salary.equals(new Float(3500))); + assertTrue("incorrect SAL" , result.salary.equals(Float.valueOf(3500))); assertNull("COMM is supposed to be null", result.commission); assertTrue("incorrect DEPTNO" , result.department.equals(new BigDecimal(20))); ((DatabaseSession)s).logout(); diff --git a/foundation/eclipselink.extension.oracle.test/src/org/eclipse/persistence/testing/tests/plsqlrecord/PLSQLrecordOutTestSet.java b/foundation/eclipselink.extension.oracle.test/src/org/eclipse/persistence/testing/tests/plsqlrecord/PLSQLrecordOutTestSet.java index 315b9083b91..49af02402fc 100644 --- a/foundation/eclipselink.extension.oracle.test/src/org/eclipse/persistence/testing/tests/plsqlrecord/PLSQLrecordOutTestSet.java +++ b/foundation/eclipselink.extension.oracle.test/src/org/eclipse/persistence/testing/tests/plsqlrecord/PLSQLrecordOutTestSet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -10,7 +10,7 @@ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause */ -// Copyright (c) 2011, 2015 Oracle and/or its affiliates. All rights reserved. +// Copyright (c) 2011, 2023 Oracle and/or its affiliates. All rights reserved. package org.eclipse.persistence.testing.tests.plsqlrecord; @@ -272,7 +272,7 @@ public void runQuery() { assertNull("MGR is supposed to be null", record.get("MGR")); assertNull("HIREDATE is supposed to be null", record.get("HIREDATE")); assertTrue("incorrect SAL" , - record.get("SAL").equals(new Double(6000.0))); + record.get("SAL").equals(Double.valueOf(6000.0))); assertNull("COMM is supposed to be null", record.get("COMM")); assertTrue("incorrect DEPTNO" , record.get("DEPTNO").equals(new BigDecimal(20))); diff --git a/foundation/eclipselink.extension.oracle.test/src/org/eclipse/persistence/testing/tests/plsqlrecord/PLSQLrecordWithCompatibleTypeInOutTestSet.java b/foundation/eclipselink.extension.oracle.test/src/org/eclipse/persistence/testing/tests/plsqlrecord/PLSQLrecordWithCompatibleTypeInOutTestSet.java index 3d5fd411efb..49d408c8bb0 100644 --- a/foundation/eclipselink.extension.oracle.test/src/org/eclipse/persistence/testing/tests/plsqlrecord/PLSQLrecordWithCompatibleTypeInOutTestSet.java +++ b/foundation/eclipselink.extension.oracle.test/src/org/eclipse/persistence/testing/tests/plsqlrecord/PLSQLrecordWithCompatibleTypeInOutTestSet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -10,7 +10,7 @@ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause */ -// Copyright (c) 2011, 2015 Oracle and/or its affiliates. All rights reserved. +// Copyright (c) 2011, 2023 Oracle and/or its affiliates. All rights reserved. package org.eclipse.persistence.testing.tests.plsqlrecord; @@ -302,7 +302,7 @@ public void runQuery() { assertTrue("incorrect ENAME" , result.name.equals("GOOFY")); assertTrue("incorrect JOB" , result.job.equals("ACTOR")); assertNull("MGR is supposed to be null", result.manager); - assertTrue("incorrect SAL" , result.salary.equals(new Float(3500))); + assertTrue("incorrect SAL" , result.salary.equals(Float.valueOf(3500))); assertTrue("incorrect DEPTNO" , result.department.equals(new BigDecimal(20))); ((DatabaseSession)s).logout(); } diff --git a/foundation/eclipselink.extension.oracle.test/src/org/eclipse/persistence/testing/tests/plsqlrecord/PLSQLrecordWithCompatibleTypeOutTestSet.java b/foundation/eclipselink.extension.oracle.test/src/org/eclipse/persistence/testing/tests/plsqlrecord/PLSQLrecordWithCompatibleTypeOutTestSet.java index bf96eb99bec..450e304ca74 100644 --- a/foundation/eclipselink.extension.oracle.test/src/org/eclipse/persistence/testing/tests/plsqlrecord/PLSQLrecordWithCompatibleTypeOutTestSet.java +++ b/foundation/eclipselink.extension.oracle.test/src/org/eclipse/persistence/testing/tests/plsqlrecord/PLSQLrecordWithCompatibleTypeOutTestSet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -10,7 +10,7 @@ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause */ -// Copyright (c) 2011, 2015 Oracle and/or its affiliates. All rights reserved. +// Copyright (c) 2011, 2023 Oracle and/or its affiliates. All rights reserved. package org.eclipse.persistence.testing.tests.plsqlrecord; @@ -269,7 +269,7 @@ public void runQuery() { assertTrue("incorrect ENAME" , result.name.equals("GOOFY")); assertTrue("incorrect JOB" , result.job.equals("ACTOR")); assertNull("MGR is supposed to be null", result.manager); - assertTrue("incorrect SAL" , result.salary.equals(new Float(6000))); + assertTrue("incorrect SAL" , result.salary.equals(Float.valueOf(6000))); assertNull("COMM is supposed to be null", result.commission); assertTrue("incorrect DEPTNO" , result.department.equals(new BigDecimal(20))); ((DatabaseSession)s).logout(); diff --git a/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/expressions/ExpressionOperator.java b/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/expressions/ExpressionOperator.java index ea6bb51beca..ee4730c3ccb 100644 --- a/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/expressions/ExpressionOperator.java +++ b/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/expressions/ExpressionOperator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2022 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2018, 2022 IBM Corporation. All rights reserved. * * This program and the accompanying materials are made available under the @@ -802,7 +802,7 @@ public void copyTo(ExpressionOperator operator) { operator.databaseStrings = databaseStrings == null ? null : Helper.copyStringArray(databaseStrings); operator.argumentIndices = argumentIndices == null ? null : Helper.copyIntArray(argumentIndices); operator.javaStrings = javaStrings == null ? null : Helper.copyStringArray(javaStrings); - operator.isBindingSupported = isBindingSupported == null ? null : new Boolean(isBindingSupported); + operator.isBindingSupported = isBindingSupported == null ? null : Boolean.valueOf(isBindingSupported); } /** diff --git a/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/databaseaccess/DatasourcePlatform.java b/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/databaseaccess/DatasourcePlatform.java index 82fb909beb4..e038039ae0c 100644 --- a/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/databaseaccess/DatasourcePlatform.java +++ b/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/databaseaccess/DatasourcePlatform.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2022 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2019, 2022 IBM Corporation. All rights reserved. * * This program and the accompanying materials are made available under the @@ -88,7 +88,7 @@ public class DatasourcePlatform implements Platform { protected String endDelimiter = null; /** Ensures that only one thread at a time can add/remove sequences */ - protected Object sequencesLock = new Boolean(true); + protected Object sequencesLock = Boolean.valueOf(true); /** If the native sequence type is not supported, if table sequencing should be used. */ protected boolean defaultNativeSequenceToTable; diff --git a/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/expressions/ExpressionJavaPrinter.java b/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/expressions/ExpressionJavaPrinter.java index 52d4264401d..0a9a9d394e7 100644 --- a/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/expressions/ExpressionJavaPrinter.java +++ b/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/expressions/ExpressionJavaPrinter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -157,13 +157,13 @@ public void printJava(Object object) { } public void printByte(Byte aByte) { - printString("new Byte((byte)"); + printString("Byte.valueOf((byte)"); printString((aByte).toString()); printString(")"); } public void printCharacter(Character aCharacter) { - printString("new Character('"); + printString("Character.valueOf('"); printString((aCharacter).toString()); printString("')"); } diff --git a/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/oxm/Context.java b/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/oxm/Context.java index 875a18197b8..50707eb712e 100644 --- a/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/oxm/Context.java +++ b/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/oxm/Context.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -631,8 +631,8 @@ private void setValueByXPath(Object object, CoreObjectBuilder objectBuilder, Str *

Set values in the object model based on the corresponding document. The following pairings are equivalent:

* * Set the Customer's ID - *
 context.setValueByXPath(customer, "@id", null, new Integer(123));
-     * customer.setId(new Integer(123));
+ *
 context.setValueByXPath(customer, "@id", null, Integer.valueOf(123));
+     * customer.setId(Integer.valueOf(123));
* * Set the Customer's Name *
 context.setValueByXPath(customer, "ns:personal-info/ns:name/text()", aNamespaceResolver, "Jane Doe");
diff --git a/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/oxm/XMLConversionManager.java b/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/oxm/XMLConversionManager.java
index ab2a3bcf3dc..70c70ec9bec 100644
--- a/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/oxm/XMLConversionManager.java
+++ b/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/oxm/XMLConversionManager.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2022 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved.
  *
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License v. 2.0 which is available at
@@ -607,9 +607,9 @@ protected Float convertObjectToFloat(Object sourceObject) throws ConversionExcep
            if(((String) sourceObject).length() == 0) {
                return 0f;
            } else if(Constants.POSITIVE_INFINITY.equals(sourceObject)){
-               return new Float(Float.POSITIVE_INFINITY);
+               return Float.valueOf(Float.POSITIVE_INFINITY);
            }else if(Constants.NEGATIVE_INFINITY.equals(sourceObject)){
-               return new Float(Float.NEGATIVE_INFINITY);
+               return Float.valueOf(Float.NEGATIVE_INFINITY);
            }
        }
        return super.convertObjectToFloat(sourceObject);
diff --git a/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/oxm/XMLContext.java b/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/oxm/XMLContext.java
index bc24f56dfd5..15b11af6b11 100644
--- a/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/oxm/XMLContext.java
+++ b/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/oxm/XMLContext.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved.
  *
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License v. 2.0 which is available at
@@ -569,8 +569,8 @@ public  T getValueByXPath(Object object, String xPath, NamespaceResolver name
      * 

Set values in the object model based on the corresponding XML document. The following pairings are equivalent:

* * Set the Customer's ID - *
 xmlContext.setValueByXPath(customer, "@id", null, new Integer(123));
-     * customer.setId(new Integer(123));
+ *
 xmlContext.setValueByXPath(customer, "@id", null, Integer.valueOf(123));
+     * customer.setId(Integer.valueOf(123));
* * Set the Customer's Name *
 xmlContext.setValueByXPath(customer, "ns:personal-info/ns:name/text()", aNamespaceResolver, "Jane Doe");
diff --git a/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/queries/ReadAllQuery.java b/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/queries/ReadAllQuery.java
index eb242ba1f2a..f40095d5995 100644
--- a/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/queries/ReadAllQuery.java
+++ b/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/queries/ReadAllQuery.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved.
  *
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License v. 2.0 which is available at
@@ -1145,7 +1145,7 @@ public void setContainerPolicy(ContainerPolicy containerPolicy) {
      * PUBLIC:
      * Set the Hierarchical Query Clause for the query
      * 

Example: - *

Expression startWith = builder.get("id").equal(new Integer(100)); //can be any expression which identifies a set of employees + *

Expression startWith = builder.get("id").equal(Integer.valueOf(100)); //can be any expression which identifies a set of employees *

Expression connectBy = builder.get("managedEmployees"); //indicated the relationship that the hierarchy is based on, must be self-referential *

Vector orderBy = new Vector(); *

orderBy.addElement(builder.get("startDate")); @@ -1168,7 +1168,7 @@ public void setHierarchicalQueryClause(Expression startWith, Expression connectB *

* Example: *

- * Expression startWith = builder.get("id").equal(new Integer(100)); //can + * Expression startWith = builder.get("id").equal(Integer.valueOf(100)); //can * be any expression which identifies a set of employees
* Expression connectBy = builder.get("managedEmployees"); //indicated the * relationship that the hierarchy is based on, must be self-referential
diff --git a/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/sessions/DatabaseLogin.java b/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/sessions/DatabaseLogin.java index f01e78e3155..c7e16229bde 100644 --- a/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/sessions/DatabaseLogin.java +++ b/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/sessions/DatabaseLogin.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -817,7 +817,7 @@ public void setQueryRetryAttemptCount(int queryRetryAttemptCount) { * PUBLIC: * The default value to substitute for database NULLs can be configured * on a per-class basis. - * Example: login.setDefaultNullValue(long.class, new Long(0)) + * Example: login.setDefaultNullValue(long.class, Long.valueOf(0)) */ public void setDefaultNullValue(Class type, Object value) { getPlatform().getConversionManager().setDefaultNullValue(type, value); diff --git a/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/sessions/DatasourceLogin.java b/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/sessions/DatasourceLogin.java index 3cf427d3b91..55ead58981b 100644 --- a/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/sessions/DatasourceLogin.java +++ b/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/sessions/DatasourceLogin.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -395,7 +395,7 @@ public void setConnector(Connector connector) { * PUBLIC: * The default value to substitute for database NULLs can be configured * on a per-class basis. - * Example: login.setDefaultNullValue(long.class, new Long(0)) + * Example: login.setDefaultNullValue(long.class, Long.valueOf(0)) */ public void setDefaultNullValue(Class type, Object value) { getDatasourcePlatform().getConversionManager().setDefaultNullValue(type, value); diff --git a/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/sessions/Project.java b/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/sessions/Project.java index 67e467cab8f..159b39b5504 100644 --- a/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/sessions/Project.java +++ b/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/sessions/Project.java @@ -193,7 +193,7 @@ public class Project extends CoreProject partitioningPolicies; /** Ensures that only one thread at a time can add/remove descriptors */ - protected Object descriptorsLock = new Boolean(true); + protected Object descriptorsLock = Boolean.valueOf(true); /** VPD connection settings */ protected String vpdIdentifier; diff --git a/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/sessions/factories/ProjectClassGenerator.java b/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/sessions/factories/ProjectClassGenerator.java index ef1de5f65ba..7b59fdbb4cf 100644 --- a/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/sessions/factories/ProjectClassGenerator.java +++ b/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/sessions/factories/ProjectClassGenerator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1998, 2019 IBM Corporation. All rights reserved. * * This program and the accompanying materials are made available under the @@ -1928,7 +1928,7 @@ protected String printString(Object value) { } if (value instanceof Character) { - return "new Character('" + value + "')"; + return "Character.valueOf('" + value + "')"; } //Bug2662265 diff --git a/foundation/org.eclipse.persistence.oracle/src/org/eclipse/persistence/tools/profiler/oracle/DMSPerformanceProfiler.java b/foundation/org.eclipse.persistence.oracle/src/org/eclipse/persistence/tools/profiler/oracle/DMSPerformanceProfiler.java index 5291b576b81..eaa81144206 100644 --- a/foundation/org.eclipse.persistence.oracle/src/org/eclipse/persistence/tools/profiler/oracle/DMSPerformanceProfiler.java +++ b/foundation/org.eclipse.persistence.oracle/src/org/eclipse/persistence/tools/profiler/oracle/DMSPerformanceProfiler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -210,7 +210,7 @@ public void startOperationProfile(String operationName) { } Sensor phaseEvent = getSensorByName(operationName); if (phaseEvent != null) { - Long startToken = new Long(((PhaseEvent)phaseEvent).start()); + Long startToken = Long.valueOf(((PhaseEvent)phaseEvent).start()); getPhaseEventStartToken().put(operationName, startToken); } } @@ -231,7 +231,7 @@ public void startOperationProfile(String operationName, DatabaseQuery query, int Sensor phaseEvent = getPhaseEventForQuery(operationName, query, weight); if (phaseEvent != null) { - Long startToken = new Long(((PhaseEvent)phaseEvent).start()); + Long startToken = Long.valueOf(((PhaseEvent)phaseEvent).start()); if (query != null) { getPhaseEventStartToken().put(query.getSensorName(operationName, getSessionName()), startToken); } else { diff --git a/jpa/eclipselink.jpa.test.jse/src/org/eclipse/persistence/jpa/collection/model/NodeHolder.java b/jpa/eclipselink.jpa.test.jse/src/org/eclipse/persistence/jpa/collection/model/NodeHolder.java index e599c427874..556e6d0d22f 100644 --- a/jpa/eclipselink.jpa.test.jse/src/org/eclipse/persistence/jpa/collection/model/NodeHolder.java +++ b/jpa/eclipselink.jpa.test.jse/src/org/eclipse/persistence/jpa/collection/model/NodeHolder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -53,7 +53,7 @@ public void addNodes(int id) { } public void removeNodes(int id) { - nodes.remove(new Integer(id)); + nodes.remove(Integer.valueOf(id)); } public int getId() { diff --git a/jpa/eclipselink.jpa.test.jse/src/org/eclipse/persistence/jpa/compositeid/TestCompositeId.java b/jpa/eclipselink.jpa.test.jse/src/org/eclipse/persistence/jpa/compositeid/TestCompositeId.java index 3aeb8df0df0..2311c798ca9 100644 --- a/jpa/eclipselink.jpa.test.jse/src/org/eclipse/persistence/jpa/compositeid/TestCompositeId.java +++ b/jpa/eclipselink.jpa.test.jse/src/org/eclipse/persistence/jpa/compositeid/TestCompositeId.java @@ -92,11 +92,11 @@ public void testCompositeId() throws Exception { assertNotNull(compBFind.getId()); assertNotNull(compBFind.getId().getCompAId()); assertEquals(compBFind.getId().getCompAId().getEnvironment().getValue(), "1"); - assertEquals(compBFind.getId().getCompAId().getIdentifier().getValue(), new Integer(1)); + assertEquals(compBFind.getId().getCompAId().getIdentifier().getValue(), Integer.valueOf(1)); assertNotNull(compBFind.getId().getClientId()); assertEquals(compBFind.getId().getClientId().getValue(), "1"); assertNotNull(compBFind.getId().getRN()); - assertEquals(compBFind.getId().getRN().getValue(), new Integer(1)); + assertEquals(compBFind.getId().getRN().getValue(), Integer.valueOf(1)); CompC compC = new CompC(); CompCId compCId = new CompCId(); @@ -118,7 +118,7 @@ public void testCompositeId() throws Exception { assertNotSame(compC, compCFind); assertNotNull(compC.getId()); assertNotNull(compC.getId().getBTI()); - assertEquals(compC.getId().getBTI().getValue(), new Integer(3)); + assertEquals(compC.getId().getBTI().getValue(), Integer.valueOf(3)); assertNotNull(compC.getId().getCompBIdId()); assertEquals(compC.getId().getUserId().getValue(), "4"); assertNotNull(compC.getId().getUserId()); @@ -127,11 +127,11 @@ public void testCompositeId() throws Exception { assertNotNull(compBU2); assertNotNull(compBU2.getCompAId()); assertEquals(compBU2.getCompAId().getEnvironment().getValue(), "1"); - assertEquals(compBU2.getCompAId().getIdentifier().getValue(), new Integer(1)); + assertEquals(compBU2.getCompAId().getIdentifier().getValue(), Integer.valueOf(1)); assertNotNull(compBU2.getClientId()); assertEquals(compBU2.getClientId().getValue(), "1"); assertNotNull(compBU2.getRN()); - assertEquals(compBU2.getRN().getValue(), new Integer(1)); + assertEquals(compBU2.getRN().getValue(), Integer.valueOf(1)); } finally { if (em != null) { if (transaction.isActive()) diff --git a/jpa/eclipselink.jpa.test.jse/src/org/eclipse/persistence/jpa/converter/TestAutoApplyConverter.java b/jpa/eclipselink.jpa.test.jse/src/org/eclipse/persistence/jpa/converter/TestAutoApplyConverter.java index cbbe02e24b5..080e45c6151 100644 --- a/jpa/eclipselink.jpa.test.jse/src/org/eclipse/persistence/jpa/converter/TestAutoApplyConverter.java +++ b/jpa/eclipselink.jpa.test.jse/src/org/eclipse/persistence/jpa/converter/TestAutoApplyConverter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2023 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2016 IBM Corporation. All rights reserved. * * This program and the accompanying materials are made available under the @@ -82,14 +82,14 @@ public void persistTestBooleanPrimitive() { em.getTransaction().commit(); Assert.assertTrue(BooleanToStringAutoApplyConverter.convertToDatabaseTriggered); - Assert.assertEquals(new Boolean(valueConvert), BooleanToStringAutoApplyConverter.ctdcVal); + Assert.assertEquals(Boolean.valueOf(valueConvert), BooleanToStringAutoApplyConverter.ctdcVal); BooleanToStringAutoApplyConverter.reset(); em.clear(); ConvertEntityB2S findEntity = em.find(ConvertEntityB2S.class, id); Assert.assertTrue(BooleanToStringAutoApplyConverter.convertToEntityTriggered); - Assert.assertEquals(new Boolean(valueConvert).toString(), BooleanToStringAutoApplyConverter.cteaVal); + Assert.assertEquals(Boolean.valueOf(valueConvert).toString(), BooleanToStringAutoApplyConverter.cteaVal); Assert.assertNotNull(findEntity); Assert.assertNotNull(findEntity.getValueConvert()); Assert.assertNotNull(findEntity.getValueNoConvert()); @@ -158,14 +158,14 @@ public void persistTestBytePrimitive() { em.getTransaction().commit(); Assert.assertTrue(ByteToStringAutoApplyConverter.convertToDatabaseTriggered); - Assert.assertEquals(new Byte(valueConvert), ByteToStringAutoApplyConverter.ctdcVal); + Assert.assertEquals(Byte.valueOf(valueConvert), ByteToStringAutoApplyConverter.ctdcVal); ByteToStringAutoApplyConverter.reset(); em.clear(); ConvertEntityBy2S findEntity = em.find(ConvertEntityBy2S.class, id); Assert.assertTrue(ByteToStringAutoApplyConverter.convertToEntityTriggered); - Assert.assertEquals(new Byte(valueConvert).toString(), ByteToStringAutoApplyConverter.cteaVal); + Assert.assertEquals(Byte.valueOf(valueConvert).toString(), ByteToStringAutoApplyConverter.cteaVal); Assert.assertNotNull(findEntity); Assert.assertNotNull(findEntity.getValueConvert()); Assert.assertNotNull(findEntity.getValueNoConvert()); @@ -185,8 +185,8 @@ public void persistTestByteWrapper() { EntityManager em = emfAutoApplyConverters.createEntityManager(); long id = System.currentTimeMillis(); - Byte valueConvert = new Byte((byte) 10); - Byte valueNoConvert = new Byte((byte) 14); + Byte valueConvert = Byte.valueOf((byte) 10); + Byte valueNoConvert = Byte.valueOf((byte) 14); try { ByteToStringAutoApplyConverter.reset(); ConvertEntityByW2S entity = new ConvertEntityByW2S(id, valueConvert, valueNoConvert); @@ -234,14 +234,14 @@ public void persistTestCharPrimitive() { em.getTransaction().commit(); Assert.assertTrue(CharToStringAutoApplyConverter.convertToDatabaseTriggered); - Assert.assertEquals(new Character(valueConvert), CharToStringAutoApplyConverter.ctdcVal); + Assert.assertEquals(Character.valueOf(valueConvert), CharToStringAutoApplyConverter.ctdcVal); CharToStringAutoApplyConverter.reset(); em.clear(); ConvertEntityC2S findEntity = em.find(ConvertEntityC2S.class, id); Assert.assertTrue(CharToStringAutoApplyConverter.convertToEntityTriggered); - Assert.assertEquals(new Character(valueConvert).toString(), CharToStringAutoApplyConverter.cteaVal); + Assert.assertEquals(Character.valueOf(valueConvert).toString(), CharToStringAutoApplyConverter.cteaVal); Assert.assertNotNull(findEntity); Assert.assertNotNull(findEntity.getValueConvert()); Assert.assertNotNull(findEntity.getValueNoConvert()); @@ -261,8 +261,8 @@ public void persistTestCharWrapper() { EntityManager em = emfAutoApplyConverters.createEntityManager(); long id = System.currentTimeMillis(); - Character valueConvert = new Character('A'); - Character valueNoConvert = new Character('z'); + Character valueConvert = Character.valueOf('A'); + Character valueNoConvert = Character.valueOf('z'); try { CharToStringAutoApplyConverter.reset(); ConvertEntityCW2S entity = new ConvertEntityCW2S(id, valueConvert, valueNoConvert); @@ -310,14 +310,14 @@ public void persistTestDoublePrimitive() { em.getTransaction().commit(); Assert.assertTrue(DoubleToStringAutoApplyConverter.convertToDatabaseTriggered); - Assert.assertEquals(new Double(valueConvert), DoubleToStringAutoApplyConverter.ctdcVal); + Assert.assertEquals(Double.valueOf(valueConvert), DoubleToStringAutoApplyConverter.ctdcVal); DoubleToStringAutoApplyConverter.reset(); em.clear(); ConvertEntityD2S findEntity = em.find(ConvertEntityD2S.class, id); Assert.assertTrue(DoubleToStringAutoApplyConverter.convertToEntityTriggered); - Assert.assertEquals(new Double(valueConvert).toString(), DoubleToStringAutoApplyConverter.cteaVal); + Assert.assertEquals(Double.valueOf(valueConvert).toString(), DoubleToStringAutoApplyConverter.cteaVal); Assert.assertNotNull(findEntity); Assert.assertNotNull(findEntity.getValueConvert()); Assert.assertNotNull(findEntity.getValueNoConvert()); @@ -337,8 +337,8 @@ public void persistTestDoubleWrapper() { EntityManager em = emfAutoApplyConverters.createEntityManager(); long id = System.currentTimeMillis(); - Double valueConvert = new Double(42.0); - Double valueNoConvert = new Double(100.0); + Double valueConvert = Double.valueOf(42.0); + Double valueNoConvert = Double.valueOf(100.0); try { DoubleToStringAutoApplyConverter.reset(); ConvertEntityDW2S entity = new ConvertEntityDW2S(id, valueConvert, valueNoConvert); @@ -386,14 +386,14 @@ public void persistTestFloatPrimitive() { em.getTransaction().commit(); Assert.assertTrue(FloatToStringAutoApplyConverter.convertToDatabaseTriggered); - Assert.assertEquals(new Float(valueConvert), FloatToStringAutoApplyConverter.ctdcVal); + Assert.assertEquals(Float.valueOf(valueConvert), FloatToStringAutoApplyConverter.ctdcVal); FloatToStringAutoApplyConverter.reset(); em.clear(); ConvertEntityF2S findEntity = em.find(ConvertEntityF2S.class, id); Assert.assertTrue(FloatToStringAutoApplyConverter.convertToEntityTriggered); - Assert.assertEquals(new Float(valueConvert).toString(), FloatToStringAutoApplyConverter.cteaVal); + Assert.assertEquals(Float.valueOf(valueConvert).toString(), FloatToStringAutoApplyConverter.cteaVal); Assert.assertNotNull(findEntity); Assert.assertNotNull(findEntity.getValueConvert()); Assert.assertNotNull(findEntity.getValueNoConvert()); @@ -413,8 +413,8 @@ public void persistTestFloatWrapper() { EntityManager em = emfAutoApplyConverters.createEntityManager(); long id = System.currentTimeMillis(); - Float valueConvert = new Float(42.0f); - Float valueNoConvert = new Float(100.0f); + Float valueConvert = Float.valueOf(42.0f); + Float valueNoConvert = Float.valueOf(100.0f); try { FloatToStringAutoApplyConverter.reset(); ConvertEntityFW2S entity = new ConvertEntityFW2S(id, valueConvert, valueNoConvert); @@ -462,14 +462,14 @@ public void persistTestIntegerPrimitive() { em.getTransaction().commit(); Assert.assertTrue(IntToStringAutoApplyConverter.convertToDatabaseTriggered); - Assert.assertEquals(new Integer(valueConvert), IntToStringAutoApplyConverter.ctdcVal); + Assert.assertEquals(Integer.valueOf(valueConvert), IntToStringAutoApplyConverter.ctdcVal); IntToStringAutoApplyConverter.reset(); em.clear(); ConvertEntityI2S findEntity = em.find(ConvertEntityI2S.class, id); Assert.assertTrue(IntToStringAutoApplyConverter.convertToEntityTriggered); - Assert.assertEquals(new Integer(valueConvert).toString(), IntToStringAutoApplyConverter.cteaVal); + Assert.assertEquals(Integer.valueOf(valueConvert).toString(), IntToStringAutoApplyConverter.cteaVal); Assert.assertNotNull(findEntity); Assert.assertNotNull(findEntity.getValueConvert()); Assert.assertNotNull(findEntity.getValueNoConvert()); @@ -489,8 +489,8 @@ public void persistTestIntegerWrapper() { EntityManager em = emfAutoApplyConverters.createEntityManager(); long id = System.currentTimeMillis(); - Integer valueConvert = new Integer(42); - Integer valueNoConvert = new Integer(100); + Integer valueConvert = Integer.valueOf(42); + Integer valueNoConvert = Integer.valueOf(100); try { IntToStringAutoApplyConverter.reset(); ConvertEntityIW2S entity = new ConvertEntityIW2S(id, valueConvert, valueNoConvert); @@ -538,14 +538,14 @@ public void persistTestLongPrimitive() { em.getTransaction().commit(); Assert.assertTrue(LongToStringAutoApplyConverter.convertToDatabaseTriggered); - Assert.assertEquals(new Long(valueConvert), LongToStringAutoApplyConverter.ctdcVal); + Assert.assertEquals(Long.valueOf(valueConvert), LongToStringAutoApplyConverter.ctdcVal); LongToStringAutoApplyConverter.reset(); em.clear(); ConvertEntityL2S findEntity = em.find(ConvertEntityL2S.class, id); Assert.assertTrue(LongToStringAutoApplyConverter.convertToEntityTriggered); - Assert.assertEquals(new Long(valueConvert).toString(), LongToStringAutoApplyConverter.cteaVal); + Assert.assertEquals(Long.valueOf(valueConvert).toString(), LongToStringAutoApplyConverter.cteaVal); Assert.assertNotNull(findEntity); Assert.assertNotNull(findEntity.getValueConvert()); Assert.assertNotNull(findEntity.getValueNoConvert()); @@ -565,8 +565,8 @@ public void persistTestLongWrapper() { EntityManager em = emfAutoApplyConverters.createEntityManager(); long id = System.currentTimeMillis(); - Long valueConvert = new Long((long) 42); - Long valueNoConvert = new Long((long) 100); + Long valueConvert = Long.valueOf((long) 42); + Long valueNoConvert = Long.valueOf((long) 100); try { LongToStringAutoApplyConverter.reset(); ConvertEntityLW2S entity = new ConvertEntityLW2S(id, valueConvert, valueNoConvert); @@ -614,14 +614,14 @@ public void persistTestShortPrimitive() { em.getTransaction().commit(); Assert.assertTrue(ShortToStringAutoApplyConverter.convertToDatabaseTriggered); - Assert.assertEquals(new Short(valueConvert), ShortToStringAutoApplyConverter.ctdcVal); + Assert.assertEquals(Short.valueOf(valueConvert), ShortToStringAutoApplyConverter.ctdcVal); ShortToStringAutoApplyConverter.reset(); em.clear(); ConvertEntitySh2S findEntity = em.find(ConvertEntitySh2S.class, id); Assert.assertTrue(ShortToStringAutoApplyConverter.convertToEntityTriggered); - Assert.assertEquals(new Short(valueConvert).toString(), ShortToStringAutoApplyConverter.cteaVal); + Assert.assertEquals(Short.valueOf(valueConvert).toString(), ShortToStringAutoApplyConverter.cteaVal); Assert.assertNotNull(findEntity); Assert.assertNotNull(findEntity.getValueConvert()); Assert.assertNotNull(findEntity.getValueNoConvert()); @@ -641,8 +641,8 @@ public void persistTestShortWrapper() { EntityManager em = emfAutoApplyConverters.createEntityManager(); long id = System.currentTimeMillis(); - Short valueConvert = new Short((short) 42); - Short valueNoConvert = new Short((short) 100); + Short valueConvert = Short.valueOf((short) 42); + Short valueNoConvert = Short.valueOf((short) 100); try { ShortToStringAutoApplyConverter.reset(); ConvertEntityShW2S entity = new ConvertEntityShW2S(id, valueConvert, valueNoConvert); diff --git a/jpa/eclipselink.jpa.test.jse/src/org/eclipse/persistence/jpa/test/basic/TestBasicPersistence.java b/jpa/eclipselink.jpa.test.jse/src/org/eclipse/persistence/jpa/test/basic/TestBasicPersistence.java index ae11b29e6bc..c93ae22a42c 100644 --- a/jpa/eclipselink.jpa.test.jse/src/org/eclipse/persistence/jpa/test/basic/TestBasicPersistence.java +++ b/jpa/eclipselink.jpa.test.jse/src/org/eclipse/persistence/jpa/test/basic/TestBasicPersistence.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2014, 2017 IBM Corporation. All rights reserved. * * This program and the accompanying materials are made available under the @@ -89,7 +89,7 @@ public class TestBasicPersistence { String rmiPortProp = System.getProperty("rmi.port"); if (!(rmiPortProp == null || rmiPortProp.isEmpty())) { try { - rmiPortVal = new Integer(rmiPortProp); + rmiPortVal = Integer.valueOf(rmiPortProp); } catch (NumberFormatException nfe) { // Use default value. } diff --git a/jpa/eclipselink.jpa.test.jse/src/org/eclipse/persistence/jpa/test/jpql/TestAggregateFunctions.java b/jpa/eclipselink.jpa.test.jse/src/org/eclipse/persistence/jpa/test/jpql/TestAggregateFunctions.java index 0e3985d4d5a..94cd630203a 100644 --- a/jpa/eclipselink.jpa.test.jse/src/org/eclipse/persistence/jpa/test/jpql/TestAggregateFunctions.java +++ b/jpa/eclipselink.jpa.test.jse/src/org/eclipse/persistence/jpa/test/jpql/TestAggregateFunctions.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2019 IBM Corporation. All rights reserved. * * This program and the accompanying materials are made available under the @@ -78,7 +78,7 @@ public void testEmptyAggregateFunctionsWithPrimitives() { q = em.createQuery("SELECT COUNT(n.primitive) FROM NoResultEntity n"); res = q.getSingleResult(); - Assert.assertEquals("Result of COUNT aggregate should have been a Long", new Long(0), res); + Assert.assertEquals("Result of COUNT aggregate should have been a Long", Long.valueOf(0), res); } finally { if (em.getTransaction().isActive()) { em.getTransaction().rollback(); @@ -114,7 +114,7 @@ public void testEmptyAggregateFunctionsWithPrimitives() { q = em.createQuery("SELECT COUNT(n.primitive) FROM NoResultEntity n"); res = q.getSingleResult(); - Assert.assertEquals("Result of COUNT aggregate should have been a Long", new Long(0), res); + Assert.assertEquals("Result of COUNT aggregate should have been a Long", Long.valueOf(0), res); } finally { if (em.getTransaction().isActive()) { em.getTransaction().rollback(); @@ -159,7 +159,7 @@ public void testEmptyAggregateFunctionsWithWrappers() { q = em.createQuery("SELECT COUNT(n.wrapper) FROM NoResultEntity n"); res = q.getSingleResult(); - Assert.assertEquals("Result of COUNT aggregate should have been a Long", new Long(0), res); + Assert.assertEquals("Result of COUNT aggregate should have been a Long", Long.valueOf(0), res); } finally { if (em.getTransaction().isActive()) { em.getTransaction().rollback(); @@ -201,23 +201,23 @@ public void testAggregateFunctionsWithPrimitives() { Query q = em.createQuery("SELECT MIN(se.itemInteger2) FROM SimpleEntity se"); Object res = q.getSingleResult(); - Assert.assertEquals("Result of MIN aggregate should have been NULL", new Integer(0), res); + Assert.assertEquals("Result of MIN aggregate should have been NULL", Integer.valueOf(0), res); Query q2 = em.createQuery("SELECT MAX(se.itemInteger2) FROM SimpleEntity se"); Object res2 = q2.getSingleResult(); - Assert.assertEquals("Result of MAX aggregate should have been NULL", new Integer(0), res2); + Assert.assertEquals("Result of MAX aggregate should have been NULL", Integer.valueOf(0), res2); Query q3 = em.createQuery("SELECT AVG(se.itemInteger2) FROM SimpleEntity se"); Object res3 = q3.getSingleResult(); - Assert.assertEquals("Result of AVG aggregate should have been NULL", new Double(0), res3); + Assert.assertEquals("Result of AVG aggregate should have been NULL", Double.valueOf(0), res3); Query q4 = em.createQuery("SELECT SUM(se.itemInteger2) FROM SimpleEntity se"); Object res4 = q4.getSingleResult(); - Assert.assertEquals("Result of SUM aggregate should have been NULL", new Long(0), res4); + Assert.assertEquals("Result of SUM aggregate should have been NULL", Long.valueOf(0), res4); Query q5 = em.createQuery("SELECT COUNT(se.itemInteger2) FROM SimpleEntity se"); Object res5 = q5.getSingleResult(); - Assert.assertEquals("Result of COUNT aggregate should have been a Long", new Long(2), res5); + Assert.assertEquals("Result of COUNT aggregate should have been a Long", Long.valueOf(2), res5); } finally { if (em.getTransaction().isActive()) { em.getTransaction().rollback(); @@ -246,12 +246,12 @@ public void testAggregateFunctionsWithWrappers() { SimpleEntity se = new SimpleEntity(); se.setKeyString("SimpleEntity1"); - se.setItemInteger1(new Integer(0)); + se.setItemInteger1(Integer.valueOf(0)); entities.add(se); SimpleEntity se2 = new SimpleEntity(); se2.setKeyString("SimpleEntity2"); - se2.setItemInteger1(new Integer(0)); + se2.setItemInteger1(Integer.valueOf(0)); entities.add(se2); EntityManager em = resultEmf.createEntityManager(); @@ -265,23 +265,23 @@ public void testAggregateFunctionsWithWrappers() { Query q = em.createQuery("SELECT MIN(se.itemInteger1) FROM SimpleEntity se"); Object res = q.getSingleResult(); - Assert.assertEquals("Result of MIN aggregate should have been NULL", new Integer(0), res); + Assert.assertEquals("Result of MIN aggregate should have been NULL", Integer.valueOf(0), res); Query q2 = em.createQuery("SELECT MAX(se.itemInteger1) FROM SimpleEntity se"); Object res2 = q2.getSingleResult(); - Assert.assertEquals("Result of MAX aggregate should have been NULL", new Integer(0), res2); + Assert.assertEquals("Result of MAX aggregate should have been NULL", Integer.valueOf(0), res2); Query q3 = em.createQuery("SELECT AVG(se.itemInteger1) FROM SimpleEntity se"); Object res3 = q3.getSingleResult(); - Assert.assertEquals("Result of AVG aggregate should have been NULL", new Double(0), res3); + Assert.assertEquals("Result of AVG aggregate should have been NULL", Double.valueOf(0), res3); Query q4 = em.createQuery("SELECT SUM(se.itemInteger1) FROM SimpleEntity se"); Object res4 = q4.getSingleResult(); - Assert.assertEquals("Result of SUM aggregate should have been NULL", new Long(0), res4); + Assert.assertEquals("Result of SUM aggregate should have been NULL", Long.valueOf(0), res4); Query q5 = em.createQuery("SELECT COUNT(se.itemInteger1) FROM SimpleEntity se"); Object res5 = q5.getSingleResult(); - Assert.assertEquals("Result of COUNT aggregate should have been a Long", new Long(2), res5); + Assert.assertEquals("Result of COUNT aggregate should have been a Long", Long.valueOf(2), res5); } finally { if (em.getTransaction().isActive()) { em.getTransaction().rollback(); diff --git a/jpa/eclipselink.jpa.test.jse/src/org/eclipse/persistence/jpa/test/mapping/TestAttributeOverride.java b/jpa/eclipselink.jpa.test.jse/src/org/eclipse/persistence/jpa/test/mapping/TestAttributeOverride.java index eb5f3ecdeaf..86d80f55688 100644 --- a/jpa/eclipselink.jpa.test.jse/src/org/eclipse/persistence/jpa/test/mapping/TestAttributeOverride.java +++ b/jpa/eclipselink.jpa.test.jse/src/org/eclipse/persistence/jpa/test/mapping/TestAttributeOverride.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2020 IBM Corporation. All rights reserved. * * This program and the accompanying materials are made available under the @@ -135,7 +135,7 @@ public void testOverrideLowerCaseElementCollectionObjectMapping() { em = emf.createEntityManager(); try { - Integer id = new Integer(41); + Integer id = Integer.valueOf(41); OverrideEmbeddableB emb1 = new OverrideEmbeddableB(43, 44, new OverrideNestedEmbeddableB(45, 46)); OverrideEmbeddableB emb2 = new OverrideEmbeddableB(47, 48, new OverrideNestedEmbeddableB(49, 50)); diff --git a/jpa/eclipselink.jpa.test.jse/src/org/eclipse/persistence/jpa/test/property/TestConvertResultToBoolean.java b/jpa/eclipselink.jpa.test.jse/src/org/eclipse/persistence/jpa/test/property/TestConvertResultToBoolean.java index 5f5ad158f75..abc010b085a 100644 --- a/jpa/eclipselink.jpa.test.jse/src/org/eclipse/persistence/jpa/test/property/TestConvertResultToBoolean.java +++ b/jpa/eclipselink.jpa.test.jse/src/org/eclipse/persistence/jpa/test/property/TestConvertResultToBoolean.java @@ -72,14 +72,14 @@ public void testCASE_DisableConvertResultToBoolean() { DatabasePlatform platform = getPlatform(emf); if(platform.isDB2() || platform.isDerby()) { - assertEquals(new Integer(1), intList.get(0)); - assertEquals(new Integer(0), intList.get(1)); + assertEquals(Integer.valueOf(1), intList.get(0)); + assertEquals(Integer.valueOf(0), intList.get(1)); } else if(platform.isOracle()) { assertEquals(new java.math.BigDecimal(1), intList.get(0)); assertEquals(new java.math.BigDecimal(0), intList.get(1)); } else { - assertEquals(new Long(1), intList.get(0)); - assertEquals(new Long(0), intList.get(1)); + assertEquals(Long.valueOf(1), intList.get(0)); + assertEquals(Long.valueOf(0), intList.get(1)); } } finally { if (em.getTransaction().isActive()) { diff --git a/jpa/eclipselink.jpa.test.jse/src/org/eclipse/persistence/jpa/test/property/TestParameterBinding.java b/jpa/eclipselink.jpa.test.jse/src/org/eclipse/persistence/jpa/test/property/TestParameterBinding.java index a4721b46565..14e49d0a356 100644 --- a/jpa/eclipselink.jpa.test.jse/src/org/eclipse/persistence/jpa/test/property/TestParameterBinding.java +++ b/jpa/eclipselink.jpa.test.jse/src/org/eclipse/persistence/jpa/test/property/TestParameterBinding.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2019 IBM Corporation. All rights reserved. * * This program and the accompanying materials are made available under the @@ -122,9 +122,9 @@ public void testCOALESCE_ForceBindJPQLParameters() { //3: Test COALESCE function with all arguments as parameters TypedQuery query = em.createQuery("SELECT 1 FROM GenericEntity s " + "WHERE ABS(COALESCE(?1, ?2)) >= ?3", GenericEntity.class); - query.setParameter(1, new Integer(1)); - query.setParameter(2, new Integer(20)); - query.setParameter(3, new Integer(300)); + query.setParameter(1, Integer.valueOf(1)); + query.setParameter(2, Integer.valueOf(20)); + query.setParameter(3, Integer.valueOf(300)); query.getResultList(); DatabaseCall call = ((JpaQuery)query).getDatabaseQuery().getCall(); diff --git a/jpa/eclipselink.jpa.test.jse/src/org/eclipse/persistence/jpa/test/query/TestQueryCase.java b/jpa/eclipselink.jpa.test.jse/src/org/eclipse/persistence/jpa/test/query/TestQueryCase.java index 6d9fdea94c3..2bfd7a924dd 100644 --- a/jpa/eclipselink.jpa.test.jse/src/org/eclipse/persistence/jpa/test/query/TestQueryCase.java +++ b/jpa/eclipselink.jpa.test.jse/src/org/eclipse/persistence/jpa/test/query/TestQueryCase.java @@ -88,7 +88,7 @@ public void testQuery_JPQL_Case_Literals_1() { assertEquals("B", dto01.get(0).getItemString2()); assertEquals("C", dto01.get(0).getItemString3()); assertEquals("D", dto01.get(0).getItemString4()); - assertEquals(new Integer(1), dto01.get(0).getItemInteger1()); + assertEquals(Integer.valueOf(1), dto01.get(0).getItemInteger1()); } finally { if (em.getTransaction().isActive()) { em.getTransaction().rollback(); @@ -147,7 +147,7 @@ public void testQuery_Criteria_Case_Literals_1() { assertEquals("B", dto01.get(0).getItemString2()); assertEquals("C", dto01.get(0).getItemString3()); assertEquals("D", dto01.get(0).getItemString4()); - assertEquals(new Integer(1), dto01.get(0).getItemInteger1()); + assertEquals(Integer.valueOf(1), dto01.get(0).getItemInteger1()); } finally { if (em.getTransaction().isActive()) { em.getTransaction().rollback(); @@ -211,7 +211,7 @@ public void testQuery_JPQL_Case_Parameters_1() { assertEquals("B", dto01.get(0).getItemString2()); assertEquals("C", dto01.get(0).getItemString3()); assertEquals("D", dto01.get(0).getItemString4()); - assertEquals(new Integer(1), dto01.get(0).getItemInteger1()); + assertEquals(Integer.valueOf(1), dto01.get(0).getItemInteger1()); } finally { if (em.getTransaction().isActive()) { em.getTransaction().rollback(); @@ -303,7 +303,7 @@ public void testQuery_Criteria_Case_Parameters_1() { assertEquals("B", dto01.get(0).getItemString2()); assertEquals("C", dto01.get(0).getItemString3()); assertEquals("D", dto01.get(0).getItemString4()); - assertEquals(new Integer(1), dto01.get(0).getItemInteger1()); + assertEquals(Integer.valueOf(1), dto01.get(0).getItemInteger1()); } finally { if (em.getTransaction().isActive()) { em.getTransaction().rollback(); @@ -356,7 +356,7 @@ public void testQuery_JPQL_Case_Literals_2() { assertEquals("B", dto01.get(0).getItemString2()); assertEquals("C", dto01.get(0).getItemString3()); assertEquals("D", dto01.get(0).getItemString4()); - assertEquals(new Integer(1), dto01.get(0).getItemInteger1()); + assertEquals(Integer.valueOf(1), dto01.get(0).getItemInteger1()); } finally { if (em.getTransaction().isActive()) { em.getTransaction().rollback(); @@ -417,7 +417,7 @@ public void testQuery_Criteria_Case_Literals_2() { assertEquals("B", dto01.get(0).getItemString2()); assertEquals("C", dto01.get(0).getItemString3()); assertEquals("D", dto01.get(0).getItemString4()); - assertEquals(new Integer(1), dto01.get(0).getItemInteger1()); + assertEquals(Integer.valueOf(1), dto01.get(0).getItemInteger1()); } finally { if (em.getTransaction().isActive()) { em.getTransaction().rollback(); @@ -480,7 +480,7 @@ public void testQuery_JPQL_Case_Parameters_2() { assertEquals("B", dto01.get(0).getItemString2()); assertEquals("C", dto01.get(0).getItemString3()); assertEquals("D", dto01.get(0).getItemString4()); - assertEquals(new Integer(1), dto01.get(0).getItemInteger1()); + assertEquals(Integer.valueOf(1), dto01.get(0).getItemInteger1()); } finally { if (em.getTransaction().isActive()) { em.getTransaction().rollback(); @@ -561,7 +561,7 @@ public void testQuery_Criteria_Case_Parameters_2() { assertEquals("B", dto01.get(0).getItemString2()); assertEquals("C", dto01.get(0).getItemString3()); assertEquals("D", dto01.get(0).getItemString4()); - assertEquals(new Integer(1), dto01.get(0).getItemInteger1()); + assertEquals(Integer.valueOf(1), dto01.get(0).getItemInteger1()); } finally { if (em.getTransaction().isActive()) { em.getTransaction().rollback(); @@ -614,8 +614,8 @@ public void testQuery_JPQL_Case_Literals_3() { assertEquals("Other", dto01.get(0).getStr2()); assertNull(dto01.get(0).getStr3()); assertNull(dto01.get(0).getStr4()); - assertEquals(new Integer(2), dto01.get(0).getInteger1()); - assertEquals(new Integer(2), dto01.get(0).getInteger2()); + assertEquals(Integer.valueOf(2), dto01.get(0).getInteger1()); + assertEquals(Integer.valueOf(2), dto01.get(0).getInteger2()); } finally { if (em.getTransaction().isActive()) { em.getTransaction().rollback(); @@ -648,12 +648,12 @@ public void testQuery_Criteria_Case_Literals_3() { .otherwise("Other"); Expression selectCase2 = cb.selectCase() - .when(cb.equal(root.get(EntityTbl01_.itemString3), "C"), new Long(1)) - .otherwise(new Long(0)); + .when(cb.equal(root.get(EntityTbl01_.itemString3), "C"), Long.valueOf(1)) + .otherwise(Long.valueOf(0)); Expression selectCase3 = cb.selectCase() - .when(cb.equal(root.get(EntityTbl01_.itemString4), "D"), new Long(1)) - .otherwise(new Long(0)); + .when(cb.equal(root.get(EntityTbl01_.itemString4), "D"), Long.valueOf(1)) + .otherwise(Long.valueOf(0)); cquery.select(cb.construct(Dto01.class, root.get(EntityTbl01_.itemString1), @@ -672,8 +672,8 @@ public void testQuery_Criteria_Case_Literals_3() { assertEquals("Other", dto01.get(0).getStr2()); assertNull(dto01.get(0).getStr3()); assertNull(dto01.get(0).getStr4()); - assertEquals(new Integer(2), dto01.get(0).getInteger1()); - assertEquals(new Integer(2), dto01.get(0).getInteger2()); + assertEquals(Integer.valueOf(2), dto01.get(0).getInteger1()); + assertEquals(Integer.valueOf(2), dto01.get(0).getInteger2()); } finally { if (em.getTransaction().isActive()) { em.getTransaction().rollback(); @@ -737,8 +737,8 @@ public void testQuery_JPQL_Case_Parameters_3() { assertEquals("Other", dto01.get(0).getStr2()); assertNull(dto01.get(0).getStr3()); assertNull(dto01.get(0).getStr4()); - assertEquals(new Integer(2), dto01.get(0).getInteger1()); - assertEquals(new Integer(2), dto01.get(0).getInteger2()); + assertEquals(Integer.valueOf(2), dto01.get(0).getInteger1()); + assertEquals(Integer.valueOf(2), dto01.get(0).getInteger2()); } finally { if (em.getTransaction().isActive()) { em.getTransaction().rollback(); @@ -802,8 +802,8 @@ public void testQuery_Criteria_Case_Parameters_3() { query.setParameter(resultParam2, "Other"); query.setParameter(checkParam2, "C"); query.setParameter(checkParam3, "D"); - query.setParameter(resultParam3, new Long(1)); - query.setParameter(resultParam4, new Long(1)); + query.setParameter(resultParam3, Long.valueOf(1)); + query.setParameter(resultParam4, Long.valueOf(1)); List dto01 = query.getResultList(); assertNotNull(dto01); @@ -812,8 +812,8 @@ public void testQuery_Criteria_Case_Parameters_3() { assertEquals("Other", dto01.get(0).getStr2()); assertNull(dto01.get(0).getStr3()); assertNull(dto01.get(0).getStr4()); - assertEquals(new Integer(2), dto01.get(0).getInteger1()); - assertEquals(new Integer(2), dto01.get(0).getInteger2()); + assertEquals(Integer.valueOf(2), dto01.get(0).getInteger1()); + assertEquals(Integer.valueOf(2), dto01.get(0).getInteger2()); } finally { if (em.getTransaction().isActive()) { em.getTransaction().rollback(); @@ -847,8 +847,8 @@ public void testQuery_JPQL_Case_Literals_4() { List intList = query.getResultList(); assertNotNull(intList); assertEquals(2, intList.size()); - assertEquals(new Integer(100), intList.get(0)); - assertEquals(new Integer(100), intList.get(1)); + assertEquals(Integer.valueOf(100), intList.get(0)); + assertEquals(Integer.valueOf(100), intList.get(1)); } finally { if (em.getTransaction().isActive()) { em.getTransaction().rollback(); @@ -886,8 +886,8 @@ public void testQuery_Criteria_Case_Literals_4() { List intList = query.getResultList(); assertNotNull(intList); assertEquals(2, intList.size()); - assertEquals(new Integer(100), intList.get(0)); - assertEquals(new Integer(100), intList.get(1)); + assertEquals(Integer.valueOf(100), intList.get(0)); + assertEquals(Integer.valueOf(100), intList.get(1)); } finally { if (em.getTransaction().isActive()) { em.getTransaction().rollback(); @@ -926,8 +926,8 @@ public void testQuery_JPQL_Case_Parameters_4() { List intList = query.getResultList(); assertNotNull(intList); assertEquals(2, intList.size()); - assertEquals(new Integer(100).intValue(), intList.get(0).intValue()); - assertEquals(new Integer(100).intValue(), intList.get(1).intValue()); + assertEquals(Integer.valueOf(100).intValue(), intList.get(0).intValue()); + assertEquals(Integer.valueOf(100).intValue(), intList.get(1).intValue()); } finally { if (em.getTransaction().isActive()) { em.getTransaction().rollback(); @@ -979,8 +979,8 @@ public void testQuery_Criteria_Case_Parameters_4() { List intList = query.getResultList(); assertNotNull(intList); assertEquals(2, intList.size()); - assertEquals(new Integer(100).intValue(), intList.get(0).intValue()); - assertEquals(new Integer(100).intValue(), intList.get(1).intValue()); + assertEquals(Integer.valueOf(100).intValue(), intList.get(0).intValue()); + assertEquals(Integer.valueOf(100).intValue(), intList.get(1).intValue()); } finally { if (em.getTransaction().isActive()) { em.getTransaction().rollback(); diff --git a/jpa/eclipselink.jpa.test.jse/src/org/eclipse/persistence/jpa/test/query/TestQueryIN.java b/jpa/eclipselink.jpa.test.jse/src/org/eclipse/persistence/jpa/test/query/TestQueryIN.java index de70576f685..d1174ab920a 100644 --- a/jpa/eclipselink.jpa.test.jse/src/org/eclipse/persistence/jpa/test/query/TestQueryIN.java +++ b/jpa/eclipselink.jpa.test.jse/src/org/eclipse/persistence/jpa/test/query/TestQueryIN.java @@ -65,7 +65,7 @@ public void testQuery_JPQL_IN_Literals_1() { Assert.assertEquals("TWO", dto01.get(0).getItemString2()); Assert.assertEquals("THREE", dto01.get(0).getItemString3()); Assert.assertEquals("FIVE", dto01.get(0).getItemString4()); - Assert.assertEquals(new Integer(1), dto01.get(0).getItemInteger1()); + Assert.assertEquals(Integer.valueOf(1), dto01.get(0).getItemInteger1()); } finally { if (em.getTransaction().isActive()) { em.getTransaction().rollback(); @@ -103,7 +103,7 @@ public void testQuery_JPQL_IN_Parameters_1() { Assert.assertEquals("TWO", dto01.get(0).getItemString2()); Assert.assertEquals("THREE", dto01.get(0).getItemString3()); Assert.assertEquals("FIVE", dto01.get(0).getItemString4()); - Assert.assertEquals(new Integer(1), dto01.get(0).getItemInteger1()); + Assert.assertEquals(Integer.valueOf(1), dto01.get(0).getItemInteger1()); // equivalent test 2 query = em.createQuery("" @@ -118,7 +118,7 @@ public void testQuery_JPQL_IN_Parameters_1() { Assert.assertEquals("TWO", dto01.get(0).getItemString2()); Assert.assertEquals("THREE", dto01.get(0).getItemString3()); Assert.assertEquals("FIVE", dto01.get(0).getItemString4()); - Assert.assertEquals(new Integer(1), dto01.get(0).getItemInteger1()); + Assert.assertEquals(Integer.valueOf(1), dto01.get(0).getItemInteger1()); } finally { if (em.getTransaction().isActive()) { em.getTransaction().rollback(); @@ -158,7 +158,7 @@ public void testQuery_Criteria_IN_Literals_1() { Assert.assertEquals("TWO", dto01.get(0).getItemString2()); Assert.assertEquals("THREE", dto01.get(0).getItemString3()); Assert.assertEquals("FIVE", dto01.get(0).getItemString4()); - Assert.assertEquals(new Integer(1), dto01.get(0).getItemInteger1()); + Assert.assertEquals(Integer.valueOf(1), dto01.get(0).getItemInteger1()); // equivalent test 2 cb = em.getCriteriaBuilder(); @@ -179,7 +179,7 @@ public void testQuery_Criteria_IN_Literals_1() { Assert.assertEquals("TWO", dto01.get(0).getItemString2()); Assert.assertEquals("THREE", dto01.get(0).getItemString3()); Assert.assertEquals("FIVE", dto01.get(0).getItemString4()); - Assert.assertEquals(new Integer(1), dto01.get(0).getItemInteger1()); + Assert.assertEquals(Integer.valueOf(1), dto01.get(0).getItemInteger1()); // equivalent test 3 cb = em.getCriteriaBuilder(); @@ -200,7 +200,7 @@ public void testQuery_Criteria_IN_Literals_1() { Assert.assertEquals("TWO", dto01.get(0).getItemString2()); Assert.assertEquals("THREE", dto01.get(0).getItemString3()); Assert.assertEquals("FIVE", dto01.get(0).getItemString4()); - Assert.assertEquals(new Integer(1), dto01.get(0).getItemInteger1()); + Assert.assertEquals(Integer.valueOf(1), dto01.get(0).getItemInteger1()); } finally { if (em.getTransaction().isActive()) { em.getTransaction().rollback(); @@ -248,7 +248,7 @@ public void testQuery_Criteria_IN_Parameters_1() { Assert.assertEquals("TWO", dto01.get(0).getItemString2()); Assert.assertEquals("THREE", dto01.get(0).getItemString3()); Assert.assertEquals("FIVE", dto01.get(0).getItemString4()); - Assert.assertEquals(new Integer(1), dto01.get(0).getItemInteger1()); + Assert.assertEquals(Integer.valueOf(1), dto01.get(0).getItemInteger1()); // equivalent test 2 cb = em.getCriteriaBuilder(); @@ -277,7 +277,7 @@ public void testQuery_Criteria_IN_Parameters_1() { Assert.assertEquals("TWO", dto01.get(0).getItemString2()); Assert.assertEquals("THREE", dto01.get(0).getItemString3()); Assert.assertEquals("FIVE", dto01.get(0).getItemString4()); - Assert.assertEquals(new Integer(1), dto01.get(0).getItemInteger1()); + Assert.assertEquals(Integer.valueOf(1), dto01.get(0).getItemInteger1()); // equivalent test 3 cb = em.getCriteriaBuilder(); @@ -299,7 +299,7 @@ public void testQuery_Criteria_IN_Parameters_1() { Assert.assertEquals("TWO", dto01.get(0).getItemString2()); Assert.assertEquals("THREE", dto01.get(0).getItemString3()); Assert.assertEquals("FIVE", dto01.get(0).getItemString4()); - Assert.assertEquals(new Integer(1), dto01.get(0).getItemInteger1()); + Assert.assertEquals(Integer.valueOf(1), dto01.get(0).getItemInteger1()); } finally { if (em.getTransaction().isActive()) { em.getTransaction().rollback(); @@ -334,7 +334,7 @@ public void testQuery_JPQL_IN_SUBQUERY_Literals_1() { Assert.assertEquals("SEVEN", dto01.get(0).getItemString2()); Assert.assertEquals("EIGHT", dto01.get(0).getItemString3()); Assert.assertEquals("NINE", dto01.get(0).getItemString4()); - Assert.assertEquals(new Integer(2), dto01.get(0).getItemInteger1()); + Assert.assertEquals(Integer.valueOf(2), dto01.get(0).getItemInteger1()); } finally { if (em.getTransaction().isActive()) { em.getTransaction().rollback(); @@ -370,7 +370,7 @@ public void testQuery_JPQL_IN_SUBQUERY_Parameters_1() { Assert.assertEquals("SEVEN", dto01.get(0).getItemString2()); Assert.assertEquals("EIGHT", dto01.get(0).getItemString3()); Assert.assertEquals("NINE", dto01.get(0).getItemString4()); - Assert.assertEquals(new Integer(2), dto01.get(0).getItemInteger1()); + Assert.assertEquals(Integer.valueOf(2), dto01.get(0).getItemInteger1()); } finally { if (em.getTransaction().isActive()) { em.getTransaction().rollback(); @@ -415,7 +415,7 @@ public void testQuery_Criteria_IN_SUBQUERY_Literals_1() { Assert.assertEquals("SEVEN", dto01.get(0).getItemString2()); Assert.assertEquals("EIGHT", dto01.get(0).getItemString3()); Assert.assertEquals("NINE", dto01.get(0).getItemString4()); - Assert.assertEquals(new Integer(2), dto01.get(0).getItemInteger1()); + Assert.assertEquals(Integer.valueOf(2), dto01.get(0).getItemInteger1()); // equivalent test 2 cb = em.getCriteriaBuilder(); @@ -441,7 +441,7 @@ public void testQuery_Criteria_IN_SUBQUERY_Literals_1() { Assert.assertEquals("SEVEN", dto01.get(0).getItemString2()); Assert.assertEquals("EIGHT", dto01.get(0).getItemString3()); Assert.assertEquals("NINE", dto01.get(0).getItemString4()); - Assert.assertEquals(new Integer(2), dto01.get(0).getItemInteger1()); + Assert.assertEquals(Integer.valueOf(2), dto01.get(0).getItemInteger1()); } finally { if (em.getTransaction().isActive()) { em.getTransaction().rollback(); @@ -488,7 +488,7 @@ public void testQuery_Criteria_IN_SUBQUERY_Parameters_1() { Assert.assertEquals("SEVEN", dto01.get(0).getItemString2()); Assert.assertEquals("EIGHT", dto01.get(0).getItemString3()); Assert.assertEquals("NINE", dto01.get(0).getItemString4()); - Assert.assertEquals(new Integer(2), dto01.get(0).getItemInteger1()); + Assert.assertEquals(Integer.valueOf(2), dto01.get(0).getItemInteger1()); // equivalent test 2 cb = em.getCriteriaBuilder(); @@ -516,7 +516,7 @@ public void testQuery_Criteria_IN_SUBQUERY_Parameters_1() { Assert.assertEquals("SEVEN", dto01.get(0).getItemString2()); Assert.assertEquals("EIGHT", dto01.get(0).getItemString3()); Assert.assertEquals("NINE", dto01.get(0).getItemString4()); - Assert.assertEquals(new Integer(2), dto01.get(0).getItemInteger1()); + Assert.assertEquals(Integer.valueOf(2), dto01.get(0).getItemInteger1()); } finally { if (em.getTransaction().isActive()) { em.getTransaction().rollback(); @@ -551,7 +551,7 @@ public void testQuery_JPQL_IN_SUBQUERY_Literals_2() { Assert.assertEquals("SEVEN", dto01.get(0).getItemString2()); Assert.assertEquals("EIGHT", dto01.get(0).getItemString3()); Assert.assertEquals("NINE", dto01.get(0).getItemString4()); - Assert.assertEquals(new Integer(2), dto01.get(0).getItemInteger1()); + Assert.assertEquals(Integer.valueOf(2), dto01.get(0).getItemInteger1()); } finally { if (em.getTransaction().isActive()) { em.getTransaction().rollback(); @@ -589,7 +589,7 @@ public void testQuery_JPQL_IN_SUBQUERY_Parameters_2() { Assert.assertEquals("SEVEN", dto01.get(0).getItemString2()); Assert.assertEquals("EIGHT", dto01.get(0).getItemString3()); Assert.assertEquals("NINE", dto01.get(0).getItemString4()); - Assert.assertEquals(new Integer(2), dto01.get(0).getItemInteger1()); + Assert.assertEquals(Integer.valueOf(2), dto01.get(0).getItemInteger1()); } finally { if (em.getTransaction().isActive()) { em.getTransaction().rollback(); @@ -634,7 +634,7 @@ public void testQuery_Criteria_IN_SUBQUERY_Literals_2() { Assert.assertEquals("SEVEN", dto01.get(0).getItemString2()); Assert.assertEquals("EIGHT", dto01.get(0).getItemString3()); Assert.assertEquals("NINE", dto01.get(0).getItemString4()); - Assert.assertEquals(new Integer(2), dto01.get(0).getItemInteger1()); + Assert.assertEquals(Integer.valueOf(2), dto01.get(0).getItemInteger1()); // equivalent test 2 cb = em.getCriteriaBuilder(); @@ -661,7 +661,7 @@ public void testQuery_Criteria_IN_SUBQUERY_Literals_2() { Assert.assertEquals("SEVEN", dto01.get(0).getItemString2()); Assert.assertEquals("EIGHT", dto01.get(0).getItemString3()); Assert.assertEquals("NINE", dto01.get(0).getItemString4()); - Assert.assertEquals(new Integer(2), dto01.get(0).getItemInteger1()); + Assert.assertEquals(Integer.valueOf(2), dto01.get(0).getItemInteger1()); } finally { if (em.getTransaction().isActive()) { em.getTransaction().rollback(); @@ -712,7 +712,7 @@ public void testQuery_Criteria_IN_SUBQUERY_Parameters_2() { Assert.assertEquals("SEVEN", dto01.get(0).getItemString2()); Assert.assertEquals("EIGHT", dto01.get(0).getItemString3()); Assert.assertEquals("NINE", dto01.get(0).getItemString4()); - Assert.assertEquals(new Integer(2), dto01.get(0).getItemInteger1()); + Assert.assertEquals(Integer.valueOf(2), dto01.get(0).getItemInteger1()); // equivalent test 2 cb = em.getCriteriaBuilder(); @@ -745,7 +745,7 @@ public void testQuery_Criteria_IN_SUBQUERY_Parameters_2() { Assert.assertEquals("SEVEN", dto01.get(0).getItemString2()); Assert.assertEquals("EIGHT", dto01.get(0).getItemString3()); Assert.assertEquals("NINE", dto01.get(0).getItemString4()); - Assert.assertEquals(new Integer(2), dto01.get(0).getItemInteger1()); + Assert.assertEquals(Integer.valueOf(2), dto01.get(0).getItemInteger1()); } finally { if (em.getTransaction().isActive()) { em.getTransaction().rollback(); diff --git a/jpa/eclipselink.jpa.test.jse/src/org/eclipse/persistence/jpa/test/query/model/Dto01.java b/jpa/eclipselink.jpa.test.jse/src/org/eclipse/persistence/jpa/test/query/model/Dto01.java index ca5c8961917..f7a42845d43 100644 --- a/jpa/eclipselink.jpa.test.jse/src/org/eclipse/persistence/jpa/test/query/model/Dto01.java +++ b/jpa/eclipselink.jpa.test.jse/src/org/eclipse/persistence/jpa/test/query/model/Dto01.java @@ -39,8 +39,8 @@ public Dto01(String str1, String str2, Integer integer1, Integer integer2) { public Dto01(String str1, String str2, Long integer1, Long integer2) { this.str1 = str1; this.str2 = str2; - this.integer1 = new Integer(integer1.intValue()); - this.integer2 = new Integer(integer2.intValue()); + this.integer1 = Integer.valueOf(integer1.intValue()); + this.integer2 = Integer.valueOf(integer2.intValue()); } public String getStr1() { diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/advanced/Buyer.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/advanced/Buyer.java index e276365f3c7..d2948fb35f5 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/advanced/Buyer.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/advanced/Buyer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2019 IBM Corporation. All rights reserved. * * This program and the accompanying materials are made available under the @@ -108,35 +108,35 @@ public Buyer() { } public void addAmex(long number) { - getCreditCards().put(AMEX, new Long(number)); + getCreditCards().put(AMEX, Long.valueOf(number)); } public void addCanadianImperialCreditLine(long number) { - getCreditLines().put(CANADIAN_IMPERIAL, new Long(number)); + getCreditLines().put(CANADIAN_IMPERIAL, Long.valueOf(number)); } public void addDinersClub(long number) { - getCreditCards().put(DINERS, new Long(number)); + getCreditCards().put(DINERS, Long.valueOf(number)); } public void addMastercard(long number) { - getCreditCards().put(MASTERCARD, new Long(number)); + getCreditCards().put(MASTERCARD, Long.valueOf(number)); } public void addRoyalBankCreditLine(long number) { - getCreditLines().put(ROYAL_BANK, new Long(number)); + getCreditLines().put(ROYAL_BANK, Long.valueOf(number)); } public void addScotiabankCreditLine(long number) { - getCreditLines().put(SCOTIABANK, new Long(number)); + getCreditLines().put(SCOTIABANK, Long.valueOf(number)); } public void addTorontoDominionCreditLine(long number) { - getCreditLines().put(TORONTO_DOMINION, new Long(number)); + getCreditLines().put(TORONTO_DOMINION, Long.valueOf(number)); } public void addVisa(long number) { - getCreditCards().put(VISA, new Long(number)); + getCreditCards().put(VISA, Long.valueOf(number)); } public boolean buysSaturdayToSunday() { diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/advanced/Customizer.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/advanced/Customizer.java index e9ea637fc93..64993edde4c 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/advanced/Customizer.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/advanced/Customizer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -48,7 +48,7 @@ public void customize(Session session) throws Exception { if(numberOfCalls != null) { num = numberOfCalls.intValue(); } - sessionCalls.put(sessionName, new Integer(num + 1)); + sessionCalls.put(sessionName, Integer.valueOf(num + 1)); //**temp session.getEventManager().addListener(new AcquireReleaseListener()); @@ -92,7 +92,7 @@ public void customize(ClassDescriptor descriptor) { if(numberOfCalls != null) { num = numberOfCalls.intValue(); } - descriptorCalls.put(javaClassName, new Integer(num + 1)); + descriptorCalls.put(javaClassName, Integer.valueOf(num + 1)); addCustomQueryKeys(descriptor); } diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/composite/advanced/Customizer.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/composite/advanced/Customizer.java index f79f259e10b..ce8b2dc33d2 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/composite/advanced/Customizer.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/composite/advanced/Customizer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -51,7 +51,7 @@ public void customize(Session session) { if(numberOfCalls != null) { num = numberOfCalls.intValue(); } - sessionCalls.put(sessionName, new Integer(num + 1)); + sessionCalls.put(sessionName, Integer.valueOf(num + 1)); //**temp session.getEventManager().addListener(new AcquireReleaseListener()); @@ -72,7 +72,7 @@ public void customize(ClassDescriptor descriptor) { if(numberOfCalls != null) { num = numberOfCalls.intValue(); } - descriptorCalls.put(javaClassName, new Integer(num + 1)); + descriptorCalls.put(javaClassName, Integer.valueOf(num + 1)); addCustomQueryKeys(descriptor); } diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/fieldaccess/advanced/Buyer.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/fieldaccess/advanced/Buyer.java index a37e891a6c6..cdde11a9a57 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/fieldaccess/advanced/Buyer.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/fieldaccess/advanced/Buyer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -131,19 +131,19 @@ public Buyer() { } public void addAmex(long number) { - getCreditCards().put(AMEX, new Long(number)); + getCreditCards().put(AMEX, Long.valueOf(number)); } public void addDinersClub(long number) { - getCreditCards().put(DINERS, new Long(number)); + getCreditCards().put(DINERS, Long.valueOf(number)); } public void addMastercard(long number) { - getCreditCards().put(MASTERCARD, new Long(number)); + getCreditCards().put(MASTERCARD, Long.valueOf(number)); } public void addVisa(long number) { - getCreditCards().put(VISA, new Long(number)); + getCreditCards().put(VISA, Long.valueOf(number)); } public boolean buysSaturdayToSunday() { diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/fieldaccess/advanced/Customizer.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/fieldaccess/advanced/Customizer.java index 585afc998e0..62f67fe4073 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/fieldaccess/advanced/Customizer.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/fieldaccess/advanced/Customizer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -38,7 +38,7 @@ public void customize(Session session) { if(numberOfCalls != null) { num = numberOfCalls.intValue(); } - sessionCalls.put(sessionName, new Integer(num + 1)); + sessionCalls.put(sessionName, Integer.valueOf(num + 1)); session.getEventManager().addListener(new SessionEventAdapter() { public void postLogin(SessionEvent event) { @@ -56,7 +56,7 @@ public void customize(ClassDescriptor descriptor) { if(numberOfCalls != null) { num = numberOfCalls.intValue(); } - descriptorCalls.put(javaClassName, new Integer(num + 1)); + descriptorCalls.put(javaClassName, Integer.valueOf(num + 1)); } public static Map getSessionCalls() { diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/inheritance/Bicycle.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/inheritance/Bicycle.java index 5e31bf01636..e6aada76fa5 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/inheritance/Bicycle.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/inheritance/Bicycle.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -34,7 +34,7 @@ public void setDescription(String aDescription) { } public void change() { - this.setPassengerCapacity(new Integer(100)); + this.setPassengerCapacity(Integer.valueOf(100)); this.setDescription("This Bike is easy to handle"); } } diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/inheritance/FueledVehicle.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/inheritance/FueledVehicle.java index 54dc1de6a95..a150706deb0 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/inheritance/FueledVehicle.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/inheritance/FueledVehicle.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -37,7 +37,7 @@ public Object clone() { } public void change() { - this.setPassengerCapacity(new Integer(100)); + this.setPassengerCapacity(Integer.valueOf(100)); this.setFuelType("HOT AIR"); } diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/inheritance/InheritanceModelExamples.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/inheritance/InheritanceModelExamples.java index 10f3578f119..b46b3bd000f 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/inheritance/InheritanceModelExamples.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/inheritance/InheritanceModelExamples.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -22,7 +22,7 @@ public class InheritanceModelExamples { public static Bicycle bikeExample1(Company company) { Bicycle example = new Bicycle(); - example.setPassengerCapacity(new Integer(1)); + example.setPassengerCapacity(Integer.valueOf(1)); example.setOwner(company); example.setDescription("Hercules"); // example.addPartNumber("1288H8HH-f"); @@ -32,7 +32,7 @@ public static Bicycle bikeExample1(Company company) { public static Bicycle bikeExample2(Company company) { Bicycle example = new Bicycle(); - example.setPassengerCapacity(new Integer(2)); + example.setPassengerCapacity(Integer.valueOf(2)); example.setOwner(company); example.setDescription("Atlas"); // example.addPartNumber("176339GT-a"); @@ -43,7 +43,7 @@ public static Bicycle bikeExample2(Company company) { public static Bicycle bikeExample3(Company company) { Bicycle example = new Bicycle(); - example.setPassengerCapacity(new Integer(3)); + example.setPassengerCapacity(Integer.valueOf(3)); example.setOwner(company); example.setDescription("Aone"); // example.addPartNumber("188181TT-a"); @@ -53,21 +53,21 @@ public static Bicycle bikeExample3(Company company) { public static Boat boatExample1(Company company) { Boat example = new Boat(); - example.setPassengerCapacity(new Integer(10)); + example.setPassengerCapacity(Integer.valueOf(10)); example.setOwner(company); return example; } public static Boat boatExample2(Company company) { Boat example = new Boat(); - example.setPassengerCapacity(new Integer(20)); + example.setPassengerCapacity(Integer.valueOf(20)); example.setOwner(company); return example; } public static Boat boatExample3(Company company) { Boat example = new Boat(); - example.setPassengerCapacity(new Integer(30)); + example.setPassengerCapacity(Integer.valueOf(30)); example.setOwner(company); return example; } @@ -75,8 +75,8 @@ public static Boat boatExample3(Company company) { public static Bus busExample1(Company company) { Bus example = new Bus(); - example.setPassengerCapacity(new Integer(30)); - example.setFuelCapacity(new Integer(100)); + example.setPassengerCapacity(Integer.valueOf(30)); + example.setFuelCapacity(Integer.valueOf(100)); example.setDescription("SCHOOL BUS"); example.setFuelType("Petrol"); example.setOwner(company); @@ -90,8 +90,8 @@ public static Bus busExample1(Company company) { public static Bus busExample2(Company company) { Bus example = new Bus(); - example.setPassengerCapacity(new Integer(30)); - example.setFuelCapacity(new Integer(100)); + example.setPassengerCapacity(Integer.valueOf(30)); + example.setFuelCapacity(Integer.valueOf(100)); example.setDescription("TOUR BUS"); example.setFuelType("Petrol"); example.setOwner(company); @@ -105,8 +105,8 @@ public static Bus busExample2(Company company) { public static Bus busExample3(Company company) { Bus example = new Bus(); - example.setPassengerCapacity(new Integer(30)); - example.setFuelCapacity(new Integer(100)); + example.setPassengerCapacity(Integer.valueOf(30)); + example.setFuelCapacity(Integer.valueOf(100)); example.setDescription("TRANSIT BUS"); example.setFuelType("Gas"); example.setOwner(company); @@ -120,8 +120,8 @@ public static Bus busExample3(Company company) { public static Car carExample1() { Car example = new Car(); - example.setPassengerCapacity(new Integer(2)); - example.setFuelCapacity(new Integer(30)); + example.setPassengerCapacity(Integer.valueOf(2)); + example.setFuelCapacity(Integer.valueOf(30)); example.setDescription("PONTIAC"); example.setFuelType("Petrol"); // example.addPartNumber("021776RM-b"); @@ -133,8 +133,8 @@ public static Car carExample1() { public static Car carExample2() { Car example = new Car(); - example.setPassengerCapacity(new Integer(4)); - example.setFuelCapacity(new Integer(50)); + example.setPassengerCapacity(Integer.valueOf(4)); + example.setFuelCapacity(Integer.valueOf(50)); example.setDescription("TOYOTA"); example.setFuelType("Petrol"); // example.addPartNumber("021776TT-a"); @@ -146,8 +146,8 @@ public static Car carExample2() { public static Car carExample3() { Car example = new Car(); - example.setPassengerCapacity(new Integer(5)); - example.setFuelCapacity(new Integer(60)); + example.setPassengerCapacity(Integer.valueOf(5)); + example.setFuelCapacity(Integer.valueOf(60)); example.setDescription("BMW"); example.setFuelType("Disel"); // example.addPartNumber("021776KM-k"); @@ -159,8 +159,8 @@ public static Car carExample3() { public static Car carExample4() { Car example = new Car(); - example.setPassengerCapacity(new Integer(8)); - example.setFuelCapacity(new Integer(100)); + example.setPassengerCapacity(Integer.valueOf(8)); + example.setFuelCapacity(Integer.valueOf(100)); example.setDescription("Mazda"); example.setFuelType("Coca-Cola"); // example.addPartNumber("021776KM-k"); @@ -210,8 +210,8 @@ public static Company companyExample3() { public static FueledVehicle fueledVehicleExample1(Company company) { FueledVehicle example = new FueledVehicle(); - example.setPassengerCapacity(new Integer(1)); - example.setFuelCapacity(new Integer(10)); + example.setPassengerCapacity(Integer.valueOf(1)); + example.setFuelCapacity(Integer.valueOf(10)); example.setDescription("Motercycle"); example.setOwner(company); return example; @@ -220,8 +220,8 @@ public static FueledVehicle fueledVehicleExample1(Company company) { public static Car imaginaryCarExample1() { ImaginaryCar example = new ImaginaryCar(); - example.setPassengerCapacity(new Integer(2)); - example.setFuelCapacity(new Integer(30)); + example.setPassengerCapacity(Integer.valueOf(2)); + example.setFuelCapacity(Integer.valueOf(30)); example.setDescription("PONTIAC"); example.setFuelType("Petrol"); // example.addPartNumber("021776RM-b"); @@ -232,8 +232,8 @@ public static Car imaginaryCarExample1() public static Car imaginaryCarExample2() { ImaginaryCar example = new ImaginaryCar(); - example.setPassengerCapacity(new Integer(4)); - example.setFuelCapacity(new Integer(50)); + example.setPassengerCapacity(Integer.valueOf(4)); + example.setFuelCapacity(Integer.valueOf(50)); example.setDescription("TOYOTA"); example.setFuelType("Petrol"); // example.addPartNumber("021776TT-a"); @@ -244,8 +244,8 @@ public static Car imaginaryCarExample2() public static Car imaginaryCarExample3() { ImaginaryCar example = new ImaginaryCar(); - example.setPassengerCapacity(new Integer(5)); - example.setFuelCapacity(new Integer(60)); + example.setPassengerCapacity(Integer.valueOf(5)); + example.setFuelCapacity(Integer.valueOf(60)); example.setDescription("BMW"); example.setFuelType("Disel"); // example.addPartNumber("021776KM-k"); @@ -256,8 +256,8 @@ public static Car imaginaryCarExample3() public static Car imaginaryCarExample4() { Car example = new Car(); - example.setPassengerCapacity(new Integer(8)); - example.setFuelCapacity(new Integer(100)); + example.setPassengerCapacity(Integer.valueOf(8)); + example.setFuelCapacity(Integer.valueOf(100)); example.setDescription("Mazda"); example.setFuelType("Coca-Cola"); // example.addPartNumber("021776KM-k"); @@ -268,7 +268,7 @@ public static Car imaginaryCarExample4() public static NonFueledVehicle nonFueledVehicleExample1(Company company) { NonFueledVehicle example = new NonFueledVehicle(); - example.setPassengerCapacity(new Integer(1)); + example.setPassengerCapacity(Integer.valueOf(1)); example.setOwner(company); return example; } @@ -320,8 +320,8 @@ public static Person personExample6() { public static Car sportsCarExample1() { SportsCar example = new SportsCar(); - example.setPassengerCapacity(new Integer(2)); - example.setFuelCapacity(new Integer(60)); + example.setPassengerCapacity(Integer.valueOf(2)); + example.setFuelCapacity(Integer.valueOf(60)); example.setDescription("Corvet"); example.setFuelType("Disel"); return example; diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/inherited/Birthday.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/inherited/Birthday.java index 5b2dfdfe116..eaf6024ecd5 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/inherited/Birthday.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/inherited/Birthday.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -57,7 +57,7 @@ public Integer getYear() { public int hashCode() { String hc = year.toString() + month.toString() + day.toString(); - return new Integer(hc).intValue(); + return Integer.valueOf(hc).intValue(); } public void setDay(Integer day) { diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/lob/ImageSimulator.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/lob/ImageSimulator.java index 57399e8f9d5..e65ef0c8561 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/lob/ImageSimulator.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/lob/ImageSimulator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -40,12 +40,12 @@ public static Image generateImage(int blobSize, int clobSize) { generatedImage.setScript(initStringBase(clobSize / 100)); generatedImage.setAudio(initByteBase(blobSize)); generatedImage.setCommentary(initCharArrayBase(clobSize)); - generatedImage.setCustomAttribute1(new SerializableNonEntity(new Long(Long.MAX_VALUE))); - generatedImage.setCustomAttribute2(new SerializableNonEntity(new Long(Long.MAX_VALUE))); - generatedImage.setXml1(new SerializableNonEntity(new Long(Long.MIN_VALUE))); - generatedImage.setXml2(new SerializableNonEntity(new Long(Long.MIN_VALUE))); - generatedImage.setJson1(new SerializableNonEntity(new Long(Long.MIN_VALUE))); - generatedImage.setJson2(new SerializableNonEntity(new Long(Long.MIN_VALUE))); + generatedImage.setCustomAttribute1(new SerializableNonEntity(Long.valueOf(Long.MAX_VALUE))); + generatedImage.setCustomAttribute2(new SerializableNonEntity(Long.valueOf(Long.MAX_VALUE))); + generatedImage.setXml1(new SerializableNonEntity(Long.valueOf(Long.MIN_VALUE))); + generatedImage.setXml2(new SerializableNonEntity(Long.valueOf(Long.MIN_VALUE))); + generatedImage.setJson1(new SerializableNonEntity(Long.valueOf(Long.MIN_VALUE))); + generatedImage.setJson2(new SerializableNonEntity(Long.valueOf(Long.MIN_VALUE))); return generatedImage; } @@ -77,7 +77,7 @@ public static Byte[] initObjectByteBase(int cycle) { new Random().nextBytes(pictures); Byte[] pics = new Byte[cycle]; for (int x = 0; x < cycle; x++) { - pics[x] = new Byte(pictures[x]); + pics[x] = Byte.valueOf(pictures[x]); } return pics; } diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/sessionbean/EmployeeServiceBean.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/sessionbean/EmployeeServiceBean.java index 152991a6513..b7e8e0fd1e8 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/sessionbean/EmployeeServiceBean.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/sessionbean/EmployeeServiceBean.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -40,7 +40,7 @@ public List findAll() { } public Employee findById(int id) { - Employee employee = entityManager.find(Employee.class, new Integer(id)); + Employee employee = entityManager.find(Employee.class, Integer.valueOf(id)); if (employee != null) { employee.getAddress(); } @@ -54,7 +54,7 @@ public List findByFirstName(String fname) { return query.getResultList(); } public Employee fetchById(int id) { - Employee employee = entityManager.find(Employee.class, new Integer(id)); + Employee employee = entityManager.find(Employee.class, Integer.valueOf(id)); employee.getAddress(); employee.getManager(); return employee; diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/xml/advanced/Employee.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/xml/advanced/Employee.java index 3daab8c145d..c389edbf4be 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/xml/advanced/Employee.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/xml/advanced/Employee.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -125,11 +125,11 @@ public Employee(String firstName, String lastName){ } public void addAmex(long number) { - getCreditCards().put(AMEX, new Long(number)); + getCreditCards().put(AMEX, Long.valueOf(number)); } public void addCanadianImperialCreditLine(long number) { - getCreditLines().put(CANADIAN_IMPERIAL, new Long(number)); + getCreditLines().put(CANADIAN_IMPERIAL, Long.valueOf(number)); } public void addDealer(Dealer dealer) { @@ -137,7 +137,7 @@ public void addDealer(Dealer dealer) { } public void addDinersClub(long number) { - getCreditCards().put(DINERS, new Long(number)); + getCreditCards().put(DINERS, Long.valueOf(number)); } public void addManagedEmployee(Employee emp) { @@ -146,7 +146,7 @@ public void addManagedEmployee(Employee emp) { } public void addMastercard(long number) { - getCreditCards().put(MASTERCARD, new Long(number)); + getCreditCards().put(MASTERCARD, Long.valueOf(number)); } public void addPhoneNumber(PhoneNumber phone) { @@ -163,19 +163,19 @@ public void addResponsibility(String responsibility) { } public void addRoyalBankCreditLine(long number) { - getCreditLines().put(ROYAL_BANK, new Long(number)); + getCreditLines().put(ROYAL_BANK, Long.valueOf(number)); } public void addScotiabankCreditLine(long number) { - getCreditLines().put(SCOTIABANK, new Long(number)); + getCreditLines().put(SCOTIABANK, Long.valueOf(number)); } public void addTorontoDominionCreditLine(long number) { - getCreditLines().put(TORONTO_DOMINION, new Long(number)); + getCreditLines().put(TORONTO_DOMINION, Long.valueOf(number)); } public void addVisa(long number) { - getCreditCards().put(VISA, new Long(number)); + getCreditCards().put(VISA, Long.valueOf(number)); } /** diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/xml/composite/advanced/member_2/Employee.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/xml/composite/advanced/member_2/Employee.java index 516b8b26fa6..2a6abb03c67 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/xml/composite/advanced/member_2/Employee.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/xml/composite/advanced/member_2/Employee.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -127,11 +127,11 @@ public Employee(String firstName, String lastName){ } public void addAmex(long number) { - getCreditCards().put(AMEX, new Long(number)); + getCreditCards().put(AMEX, Long.valueOf(number)); } public void addCanadianImperialCreditLine(long number) { - getCreditLines().put(CANADIAN_IMPERIAL, new Long(number)); + getCreditLines().put(CANADIAN_IMPERIAL, Long.valueOf(number)); } public void addDealer(Dealer dealer) { @@ -139,7 +139,7 @@ public void addDealer(Dealer dealer) { } public void addDinersClub(long number) { - getCreditCards().put(DINERS, new Long(number)); + getCreditCards().put(DINERS, Long.valueOf(number)); } public void addManagedEmployee(Employee emp) { @@ -148,7 +148,7 @@ public void addManagedEmployee(Employee emp) { } public void addMastercard(long number) { - getCreditCards().put(MASTERCARD, new Long(number)); + getCreditCards().put(MASTERCARD, Long.valueOf(number)); } public void addPhoneNumber(PhoneNumber phone) { @@ -165,19 +165,19 @@ public void addResponsibility(String responsibility) { } public void addRoyalBankCreditLine(long number) { - getCreditLines().put(ROYAL_BANK, new Long(number)); + getCreditLines().put(ROYAL_BANK, Long.valueOf(number)); } public void addScotiabankCreditLine(long number) { - getCreditLines().put(SCOTIABANK, new Long(number)); + getCreditLines().put(SCOTIABANK, Long.valueOf(number)); } public void addTorontoDominionCreditLine(long number) { - getCreditLines().put(TORONTO_DOMINION, new Long(number)); + getCreditLines().put(TORONTO_DOMINION, Long.valueOf(number)); } public void addVisa(long number) { - getCreditCards().put(VISA, new Long(number)); + getCreditCards().put(VISA, Long.valueOf(number)); } /** diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/xml/inheritance/Bicycle.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/xml/inheritance/Bicycle.java index 705b32fdcd9..3165d258b98 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/xml/inheritance/Bicycle.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/xml/inheritance/Bicycle.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -28,7 +28,7 @@ public void setDescription(String aDescription) { } public void change() { - this.setPassengerCapacity(new Integer(100)); + this.setPassengerCapacity(Integer.valueOf(100)); this.setDescription("This Bike is easy to handle"); } } diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/xml/inheritance/FueledVehicle.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/xml/inheritance/FueledVehicle.java index c0493f16ffe..91e3e952d09 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/xml/inheritance/FueledVehicle.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/xml/inheritance/FueledVehicle.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -54,7 +54,7 @@ public void setFuelType(String type) { } public void change() { - this.setPassengerCapacity(new Integer(100)); + this.setPassengerCapacity(Integer.valueOf(100)); this.setFuelType("HOT AIR"); } diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/xml/inheritance/InheritanceModelExamples.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/xml/inheritance/InheritanceModelExamples.java index 4b379140611..614ffa1a4ed 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/xml/inheritance/InheritanceModelExamples.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/xml/inheritance/InheritanceModelExamples.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -22,7 +22,7 @@ public class InheritanceModelExamples { public static Bicycle bikeExample1(Company company) { Bicycle example = new Bicycle(); - example.setPassengerCapacity(new Integer(1)); + example.setPassengerCapacity(Integer.valueOf(1)); example.setOwner(company); example.setDescription("Hercules"); // example.addPartNumber("1288H8HH-f"); @@ -32,7 +32,7 @@ public static Bicycle bikeExample1(Company company) { public static Bicycle bikeExample2(Company company) { Bicycle example = new Bicycle(); - example.setPassengerCapacity(new Integer(2)); + example.setPassengerCapacity(Integer.valueOf(2)); example.setOwner(company); example.setDescription("Atlas"); // example.addPartNumber("176339GT-a"); @@ -43,7 +43,7 @@ public static Bicycle bikeExample2(Company company) { public static Bicycle bikeExample3(Company company) { Bicycle example = new Bicycle(); - example.setPassengerCapacity(new Integer(3)); + example.setPassengerCapacity(Integer.valueOf(3)); example.setOwner(company); example.setDescription("Aone"); // example.addPartNumber("188181TT-a"); @@ -53,21 +53,21 @@ public static Bicycle bikeExample3(Company company) { public static Boat boatExample1(Company company) { Boat example = new Boat(); - example.setPassengerCapacity(new Integer(10)); + example.setPassengerCapacity(Integer.valueOf(10)); example.setOwner(company); return example; } public static Boat boatExample2(Company company) { Boat example = new Boat(); - example.setPassengerCapacity(new Integer(20)); + example.setPassengerCapacity(Integer.valueOf(20)); example.setOwner(company); return example; } public static Boat boatExample3(Company company) { Boat example = new Boat(); - example.setPassengerCapacity(new Integer(30)); + example.setPassengerCapacity(Integer.valueOf(30)); example.setOwner(company); return example; } @@ -75,8 +75,8 @@ public static Boat boatExample3(Company company) { public static Bus busExample1(Company company) { Bus example = new Bus(); - example.setPassengerCapacity(new Integer(30)); - example.setFuelCapacity(new Integer(100)); + example.setPassengerCapacity(Integer.valueOf(30)); + example.setFuelCapacity(Integer.valueOf(100)); example.setDescription("SCHOOL BUS"); example.setFuelType("Petrol"); example.setOwner(company); @@ -90,8 +90,8 @@ public static Bus busExample1(Company company) { public static Bus busExample2(Company company) { Bus example = new Bus(); - example.setPassengerCapacity(new Integer(30)); - example.setFuelCapacity(new Integer(100)); + example.setPassengerCapacity(Integer.valueOf(30)); + example.setFuelCapacity(Integer.valueOf(100)); example.setDescription("TOUR BUS"); example.setFuelType("Petrol"); example.setOwner(company); @@ -105,8 +105,8 @@ public static Bus busExample2(Company company) { public static Bus busExample3(Company company) { Bus example = new Bus(); - example.setPassengerCapacity(new Integer(30)); - example.setFuelCapacity(new Integer(100)); + example.setPassengerCapacity(Integer.valueOf(30)); + example.setFuelCapacity(Integer.valueOf(100)); example.setDescription("TRANSIT BUS"); example.setFuelType("Gas"); example.setOwner(company); @@ -120,8 +120,8 @@ public static Bus busExample3(Company company) { public static Car carExample1() { Car example = new Car(); - example.setPassengerCapacity(new Integer(2)); - example.setFuelCapacity(new Integer(30)); + example.setPassengerCapacity(Integer.valueOf(2)); + example.setFuelCapacity(Integer.valueOf(30)); example.setDescription("PONTIAC"); example.setFuelType("Petrol"); // example.addPartNumber("021776RM-b"); @@ -133,8 +133,8 @@ public static Car carExample1() { public static Car carExample2() { Car example = new Car(); - example.setPassengerCapacity(new Integer(4)); - example.setFuelCapacity(new Integer(50)); + example.setPassengerCapacity(Integer.valueOf(4)); + example.setFuelCapacity(Integer.valueOf(50)); example.setDescription("TOYOTA"); example.setFuelType("Petrol"); // example.addPartNumber("021776TT-a"); @@ -146,8 +146,8 @@ public static Car carExample2() { public static Car carExample3() { Car example = new Car(); - example.setPassengerCapacity(new Integer(5)); - example.setFuelCapacity(new Integer(60)); + example.setPassengerCapacity(Integer.valueOf(5)); + example.setFuelCapacity(Integer.valueOf(60)); example.setDescription("BMW"); example.setFuelType("Disel"); // example.addPartNumber("021776KM-k"); @@ -159,8 +159,8 @@ public static Car carExample3() { public static Car carExample4() { Car example = new Car(); - example.setPassengerCapacity(new Integer(8)); - example.setFuelCapacity(new Integer(100)); + example.setPassengerCapacity(Integer.valueOf(8)); + example.setFuelCapacity(Integer.valueOf(100)); example.setDescription("Mazda"); example.setFuelType("Coca-Cola"); // example.addPartNumber("021776KM-k"); @@ -210,8 +210,8 @@ public static Company companyExample3() { public static FueledVehicle fueledVehicleExample1(Company company) { FueledVehicle example = new FueledVehicle(); - example.setPassengerCapacity(new Integer(1)); - example.setFuelCapacity(new Integer(10)); + example.setPassengerCapacity(Integer.valueOf(1)); + example.setFuelCapacity(Integer.valueOf(10)); example.setDescription("Motercycle"); example.setOwner(company); return example; @@ -220,8 +220,8 @@ public static FueledVehicle fueledVehicleExample1(Company company) { public static Car imaginaryCarExample1() { ImaginaryCar example = new ImaginaryCar(); - example.setPassengerCapacity(new Integer(2)); - example.setFuelCapacity(new Integer(30)); + example.setPassengerCapacity(Integer.valueOf(2)); + example.setFuelCapacity(Integer.valueOf(30)); example.setDescription("PONTIAC"); example.setFuelType("Petrol"); // example.addPartNumber("021776RM-b"); @@ -232,8 +232,8 @@ public static Car imaginaryCarExample1() public static Car imaginaryCarExample2() { ImaginaryCar example = new ImaginaryCar(); - example.setPassengerCapacity(new Integer(4)); - example.setFuelCapacity(new Integer(50)); + example.setPassengerCapacity(Integer.valueOf(4)); + example.setFuelCapacity(Integer.valueOf(50)); example.setDescription("TOYOTA"); example.setFuelType("Petrol"); // example.addPartNumber("021776TT-a"); @@ -244,8 +244,8 @@ public static Car imaginaryCarExample2() public static Car imaginaryCarExample3() { ImaginaryCar example = new ImaginaryCar(); - example.setPassengerCapacity(new Integer(5)); - example.setFuelCapacity(new Integer(60)); + example.setPassengerCapacity(Integer.valueOf(5)); + example.setFuelCapacity(Integer.valueOf(60)); example.setDescription("BMW"); example.setFuelType("Disel"); // example.addPartNumber("021776KM-k"); @@ -256,8 +256,8 @@ public static Car imaginaryCarExample3() public static Car imaginaryCarExample4() { Car example = new Car(); - example.setPassengerCapacity(new Integer(8)); - example.setFuelCapacity(new Integer(100)); + example.setPassengerCapacity(Integer.valueOf(8)); + example.setFuelCapacity(Integer.valueOf(100)); example.setDescription("Mazda"); example.setFuelType("Coca-Cola"); // example.addPartNumber("021776KM-k"); @@ -268,7 +268,7 @@ public static Car imaginaryCarExample4() public static NonFueledVehicle nonFueledVehicleExample1(Company company) { NonFueledVehicle example = new NonFueledVehicle(); - example.setPassengerCapacity(new Integer(1)); + example.setPassengerCapacity(Integer.valueOf(1)); example.setOwner(company); return example; } @@ -319,8 +319,8 @@ public static Person personExample6() { public static Car sportsCarExample1() { SportsCar example = new SportsCar(); - example.setPassengerCapacity(new Integer(2)); - example.setFuelCapacity(new Integer(60)); + example.setPassengerCapacity(Integer.valueOf(2)); + example.setFuelCapacity(Integer.valueOf(60)); example.setDescription("Corvet"); example.setFuelType("Disel"); return example; diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/xml/inherited/Birthday.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/xml/inherited/Birthday.java index 34b9d93a900..ff104806f06 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/xml/inherited/Birthday.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/xml/inherited/Birthday.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -54,7 +54,7 @@ public Integer getYear() { public int hashCode() { String hc = year.toString() + month.toString() + day.toString(); - return new Integer(hc).intValue(); + return Integer.valueOf(hc).intValue(); } public void setDay(Integer day) { diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa21/advanced/EmployeePopulator.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa21/advanced/EmployeePopulator.java index 2cbdbb7ac7e..c79e06283da 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa21/advanced/EmployeePopulator.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa21/advanced/EmployeePopulator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -201,7 +201,7 @@ public Employee basicEmployeeExample1() { employee.setFirstName("Bob"); employee.setLastName("Smith"); employee.setMale(); - employee.setSalary(new Long(35000)); + employee.setSalary(Long.valueOf(35000)); employee.setPeriod(employmentPeriodExample1()); employee.setAddress(addressExample1()); employee.setDepartment(departmentExample1()); @@ -224,7 +224,7 @@ public Employee basicEmployeeExample10() { employee.setFemale(); employee.setPeriod(employmentPeriodExample10()); employee.setAddress(addressExample10()); - employee.setSalary(new Long(56232)); + employee.setSalary(Long.valueOf(56232)); employee.addPhoneNumber(phoneNumberExample1()); employee.addPhoneNumber(phoneNumberExample2()); employee.addResponsibility("Sort files"); @@ -244,7 +244,7 @@ public Employee basicEmployeeExample11() { employee.setFemale(); employee.setPeriod(employmentPeriodExample11()); employee.setAddress(addressExample11()); - employee.setSalary(new Long(75000)); + employee.setSalary(Long.valueOf(75000)); employee.addPhoneNumber(phoneNumberExample2()); employee.addPhoneNumber(phoneNumberExample3()); employee.addPhoneNumber(phoneNumberExample4()); @@ -266,7 +266,7 @@ public Employee basicEmployeeExample12() { employee.setMale(); employee.setPeriod(employmentPeriodExample12()); employee.setAddress(addressExample12()); - employee.setSalary(new Long(50000)); + employee.setSalary(Long.valueOf(50000)); employee.addPhoneNumber(phoneNumberExample3()); employee.addPhoneNumber(phoneNumberExample4()); employee.addResponsibility("Bug fixes"); @@ -283,7 +283,7 @@ public Employee basicEmployeeExample13() { try { employee.setFirstName("SquareRoot"); employee.setLastName("TestCase1"); - employee.setSalary(new Long(36)); + employee.setSalary(Long.valueOf(36)); employee.setPeriod(employmentPeriodExample1()); employee.setAddress(addressExample1()); employee.addPhoneNumber(phoneNumberExample1()); @@ -302,7 +302,7 @@ public Employee basicEmployeeExample14() { try { employee.setFirstName("SquareRoot"); employee.setLastName("TestCase2"); - employee.setSalary(new Long(49)); + employee.setSalary(Long.valueOf(49)); employee.setPeriod(employmentPeriodExample1()); employee.setAddress(addressExample1()); employee.addPhoneNumber(phoneNumberExample1()); @@ -322,7 +322,7 @@ public Employee basicEmployeeExample15() { try { employee.setFirstName("No Phone Number"); employee.setLastName("Test case"); - employee.setSalary(new Long(555)); + employee.setSalary(Long.valueOf(555)); employee.setPeriod(employmentPeriodExample1()); employee.setAddress(addressExample1()); employee.addResponsibility("Find ways to make the days go by faster"); @@ -340,7 +340,7 @@ public Employee basicEmployeeExample2() { employee.setFirstName("John"); employee.setLastName("Way"); employee.setMale(); - employee.setSalary(new Long(53000)); + employee.setSalary(Long.valueOf(53000)); startCalendar.set(1970, 0, 1, 8, 0, 0); endCalendar.set(1970, 0, 1, 17, 30, 0); employee.setPeriod(employmentPeriodExample2()); @@ -364,7 +364,7 @@ public Employee basicEmployeeExample3() { employee.setFirstName("Charles"); employee.setLastName("Chanley"); employee.setMale(); - employee.setSalary(new Long(43000)); + employee.setSalary(Long.valueOf(43000)); startCalendar.set(1970, 0, 1, 7, 0, 0); endCalendar.set(1970, 0, 1, 15, 30, 0); employee.setPeriod(employmentPeriodExample6()); @@ -387,7 +387,7 @@ public Employee basicEmployeeExample4() { employee.setFirstName("Emanual"); employee.setLastName("Smith"); employee.setMale(); - employee.setSalary(new Long(49631)); + employee.setSalary(Long.valueOf(49631)); startCalendar.set(1970, 0, 1, 6, 45, 0); endCalendar.set(1970, 0, 1, 16, 32, 0); employee.setPeriod(employmentPeriodExample5()); @@ -411,7 +411,7 @@ public Employee basicEmployeeExample5() { employee.setFirstName("Sarah"); employee.setLastName("Way"); employee.setFemale(); - employee.setSalary(new Long(87000)); + employee.setSalary(Long.valueOf(87000)); startCalendar.set(1970, 0, 1, 12, 0, 0); endCalendar.set(1970, 0, 1, 20, 0, 30); employee.setPeriod(employmentPeriodExample4()); @@ -434,7 +434,7 @@ public Employee basicEmployeeExample6() { employee.setFirstName("Marcus"); employee.setLastName("Saunders"); employee.setMale(); - employee.setSalary(new Long(54300)); + employee.setSalary(Long.valueOf(54300)); employee.setPeriod(employmentPeriodExample3()); employee.setAddress(addressExample3()); employee.addResponsibility("Write user specifications."); @@ -454,7 +454,7 @@ public Employee basicEmployeeExample7() { employee.setFirstName("Nancy"); employee.setLastName("White"); employee.setFemale(); - employee.setSalary(new Long(31000)); + employee.setSalary(Long.valueOf(31000)); employee.setPeriod(employmentPeriodExample7()); employee.setAddress(addressExample7()); employee.addPhoneNumber(phoneNumberExample3()); @@ -472,7 +472,7 @@ public Employee basicEmployeeExample8() { employee.setFirstName("Fred"); employee.setLastName("Jones"); employee.setMale(); - employee.setSalary(new Long(500000)); + employee.setSalary(Long.valueOf(500000)); employee.setPeriod(employmentPeriodExample8()); employee.setAddress(addressExample8()); employee.addPhoneNumber(phoneNumberExample4()); @@ -491,7 +491,7 @@ public Employee basicEmployeeExample9() { employee.setFirstName("Betty"); employee.setLastName("Jones"); employee.setFemale(); - employee.setSalary(new Long(500001)); + employee.setSalary(Long.valueOf(500001)); startCalendar.set(1970, 0, 1, 22, 0, 0); endCalendar.set(1970, 0, 1, 5, 30, 0); employee.setPeriod(employmentPeriodExample9()); diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa21/advanced/converters/LongToStringConverter.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa21/advanced/converters/LongToStringConverter.java index 2ac5cbbfea1..26627dc7c2e 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa21/advanced/converters/LongToStringConverter.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa21/advanced/converters/LongToStringConverter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -28,6 +28,6 @@ public String convertToDatabaseColumn(Long attribute) { @Override public Long convertToEntityAttribute(String dbData) { - return (dbData == null) ? null : new Long(dbData); + return (dbData == null) ? null : Long.valueOf(dbData); } } diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa21/advanced/xml/EmployeePopulator.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa21/advanced/xml/EmployeePopulator.java index fdb7c2dad0f..f9e3a78161d 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa21/advanced/xml/EmployeePopulator.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa21/advanced/xml/EmployeePopulator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -187,7 +187,7 @@ public Employee basicEmployeeExample1() { employee.setFirstName("Bob"); employee.setLastName("Smith"); employee.setMale(); - employee.setSalary(new Long(35000)); + employee.setSalary(Long.valueOf(35000)); employee.setPeriod(employmentPeriodExample1()); employee.setAddress(addressExample1()); employee.setDepartment(departmentExample1()); @@ -210,7 +210,7 @@ public Employee basicEmployeeExample10() { employee.setFemale(); employee.setPeriod(employmentPeriodExample10()); employee.setAddress(addressExample10()); - employee.setSalary(new Long(56232)); + employee.setSalary(Long.valueOf(56232)); employee.addPhoneNumber(phoneNumberExample1()); employee.addPhoneNumber(phoneNumberExample2()); employee.addResponsibility("Sort files"); @@ -230,7 +230,7 @@ public Employee basicEmployeeExample11() { employee.setFemale(); employee.setPeriod(employmentPeriodExample11()); employee.setAddress(addressExample11()); - employee.setSalary(new Long(75000)); + employee.setSalary(Long.valueOf(75000)); employee.addPhoneNumber(phoneNumberExample2()); employee.addPhoneNumber(phoneNumberExample3()); employee.addPhoneNumber(phoneNumberExample4()); @@ -252,7 +252,7 @@ public Employee basicEmployeeExample12() { employee.setMale(); employee.setPeriod(employmentPeriodExample12()); employee.setAddress(addressExample12()); - employee.setSalary(new Long(50000)); + employee.setSalary(Long.valueOf(50000)); employee.addPhoneNumber(phoneNumberExample3()); employee.addPhoneNumber(phoneNumberExample4()); employee.addResponsibility("Bug fixes"); @@ -269,7 +269,7 @@ public Employee basicEmployeeExample13() { try { employee.setFirstName("SquareRoot"); employee.setLastName("TestCase1"); - employee.setSalary(new Long(36)); + employee.setSalary(Long.valueOf(36)); employee.setPeriod(employmentPeriodExample1()); employee.setAddress(addressExample1()); employee.addPhoneNumber(phoneNumberExample1()); @@ -288,7 +288,7 @@ public Employee basicEmployeeExample14() { try { employee.setFirstName("SquareRoot"); employee.setLastName("TestCase2"); - employee.setSalary(new Long(49)); + employee.setSalary(Long.valueOf(49)); employee.setPeriod(employmentPeriodExample1()); employee.setAddress(addressExample1()); employee.addPhoneNumber(phoneNumberExample1()); @@ -308,7 +308,7 @@ public Employee basicEmployeeExample15() { try { employee.setFirstName("No Phone Number"); employee.setLastName("Test case"); - employee.setSalary(new Long(555)); + employee.setSalary(Long.valueOf(555)); employee.setPeriod(employmentPeriodExample1()); employee.setAddress(addressExample1()); employee.addResponsibility("Find ways to make the days go by faster"); @@ -326,7 +326,7 @@ public Employee basicEmployeeExample2() { employee.setFirstName("John"); employee.setLastName("Way"); employee.setMale(); - employee.setSalary(new Long(53000)); + employee.setSalary(Long.valueOf(53000)); startCalendar.set(1970, 0, 1, 8, 0, 0); endCalendar.set(1970, 0, 1, 17, 30, 0); employee.setPeriod(employmentPeriodExample2()); @@ -350,7 +350,7 @@ public Employee basicEmployeeExample3() { employee.setFirstName("Charles"); employee.setLastName("Chanley"); employee.setMale(); - employee.setSalary(new Long(43000)); + employee.setSalary(Long.valueOf(43000)); startCalendar.set(1970, 0, 1, 7, 0, 0); endCalendar.set(1970, 0, 1, 15, 30, 0); employee.setPeriod(employmentPeriodExample6()); @@ -373,7 +373,7 @@ public Employee basicEmployeeExample4() { employee.setFirstName("Emanual"); employee.setLastName("Smith"); employee.setMale(); - employee.setSalary(new Long(49631)); + employee.setSalary(Long.valueOf(49631)); startCalendar.set(1970, 0, 1, 6, 45, 0); endCalendar.set(1970, 0, 1, 16, 32, 0); employee.setPeriod(employmentPeriodExample5()); @@ -397,7 +397,7 @@ public Employee basicEmployeeExample5() { employee.setFirstName("Sarah"); employee.setLastName("Way"); employee.setFemale(); - employee.setSalary(new Long(87000)); + employee.setSalary(Long.valueOf(87000)); startCalendar.set(1970, 0, 1, 12, 0, 0); endCalendar.set(1970, 0, 1, 20, 0, 30); employee.setPeriod(employmentPeriodExample4()); @@ -420,7 +420,7 @@ public Employee basicEmployeeExample6() { employee.setFirstName("Marcus"); employee.setLastName("Saunders"); employee.setMale(); - employee.setSalary(new Long(54300)); + employee.setSalary(Long.valueOf(54300)); employee.setPeriod(employmentPeriodExample3()); employee.setAddress(addressExample3()); employee.addResponsibility("Write user specifications."); @@ -440,7 +440,7 @@ public Employee basicEmployeeExample7() { employee.setFirstName("Nancy"); employee.setLastName("White"); employee.setFemale(); - employee.setSalary(new Long(31000)); + employee.setSalary(Long.valueOf(31000)); employee.setPeriod(employmentPeriodExample7()); employee.setAddress(addressExample7()); employee.addPhoneNumber(phoneNumberExample3()); @@ -458,7 +458,7 @@ public Employee basicEmployeeExample8() { employee.setFirstName("Fred"); employee.setLastName("Jones"); employee.setMale(); - employee.setSalary(new Long(500000)); + employee.setSalary(Long.valueOf(500000)); employee.setPeriod(employmentPeriodExample8()); employee.setAddress(addressExample8()); employee.addPhoneNumber(phoneNumberExample4()); @@ -477,7 +477,7 @@ public Employee basicEmployeeExample9() { employee.setFirstName("Betty"); employee.setLastName("Jones"); employee.setFemale(); - employee.setSalary(new Long(500001)); + employee.setSalary(Long.valueOf(500001)); startCalendar.set(1970, 0, 1, 22, 0, 0); endCalendar.set(1970, 0, 1, 5, 30, 0); employee.setPeriod(employmentPeriodExample9()); diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa22/advanced/converters/LongToStringConverter.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa22/advanced/converters/LongToStringConverter.java index a2db7f258cb..9b5b79c0e13 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa22/advanced/converters/LongToStringConverter.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa22/advanced/converters/LongToStringConverter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -28,6 +28,6 @@ public String convertToDatabaseColumn(Long attribute) { @Override public Long convertToEntityAttribute(String dbData) { - return (dbData == null) ? null : new Long(dbData); + return (dbData == null) ? null : Long.valueOf(dbData); } } diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/advanced/AdvancedJPAJunitTest.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/advanced/AdvancedJPAJunitTest.java index 29247b3b141..897e0941476 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/advanced/AdvancedJPAJunitTest.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/advanced/AdvancedJPAJunitTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2022 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1998, 2018 IBM Corporation. All rights reserved. * * This program and the accompanying materials are made available under the @@ -2486,7 +2486,7 @@ public void testProperty() { // verify properties set on Employee instance errorMsg += verifyPropertyValue(descriptor, "entityName", String.class, "Employee"); - errorMsg += verifyPropertyValue(descriptor, "entityIntegerProperty", Integer.class, new Integer(1)); + errorMsg += verifyPropertyValue(descriptor, "entityIntegerProperty", Integer.class, Integer.valueOf(1)); // each attribute of Employee was assigned a property attributeName with the value attribute name. for(DatabaseMapping mapping : descriptor.getMappings()) { @@ -2496,13 +2496,13 @@ public void testProperty() { // attribute m_lastName has many properties of different types DatabaseMapping mapping = descriptor.getMappingForAttributeName("lastName"); errorMsg += verifyPropertyValue(mapping, "BooleanProperty", Boolean.class, Boolean.TRUE); - errorMsg += verifyPropertyValue(mapping, "ByteProperty", Byte.class, new Byte((byte)1)); - errorMsg += verifyPropertyValue(mapping, "CharacterProperty", Character.class, new Character('A')); - errorMsg += verifyPropertyValue(mapping, "DoubleProperty", Double.class, new Double(1)); - errorMsg += verifyPropertyValue(mapping, "FloatProperty", Float.class, new Float(1)); - errorMsg += verifyPropertyValue(mapping, "IntegerProperty", Integer.class, new Integer(1)); - errorMsg += verifyPropertyValue(mapping, "LongProperty", Long.class, new Long(1)); - errorMsg += verifyPropertyValue(mapping, "ShortProperty", Short.class, new Short((short)1)); + errorMsg += verifyPropertyValue(mapping, "ByteProperty", Byte.class, Byte.valueOf((byte)1)); + errorMsg += verifyPropertyValue(mapping, "CharacterProperty", Character.class, Character.valueOf('A')); + errorMsg += verifyPropertyValue(mapping, "DoubleProperty", Double.class, Double.valueOf(1)); + errorMsg += verifyPropertyValue(mapping, "FloatProperty", Float.class, Float.valueOf(1)); + errorMsg += verifyPropertyValue(mapping, "IntegerProperty", Integer.class, Integer.valueOf(1)); + errorMsg += verifyPropertyValue(mapping, "LongProperty", Long.class, Long.valueOf(1)); + errorMsg += verifyPropertyValue(mapping, "ShortProperty", Short.class, Short.valueOf((short)1)); errorMsg += verifyPropertyValue(mapping, "BigDecimalProperty", java.math.BigDecimal.class, java.math.BigDecimal.ONE); errorMsg += verifyPropertyValue(mapping, "BigIntegerProperty", java.math.BigInteger.class, java.math.BigInteger.ONE); errorMsg += verifyPropertyValue(mapping, "byte[]Property", byte[].class, new byte[]{1, 2, 3, 4}); diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/advanced/AdvancedJunitTest.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/advanced/AdvancedJunitTest.java index c2897ebfbe8..6afe3a31791 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/advanced/AdvancedJunitTest.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/advanced/AdvancedJunitTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -576,7 +576,7 @@ public void testCoalesceJPQLQueryWithNullParameterValue() { query = query.setParameter("sal", null); // deliberate null parameter value Long result = (Long)query.getSingleResult(); // query should still function assertNotNull("Query result should be non-null", result); - assertEquals("Incorrect query results", new Long(2), result); // result value from db + assertEquals("Incorrect query results", Long.valueOf(2), result); // result value from db } catch (RuntimeException e) { throw e; } finally { diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/advanced/CacheImplJUnitTest.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/advanced/CacheImplJUnitTest.java index 1b4d7c5879a..8c20c6360d3 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/advanced/CacheImplJUnitTest.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/advanced/CacheImplJUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -314,7 +314,7 @@ public void testEvictClass_MappedSuperclass_RemovesAssignableSubclasses() { // HockeyGear(Abstract Entity) << GoalieGear (Concrete MappedSuperclass) << ChestProtector (Concrete Entity) ChestProtector e1 = new ChestProtector(); e1.setDescription("chest_protector"); - e1.setSerialNumber(new Integer(ID_PADS)); + e1.setSerialNumber(Integer.valueOf(ID_PADS)); em.persist(e1); commitTransaction(em); // do not close the entityManager between transactions or you will get bug# 307445 @@ -323,7 +323,7 @@ public void testEvictClass_MappedSuperclass_RemovesAssignableSubclasses() { // HockeyGear(Abstract Entity) << GoalieGear (Concrete MappedSuperclass) << ChestProtector (Concrete Entity) Pads p1 = new Pads(); p1.setDescription("pads"); - p1.setSerialNumber(new Integer(ID_CHESTPROTECTOR)); + p1.setSerialNumber(Integer.valueOf(ID_CHESTPROTECTOR)); em.persist(p1); commitTransaction(em); closeEntityManager(em); @@ -388,7 +388,7 @@ public void testEvictClass_NonPersistableParentOfEntityMappedSuperclassChain_Rem // HockeyGear(Abstract Entity) << GoalieGear (Concrete MappedSuperclass) << ChestProtector (Concrete Entity) ChestProtector e1 = new ChestProtector(); e1.setDescription("chest_protector"); - e1.setSerialNumber(new Integer(ID_PADS)); + e1.setSerialNumber(Integer.valueOf(ID_PADS)); em.persist(e1); commitTransaction(em); // do not close the entityManager between transactions or you will get bug# 307445 @@ -397,7 +397,7 @@ public void testEvictClass_NonPersistableParentOfEntityMappedSuperclassChain_Rem // HockeyGear(Abstract Entity) << GoalieGear (Concrete MappedSuperclass) << ChestProtector (Concrete Entity) Pads p1 = new Pads(); p1.setDescription("pads"); - p1.setSerialNumber(new Integer(ID_CHESTPROTECTOR)); + p1.setSerialNumber(Integer.valueOf(ID_CHESTPROTECTOR)); em.persist(p1); commitTransaction(em); closeEntityManager(em); @@ -461,7 +461,7 @@ public void testEvictClass_NonPersistableSubclassOfEntityMappedSuperclassChain_h // HockeyGear(Abstract Entity) << GoalieGear (Concrete MappedSuperclass) << ChestProtector (Concrete Entity) ChestProtector e1 = new ChestProtector(); e1.setDescription("chest_protector"); - e1.setSerialNumber(new Integer(ID_PADS)); + e1.setSerialNumber(Integer.valueOf(ID_PADS)); em.persist(e1); commitTransaction(em); // do not close the entityManager between transactions or you will get bug# 307445 @@ -470,7 +470,7 @@ public void testEvictClass_NonPersistableSubclassOfEntityMappedSuperclassChain_h // HockeyGear(Abstract Entity) << GoalieGear (Concrete MappedSuperclass) << ChestProtector (Concrete Entity) Pads p1 = new Pads(); p1.setDescription("pads"); - p1.setSerialNumber(new Integer(ID_CHESTPROTECTOR)); + p1.setSerialNumber(Integer.valueOf(ID_CHESTPROTECTOR)); em.persist(p1); commitTransaction(em); closeEntityManager(em); @@ -529,7 +529,7 @@ public void testEvictClassObject_MappedSuperclass_RemovesAssignableSubclasses() // HockeyGear(Abstract Entity) << GoalieGear (Concrete MappedSuperclass) << ChestProtector (Concrete Entity) ChestProtector e1 = new ChestProtector(); e1.setDescription("chest_protector"); - e1.setSerialNumber(new Integer(ID_PADS)); + e1.setSerialNumber(Integer.valueOf(ID_PADS)); em.persist(e1); commitTransaction(em); // do not close the entityManager between transactions or you will get bug# 307445 @@ -537,7 +537,7 @@ public void testEvictClassObject_MappedSuperclass_RemovesAssignableSubclasses() beginTransaction(em); Pads p1 = new Pads(); p1.setDescription("pads"); - p1.setSerialNumber(new Integer(ID_CHESTPROTECTOR)); + p1.setSerialNumber(Integer.valueOf(ID_CHESTPROTECTOR)); em.persist(p1); commitTransaction(em); closeEntityManager(em); @@ -589,7 +589,7 @@ public void testEvictClass_JavaLangClass_hasNoEffect() { // HockeyGear(Abstract Entity) << GoalieGear (Concrete MappedSuperclass) << ChestProtector (Concrete Entity) ChestProtector e1 = new ChestProtector(); e1.setDescription("gear"); - e1.setSerialNumber(new Integer(ID)); + e1.setSerialNumber(Integer.valueOf(ID)); em.persist(e1); commitTransaction(em); closeEntityManager(em); @@ -661,7 +661,7 @@ public void testGetId_fromUnsupportedJavaLangInteger_throwsIAE_on_null_descripto EntityManager em1 = createEntityManager(); JpaCache anEclipseLinkCache = (JpaCache)getEntityManagerFactory().getCache(); try { - anEclipseLinkCache.getId(new Integer(1)); + anEclipseLinkCache.getId(Integer.valueOf(1)); } catch (IllegalArgumentException iae) { _exceptionThrown = true; } finally { diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/advanced/EntityManagerJUnitTestSuite.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/advanced/EntityManagerJUnitTestSuite.java index ea3e321fd74..7cdcc9f5280 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/advanced/EntityManagerJUnitTestSuite.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/advanced/EntityManagerJUnitTestSuite.java @@ -1309,8 +1309,8 @@ public void testSubString() { int lastIndex = firstName.length(); List employees = em.createQuery("SELECT object(e) FROM Employee e where e.firstName = substring(:p1, :p2, :p3)"). setParameter("p1", firstName). - setParameter("p2", new Integer(firstIndex)). - setParameter("p3", new Integer(lastIndex)). + setParameter("p2", Integer.valueOf(firstIndex)). + setParameter("p3", Integer.valueOf(lastIndex)). getResultList(); // clean up @@ -5839,17 +5839,17 @@ public void testQueryHints() { assertTrue("FETCH_GROUP not set.", olrQuery.getFetchGroup() == fetchGroup); // Timeout - query.setHint(QueryHints.JDBC_TIMEOUT, new Integer(100)); + query.setHint(QueryHints.JDBC_TIMEOUT, Integer.valueOf(100)); assertTrue("Timeout not set.", olrQuery.getQueryTimeout() == 100); // JDBC - query.setHint(QueryHints.JDBC_FETCH_SIZE, new Integer(101)); + query.setHint(QueryHints.JDBC_FETCH_SIZE, Integer.valueOf(101)); assertTrue("Fetch-size not set.", olrQuery.getFetchSize() == 101); - query.setHint(QueryHints.JDBC_MAX_ROWS, new Integer(103)); + query.setHint(QueryHints.JDBC_MAX_ROWS, Integer.valueOf(103)); assertTrue("Max-rows not set.", olrQuery.getMaxRows() == 103); - query.setHint(QueryHints.JDBC_FIRST_RESULT, new Integer(123)); + query.setHint(QueryHints.JDBC_FIRST_RESULT, Integer.valueOf(123)); assertTrue("JDBC_FIRST_RESULT not set.", olrQuery.getFirstResult() == 123); // Refresh @@ -7410,7 +7410,7 @@ public void testInitializeFieldForPropertyAccess(){ em = createEntityManager(); beginTransaction(em); try { - employee = em.find(Employee.class, new Integer(id)); + employee = em.find(Employee.class, Integer.valueOf(id)); address = employee.getAddress(); assertTrue("The address was not persisted.", employee.getAddress() != null); @@ -7452,7 +7452,7 @@ public void testSetFieldForPropertyAccess(){ int managerId = manager.getId(); beginTransaction(em); - employee = em.find(Employee.class, new Integer(id)); + employee = em.find(Employee.class, Integer.valueOf(id)); employee.getAddress(); address = new Address(); @@ -7476,7 +7476,7 @@ public void testSetFieldForPropertyAccess(){ em = createEntityManager(); beginTransaction(em); - employee = em.find(Employee.class, new Integer(id)); + employee = em.find(Employee.class, Integer.valueOf(id)); address = employee.getAddress(); manager = employee.getManager(); @@ -7486,8 +7486,8 @@ public void testSetFieldForPropertyAccess(){ assertTrue("The manager was not persisted.", employee.getManager() != null); assertTrue("The manager was not correctly persisted.", employee.getManager().getFirstName().equals("Metro")); - Address initialAddress = em.find(Address.class, new Integer(addressId)); - Employee initialManager = em.find(Employee.class, new Integer(managerId)); + Address initialAddress = em.find(Address.class, Integer.valueOf(addressId)); + Employee initialManager = em.find(Employee.class, Integer.valueOf(managerId)); employee.setAddress((Address)null); employee.setManager((Employee)null); em.remove(address); @@ -7552,7 +7552,7 @@ public void testSetFieldForPropertyAccessWithRefresh(){ em = createEntityManager(); beginTransaction(em); - employee = em.find(Employee.class, new Integer(id)); + employee = em.find(Employee.class, Integer.valueOf(id)); address = employee.getAddress(); manager = employee.getManager(); @@ -7562,8 +7562,8 @@ public void testSetFieldForPropertyAccessWithRefresh(){ assertTrue("The manager was not persisted.", employee.getManager() != null); assertTrue("The manager was not correctly persisted.", employee.getManager().getFirstName().equals("Metro")); - Address initialAddress = em.find(Address.class, new Integer(addressId)); - Employee initialManager = em.find(Employee.class, new Integer(managerId)); + Address initialAddress = em.find(Address.class, Integer.valueOf(addressId)); + Employee initialManager = em.find(Employee.class, Integer.valueOf(managerId)); employee.setAddress((Address)null); employee.setManager((Employee)null); em.remove(address); @@ -7605,7 +7605,7 @@ public void testSetFieldForPropertyAccessWithNewEM(){ em = createEntityManager(); beginTransaction(em); - employee = em.find(Employee.class, new Integer(id)); + employee = em.find(Employee.class, Integer.valueOf(id)); employee.getAddress(); employee.getManager(); @@ -7629,7 +7629,7 @@ public void testSetFieldForPropertyAccessWithNewEM(){ em = createEntityManager(); beginTransaction(em); - employee = em.find(Employee.class, new Integer(id)); + employee = em.find(Employee.class, Integer.valueOf(id)); address = employee.getAddress(); manager = employee.getManager(); @@ -7639,8 +7639,8 @@ public void testSetFieldForPropertyAccessWithNewEM(){ assertTrue("The manager was not persisted.", employee.getManager() != null); assertTrue("The manager was not correctly persisted.", employee.getManager().getFirstName().equals("Metro")); - Address initialAddress = em.find(Address.class, new Integer(addressId)); - Employee initialManager = em.find(Employee.class, new Integer(managerId)); + Address initialAddress = em.find(Address.class, Integer.valueOf(addressId)); + Employee initialManager = em.find(Employee.class, Integer.valueOf(managerId)); employee.setAddress((Address)null); employee.setManager((Employee)null); @@ -8409,7 +8409,7 @@ public void testClosedEmShouldThrowException() { errorMsg = errorMsg + "; em.getDelegate() threw wrong exception: " + ex.getMessage(); } try { - em.getReference(Employee.class, new Integer(1)); + em.getReference(Employee.class, Integer.valueOf(1)); errorMsg = errorMsg + "; em.getReference() didn't throw exception"; } catch(IllegalStateException ise) { // expected diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/advanced/SQLResultSetMappingTestSuite.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/advanced/SQLResultSetMappingTestSuite.java index 16aea4a145a..abe5c40b9af 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/advanced/SQLResultSetMappingTestSuite.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/advanced/SQLResultSetMappingTestSuite.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -193,7 +193,7 @@ public void testBindParameters() throws Exception { query.addArgument("1"); Vector params = new Vector(); //4000 is a more reasonable budget given test data if results are expected - params.add(new Integer(4000)); + params.add(Integer.valueOf(4000)); List results = (List)getServerSession().executeQuery(query, params); assertNotNull("No result returned", results); assertTrue("Empty list returned", (results.size()!=0)); @@ -212,7 +212,7 @@ public void testBindParametersWithPostitional() throws Exception { query.setShouldBindAllParameters(true); query.addArgument("1"); Vector params = new Vector(); - params.add(new Integer(4000)); + params.add(Integer.valueOf(4000)); List results = (List)getServerSession().executeQuery(query, params); assertNotNull("No result returned", results); assertTrue("Empty list returned", (results.size()!=0)); diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/advanced/UpdateAllQueryAdvancedJunitTest.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/advanced/UpdateAllQueryAdvancedJunitTest.java index 1f5a076fb41..beb4c1f2701 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/advanced/UpdateAllQueryAdvancedJunitTest.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/advanced/UpdateAllQueryAdvancedJunitTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -134,7 +134,7 @@ public static void testFirstNamePrefixBLAForSalary() { public static void testDoubleSalaryForAll() { ExpressionBuilder builder = new ExpressionBuilder(); UpdateAllQuery updateQuery = new UpdateAllQuery(Employee.class); - updateQuery.addUpdate("salary", ExpressionMath.multiply(builder.get("salary"), new Integer(2))); + updateQuery.addUpdate("salary", ExpressionMath.multiply(builder.get("salary"), Integer.valueOf(2))); updateAllQueryInternal(updateQuery); } @@ -142,7 +142,7 @@ public static void testDoubleSalaryForSalary() { ExpressionBuilder builder = new ExpressionBuilder(); Expression selectionExpression = builder.get("salary").lessThan(20000); UpdateAllQuery updateQuery = new UpdateAllQuery(Employee.class, selectionExpression); - updateQuery.addUpdate("salary", ExpressionMath.multiply(builder.get("salary"), new Integer(2))); + updateQuery.addUpdate("salary", ExpressionMath.multiply(builder.get("salary"), Integer.valueOf(2))); updateAllQueryInternal(updateQuery); } @@ -150,7 +150,7 @@ public static void testFirstNamePrefixBLADoubleSalaryForAll() { ExpressionBuilder builder = new ExpressionBuilder(); UpdateAllQuery updateQuery = new UpdateAllQuery(Employee.class); updateQuery.addUpdate("firstName", Expression.fromLiteral("'BLA'", null).concat(builder.get("firstName"))); - updateQuery.addUpdate("salary", ExpressionMath.multiply(builder.get("salary"), new Integer(2))); + updateQuery.addUpdate("salary", ExpressionMath.multiply(builder.get("salary"), Integer.valueOf(2))); updateAllQueryInternal(updateQuery); } @@ -159,7 +159,7 @@ public static void testFirstNamePrefixBLADoubleSalaryForSalary() { Expression selectionExpression = builder.get("salary").lessThan(20000); UpdateAllQuery updateQuery = new UpdateAllQuery(Employee.class, selectionExpression); updateQuery.addUpdate("firstName", Expression.fromLiteral("'BLA'", null).concat(builder.get("firstName"))); - updateQuery.addUpdate("salary", ExpressionMath.multiply(builder.get("salary"), new Integer(2))); + updateQuery.addUpdate("salary", ExpressionMath.multiply(builder.get("salary"), Integer.valueOf(2))); updateAllQueryInternal(updateQuery); } @@ -168,7 +168,7 @@ public static void testFirstNamePrefixBLADoubleSalaryForSalaryForFirstName() { Expression selectionExpression = builder.get("salary").lessThan(20000).and(builder.get("firstName").like("J%")); UpdateAllQuery updateQuery = new UpdateAllQuery(Employee.class, selectionExpression); updateQuery.addUpdate("firstName", Expression.fromLiteral("'BLA'", null).concat(builder.get("firstName"))); - updateQuery.addUpdate("salary", ExpressionMath.multiply(builder.get("salary"), new Integer(2))); + updateQuery.addUpdate("salary", ExpressionMath.multiply(builder.get("salary"), Integer.valueOf(2))); updateAllQueryInternal(updateQuery); } diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/advanced/compositepk/AdvancedCompositePKJunitTest.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/advanced/compositepk/AdvancedCompositePKJunitTest.java index 18934564f5a..1dde3ed2460 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/advanced/compositepk/AdvancedCompositePKJunitTest.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/advanced/compositepk/AdvancedCompositePKJunitTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1998, 2018 IBM Corporation. All rights reserved. * * This program and the accompanying materials are made available under the @@ -1048,8 +1048,8 @@ public void testNestedEmbeddableSequenceGeneration(){ b = (Book) em.merge(b); a = (Author) em.merge(a); - assertTrue("The PK value for "+ b.getClass() +" (" + b.getId().getNumberId().getValue() + ") is not sequence generated", (b.getId().getNumberId().getValue() >= new Long(1000))); - assertTrue("The PK value for "+ a.getClass() +" (" + a.getId().getNumberId().getValue() + ") is not sequence generated", (a.getId().getNumberId().getValue() >= new Long(1000))); + assertTrue("The PK value for "+ b.getClass() +" (" + b.getId().getNumberId().getValue() + ") is not sequence generated", (b.getId().getNumberId().getValue() >= Long.valueOf(1000))); + assertTrue("The PK value for "+ a.getClass() +" (" + a.getId().getNumberId().getValue() + ") is not sequence generated", (a.getId().getNumberId().getValue() >= Long.valueOf(1000))); rollbackTransaction(em); } diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/advanced/concurrency/ConcurrencyTest.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/advanced/concurrency/ConcurrencyTest.java index 6e2838d13bb..c38e92ee90c 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/advanced/concurrency/ConcurrencyTest.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/advanced/concurrency/ConcurrencyTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -64,7 +64,7 @@ public void testDeadLockOnReadLock() { em.getTransaction().commit(); em.close(); try { - Integer i = new Integer(5); + Integer i = Integer.valueOf(5); Thread thread1 = new Thread(new Runner1(i, dept.getId(), equip.getId(), emf)); thread1.setName("Runner1"); Thread thread2 = new Thread(new Runner2(i, dept.getId(), equip.getId(), emf)); @@ -107,7 +107,7 @@ public void testTransitionToDeferedFailure() { if (isOnServer()) { return; } - Integer toWaitOn = new Integer(4); + Integer toWaitOn = Integer.valueOf(4); Thread thread1 = null; EntityManagerFactory emf = getEntityManagerFactory(); EntityManager em = emf.createEntityManager(); diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/composite/advanced/EntityManagerJUnitTestSuite.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/composite/advanced/EntityManagerJUnitTestSuite.java index d4cf64c38b9..2892788931e 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/composite/advanced/EntityManagerJUnitTestSuite.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/composite/advanced/EntityManagerJUnitTestSuite.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1998, 2019 IBM Corporation. All rights reserved. * * This program and the accompanying materials are made available under the @@ -1364,8 +1364,8 @@ public void testSubString() { int lastIndex = firstName.length(); List employees = em.createQuery("SELECT object(e) FROM Employee e where e.firstName = substring(:p1, :p2, :p3)"). setParameter("p1", firstName). - setParameter("p2", new Integer(firstIndex)). - setParameter("p3", new Integer(lastIndex)). + setParameter("p2", Integer.valueOf(firstIndex)). + setParameter("p3", Integer.valueOf(lastIndex)). getResultList(); // clean up @@ -5250,17 +5250,17 @@ public void testQueryHints() { assertTrue("FETCH_GROUP not set.", olrQuery.getFetchGroup() == fetchGroup); // Timeout - query.setHint(QueryHints.JDBC_TIMEOUT, new Integer(100)); + query.setHint(QueryHints.JDBC_TIMEOUT, Integer.valueOf(100)); assertTrue("Timeout not set.", olrQuery.getQueryTimeout() == 100); // JDBC - query.setHint(QueryHints.JDBC_FETCH_SIZE, new Integer(101)); + query.setHint(QueryHints.JDBC_FETCH_SIZE, Integer.valueOf(101)); assertTrue("Fetch-size not set.", olrQuery.getFetchSize() == 101); - query.setHint(QueryHints.JDBC_MAX_ROWS, new Integer(103)); + query.setHint(QueryHints.JDBC_MAX_ROWS, Integer.valueOf(103)); assertTrue("Max-rows not set.", olrQuery.getMaxRows() == 103); - query.setHint(QueryHints.JDBC_FIRST_RESULT, new Integer(123)); + query.setHint(QueryHints.JDBC_FIRST_RESULT, Integer.valueOf(123)); assertTrue("JDBC_FIRST_RESULT not set.", olrQuery.getFirstResult() == 123); // Refresh @@ -6606,7 +6606,7 @@ public void testInitializeFieldForPropertyAccess(){ em = createEntityManager(); beginTransaction(em); try { - employee = em.find(Employee.class, new Integer(id)); + employee = em.find(Employee.class, Integer.valueOf(id)); address = employee.getAddress(); assertTrue("The address was not persisted.", employee.getAddress() != null); @@ -6648,7 +6648,7 @@ public void testSetFieldForPropertyAccess(){ int managerId = manager.getId(); beginTransaction(em); - employee = em.find(Employee.class, new Integer(id)); + employee = em.find(Employee.class, Integer.valueOf(id)); employee.getAddress(); address = new Address(); @@ -6672,7 +6672,7 @@ public void testSetFieldForPropertyAccess(){ em = createEntityManager(); beginTransaction(em); - employee = em.find(Employee.class, new Integer(id)); + employee = em.find(Employee.class, Integer.valueOf(id)); address = employee.getAddress(); manager = employee.getManager(); @@ -6682,8 +6682,8 @@ public void testSetFieldForPropertyAccess(){ assertTrue("The manager was not persisted.", employee.getManager() != null); assertTrue("The manager was not correctly persisted.", employee.getManager().getFirstName().equals("Metro")); - Address initialAddress = em.find(Address.class, new Integer(addressId)); - Employee initialManager = em.find(Employee.class, new Integer(managerId)); + Address initialAddress = em.find(Address.class, Integer.valueOf(addressId)); + Employee initialManager = em.find(Employee.class, Integer.valueOf(managerId)); employee.setAddress((Address)null); employee.setManager((Employee)null); em.remove(address); @@ -6748,7 +6748,7 @@ public void testSetFieldForPropertyAccessWithRefresh(){ em = createEntityManager(); beginTransaction(em); - employee = em.find(Employee.class, new Integer(id)); + employee = em.find(Employee.class, Integer.valueOf(id)); address = employee.getAddress(); manager = employee.getManager(); @@ -6758,8 +6758,8 @@ public void testSetFieldForPropertyAccessWithRefresh(){ assertTrue("The manager was not persisted.", employee.getManager() != null); assertTrue("The manager was not correctly persisted.", employee.getManager().getFirstName().equals("Metro")); - Address initialAddress = em.find(Address.class, new Integer(addressId)); - Employee initialManager = em.find(Employee.class, new Integer(managerId)); + Address initialAddress = em.find(Address.class, Integer.valueOf(addressId)); + Employee initialManager = em.find(Employee.class, Integer.valueOf(managerId)); employee.setAddress((Address)null); employee.setManager((Employee)null); em.remove(address); @@ -6801,7 +6801,7 @@ public void testSetFieldForPropertyAccessWithNewEM(){ em = createEntityManager(); beginTransaction(em); - employee = em.find(Employee.class, new Integer(id)); + employee = em.find(Employee.class, Integer.valueOf(id)); employee.getAddress(); employee.getManager(); @@ -6825,7 +6825,7 @@ public void testSetFieldForPropertyAccessWithNewEM(){ em = createEntityManager(); beginTransaction(em); - employee = em.find(Employee.class, new Integer(id)); + employee = em.find(Employee.class, Integer.valueOf(id)); address = employee.getAddress(); manager = employee.getManager(); @@ -6835,8 +6835,8 @@ public void testSetFieldForPropertyAccessWithNewEM(){ assertTrue("The manager was not persisted.", employee.getManager() != null); assertTrue("The manager was not correctly persisted.", employee.getManager().getFirstName().equals("Metro")); - Address initialAddress = em.find(Address.class, new Integer(addressId)); - Employee initialManager = em.find(Employee.class, new Integer(managerId)); + Address initialAddress = em.find(Address.class, Integer.valueOf(addressId)); + Employee initialManager = em.find(Employee.class, Integer.valueOf(managerId)); employee.setAddress((Address)null); employee.setManager((Employee)null); @@ -7280,7 +7280,7 @@ public void testClosedEmShouldThrowException() { errorMsg = errorMsg + "; em.getDelegate() threw wrong exception: " + ex.getMessage(); } try { - em.getReference(Employee.class, new Integer(1)); + em.getReference(Employee.class, Integer.valueOf(1)); errorMsg = errorMsg + "; em.getReference() didn't throw exception"; } catch(IllegalStateException ise) { // expected diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/criteria/JUnitCriteriaUnitTestSuite.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/criteria/JUnitCriteriaUnitTestSuite.java index ffc80e9d894..4b910cf6a25 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/criteria/JUnitCriteriaUnitTestSuite.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/criteria/JUnitCriteriaUnitTestSuite.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -469,7 +469,7 @@ public void testSelectEmployeeWithSameParameterUsedMultipleTimes() { //need to cast to erase the type on the get("id") expression so it matches the type on param1 cq.where(qb.or( qb.greaterThan(root.get("id" ), param1), param1.isNull()) ); - em.createQuery(cq).setParameter(param1, new Integer(1)).getResultList(); + em.createQuery(cq).setParameter(param1, Integer.valueOf(1)).getResultList(); } finally { rollbackTransaction(em); closeEntityManager(em); diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/datatypes/BooleanJUnitTestCase.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/datatypes/BooleanJUnitTestCase.java index 09cf05a170e..525f7e245c5 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/datatypes/BooleanJUnitTestCase.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/datatypes/BooleanJUnitTestCase.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -64,17 +64,17 @@ public void testCreateWrapperTypes() { beginTransaction(em); WrapperTypes[] wrapperTypes = new WrapperTypes[4]; wrapperTypes[0] = new WrapperTypes(BigDecimal.ZERO, BigInteger.ZERO, Boolean.FALSE, - new Byte("0"), 'A', new Short("0"), - 0, 0L, new Float(0.0), 0.0, "A String"); + Byte.valueOf("0"), 'A', Short.valueOf("0"), + 0, 0L, 0.0f, 0.0, "A String"); wrapperTypes[1] = new WrapperTypes(BigDecimal.ONE, BigInteger.ONE, Boolean.TRUE, - new Byte("1"), 'B', new Short("1"), - 1, 1L, new Float(1.0), 1.0, "B String"); + Byte.valueOf("1"), 'B', Short.valueOf("1"), + 1, 1L, 1.0f, 1.0, "B String"); wrapperTypes[2] = new WrapperTypes(new BigDecimal(2), new BigInteger("2"), Boolean.FALSE, - new Byte("2"), 'C', new Short("2"), - 2, 2L, new Float(2.0), 2.0, "C String"); + Byte.valueOf("2"), 'C', Short.valueOf("2"), + 2, 2L, 2.0f, 2.0, "C String"); wrapperTypes[3] = new WrapperTypes(new BigDecimal(3), new BigInteger("3"), Boolean.TRUE, - new Byte("3"), 'D', new Short("3"), - 3, 3L, new Float(3.0), 3.0, "D String"); + Byte.valueOf("3"), 'D', Short.valueOf("3"), + 3, 3L, 3.0f, 3.0, "D String"); for (WrapperTypes wrapperType: wrapperTypes) { em.persist(wrapperType); } diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/datatypes/NullBindingJUnitTestCase.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/datatypes/NullBindingJUnitTestCase.java index 69bc74cc829..2200da5b147 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/datatypes/NullBindingJUnitTestCase.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/datatypes/NullBindingJUnitTestCase.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -94,8 +94,8 @@ public void testCreateWrapperTypes() { beginTransaction(em); wt = new WrapperTypes(BigDecimal.ZERO, BigInteger.ZERO, Boolean.FALSE, - new Byte("0"), 'A', new Short("0"), - 0, 0L, new Float(0.0), 0.0, "A String"); + Byte.valueOf("0"), 'A', Short.valueOf("0"), + 0, 0L, 0.0f, 0.0, "A String"); em.persist(wt); wrapperId = wt.getId(); commitTransaction(em); diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/ddlgeneration/DDLGenerationJUnitTestSuite.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/ddlgeneration/DDLGenerationJUnitTestSuite.java index 5529d78c6d8..31f24ce5286 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/ddlgeneration/DDLGenerationJUnitTestSuite.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/ddlgeneration/DDLGenerationJUnitTestSuite.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2014 IBM Corporation. All rights reserved. * Copyright (c) 2010 Frank Schwarz. All rights reserved. * Copyright (c) 2008 Daryl Davis. All rights reserved. @@ -1557,14 +1557,14 @@ public void testLAZYLOBWithEmbeddedId() { beginTransaction(em); Lobtest lobtest = new Lobtest(); - Byte b1 = new Byte("1"); - Byte b2 = new Byte("2"); + Byte b1 = Byte.valueOf("1"); + Byte b2 = Byte.valueOf("2"); lobtest.setContentdata(new byte[]{b1, b2}); lobtest.setUuid("123456789"); pk.setDocid("blah"); - pk.setVersionid(new BigInteger(new Long(System.currentTimeMillis()).toString())); + pk.setVersionid(new BigInteger(Long.valueOf(System.currentTimeMillis()).toString())); lobtest.setLobtestPK(pk); em.persist(lobtest); diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/dynamic/simple/SimpleTypeTestSuite.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/dynamic/simple/SimpleTypeTestSuite.java index 2a1aad3b0dc..f526a447459 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/dynamic/simple/SimpleTypeTestSuite.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/dynamic/simple/SimpleTypeTestSuite.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -120,7 +120,7 @@ public void find() { EntityManager em = emf.createEntityManager(); DynamicEntity simpleInstance = find(em, 1); assertNotNull("Could not find simple instance with id = 1", simpleInstance); - simpleInstance = find(em, new Integer(1)); + simpleInstance = find(em, Integer.valueOf(1)); assertNotNull("Could not find simple instance with id = Integer(1)", simpleInstance); } diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/fieldaccess/advanced/EntityManagerJUnitTestSuite.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/fieldaccess/advanced/EntityManagerJUnitTestSuite.java index 20e4afe093d..2b740a89c54 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/fieldaccess/advanced/EntityManagerJUnitTestSuite.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/fieldaccess/advanced/EntityManagerJUnitTestSuite.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2019 IBM Corporation. All rights reserved. * * This program and the accompanying materials are made available under the @@ -718,8 +718,8 @@ public void testSubString() { int lastIndex = firstName.length(); List employees = em.createQuery("SELECT object(e) FROM Employee e where e.firstName = substring(:p1, :p2, :p3)"). setParameter("p1", firstName). - setParameter("p2", new Integer(firstIndex)). - setParameter("p3", new Integer(lastIndex)). + setParameter("p2", Integer.valueOf(firstIndex)). + setParameter("p3", Integer.valueOf(lastIndex)). getResultList(); // clean up @@ -2561,12 +2561,12 @@ public void testQueryHints() { query.setHint(QueryHints.READ_ONLY, Boolean.FALSE); assertFalse("Read-only not set.", olrQuery.isReadOnly()); - query.setHint(QueryHints.JDBC_TIMEOUT, new Integer(100)); + query.setHint(QueryHints.JDBC_TIMEOUT, Integer.valueOf(100)); assertTrue("Timeout not set.", olrQuery.getQueryTimeout() == 100); - query.setHint(QueryHints.JDBC_FETCH_SIZE, new Integer(101)); + query.setHint(QueryHints.JDBC_FETCH_SIZE, Integer.valueOf(101)); assertTrue("Fetch-size not set.", olrQuery.getFetchSize() == 101); - query.setHint(QueryHints.JDBC_MAX_ROWS, new Integer(103)); + query.setHint(QueryHints.JDBC_MAX_ROWS, Integer.valueOf(103)); assertTrue("Max-rows not set.", olrQuery.getMaxRows() == 103); query.setHint(QueryHints.REFRESH_CASCADE, CascadePolicy.NoCascading); assertTrue(olrQuery.getCascadePolicy()==DatabaseQuery.NoCascading); @@ -3503,7 +3503,7 @@ public void testInitializeFieldForPropertyAccess() { em = createEntityManager(); beginTransaction(em); try { - employee = em.find(Employee.class, new Integer(id)); + employee = em.find(Employee.class, Integer.valueOf(id)); address = employee.getAddress(); assertTrue("The address was not persisted.", employee.getAddress() != null); @@ -3540,7 +3540,7 @@ public void testSetFieldForPropertyAccess() { int addressId = address.getId(); beginTransaction(em); - employee = em.find(Employee.class, new Integer(id)); + employee = em.find(Employee.class, Integer.valueOf(id)); employee.getAddress(); address = new Address(); @@ -3560,13 +3560,13 @@ public void testSetFieldForPropertyAccess() { em = createEntityManager(); beginTransaction(em); try { - employee = em.find(Employee.class, new Integer(id)); + employee = em.find(Employee.class, Integer.valueOf(id)); address = employee.getAddress(); assertTrue("The address was not persisted.", employee.getAddress() != null); assertTrue("The address was not correctly persisted.", employee.getAddress().getCity().equals("Metropolis")); } finally { - Address initialAddress = em.find(Address.class, new Integer(addressId)); + Address initialAddress = em.find(Address.class, Integer.valueOf(addressId)); employee.setAddress(null); employee.setManager((Employee)null); em.remove(address); @@ -3621,13 +3621,13 @@ public void testSetFieldForPropertyAccessWithRefresh() { em = createEntityManager(); beginTransaction(em); try { - employee = em.find(Employee.class, new Integer(id)); + employee = em.find(Employee.class, Integer.valueOf(id)); address = employee.getAddress(); assertTrue("The address was not persisted.", employee.getAddress() != null); assertTrue("The address was not correctly persisted.", employee.getAddress().getCity().equals("Metropolis")); } finally { - Address initialAddress = em.find(Address.class, new Integer(addressId)); + Address initialAddress = em.find(Address.class, Integer.valueOf(addressId)); employee.setAddress(null); employee.setManager((Employee)null); em.remove(address); @@ -3663,7 +3663,7 @@ public void testSetFieldForPropertyAccessWithNewEM(){ em = createEntityManager(); beginTransaction(em); - employee = em.find(Employee.class, new Integer(id)); + employee = em.find(Employee.class, Integer.valueOf(id)); employee.getAddress(); address = new Address(); @@ -3683,14 +3683,14 @@ public void testSetFieldForPropertyAccessWithNewEM(){ em = createEntityManager(); beginTransaction(em); try { - employee = em.find(Employee.class, new Integer(id)); + employee = em.find(Employee.class, Integer.valueOf(id)); address = employee.getAddress(); assertTrue("The address was not persisted.", employee.getAddress() != null); assertTrue("The address was not correctly persisted.", employee.getAddress().getCity().equals("Metropolis")); } finally { - Address initialAddress = em.find(Address.class, new Integer(addressId)); + Address initialAddress = em.find(Address.class, Integer.valueOf(addressId)); employee.setAddress(null); employee.setManager((Employee)null); em.remove(address); @@ -4415,7 +4415,7 @@ public void testClosedEmShouldThrowException() { errorMsg = errorMsg + "; em.getDelegate() threw wrong exception: " + ex.getMessage(); } try { - em.getReference(Employee.class, new Integer(1)); + em.getReference(Employee.class, Integer.valueOf(1)); errorMsg = errorMsg + "; em.getReference() didn't throw exception"; } catch(IllegalStateException ise) { // expected diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/fieldaccess/advanced/EntityManagerTLRJUnitTestSuite.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/fieldaccess/advanced/EntityManagerTLRJUnitTestSuite.java index 912105d9afa..f4247b11bd7 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/fieldaccess/advanced/EntityManagerTLRJUnitTestSuite.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/fieldaccess/advanced/EntityManagerTLRJUnitTestSuite.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -598,8 +598,8 @@ public void testSubString() { int lastIndex = firstName.length(); List employees = em.createQuery("SELECT object(e) FROM Employee e where e.firstName = substring(:p1, :p2, :p3)"). setParameter("p1", firstName). - setParameter("p2", new Integer(firstIndex)). - setParameter("p3", new Integer(lastIndex)). + setParameter("p2", Integer.valueOf(firstIndex)). + setParameter("p3", Integer.valueOf(lastIndex)). getResultList(); // clean up @@ -2421,12 +2421,12 @@ public void testQueryHints() { query.setHint(QueryHints.READ_ONLY, Boolean.FALSE); assertFalse("Read-only not set.", olrQuery.isReadOnly()); - query.setHint(QueryHints.JDBC_TIMEOUT, new Integer(100)); + query.setHint(QueryHints.JDBC_TIMEOUT, Integer.valueOf(100)); assertTrue("Timeout not set.", olrQuery.getQueryTimeout() == 100); - query.setHint(QueryHints.JDBC_FETCH_SIZE, new Integer(101)); + query.setHint(QueryHints.JDBC_FETCH_SIZE, Integer.valueOf(101)); assertTrue("Fetch-size not set.", olrQuery.getFetchSize() == 101); - query.setHint(QueryHints.JDBC_MAX_ROWS, new Integer(103)); + query.setHint(QueryHints.JDBC_MAX_ROWS, Integer.valueOf(103)); assertTrue("Max-rows not set.", olrQuery.getMaxRows() == 103); query.setHint(QueryHints.REFRESH_CASCADE, CascadePolicy.NoCascading); assertTrue(olrQuery.getCascadePolicy()==DatabaseQuery.NoCascading); @@ -3355,7 +3355,7 @@ public void testInitializeFieldForPropertyAccess() { em = createEntityManager("fieldaccess"); beginTransaction(em); try { - employee = em.find(Employee.class, new Integer(id)); + employee = em.find(Employee.class, Integer.valueOf(id)); address = employee.getAddress(); assertTrue("The address was not persisted.", employee.getAddress() != null); @@ -3392,7 +3392,7 @@ public void testSetFieldForPropertyAccess() { int addressId = address.getId(); beginTransaction(em); - employee = em.find(Employee.class, new Integer(id)); + employee = em.find(Employee.class, Integer.valueOf(id)); employee.getAddress(); address = new Address(); @@ -3412,13 +3412,13 @@ public void testSetFieldForPropertyAccess() { em = createEntityManager("fieldaccess"); beginTransaction(em); try { - employee = em.find(Employee.class, new Integer(id)); + employee = em.find(Employee.class, Integer.valueOf(id)); address = employee.getAddress(); assertTrue("The address was not persisted.", employee.getAddress() != null); assertTrue("The address was not correctly persisted.", employee.getAddress().getCity().equals("Metropolis")); } finally { - Address initialAddress = em.find(Address.class, new Integer(addressId)); + Address initialAddress = em.find(Address.class, Integer.valueOf(addressId)); employee.setAddress(null); employee.setManager((Employee)null); em.remove(address); @@ -3473,13 +3473,13 @@ public void testSetFieldForPropertyAccessWithRefresh() { em = createEntityManager("fieldaccess"); beginTransaction(em); try { - employee = em.find(Employee.class, new Integer(id)); + employee = em.find(Employee.class, Integer.valueOf(id)); address = employee.getAddress(); assertTrue("The address was not persisted.", employee.getAddress() != null); assertTrue("The address was not correctly persisted.", employee.getAddress().getCity().equals("Metropolis")); } finally { - Address initialAddress = em.find(Address.class, new Integer(addressId)); + Address initialAddress = em.find(Address.class, Integer.valueOf(addressId)); employee.setAddress(null); employee.setManager((Employee)null); em.remove(address); @@ -3515,7 +3515,7 @@ public void testSetFieldForPropertyAccessWithNewEM(){ em = createEntityManager("fieldaccess"); beginTransaction(em); - employee = em.find(Employee.class, new Integer(id)); + employee = em.find(Employee.class, Integer.valueOf(id)); employee.getAddress(); address = new Address(); @@ -3535,14 +3535,14 @@ public void testSetFieldForPropertyAccessWithNewEM(){ em = createEntityManager("fieldaccess"); beginTransaction(em); try { - employee = em.find(Employee.class, new Integer(id)); + employee = em.find(Employee.class, Integer.valueOf(id)); address = employee.getAddress(); assertTrue("The address was not persisted.", employee.getAddress() != null); assertTrue("The address was not correctly persisted.", employee.getAddress().getCity().equals("Metropolis")); } finally { - Address initialAddress = em.find(Address.class, new Integer(addressId)); + Address initialAddress = em.find(Address.class, Integer.valueOf(addressId)); employee.setAddress(null); employee.setManager((Employee)null); em.remove(address); @@ -4213,7 +4213,7 @@ public void testClosedEmShouldThrowException() { errorMsg = errorMsg + "; em.getDelegate() threw wrong exception: " + ex.getMessage(); } try { - em.getReference(Employee.class, new Integer(1)); + em.getReference(Employee.class, Integer.valueOf(1)); errorMsg = errorMsg + "; em.getReference() didn't throw exception"; } catch(IllegalStateException ise) { // expected diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/fieldaccess/advanced/SQLResultSetMappingTestSuite.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/fieldaccess/advanced/SQLResultSetMappingTestSuite.java index 6ee9b09e627..469ceb08507 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/fieldaccess/advanced/SQLResultSetMappingTestSuite.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/fieldaccess/advanced/SQLResultSetMappingTestSuite.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -203,7 +203,7 @@ public void testBindParameters() throws Exception { query.addArgument("1"); Vector params = new Vector(); //4000 is a more reasonable budget given test data if results are expected - params.add(new Integer(4000)); + params.add(Integer.valueOf(4000)); List results = (List)getServerSession("fieldaccess").executeQuery(query, params); assertNotNull("No result returned", results); assertTrue("Empty list returned", (results.size()!=0)); @@ -222,7 +222,7 @@ public void testBindParametersWithPostitional() throws Exception { query.setShouldBindAllParameters(true); query.addArgument("1"); Vector params = new Vector(); - params.add(new Integer(4000)); + params.add(Integer.valueOf(4000)); List results = (List)getServerSession("fieldaccess").executeQuery(query, params); assertNotNull("No result returned", results); assertTrue("Empty list returned", (results.size()!=0)); diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/fieldaccess/advanced/UpdateAllQueryAdvancedJunitTest.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/fieldaccess/advanced/UpdateAllQueryAdvancedJunitTest.java index 5e7ac88cb4e..ab62a1ce4bb 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/fieldaccess/advanced/UpdateAllQueryAdvancedJunitTest.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/fieldaccess/advanced/UpdateAllQueryAdvancedJunitTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -196,7 +196,7 @@ public void testDoubleSalaryForAll() { try{ ExpressionBuilder builder = new ExpressionBuilder(); UpdateAllQuery updateQuery = new UpdateAllQuery(Employee.class); - updateQuery.addUpdate("salary", ExpressionMath.multiply(builder.get("salary"), new Integer(2))); + updateQuery.addUpdate("salary", ExpressionMath.multiply(builder.get("salary"), Integer.valueOf(2))); updateAllQueryInternal(updateQuery); }finally{ if (isTransactionActive(em)){ @@ -218,7 +218,7 @@ public void testDoubleSalaryForSalary() { ExpressionBuilder builder = new ExpressionBuilder(); Expression selectionExpression = builder.get("salary").lessThan(20000); UpdateAllQuery updateQuery = new UpdateAllQuery(Employee.class, selectionExpression); - updateQuery.addUpdate("salary", ExpressionMath.multiply(builder.get("salary"), new Integer(2))); + updateQuery.addUpdate("salary", ExpressionMath.multiply(builder.get("salary"), Integer.valueOf(2))); updateAllQueryInternal(updateQuery); }finally{ if (isTransactionActive(em)){ @@ -240,7 +240,7 @@ public void testFirstNamePrefixBLADoubleSalaryForAll() { ExpressionBuilder builder = new ExpressionBuilder(); UpdateAllQuery updateQuery = new UpdateAllQuery(Employee.class); updateQuery.addUpdate("firstName", Expression.fromLiteral("'BLA'", null).concat(builder.get("firstName"))); - updateQuery.addUpdate("salary", ExpressionMath.multiply(builder.get("salary"), new Integer(2))); + updateQuery.addUpdate("salary", ExpressionMath.multiply(builder.get("salary"), Integer.valueOf(2))); updateAllQueryInternal(updateQuery); }finally{ if (isTransactionActive(em)){ @@ -263,7 +263,7 @@ public void testFirstNamePrefixBLADoubleSalaryForSalary() { Expression selectionExpression = builder.get("salary").lessThan(20000); UpdateAllQuery updateQuery = new UpdateAllQuery(Employee.class, selectionExpression); updateQuery.addUpdate("firstName", Expression.fromLiteral("'BLA'", null).concat(builder.get("firstName"))); - updateQuery.addUpdate("salary", ExpressionMath.multiply(builder.get("salary"), new Integer(2))); + updateQuery.addUpdate("salary", ExpressionMath.multiply(builder.get("salary"), Integer.valueOf(2))); updateAllQueryInternal(updateQuery); }finally{ if (isTransactionActive(em)){ @@ -286,7 +286,7 @@ public void testFirstNamePrefixBLADoubleSalaryForSalaryForFirstName() { Expression selectionExpression = builder.get("salary").lessThan(20000).and(builder.get("firstName").like("J%")); UpdateAllQuery updateQuery = new UpdateAllQuery(Employee.class, selectionExpression); updateQuery.addUpdate("firstName", Expression.fromLiteral("'BLA'", null).concat(builder.get("firstName"))); - updateQuery.addUpdate("salary", ExpressionMath.multiply(builder.get("salary"), new Integer(2))); + updateQuery.addUpdate("salary", ExpressionMath.multiply(builder.get("salary"), Integer.valueOf(2))); updateAllQueryInternal(updateQuery); }finally{ if (isTransactionActive(em)){ diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/fieldaccess/relationships/ExpressionJUnitTestSuite.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/fieldaccess/relationships/ExpressionJUnitTestSuite.java index 89b744de522..e7270b13cd9 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/fieldaccess/relationships/ExpressionJUnitTestSuite.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/fieldaccess/relationships/ExpressionJUnitTestSuite.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -458,7 +458,7 @@ public void testLocateWithSingleArgument() throws Exception { beginTransaction(em); try { ExpressionBuilder builder = new ExpressionBuilder(); - Expression expression = builder.get("name").locate("t").equal(new Integer(2)); + Expression expression = builder.get("name").locate("t").equal(Integer.valueOf(2)); ReadAllQuery query = new ReadAllQuery(); query.setReferenceClass(Item.class); @@ -518,7 +518,7 @@ public void testLocateWithDoubleArgument() throws Exception { beginTransaction(em); try { ExpressionBuilder builder = new ExpressionBuilder(); - Expression expression = builder.get("name").locate("i", 2).equal(new Integer(5)); + Expression expression = builder.get("name").locate("i", 2).equal(Integer.valueOf(5)); ReadAllQuery query = new ReadAllQuery(); query.setReferenceClass(Item.class); diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/fieldaccess/relationships/RelationshipModelJUnitTestSuite.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/fieldaccess/relationships/RelationshipModelJUnitTestSuite.java index 0bcf4a032ef..0189b56bc77 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/fieldaccess/relationships/RelationshipModelJUnitTestSuite.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/fieldaccess/relationships/RelationshipModelJUnitTestSuite.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -211,7 +211,7 @@ public void testGetResultCollectionTest() { returnedCustomers1 = query1.getResultCollection(); EJBQueryImpl query2 = (EJBQueryImpl) entityManagerImpl.createQuery(ejbql1); - query2.setParameter("id", new Integer(-10)); + query2.setParameter("id", Integer.valueOf(-10)); returnedCustomers2 = query2.getResultCollection(); // bug:4297903, check container policy failure @@ -233,7 +233,7 @@ public void testGetResultCollectionTest() { entityManagerImpl = (EntityManagerImpl) em.getDelegate(); // bug:4300879, check ReadObjectQuery fails EJBQueryImpl query4 = (EJBQueryImpl) entityManagerImpl.createQuery(ejbql1); - query4.setParameter("id", new Integer(-10)); + query4.setParameter("id", Integer.valueOf(-10)); ReadObjectQuery readObjectQuery2 = new ReadObjectQuery(Customer.class); readObjectQuery2.setEJBQLString(ejbql1); query4.setDatabaseQuery(readObjectQuery2); @@ -293,7 +293,7 @@ public void testGetResultListTest() { returnedCustomers1 = query1.getResultList(); Query query2 = em.createQuery(ejbql1); - query2.setParameter("id", new Integer(-10)); + query2.setParameter("id", Integer.valueOf(-10)); returnedCustomers2 = query2.getResultList(); // bug:4297903, check container policy failure @@ -315,7 +315,7 @@ public void testGetResultListTest() { entityManagerImpl = (EntityManagerImpl) em.getDelegate(); // bug:4300879, check ReadObjectQuery fails EJBQueryImpl query4 = (EJBQueryImpl) entityManagerImpl.createQuery(ejbql1); - query4.setParameter("id", new Integer(-10)); + query4.setParameter("id", Integer.valueOf(-10)); ReadObjectQuery readObjectQuery2 = new ReadObjectQuery(Customer.class); readObjectQuery2.setEJBQLString(ejbql1); query4.setDatabaseQuery(readObjectQuery2); diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/inheritance/LifecycleCallbackJunitTest.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/inheritance/LifecycleCallbackJunitTest.java index edf50a6647e..1ecc1370c7b 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/inheritance/LifecycleCallbackJunitTest.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/inheritance/LifecycleCallbackJunitTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -157,8 +157,8 @@ public void testPostPersistBusInheritAndDefault() { try { Bus bus = new Bus(); - bus.setPassengerCapacity(new Integer(50)); - bus.setFuelCapacity(new Integer(175)); + bus.setPassengerCapacity(Integer.valueOf(50)); + bus.setFuelCapacity(Integer.valueOf(175)); bus.setDescription("OC Transpo Bus"); bus.setFuelType("Diesel"); em.persist(bus); @@ -203,8 +203,8 @@ public void testPostPersistSportsCarInheritAndExcludeDefault() { try { SportsCar sportsCar = new SportsCar(); - sportsCar.setPassengerCapacity(new Integer(4)); - sportsCar.setFuelCapacity(new Integer(55)); + sportsCar.setPassengerCapacity(Integer.valueOf(4)); + sportsCar.setFuelCapacity(Integer.valueOf(55)); sportsCar.setDescription("Porshe"); sportsCar.setFuelType("Gas"); em.persist(sportsCar); @@ -238,8 +238,8 @@ public void testPrePersistBusOverrideAndAbstractInheritAndDefault() { try { Bus bus = new Bus(); - bus.setPassengerCapacity(new Integer(30)); - bus.setFuelCapacity(new Integer(100)); + bus.setPassengerCapacity(Integer.valueOf(30)); + bus.setFuelCapacity(Integer.valueOf(100)); bus.setDescription("School Bus"); bus.setFuelType("Diesel"); em.persist(bus); @@ -281,8 +281,8 @@ public void testPrePersistSportsCarInheritAndExcludeDefault() { try { SportsCar sportsCar = new SportsCar(); - sportsCar.setPassengerCapacity(new Integer(2)); - sportsCar.setFuelCapacity(new Integer(60)); + sportsCar.setPassengerCapacity(Integer.valueOf(2)); + sportsCar.setFuelCapacity(Integer.valueOf(60)); sportsCar.setDescription("Corvette"); sportsCar.setFuelType("Gas"); em.persist(sportsCar); @@ -314,8 +314,8 @@ public void testPrePersistSportsCarOverride() { try { SportsCar sportsCar = new SportsCar(); - sportsCar.setPassengerCapacity(new Integer(2)); - sportsCar.setFuelCapacity(new Integer(90)); + sportsCar.setPassengerCapacity(Integer.valueOf(2)); + sportsCar.setFuelCapacity(Integer.valueOf(90)); sportsCar.setDescription("Viper"); sportsCar.setFuelType("Gas"); em.persist(sportsCar); diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/inheritance/MixedInheritanceJUnitTestCase.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/inheritance/MixedInheritanceJUnitTestCase.java index 9cbff68d257..a230c861bc2 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/inheritance/MixedInheritanceJUnitTestCase.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/inheritance/MixedInheritanceJUnitTestCase.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -148,7 +148,7 @@ public void testCreateNewMudTire() { MudTireInfo mudTire = new MudTireInfo(); mudTire.setName("Goodyear Mud Tracks"); mudTire.setCode("MT-674-A4"); - mudTire.setPressure(new Integer(100)); + mudTire.setPressure(Integer.valueOf(100)); mudTire.setTreadDepth(3); TireRating tireRating = new TireRating(); @@ -180,7 +180,7 @@ public void testCreateNewRockTire() { RockTireInfo rockTire = new RockTireInfo(); rockTire.setName("Goodyear Mud Tracks"); rockTire.setCode("AE-678"); - rockTire.setPressure(new Integer(100)); + rockTire.setPressure(Integer.valueOf(100)); rockTire.setGrip(RockTireInfo.Grip.SUPER); try { diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/inheritance/MultipleTableInheritanceCreateTest.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/inheritance/MultipleTableInheritanceCreateTest.java index 583378ee52b..9f5b01bd3d9 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/inheritance/MultipleTableInheritanceCreateTest.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/inheritance/MultipleTableInheritanceCreateTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -48,8 +48,8 @@ public void test() throws Exception { Bus bus = new Bus(); bus.setBusDriver(busDriver); - bus.setFuelCapacity(new Integer(275)); - bus.setPassengerCapacity(new Integer(100)); + bus.setFuelCapacity(Integer.valueOf(275)); + bus.setPassengerCapacity(Integer.valueOf(100)); beginTransaction(); getEntityManager().persist(bus); diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/inheritance/TablePerClassInheritanceJUnitTest.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/inheritance/TablePerClassInheritanceJUnitTest.java index cfd8f2aaeb9..1ac3c8159e8 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/inheritance/TablePerClassInheritanceJUnitTest.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/inheritance/TablePerClassInheritanceJUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -118,7 +118,7 @@ public void testCreateAssassinWithGun() { assassin.getNicknames().add("Clyde"); Gun gun = new Gun(); - gun.setCaliber(new Integer(50)); + gun.setCaliber(Integer.valueOf(50)); gun.setDescription("Sniper rifle"); gun.setModel("9-112"); @@ -175,7 +175,7 @@ public void testAddDirectElimination() { // Assassin already has a gun, therefore, correct weapon already set // for a direct elimination. directElimination = new DirectElimination(); - directElimination.setId(new Long(System.currentTimeMillis()).intValue()); + directElimination.setId(Long.valueOf(System.currentTimeMillis()).intValue()); directElimination.setName("Joe Smuck"); directElimination.setDescription("Because he has a big mouth"); directElimination.setAssassin(assassin); @@ -226,7 +226,7 @@ public void testAddIndirectElimination() { assassin.setWeapon(bomb); indirectElimination = new IndirectElimination(); - indirectElimination.setId(new Long(System.currentTimeMillis()).intValue()); + indirectElimination.setId(Long.valueOf(System.currentTimeMillis()).intValue()); indirectElimination.setName("Jill Smuck"); indirectElimination.setDescription("Because she has a big mouth"); indirectElimination.setAssassin(assassin); @@ -637,8 +637,8 @@ public void testGunOptimisticLocking() { Gun gun1 = em1.find(Gun.class, gunSerialNumber); Gun gun2 = em2.find(Gun.class, gunSerialNumber); - gun1.setCaliber(new Integer(12)); - gun2.setCaliber(new Integer(22)); + gun1.setCaliber(Integer.valueOf(12)); + gun2.setCaliber(Integer.valueOf(22)); em1.getTransaction().commit(); em2.getTransaction().commit(); diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/inherited/InheritedModelJunitTest.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/inherited/InheritedModelJunitTest.java index 4c93652851d..b32a6715724 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/inherited/InheritedModelJunitTest.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/inherited/InheritedModelJunitTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -337,7 +337,7 @@ public void testCreateBlue() { try { Blue blue = new Blue(); - blue.setAlcoholContent(new Float(5.3)); + blue.setAlcoholContent(5.3f); em.persist(blue); m_blueId = blue.getId(); blue.setUniqueKey(m_blueId.toBigInteger()); @@ -1109,8 +1109,8 @@ public void testInheritedClone() { consumer.setName("Keith Alexander"); BlueLight blueLight = new BlueLight(); - blueLight.setAlcoholContent(new Float(4.0)); - blueLight.setUniqueKey(new BigInteger((new Long(System.currentTimeMillis()).toString()))); + blueLight.setAlcoholContent(4.0f); + blueLight.setUniqueKey(new BigInteger((Long.valueOf(System.currentTimeMillis()).toString()))); em.persist(blueLight); consumer.addBlueLightBeerToConsume(blueLight); clone.setBeerConsumer(consumer); diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/jpql/AdvancedQueryTestSuite.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/jpql/AdvancedQueryTestSuite.java index 0662fa14cab..31c1c410471 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/jpql/AdvancedQueryTestSuite.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/jpql/AdvancedQueryTestSuite.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2019 IBM Corporation. All rights reserved. * * This program and the accompanying materials are made available under the @@ -589,12 +589,12 @@ public void testNativeResultType() { query.setParameter(1, employee.getId()); query.setParameter(2, employee.getFirstName()); arrayResult = (Object[])query.getSingleResult(); - if ((arrayResult.length != 1) || (!new Integer(((Number)arrayResult[0]).intValue()).equals(employee.getId()))) { + if ((arrayResult.length != 1) || (!Integer.valueOf(((Number)arrayResult[0]).intValue()).equals(employee.getId()))) { fail("Array result not correct: " + arrayResult); } listResult = query.getResultList(); arrayResult = (Object[])listResult.get(0); - if ((arrayResult.length != 1) || (!new Integer(((Number)arrayResult[0]).intValue()).equals(employee.getId()))) { + if ((arrayResult.length != 1) || (!Integer.valueOf(((Number)arrayResult[0]).intValue()).equals(employee.getId()))) { fail("Array result not correct: " + arrayResult); } @@ -604,12 +604,12 @@ public void testNativeResultType() { query.setParameter(1, employee.getId()); query.setParameter(2, employee.getFirstName()); Map mapResult = (Map)query.getSingleResult(); - if ((mapResult.size() != 2) || (!mapResult.get("F_NAME").equals(employee.getFirstName())) || (!(new Integer(((Number)mapResult.get("EMP_ID")).intValue())).equals(employee.getId()))) { + if ((mapResult.size() != 2) || (!mapResult.get("F_NAME").equals(employee.getFirstName())) || (!(Integer.valueOf(((Number)mapResult.get("EMP_ID")).intValue())).equals(employee.getId()))) { fail("Map result not correct: " + mapResult); } listResult = query.getResultList(); mapResult = (Map)listResult.get(0); - if ((mapResult.size() != 2) || (!mapResult.get("F_NAME").equals(employee.getFirstName())) || (!(new Integer(((Number)mapResult.get("EMP_ID")).intValue())).equals(employee.getId()))) { + if ((mapResult.size() != 2) || (!mapResult.get("F_NAME").equals(employee.getFirstName())) || (!(Integer.valueOf(((Number)mapResult.get("EMP_ID")).intValue())).equals(employee.getId()))) { fail("Map result not correct: " + mapResult); } @@ -619,12 +619,12 @@ public void testNativeResultType() { query.setParameter(1, employee.getId()); query.setParameter(2, employee.getFirstName()); mapResult = (Map)query.getSingleResult(); - if ((mapResult.size() != 1) || (!(new Integer(((Number)mapResult.get("EMP_ID")).intValue())).equals(employee.getId()))) { + if ((mapResult.size() != 1) || (!(Integer.valueOf(((Number)mapResult.get("EMP_ID")).intValue())).equals(employee.getId()))) { fail("Map result not correct: " + mapResult); } listResult = query.getResultList(); mapResult = (Map)listResult.get(0); - if ((mapResult.size() != 1) || (!(new Integer(((Number)mapResult.get("EMP_ID")).intValue())).equals(employee.getId()))) { + if ((mapResult.size() != 1) || (!(Integer.valueOf(((Number)mapResult.get("EMP_ID")).intValue())).equals(employee.getId()))) { fail("Map result not correct: " + mapResult); } @@ -633,12 +633,12 @@ public void testNativeResultType() { query.setParameter(1, employee.getId()); query.setParameter(2, employee.getFirstName()); Object valueResult = query.getSingleResult(); - if (!(new Integer(((Number)valueResult).intValue())).equals(employee.getId())) { + if (!(Integer.valueOf(((Number)valueResult).intValue())).equals(employee.getId())) { fail("Value result not correct: " + valueResult); } listResult = query.getResultList(); valueResult = listResult.get(0); - if (!(new Integer(((Number)valueResult).intValue())).equals(employee.getId())) { + if (!(Integer.valueOf(((Number)valueResult).intValue())).equals(employee.getId())) { fail("Value result not correct: " + valueResult); } } finally { diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/jpql/JUnitJPQLComplexTestSuite.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/jpql/JUnitJPQLComplexTestSuite.java index 1d547f83d5b..38321a04b1b 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/jpql/JUnitJPQLComplexTestSuite.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/jpql/JUnitJPQLComplexTestSuite.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2019 IBM Corporation. All rights reserved. * * This program and the accompanying materials are made available under the @@ -786,8 +786,8 @@ public void complexReverseSqrtTest() Employee emp1 = (Employee) expectedResult.elementAt(0); Employee emp2 = (Employee) expectedResult.elementAt(1); - double salarySquareRoot1 = Math.sqrt((new Double(emp1.getSalary()).doubleValue())); - double salarySquareRoot2 = Math.sqrt((new Double(emp2.getSalary()).doubleValue())); + double salarySquareRoot1 = Math.sqrt((Double.valueOf(emp1.getSalary()).doubleValue())); + double salarySquareRoot2 = Math.sqrt((Double.valueOf(emp2.getSalary()).doubleValue())); String ejbqlString = "SELECT OBJECT(emp) FROM Employee emp WHERE "; ejbqlString = ejbqlString + salarySquareRoot1; @@ -825,8 +825,8 @@ public void complexSqrtTest() Employee emp1 = (Employee) expectedResult.elementAt(0); Employee emp2 = (Employee) expectedResult.elementAt(1); - double salarySquareRoot1 = Math.sqrt((new Double(emp1.getSalary()).doubleValue())); - double salarySquareRoot2 = Math.sqrt((new Double(emp2.getSalary()).doubleValue())); + double salarySquareRoot1 = Math.sqrt((Double.valueOf(emp1.getSalary()).doubleValue())); + double salarySquareRoot2 = Math.sqrt((Double.valueOf(emp2.getSalary()).doubleValue())); String ejbqlString = "SELECT OBJECT(emp) FROM Employee emp WHERE "; ejbqlString = ejbqlString + "(SQRT(emp.salary) = "; @@ -1388,7 +1388,7 @@ public void complexConstructorAggregatesTest() sum += e.getSalary(); } } - LongHolder expectedResult = new LongHolder(new Long(sum), new Long(count)); + LongHolder expectedResult = new LongHolder(Long.valueOf(sum), Long.valueOf(count)); Assert.assertTrue("Constructor with aggregates argument Test Case Failed", result.equals(expectedResult)); } @@ -1405,7 +1405,7 @@ public void complexConstructorCountOnJoinedVariableTest() Collection managed = e.getManagedEmployees(); if ((managed != null) && (managed.size() > 0)) { EmployeeDetail d = new EmployeeDetail( - e.getFirstName(), e.getLastName(), new Long(managed.size())); + e.getFirstName(), e.getLastName(), Long.valueOf(managed.size())); expectedResult.add(d); } } @@ -2723,8 +2723,8 @@ public void complexIndexOfInSelectClauseTest(){ em.persist(consumer); em.flush(); List expectedResult = new ArrayList(); - expectedResult.add(new Integer(0)); - expectedResult.add(new Integer(1)); + expectedResult.add(Integer.valueOf(0)); + expectedResult.add(Integer.valueOf(1)); clearCache(); String ejbqlString = "select index(d) from EXPERT_CONSUMER e join e.designations d"; diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/jpql/JUnitJPQLExamplesTestSuite.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/jpql/JUnitJPQLExamplesTestSuite.java index 66972166a0a..17561e5138a 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/jpql/JUnitJPQLExamplesTestSuite.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/jpql/JUnitJPQLExamplesTestSuite.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -448,7 +448,7 @@ public void testExistsExpression() { subQuery.setReferenceClass(Employee.class); Expression managerExpression = employeeBuilder.get("manager").get("id").equal(managerBuilder.get("id")); - subQuery.addAttribute("one", new ConstantExpression(new Integer(1), subQuery.getExpressionBuilder())); + subQuery.addAttribute("one", new ConstantExpression(Integer.valueOf(1), subQuery.getExpressionBuilder())); subQuery.setSelectionCriteria(managerExpression); Expression employeeExpression = employeeBuilder.exists(subQuery); diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/jpql/JUnitJPQLSimpleTestSuite.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/jpql/JUnitJPQLSimpleTestSuite.java index 1ce94b6eeb2..935da72b74d 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/jpql/JUnitJPQLSimpleTestSuite.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/jpql/JUnitJPQLSimpleTestSuite.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -1014,10 +1014,10 @@ public void simpleLikeEscapeTestWithParameter() { // \ is always treated as escape in MySQL. Therefore ESCAPE '\' is considered a syntax error if (getServerSession().getPlatform().isMySQL()) { patternString = "234 RUBY $_Way"; - escChar = new Character('$'); + escChar = Character.valueOf('$'); } else { patternString = "234 RUBY \\_Way"; - escChar = new Character('\\'); + escChar = Character.valueOf('\\'); } List result = em.createQuery(ejbqlString).setParameter("pattern", patternString).setParameter("esc", escChar).getResultList(); @@ -1369,7 +1369,7 @@ public void simpleReverseSqrtTest() { Vector expectedResult = (Vector)getServerSession().executeQuery(raq); - double salarySquareRoot = Math.sqrt((new Double(((Employee)expectedResult.firstElement()).getSalary()).doubleValue())); + double salarySquareRoot = Math.sqrt((Double.valueOf(((Employee)expectedResult.firstElement()).getSalary()).doubleValue())); clearCache(); @@ -1422,7 +1422,7 @@ public void simpleSqrtTest() { Vector expectedResult = (Vector)getServerSession().executeQuery(raq); - double salarySquareRoot = Math.sqrt((new Double(((Employee)expectedResult.firstElement()).getSalary()).doubleValue())); + double salarySquareRoot = Math.sqrt((Double.valueOf(((Employee)expectedResult.firstElement()).getSalary()).doubleValue())); clearCache(); @@ -1588,11 +1588,11 @@ public void conformResultsInUnitOfWorkTest() { serverSession.login(); UnitOfWork unitOfWork = serverSession.acquireUnitOfWork(); Employee newEmployee = new Employee(); - newEmployee.setId(new Integer(9000)); + newEmployee.setId(Integer.valueOf(9000)); unitOfWork.registerObject(newEmployee); Vector testV = new Vector(); - testV.addElement(new Integer(9000)); + testV.addElement(Integer.valueOf(9000)); Employee result = (Employee)unitOfWork.executeQuery(readObjectQuery, testV); @@ -2149,7 +2149,7 @@ public void selectUsingLockModeQueryHintTest() { try { javax.persistence.Query query = em.createNamedQuery("findEmployeeByPK"); query.setParameter("id", emp1.getId()); - query.setHint("lockMode", new Short((short)1)); + query.setHint("lockMode", Short.valueOf((short)1)); emp2 = (Employee)query.getSingleResult(); } catch (Exception e) { diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/jpql/JUnitJPQLUnitTestSuite.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/jpql/JUnitJPQLUnitTestSuite.java index 2ac62f6b8a2..6975d2e6f94 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/jpql/JUnitJPQLUnitTestSuite.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/jpql/JUnitJPQLUnitTestSuite.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -373,7 +373,7 @@ public void testSelectEmployeeWithSameParameterUsedMultipleTimes() { try { String ejbqlString = "SELECT emp FROM Employee emp WHERE emp.id > :param1 OR :param1 IS null"; - createEntityManager().createQuery(ejbqlString).setParameter("param1", new Integer(1)).getResultList(); + createEntityManager().createQuery(ejbqlString).setParameter("param1", Integer.valueOf(1)).getResultList(); } catch (Exception e) { exception = e; } diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/jpql/JUnitJPQLValidationTestSuite.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/jpql/JUnitJPQLValidationTestSuite.java index 0c787e14f8a..00b2ebb883a 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/jpql/JUnitJPQLValidationTestSuite.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/jpql/JUnitJPQLValidationTestSuite.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2019 IBM Corporation. All rights reserved. * * This program and the accompanying materials are made available under the @@ -645,7 +645,7 @@ public void testParameterTypeValidation() { Query query = em.createQuery("Select e from Employee e where e.firstName = :fname AND e.lastName = :lname "); try { query.setParameter("fname", "foo"); - query.setParameter("lname", new Integer(1)); + query.setParameter("lname", Integer.valueOf(1)); query.getResultList(); } catch (IllegalArgumentException ex) { assertTrue("Failed to throw expected IllegalArgumentException, when parameter with incorrect type is used", ex.getMessage().contains("attempted to set a value of type")); diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/performance/JPAPerformanceRegressionModel.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/performance/JPAPerformanceRegressionModel.java index 6cee0adb0c9..439a14614cc 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/performance/JPAPerformanceRegressionModel.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/performance/JPAPerformanceRegressionModel.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -315,7 +315,7 @@ public void test() throws Exception { manager.close(); } manager = createEntityManager(); - address = manager.find(Address.class, new Long(address.getId())); + address = manager.find(Address.class, Long.valueOf(address.getId())); if (address.getStreet().equals("Hastings")) { throwError("Change tracking detected the change (not used?)."); } else { @@ -343,7 +343,7 @@ public void test() throws Exception { manager.close(); } manager = createEntityManager(); - address = manager.find(Address.class, new Long(address.getId())); + address = manager.find(Address.class, Long.valueOf(address.getId())); if (address.getStreet().equals("Hastings")) { throwError("Change tracking detected the change (not used?)."); } else { @@ -373,7 +373,7 @@ public void test() throws Exception { manager.close(); } manager = createEntityManager(); - employee = manager.getReference(Employee.class, new Long(employee.getId())); + employee = manager.getReference(Employee.class, Long.valueOf(employee.getId())); if (employee.getLastName().equals("Hastings")) { throwError("Change tracking detected the change (not used?)."); } else { @@ -402,7 +402,7 @@ public void test() throws Exception { manager.close(); } manager = createEntityManager(); - employee = manager.getReference(Employee.class, new Long(employee.getId())); + employee = manager.getReference(Employee.class, Long.valueOf(employee.getId())); manager.refresh(employee); if (employee.getPeriod().getStartDate().getDate() == 7) { throwError("Change tracking detected the change (not used?)."); diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/performance/reading/JPA2ReadObjectCompletelyEmployeePerformanceComparisonTest.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/performance/reading/JPA2ReadObjectCompletelyEmployeePerformanceComparisonTest.java index 65535fa45b9..aea4d857adf 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/performance/reading/JPA2ReadObjectCompletelyEmployeePerformanceComparisonTest.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/performance/reading/JPA2ReadObjectCompletelyEmployeePerformanceComparisonTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -44,7 +44,7 @@ public void setup() { public void test() throws Exception { EntityManager manager = createEntityManager(); manager.getTransaction().begin(); - Employee employee = manager.getReference(Employee.class, new Long(this.employeeId)); + Employee employee = manager.getReference(Employee.class, Long.valueOf(this.employeeId)); employee.getAddress().toString(); String.valueOf(employee.getManager()); employee.getManagedEmployees().size(); diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/performance/reading/JPAReadAllEmployeeCompletelyJoinedPerformanceComparisonTest.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/performance/reading/JPAReadAllEmployeeCompletelyJoinedPerformanceComparisonTest.java index aaa4ab559ce..a4ed9879956 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/performance/reading/JPAReadAllEmployeeCompletelyJoinedPerformanceComparisonTest.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/performance/reading/JPAReadAllEmployeeCompletelyJoinedPerformanceComparisonTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -36,9 +36,9 @@ public void test() throws Exception { EntityManager manager = createEntityManager(); manager.getTransaction().begin(); Query query = manager.createQuery("Select e from Employee e join fetch e.address left join fetch e.phoneNumbers"); - query.setHint("org.hibernate.readOnly", new Boolean(isReadOnly())); - query.setHint("eclipselink.read-only", new Boolean(isReadOnly())); - query.setHint("toplink.return-shared", new Boolean(isReadOnly())); + query.setHint("org.hibernate.readOnly", Boolean.valueOf(isReadOnly())); + query.setHint("eclipselink.read-only", Boolean.valueOf(isReadOnly())); + query.setHint("toplink.return-shared", Boolean.valueOf(isReadOnly())); List result = query.getResultList(); for (Iterator iterator = result.iterator(); iterator.hasNext();) { Employee employee = (Employee)iterator.next(); diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/performance/reading/JPAReadAllEmployeeCompletelyPerformanceComparisonTest.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/performance/reading/JPAReadAllEmployeeCompletelyPerformanceComparisonTest.java index 56a34bc04c5..ee9e66de297 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/performance/reading/JPAReadAllEmployeeCompletelyPerformanceComparisonTest.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/performance/reading/JPAReadAllEmployeeCompletelyPerformanceComparisonTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -36,9 +36,9 @@ public void test() throws Exception { EntityManager manager = createEntityManager(); manager.getTransaction().begin(); Query query = manager.createQuery("Select e from Employee e"); - query.setHint("org.hibernate.readOnly", new Boolean(isReadOnly())); - query.setHint("eclipselink.read-only", new Boolean(isReadOnly())); - query.setHint("toplink.return-shared", new Boolean(isReadOnly())); + query.setHint("org.hibernate.readOnly", Boolean.valueOf(isReadOnly())); + query.setHint("eclipselink.read-only", Boolean.valueOf(isReadOnly())); + query.setHint("toplink.return-shared", Boolean.valueOf(isReadOnly())); List result = query.getResultList(); for (Iterator iterator = result.iterator(); iterator.hasNext();) { Employee employee = (Employee)iterator.next(); diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/performance/reading/JPAReadObjectAddressPerformanceComparisonTest.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/performance/reading/JPAReadObjectAddressPerformanceComparisonTest.java index 81fea380632..2927f8e76ca 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/performance/reading/JPAReadObjectAddressPerformanceComparisonTest.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/performance/reading/JPAReadObjectAddressPerformanceComparisonTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -50,7 +50,7 @@ public void test() throws Exception { Query query = manager.createQuery("Select a from Address a where a.id = :id"); query.setHint(QueryHints.QUERY_TYPE, QueryType.ReadObject); query.setHint(QueryHints.CACHE_USAGE, CacheUsage.CheckCacheByExactPrimaryKey); - query.setParameter("id", new Long(this.addressId)); + query.setParameter("id", Long.valueOf(this.addressId)); Address address = (Address)query.getSingleResult(); address.toString(); manager.getTransaction().commit(); diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/performance/reading/JPAReadObjectCompletelyEmployeePerformanceComparisonTest.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/performance/reading/JPAReadObjectCompletelyEmployeePerformanceComparisonTest.java index 381791d94c8..3f49b260ae2 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/performance/reading/JPAReadObjectCompletelyEmployeePerformanceComparisonTest.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/performance/reading/JPAReadObjectCompletelyEmployeePerformanceComparisonTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -44,7 +44,7 @@ public void setup() { public void test() throws Exception { EntityManager manager = createEntityManager(); manager.getTransaction().begin(); - Employee employee = manager.getReference(Employee.class, new Long(this.employeeId)); + Employee employee = manager.getReference(Employee.class, Long.valueOf(this.employeeId)); employee.getAddress().toString(); String.valueOf(employee.getManager()); employee.getManagedEmployees().size(); diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/performance/reading/JPAReadObjectEmployeePerformanceComparisonTest.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/performance/reading/JPAReadObjectEmployeePerformanceComparisonTest.java index 17e240a9c11..13c1b67af4e 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/performance/reading/JPAReadObjectEmployeePerformanceComparisonTest.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/performance/reading/JPAReadObjectEmployeePerformanceComparisonTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -44,7 +44,7 @@ public void setup() { public void test() throws Exception { EntityManager manager = createEntityManager(); manager.getTransaction().begin(); - Employee employee = manager.getReference(Employee.class, new Long(this.employeeId)); + Employee employee = manager.getReference(Employee.class, Long.valueOf(this.employeeId)); employee.toString(); manager.getTransaction().commit(); manager.close(); diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/performance/reading/JPAReadObjectGetAddressPerformanceComparisonTest.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/performance/reading/JPAReadObjectGetAddressPerformanceComparisonTest.java index 90cab6a3ec1..5c088b6110b 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/performance/reading/JPAReadObjectGetAddressPerformanceComparisonTest.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/performance/reading/JPAReadObjectGetAddressPerformanceComparisonTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -44,7 +44,7 @@ public void setup() { public void test() throws Exception { EntityManager manager = createEntityManager(); manager.getTransaction().begin(); - Address address = manager.getReference(Address.class, new Long(this.addressId)); + Address address = manager.getReference(Address.class, Long.valueOf(this.addressId)); address.getId(); manager.getTransaction().commit(); manager.close(); diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/performance/writing/JPA2ComplexUpdateEmployeePerformanceComparisonTest.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/performance/writing/JPA2ComplexUpdateEmployeePerformanceComparisonTest.java index dc0a074e033..040626b1cbd 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/performance/writing/JPA2ComplexUpdateEmployeePerformanceComparisonTest.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/performance/writing/JPA2ComplexUpdateEmployeePerformanceComparisonTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -47,7 +47,7 @@ public void setup() { public void test() throws Exception { EntityManager manager = createEntityManager(); manager.getTransaction().begin(); - Employee employee = manager.find(Employee.class, new Long(originalEmployee.getId())); + Employee employee = manager.find(Employee.class, Long.valueOf(originalEmployee.getId())); count++; employee.setFirstName(originalEmployee.getFirstName() + count); employee.setLastName(originalEmployee.getLastName() + count); @@ -100,7 +100,7 @@ public void test() throws Exception { manager.getTransaction().commit(); } catch (Exception exception) { // Cache can get stale from TopLink run, so force refresh. - employee = manager.getReference(Employee.class, new Long(originalEmployee.getId())); + employee = manager.getReference(Employee.class, Long.valueOf(originalEmployee.getId())); manager.refresh(employee); employee.getPhoneNumbers(); } diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/performance/writing/JPA2InsertDeleteEmployeePerformanceComparisonTest.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/performance/writing/JPA2InsertDeleteEmployeePerformanceComparisonTest.java index f8372b34810..d9d9ac520f3 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/performance/writing/JPA2InsertDeleteEmployeePerformanceComparisonTest.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/performance/writing/JPA2InsertDeleteEmployeePerformanceComparisonTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -40,7 +40,7 @@ public void setup() { Employee any = (Employee)manager.createQuery("Select e from Employee e").getResultList().get(0); // Create a query to avoid a cache hit to load emulated data. Query query = manager.createQuery("Select e from Employee e where e.id = :id"); - query.setParameter("id", new Long(any.getId())); + query.setParameter("id", Long.valueOf(any.getId())); any = (Employee)query.getSingleResult(); manager.close(); manager = createEntityManager(); @@ -82,7 +82,7 @@ public void test() throws Exception { manager = createEntityManager(); manager.getTransaction().begin(); - employee = manager.getReference(Employee.class, new Long(employee.getId())); + employee = manager.getReference(Employee.class, Long.valueOf(employee.getId())); manager.remove(employee); manager.getTransaction().commit(); manager.close(); diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/performance/writing/JPA2UpdateEmployeePerformanceComparisonTest.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/performance/writing/JPA2UpdateEmployeePerformanceComparisonTest.java index 0190f3b17d8..179370cc7aa 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/performance/writing/JPA2UpdateEmployeePerformanceComparisonTest.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/performance/writing/JPA2UpdateEmployeePerformanceComparisonTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -49,13 +49,13 @@ public void setup() { public void test() throws Exception { EntityManager manager = createEntityManager(); manager.getTransaction().begin(); - Employee employee = manager.getReference(Employee.class, new Long(this.employeeId)); + Employee employee = manager.getReference(Employee.class, Long.valueOf(this.employeeId)); count++; employee.setFirstName(this.firstName + count); try { manager.getTransaction().commit(); } catch (Exception exception) { - employee = manager.getReference(Employee.class, new Long(this.employeeId)); + employee = manager.getReference(Employee.class, Long.valueOf(this.employeeId)); manager.refresh(employee); } manager.close(); diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/performance/writing/JPAComplexUpdateEmployeePerformanceComparisonTest.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/performance/writing/JPAComplexUpdateEmployeePerformanceComparisonTest.java index 2ef3f6226a0..7c3a09ffeaa 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/performance/writing/JPAComplexUpdateEmployeePerformanceComparisonTest.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/performance/writing/JPAComplexUpdateEmployeePerformanceComparisonTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -48,7 +48,7 @@ public void setup() { public void test() throws Exception { EntityManager manager = createEntityManager(); manager.getTransaction().begin(); - Employee employee = manager.find(Employee.class, new Long(originalEmployee.getId())); + Employee employee = manager.find(Employee.class, Long.valueOf(originalEmployee.getId())); count++; employee.setFirstName(originalEmployee.getFirstName() + count); employee.setLastName(originalEmployee.getLastName() + count); @@ -77,7 +77,7 @@ public void test() throws Exception { manager.getTransaction().commit(); } catch (Exception exception) { // Cache can get stale from TopLink run, so force refresh. - employee = manager.getReference(Employee.class, new Long(originalEmployee.getId())); + employee = manager.getReference(Employee.class, Long.valueOf(originalEmployee.getId())); manager.refresh(employee); employee.getPhoneNumbers(); } diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/performance/writing/JPAInsertDeleteAddressPerformanceComparisonTest.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/performance/writing/JPAInsertDeleteAddressPerformanceComparisonTest.java index e4d7909410b..348d7e4bcc9 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/performance/writing/JPAInsertDeleteAddressPerformanceComparisonTest.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/performance/writing/JPAInsertDeleteAddressPerformanceComparisonTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -35,7 +35,7 @@ public void setup() { Address any = (Address)manager.createQuery("Select a from Address a").getResultList().get(0); // Create a query to avoid a cache hit to load emulated data. Query query = manager.createQuery("Select a from Address a where a.id = :id"); - query.setParameter("id", new Long(any.getId())); + query.setParameter("id", Long.valueOf(any.getId())); any = (Address)query.getSingleResult(); manager.close(); manager = createEntityManager(); @@ -60,7 +60,7 @@ public void test() throws Exception { manager = createEntityManager(); manager.getTransaction().begin(); - address = manager.getReference(Address.class, new Long(address.getId())); + address = manager.getReference(Address.class, Long.valueOf(address.getId())); manager.remove(address); manager.getTransaction().commit(); manager.close(); diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/performance/writing/JPAInsertDeleteEmployeePerformanceComparisonTest.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/performance/writing/JPAInsertDeleteEmployeePerformanceComparisonTest.java index c02b79f12d4..cf29eee80db 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/performance/writing/JPAInsertDeleteEmployeePerformanceComparisonTest.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/performance/writing/JPAInsertDeleteEmployeePerformanceComparisonTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -36,7 +36,7 @@ public void setup() { Employee any = (Employee)manager.createQuery("Select e from Employee e").getResultList().get(0); // Create a query to avoid a cache hit to load emulated data. Query query = manager.createQuery("Select e from Employee e where e.id = :id"); - query.setParameter("id", new Long(any.getId())); + query.setParameter("id", Long.valueOf(any.getId())); any = (Employee)query.getSingleResult(); manager.close(); manager = createEntityManager(); @@ -86,7 +86,7 @@ public void test() throws Exception { manager = createEntityManager(); manager.getTransaction().begin(); - employee = manager.getReference(Employee.class, new Long(employee.getId())); + employee = manager.getReference(Employee.class, Long.valueOf(employee.getId())); manager.remove(employee); manager.getTransaction().commit(); manager.close(); diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/performance/writing/JPAUpdateAddressPerformanceComparisonTest.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/performance/writing/JPAUpdateAddressPerformanceComparisonTest.java index ec74a6f5a30..162834f8953 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/performance/writing/JPAUpdateAddressPerformanceComparisonTest.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/performance/writing/JPAUpdateAddressPerformanceComparisonTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -49,7 +49,7 @@ public void setup() { public void test() throws Exception { EntityManager manager = createEntityManager(); manager.getTransaction().begin(); - Address address = manager.find(Address.class, new Long(this.addressId)); + Address address = manager.find(Address.class, Long.valueOf(this.addressId)); count++; address.setStreet(street + count); manager.getTransaction().commit(); diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/performance/writing/JPAUpdateEmployeePerformanceComparisonTest.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/performance/writing/JPAUpdateEmployeePerformanceComparisonTest.java index d6d53b2dfd3..d8cee7d43e2 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/performance/writing/JPAUpdateEmployeePerformanceComparisonTest.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/performance/writing/JPAUpdateEmployeePerformanceComparisonTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -49,13 +49,13 @@ public void setup() { public void test() throws Exception { EntityManager manager = createEntityManager(); manager.getTransaction().begin(); - Employee employee = manager.getReference(Employee.class, new Long(this.employeeId)); + Employee employee = manager.getReference(Employee.class, Long.valueOf(this.employeeId)); count++; employee.setFirstName(this.firstName + count); try { manager.getTransaction().commit(); } catch (Exception exception) { - employee = manager.getReference(Employee.class, new Long(this.employeeId)); + employee = manager.getReference(Employee.class, Long.valueOf(this.employeeId)); manager.refresh(employee); } manager.close(); diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/relationships/EMQueryJUnitTestSuite.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/relationships/EMQueryJUnitTestSuite.java index ebdef1a71c0..07749b6aa8a 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/relationships/EMQueryJUnitTestSuite.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/relationships/EMQueryJUnitTestSuite.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -33,7 +33,7 @@ import junit.framework.TestSuite; public class EMQueryJUnitTestSuite extends JUnitTestCase { - protected Integer nonExistingCustomerId = new Integer(999999); + protected Integer nonExistingCustomerId = Integer.valueOf(999999); public EMQueryJUnitTestSuite() { } diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/relationships/ExpressionJUnitTestSuite.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/relationships/ExpressionJUnitTestSuite.java index c97f801d4d3..4b0b6641321 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/relationships/ExpressionJUnitTestSuite.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/relationships/ExpressionJUnitTestSuite.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -404,7 +404,7 @@ public void testLocateWithSingleArgument() throws Exception { closeEntityManager(em); try{ ExpressionBuilder builder = new ExpressionBuilder(); - Expression expression = builder.get("name").locate("t").equal(new Integer(2)); + Expression expression = builder.get("name").locate("t").equal(Integer.valueOf(2)); ReadAllQuery r = new ReadAllQuery(); r.setReferenceClass(Item.class); @@ -453,7 +453,7 @@ public void testLocateWithDoubleArgument() throws Exception { closeEntityManager(em); try{ ExpressionBuilder builder = new ExpressionBuilder(); - Expression expression = builder.get("name").locate("i", 2).equal(new Integer(5)); + Expression expression = builder.get("name").locate("i", 2).equal(Integer.valueOf(5)); ReadAllQuery r = new ReadAllQuery(); r.setReferenceClass(Item.class); @@ -503,7 +503,7 @@ public void testLocateWithDoubleArgument_Neg() throws Exception { closeEntityManager(em); try{ ExpressionBuilder builder = new ExpressionBuilder(); - Expression expression = builder.get("name").locate("t", 4).equal(new Integer(0)); + Expression expression = builder.get("name").locate("t", 4).equal(Integer.valueOf(0)); ReadAllQuery r = new ReadAllQuery(); r.setReferenceClass(Item.class); diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/relationships/RelationshipModelJUnitTestSuite.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/relationships/RelationshipModelJUnitTestSuite.java index 90ed410e04e..287992226d3 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/relationships/RelationshipModelJUnitTestSuite.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/relationships/RelationshipModelJUnitTestSuite.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -473,7 +473,7 @@ public void testGetResultCollectionTest() { returnedCustomers1 = query1.getResultCollection(); EJBQueryImpl query2 = (EJBQueryImpl) entityManagerImpl.createQuery(ejbql1); - query2.setParameter("id", new Integer(-10)); + query2.setParameter("id", Integer.valueOf(-10)); returnedCustomers2 = query2.getResultCollection(); // bug:4297903, check container policy failure @@ -495,7 +495,7 @@ public void testGetResultCollectionTest() { entityManagerImpl = (EntityManagerImpl) em.getDelegate(); // bug:4300879, check ReadObjectQuery fails EJBQueryImpl query4 = (EJBQueryImpl) entityManagerImpl.createQuery(ejbql1); - query4.setParameter("id", new Integer(-10)); + query4.setParameter("id", Integer.valueOf(-10)); ReadObjectQuery readObjectQuery2 = new ReadObjectQuery(Customer.class); readObjectQuery2.setEJBQLString(ejbql1); query4.setDatabaseQuery(readObjectQuery2); @@ -555,7 +555,7 @@ public void testGetResultListTest() { returnedCustomers1 = query1.getResultList(); Query query2 = em.createQuery(ejbql1); - query2.setParameter("id", new Integer(-10)); + query2.setParameter("id", Integer.valueOf(-10)); returnedCustomers2 = query2.getResultList(); // bug:4297903, check container policy failure @@ -577,7 +577,7 @@ public void testGetResultListTest() { entityManagerImpl = (EntityManagerImpl) em.getDelegate(); // bug:4300879, check ReadObjectQuery fails EJBQueryImpl query4 = (EJBQueryImpl) entityManagerImpl.createQuery(ejbql1); - query4.setParameter("id", new Integer(-10)); + query4.setParameter("id", Integer.valueOf(-10)); ReadObjectQuery readObjectQuery2 = new ReadObjectQuery(Customer.class); readObjectQuery2.setEJBQLString(ejbql1); query4.setDatabaseQuery(readObjectQuery2); diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/xml/advanced/EntityMappingsAdvancedJUnitTestCase.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/xml/advanced/EntityMappingsAdvancedJUnitTestCase.java index 30368bc907c..913fd6daf74 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/xml/advanced/EntityMappingsAdvancedJUnitTestCase.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/xml/advanced/EntityMappingsAdvancedJUnitTestCase.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -1049,8 +1049,8 @@ public void testSubString() { int lastIndex = firstName.length(); List employees = em.createQuery("SELECT object(e) FROM XMLEmployee e where e.firstName = substring(:p1, :p2, :p3)"). setParameter("p1", firstName). - setParameter("p2", new Integer(firstIndex)). - setParameter("p3", new Integer(lastIndex)). + setParameter("p2", Integer.valueOf(firstIndex)). + setParameter("p3", Integer.valueOf(lastIndex)). getResultList(); // clean up @@ -1299,7 +1299,7 @@ public void testProperty() { // verify properties set on Employee instance errorMsg += verifyPropertyValue(descriptor, "entityName", String.class, "XMLEmployee"); - errorMsg += verifyPropertyValue(descriptor, "entityIntegerProperty", Integer.class, new Integer(1)); + errorMsg += verifyPropertyValue(descriptor, "entityIntegerProperty", Integer.class, Integer.valueOf(1)); errorMsg += verifyPropertyValue(descriptor, "ToBeOverriddenByXml", Boolean.class, Boolean.TRUE); errorMsg += verifyPropertyValue(descriptor, "ToBeProcessed", Boolean.class, Boolean.TRUE); @@ -1311,13 +1311,13 @@ public void testProperty() { // attribute m_lastName has many properties of different types DatabaseMapping mapping = descriptor.getMappingForAttributeName("lastName"); errorMsg += verifyPropertyValue(mapping, "BooleanProperty", Boolean.class, Boolean.TRUE); - errorMsg += verifyPropertyValue(mapping, "ByteProperty", Byte.class, new Byte((byte)1)); - errorMsg += verifyPropertyValue(mapping, "CharacterProperty", Character.class, new Character('A')); - errorMsg += verifyPropertyValue(mapping, "DoubleProperty", Double.class, new Double(1)); - errorMsg += verifyPropertyValue(mapping, "FloatProperty", Float.class, new Float(1)); - errorMsg += verifyPropertyValue(mapping, "IntegerProperty", Integer.class, new Integer(1)); - errorMsg += verifyPropertyValue(mapping, "LongProperty", Long.class, new Long(1)); - errorMsg += verifyPropertyValue(mapping, "ShortProperty", Short.class, new Short((short)1)); + errorMsg += verifyPropertyValue(mapping, "ByteProperty", Byte.class, Byte.valueOf((byte)1)); + errorMsg += verifyPropertyValue(mapping, "CharacterProperty", Character.class, Character.valueOf('A')); + errorMsg += verifyPropertyValue(mapping, "DoubleProperty", Double.class, Double.valueOf(1)); + errorMsg += verifyPropertyValue(mapping, "FloatProperty", Float.class, Float.valueOf(1)); + errorMsg += verifyPropertyValue(mapping, "IntegerProperty", Integer.class, Integer.valueOf(1)); + errorMsg += verifyPropertyValue(mapping, "LongProperty", Long.class, Long.valueOf(1)); + errorMsg += verifyPropertyValue(mapping, "ShortProperty", Short.class, Short.valueOf((short)1)); errorMsg += verifyPropertyValue(mapping, "BigDecimalProperty", java.math.BigDecimal.class, java.math.BigDecimal.ONE); errorMsg += verifyPropertyValue(mapping, "BigIntegerProperty", java.math.BigInteger.class, java.math.BigInteger.ONE); errorMsg += verifyPropertyValue(mapping, "TimeProperty", java.sql.Time.class, Helper.timeFromString("13:59:59")); diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/xml/composite/advanced/EntityMappingsAdvancedJUnitTestCase.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/xml/composite/advanced/EntityMappingsAdvancedJUnitTestCase.java index 7f546d7e4b2..82e8a45aaee 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/xml/composite/advanced/EntityMappingsAdvancedJUnitTestCase.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/xml/composite/advanced/EntityMappingsAdvancedJUnitTestCase.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -1077,8 +1077,8 @@ public void testSubString() { int lastIndex = firstName.length(); List employees = em.createQuery("SELECT object(e) FROM XMLEmployee e where e.firstName = substring(:p1, :p2, :p3)"). setParameter("p1", firstName). - setParameter("p2", new Integer(firstIndex)). - setParameter("p3", new Integer(lastIndex)). + setParameter("p2", Integer.valueOf(firstIndex)). + setParameter("p3", Integer.valueOf(lastIndex)). getResultList(); // clean up @@ -1328,7 +1328,7 @@ public void testProperty() { // verify properties set on Employee instance errorMsg += verifyPropertyValue(descriptor, "entityName", String.class, "XMLEmployee"); - errorMsg += verifyPropertyValue(descriptor, "entityIntegerProperty", Integer.class, new Integer(1)); + errorMsg += verifyPropertyValue(descriptor, "entityIntegerProperty", Integer.class, Integer.valueOf(1)); errorMsg += verifyPropertyValue(descriptor, "ToBeOverriddenByXml", Boolean.class, Boolean.TRUE); errorMsg += verifyPropertyValue(descriptor, "ToBeProcessed", Boolean.class, Boolean.TRUE); @@ -1340,13 +1340,13 @@ public void testProperty() { // attribute m_lastName has many properties of different types DatabaseMapping mapping = descriptor.getMappingForAttributeName("lastName"); errorMsg += verifyPropertyValue(mapping, "BooleanProperty", Boolean.class, Boolean.TRUE); - errorMsg += verifyPropertyValue(mapping, "ByteProperty", Byte.class, new Byte((byte)1)); - errorMsg += verifyPropertyValue(mapping, "CharacterProperty", Character.class, new Character('A')); - errorMsg += verifyPropertyValue(mapping, "DoubleProperty", Double.class, new Double(1)); - errorMsg += verifyPropertyValue(mapping, "FloatProperty", Float.class, new Float(1)); - errorMsg += verifyPropertyValue(mapping, "IntegerProperty", Integer.class, new Integer(1)); - errorMsg += verifyPropertyValue(mapping, "LongProperty", Long.class, new Long(1)); - errorMsg += verifyPropertyValue(mapping, "ShortProperty", Short.class, new Short((short)1)); + errorMsg += verifyPropertyValue(mapping, "ByteProperty", Byte.class, Byte.valueOf((byte)1)); + errorMsg += verifyPropertyValue(mapping, "CharacterProperty", Character.class, Character.valueOf('A')); + errorMsg += verifyPropertyValue(mapping, "DoubleProperty", Double.class, Double.valueOf(1)); + errorMsg += verifyPropertyValue(mapping, "FloatProperty", Float.class, Float.valueOf(1)); + errorMsg += verifyPropertyValue(mapping, "IntegerProperty", Integer.class, Integer.valueOf(1)); + errorMsg += verifyPropertyValue(mapping, "LongProperty", Long.class, Long.valueOf(1)); + errorMsg += verifyPropertyValue(mapping, "ShortProperty", Short.class, Short.valueOf((short)1)); errorMsg += verifyPropertyValue(mapping, "BigDecimalProperty", java.math.BigDecimal.class, java.math.BigDecimal.ONE); errorMsg += verifyPropertyValue(mapping, "BigIntegerProperty", java.math.BigInteger.class, java.math.BigInteger.ONE); errorMsg += verifyPropertyValue(mapping, "TimeProperty", java.sql.Time.class, Helper.timeFromString("13:59:59")); diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/xml/inheritance/EntityMappingsInheritanceJUnitTestCase.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/xml/inheritance/EntityMappingsInheritanceJUnitTestCase.java index 575b71c2747..0981fb92de1 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/xml/inheritance/EntityMappingsInheritanceJUnitTestCase.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/xml/inheritance/EntityMappingsInheritanceJUnitTestCase.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -177,8 +177,8 @@ public void testCreateBusFueledVehicle() { beginTransaction(em); Bus bus = new Bus(); - bus.setPassengerCapacity(new Integer(50)); - bus.setFuelCapacity(new Integer(175)); + bus.setPassengerCapacity(Integer.valueOf(50)); + bus.setFuelCapacity(Integer.valueOf(175)); bus.setDescription("OC Transpo Bus"); bus.setFuelType("Diesel"); diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa21/advanced/ConverterTestSuite.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa21/advanced/ConverterTestSuite.java index 754bb99a69b..6e5733003fd 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa21/advanced/ConverterTestSuite.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa21/advanced/ConverterTestSuite.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -146,7 +146,7 @@ public void testAnnotationConverters() { organizer.setRace(race); Responsibility responsibility = new Responsibility(); - responsibility.setUniqueIdentifier(new Long(System.currentTimeMillis())); + responsibility.setUniqueIdentifier(Long.valueOf(System.currentTimeMillis())); responsibility.setDescription("Raise funds"); race.addOrganizer(organizer, responsibility); @@ -206,7 +206,7 @@ public void testConverterExceptionWrapping1() { organizer.setRace(race); Responsibility responsibility = new Responsibility(); - responsibility.setUniqueIdentifier(new Long(System.currentTimeMillis())); + responsibility.setUniqueIdentifier(Long.valueOf(System.currentTimeMillis())); //This string causes an exception to be thrown from the ResponsibilityConverter.convertToEntityAttribute method responsibility.setDescription(ResponsibilityConverter.THROW_EXCEPTION_IN_TO_ENTITY_ATTRIBUTE); @@ -261,7 +261,7 @@ public void testConverterExceptionWrapping2() { organizer.setRace(race); Responsibility responsibility = new Responsibility(); - responsibility.setUniqueIdentifier(new Long(System.currentTimeMillis())); + responsibility.setUniqueIdentifier(Long.valueOf(System.currentTimeMillis())); //This string causes an exception to be thrown from the ResponsibilityConverter.convertToDatabaseColumn method responsibility.setDescription(ResponsibilityConverter.THROW_EXCEPTION_IN_TO_DATABASE_COLUMN); diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa21/advanced/DDLTestSuite.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa21/advanced/DDLTestSuite.java index f109be99968..1dc34382203 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa21/advanced/DDLTestSuite.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa21/advanced/DDLTestSuite.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2023 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012, 2018 IBM Corporation. All rights reserved. * * This program and the accompanying materials are made available under the @@ -171,7 +171,7 @@ public void testPersistenceGenerateSchemaOnDatabase(String createSource, String organizer.setRace(race); Responsibility responsibility = new Responsibility(); - responsibility.setUniqueIdentifier(new Long(System.currentTimeMillis())); + responsibility.setUniqueIdentifier(Long.valueOf(System.currentTimeMillis())); responsibility.setDescription("Raise funds"); race.addOrganizer(organizer, responsibility); diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa21/advanced/ForeignKeyTestSuite.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa21/advanced/ForeignKeyTestSuite.java index fb1345f2198..1599c3465cc 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa21/advanced/ForeignKeyTestSuite.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa21/advanced/ForeignKeyTestSuite.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -223,7 +223,7 @@ public void testReadAndWriteDDLObjects() { organizer.setRace(race); Responsibility responsibility = new Responsibility(); - responsibility.setUniqueIdentifier(new Long(System.currentTimeMillis())); + responsibility.setUniqueIdentifier(Long.valueOf(System.currentTimeMillis())); responsibility.setDescription("Raise funds"); race.addOrganizer(organizer, responsibility); diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa21/advanced/StoredProcedureQueryTestSuite.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa21/advanced/StoredProcedureQueryTestSuite.java index 168836e83ec..90c686065ae 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa21/advanced/StoredProcedureQueryTestSuite.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa21/advanced/StoredProcedureQueryTestSuite.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -347,7 +347,7 @@ public void testQueryExecute1() { // reason MySql returns a Long here. By position is ok, that is, // it returns an Integer (as we registered) if (outputParamValueFromName instanceof Long) { - assertTrue("Incorrect value returned, expected " + numberOfEmployes + ", got: " + outputParamValueFromName, outputParamValueFromName.equals(new Long(numberOfEmployes))); + assertTrue("Incorrect value returned, expected " + numberOfEmployes + ", got: " + outputParamValueFromName, outputParamValueFromName.equals(Long.valueOf(numberOfEmployes))); } else if (outputParamValueFromName instanceof Integer) { assertTrue("Incorrect value returned, expected " + numberOfEmployes + ", got: " + outputParamValueFromName, outputParamValueFromName.equals(numberOfEmployes)); } @@ -383,7 +383,7 @@ public void testQueryExecute1() { // This test also mixes index and named parameters, so this test my be invalid to begin with. assertNotNull("The output parameter was null.", outputParamValueFromPosition); if (outputParamValueFromName instanceof Long) { - assertTrue("Incorrect value returned, expected " + numberOfEmployes + ", got: " + outputParamValueFromPosition, outputParamValueFromPosition.equals(new Long(numberOfEmployes))); + assertTrue("Incorrect value returned, expected " + numberOfEmployes + ", got: " + outputParamValueFromPosition, outputParamValueFromPosition.equals(Long.valueOf(numberOfEmployes))); } else if (outputParamValueFromName instanceof Integer) { assertTrue("Incorrect value returned, expected " + numberOfEmployes + ", got: " + outputParamValueFromPosition, outputParamValueFromPosition.equals(numberOfEmployes)); } @@ -512,7 +512,7 @@ public void testQueryExecute2() { // reason MySql returns a Long here. By position is ok, that is, // it returns an Integer (as we registered) if (outputParamValueFromName instanceof Long) { - assertTrue("Incorrect value returned, expected " + numberOfEmployes + ", got: " + outputParamValueFromName, outputParamValueFromName.equals(new Long(numberOfEmployes))); + assertTrue("Incorrect value returned, expected " + numberOfEmployes + ", got: " + outputParamValueFromName, outputParamValueFromName.equals(Long.valueOf(numberOfEmployes))); } else if (outputParamValueFromName instanceof Integer) { assertTrue("Incorrect value returned, expected " + numberOfEmployes + ", got: " + outputParamValueFromName, outputParamValueFromName.equals(numberOfEmployes)); } @@ -547,7 +547,7 @@ public void testQueryExecute2() { // This test also mixes index and named parameters, so this test my be invalid to begin with. assertNotNull("The output parameter was null.", outputParamValueFromPosition); if (outputParamValueFromName instanceof Long) { - assertTrue("Incorrect value returned, expected " + numberOfEmployes + ", got: " + outputParamValueFromPosition, outputParamValueFromPosition.equals(new Long(numberOfEmployes))); + assertTrue("Incorrect value returned, expected " + numberOfEmployes + ", got: " + outputParamValueFromPosition, outputParamValueFromPosition.equals(Long.valueOf(numberOfEmployes))); } else if (outputParamValueFromName instanceof Integer) { assertTrue("Incorrect value returned, expected " + numberOfEmployes + ", got: " + outputParamValueFromPosition, outputParamValueFromPosition.equals(numberOfEmployes)); } @@ -676,7 +676,7 @@ public void testQueryGetResultList() { assertTrue("Incorrect number of addresses returned", addresses.size() == 1); Object[] addressContent = (Object[]) addresses.get(0); assertTrue("Incorrect data content size", addressContent.length == 6); - assertTrue("Id content incorrect", addressContent[0].equals(new Long(address1.getId()))); + assertTrue("Id content incorrect", addressContent[0].equals(Long.valueOf(address1.getId()))); assertTrue("Steet content incorrect", addressContent[1].equals(address1.getStreet())); assertTrue("City content incorrect", addressContent[2].equals(address1.getCity())); assertTrue("Country content incorrect", addressContent[3].equals(address1.getCountry())); diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa21/advanced/XMLConverterTestSuite.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa21/advanced/XMLConverterTestSuite.java index a2e0f7cb0c2..15754efa51b 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa21/advanced/XMLConverterTestSuite.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa21/advanced/XMLConverterTestSuite.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -100,7 +100,7 @@ public void testXMLConverters() { organizer.setRace(race); Responsibility responsibility = new Responsibility(); - responsibility.setUniqueIdentifier(new Long(System.currentTimeMillis())); + responsibility.setUniqueIdentifier(Long.valueOf(System.currentTimeMillis())); responsibility.setDescription("Raise funds"); race.addOrganizer(organizer, responsibility); diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa21/advanced/XMLForeignKeyTestSuite.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa21/advanced/XMLForeignKeyTestSuite.java index c614e4c1024..4d8a9a7ee68 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa21/advanced/XMLForeignKeyTestSuite.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa21/advanced/XMLForeignKeyTestSuite.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -217,7 +217,7 @@ public void testReadAndWriteDDLObjects() { organizer.setRace(race); Responsibility responsibility = new Responsibility(); - responsibility.setUniqueIdentifier(new Long(System.currentTimeMillis())); + responsibility.setUniqueIdentifier(Long.valueOf(System.currentTimeMillis())); responsibility.setDescription("Raise funds"); race.addOrganizer(organizer, responsibility); diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa22/advanced/DDLTestSuite.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa22/advanced/DDLTestSuite.java index 5c6a45e74cf..6433b7130ca 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa22/advanced/DDLTestSuite.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa22/advanced/DDLTestSuite.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2023 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012, 2018 IBM Corporation. All rights reserved. * * This program and the accompanying materials are made available under the @@ -165,7 +165,7 @@ public void testPersistenceGenerateSchemaOnDatabase(String createSource, String organizer.setRace(race); Responsibility responsibility = new Responsibility(); - responsibility.setUniqueIdentifier(new Long(System.currentTimeMillis())); + responsibility.setUniqueIdentifier(Long.valueOf(System.currentTimeMillis())); responsibility.setDescription("Raise funds"); race.addOrganizer(organizer, responsibility); diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa22/advanced/ForeignKeyTestSuite.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa22/advanced/ForeignKeyTestSuite.java index 00918f0f64d..802e52c5fab 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa22/advanced/ForeignKeyTestSuite.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa22/advanced/ForeignKeyTestSuite.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -220,7 +220,7 @@ public void testReadAndWriteDDLObjects() { organizer.setRace(race); Responsibility responsibility = new Responsibility(); - responsibility.setUniqueIdentifier(new Long(System.currentTimeMillis())); + responsibility.setUniqueIdentifier(Long.valueOf(System.currentTimeMillis())); responsibility.setDescription("Raise funds"); race.addOrganizer(organizer, responsibility); diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa22/advanced/StoredProcedureQueryTestSuite.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa22/advanced/StoredProcedureQueryTestSuite.java index a15272dc039..e1c2b5a7d41 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa22/advanced/StoredProcedureQueryTestSuite.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa22/advanced/StoredProcedureQueryTestSuite.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -345,7 +345,7 @@ public void testQueryExecute1() { // reason MySql returns a Long here. By position is ok, that is, // it returns an Integer (as we registered) if (outputParamValueFromName instanceof Long) { - assertTrue("Incorrect value returned, expected " + numberOfEmployes + ", got: " + outputParamValueFromName, outputParamValueFromName.equals(new Long(numberOfEmployes))); + assertTrue("Incorrect value returned, expected " + numberOfEmployes + ", got: " + outputParamValueFromName, outputParamValueFromName.equals(Long.valueOf(numberOfEmployes))); } else if (outputParamValueFromName instanceof Integer) { assertTrue("Incorrect value returned, expected " + numberOfEmployes + ", got: " + outputParamValueFromName, outputParamValueFromName.equals(numberOfEmployes)); } @@ -381,7 +381,7 @@ public void testQueryExecute1() { // This test also mixes index and named parameters, so this test my be invalid to begin with. assertNotNull("The output parameter was null.", outputParamValueFromPosition); if (outputParamValueFromName instanceof Long) { - assertTrue("Incorrect value returned, expected " + numberOfEmployes + ", got: " + outputParamValueFromPosition, outputParamValueFromPosition.equals(new Long(numberOfEmployes))); + assertTrue("Incorrect value returned, expected " + numberOfEmployes + ", got: " + outputParamValueFromPosition, outputParamValueFromPosition.equals(Long.valueOf(numberOfEmployes))); } else if (outputParamValueFromName instanceof Integer) { assertTrue("Incorrect value returned, expected " + numberOfEmployes + ", got: " + outputParamValueFromPosition, outputParamValueFromPosition.equals(numberOfEmployes)); } @@ -510,7 +510,7 @@ public void testQueryExecute2() { // reason MySql returns a Long here. By position is ok, that is, // it returns an Integer (as we registered) if (outputParamValueFromName instanceof Long) { - assertTrue("Incorrect value returned, expected " + numberOfEmployes + ", got: " + outputParamValueFromName, outputParamValueFromName.equals(new Long(numberOfEmployes))); + assertTrue("Incorrect value returned, expected " + numberOfEmployes + ", got: " + outputParamValueFromName, outputParamValueFromName.equals(Long.valueOf(numberOfEmployes))); } else if (outputParamValueFromName instanceof Integer) { assertTrue("Incorrect value returned, expected " + numberOfEmployes + ", got: " + outputParamValueFromName, outputParamValueFromName.equals(numberOfEmployes)); } @@ -545,7 +545,7 @@ public void testQueryExecute2() { // This test also mixes index and named parameters, so this test my be invalid to begin with. assertNotNull("The output parameter was null.", outputParamValueFromPosition); if (outputParamValueFromName instanceof Long) { - assertTrue("Incorrect value returned, expected " + numberOfEmployes + ", got: " + outputParamValueFromPosition, outputParamValueFromPosition.equals(new Long(numberOfEmployes))); + assertTrue("Incorrect value returned, expected " + numberOfEmployes + ", got: " + outputParamValueFromPosition, outputParamValueFromPosition.equals(Long.valueOf(numberOfEmployes))); } else if (outputParamValueFromName instanceof Integer) { assertTrue("Incorrect value returned, expected " + numberOfEmployes + ", got: " + outputParamValueFromPosition, outputParamValueFromPosition.equals(numberOfEmployes)); } diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa22/advanced/XMLConverterTestSuite.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa22/advanced/XMLConverterTestSuite.java index c5a979dd34c..e20a54f902a 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa22/advanced/XMLConverterTestSuite.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa22/advanced/XMLConverterTestSuite.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -100,7 +100,7 @@ public void testXMLConverters() { organizer.setRace(race); Responsibility responsibility = new Responsibility(); - responsibility.setUniqueIdentifier(new Long(System.currentTimeMillis())); + responsibility.setUniqueIdentifier(Long.valueOf(System.currentTimeMillis())); responsibility.setDescription("Raise funds"); race.addOrganizer(organizer, responsibility); diff --git a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa22/advanced/XMLForeignKeyTestSuite.java b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa22/advanced/XMLForeignKeyTestSuite.java index 09280c59821..20bc8a9432a 100644 --- a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa22/advanced/XMLForeignKeyTestSuite.java +++ b/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa22/advanced/XMLForeignKeyTestSuite.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -217,7 +217,7 @@ public void testReadAndWriteDDLObjects() { organizer.setRace(race); Responsibility responsibility = new Responsibility(); - responsibility.setUniqueIdentifier(new Long(System.currentTimeMillis())); + responsibility.setUniqueIdentifier(Long.valueOf(System.currentTimeMillis())); responsibility.setDescription("Raise funds"); race.addOrganizer(organizer, responsibility); diff --git a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/models/wdf/jpa1/employee/Cubicle.java b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/models/wdf/jpa1/employee/Cubicle.java index 1db8f685e01..514b70c3821 100644 --- a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/models/wdf/jpa1/employee/Cubicle.java +++ b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/models/wdf/jpa1/employee/Cubicle.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2023 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2015 SAP. All rights reserved. * * This program and the accompanying materials are made available under the @@ -48,7 +48,7 @@ public Cubicle() { } public Cubicle(CubiclePrimaryKeyClass key, String color, Employee emp) { - this(new Integer(key.getFloor().intValue()), new Integer(key.getPlace().intValue()), color, emp); + this(Integer.valueOf(key.getFloor().intValue()), Integer.valueOf(key.getPlace().intValue()), color, emp); } public Cubicle(Integer aFloor, Integer aPlace, String aColor, Employee aEmployee) { diff --git a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/models/wdf/jpa1/types/BasicTypesFieldAccess.java b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/models/wdf/jpa1/types/BasicTypesFieldAccess.java index 6db9d1139d1..2b48b61a60b 100644 --- a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/models/wdf/jpa1/types/BasicTypesFieldAccess.java +++ b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/models/wdf/jpa1/types/BasicTypesFieldAccess.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2023 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2015 SAP. All rights reserved. * * This program and the accompanying materials are made available under the @@ -264,13 +264,13 @@ public void fill() { primitiveFloat = 1.5f; primitiveDouble = 2.5; wrapperBoolean = Boolean.TRUE; - wrapperByte = new Byte((byte) 1); - wrapperCharacter = new Character('A'); - wrapperShort = new Short((short) 2); - wrapperInteger = new Integer(3); - wrapperLong = new Long(4); - wrapperFloat = new Float(1.5f); - wrapperDouble = new Double(2.5); + wrapperByte = Byte.valueOf((byte) 1); + wrapperCharacter = Character.valueOf('A'); + wrapperShort = Short.valueOf((short) 2); + wrapperInteger = Integer.valueOf(3); + wrapperLong = Long.valueOf(4); + wrapperFloat = Float.valueOf(1.5f); + wrapperDouble = Double.valueOf(2.5); string2Varchar = "VARCHAR"; string2Clob = "CLOB"; bigDecimal = new BigDecimal("42.42"); @@ -291,26 +291,26 @@ public void fill() { primitiveByteArray2Blob[i] = (byte) i; } - wrapperByteArray2Binary = new Byte[] { new Byte((byte) 0), new Byte((byte) 1), new Byte((byte) 2), new Byte((byte) 3), - new Byte((byte) 4), new Byte((byte) 5), new Byte((byte) 6), new Byte((byte) 7) }; + wrapperByteArray2Binary = new Byte[] { Byte.valueOf((byte) 0), Byte.valueOf((byte) 1), Byte.valueOf((byte) 2), Byte.valueOf((byte) 3), + Byte.valueOf((byte) 4), Byte.valueOf((byte) 5), Byte.valueOf((byte) 6), Byte.valueOf((byte) 7) }; wrapperByteArray2Longvarbinary = new Byte[1111]; for (int i = 0; i < wrapperByteArray2Longvarbinary.length; i++) { - wrapperByteArray2Longvarbinary[i] = new Byte((byte) i); + wrapperByteArray2Longvarbinary[i] = Byte.valueOf((byte) i); } wrapperByteArray2Blob = new Byte[3333]; for (int i = 0; i < wrapperByteArray2Blob.length; i++) { - wrapperByteArray2Blob[i] = new Byte((byte) i); + wrapperByteArray2Blob[i] = Byte.valueOf((byte) i); } primitiveCharArray2Varchar = new char[] { 'V', 'A', 'R', 'C', 'A', 'R' }; primitiveCharArray2Clob = new char[] { 'C', 'L', 'O', 'B' }; - wrapperCharacterArray2Varchar = new Character[] { new Character('V'), new Character('A'), new Character('R'), - new Character('C'), new Character('H'), new Character('A'), new Character('R') }; - wrapperCharacterArray2Clob = new Character[] { new Character('C'), new Character('L'), new Character('O'), - new Character('B') }; + wrapperCharacterArray2Varchar = new Character[] { Character.valueOf('V'), Character.valueOf('A'), Character.valueOf('R'), + Character.valueOf('C'), Character.valueOf('H'), Character.valueOf('A'), Character.valueOf('R') }; + wrapperCharacterArray2Clob = new Character[] { Character.valueOf('C'), Character.valueOf('L'), Character.valueOf('O'), + Character.valueOf('B') }; serializable = new UserDefinedSerializable("REGEN"); // BLOB setEnumOrdinal(UserDefinedEnum.EMIL); diff --git a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/models/wdf/jpa1/types/BasicTypesPropertyAccess.java b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/models/wdf/jpa1/types/BasicTypesPropertyAccess.java index aed78ce23c9..c7f95d0f79b 100644 --- a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/models/wdf/jpa1/types/BasicTypesPropertyAccess.java +++ b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/models/wdf/jpa1/types/BasicTypesPropertyAccess.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2023 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2015 SAP. All rights reserved. * * This program and the accompanying materials are made available under the @@ -162,13 +162,13 @@ public void fill() { _primitiveFloat = 1.5f; _primitiveDouble = 2.5; _wrapperBoolean = Boolean.TRUE; - _wrapperByte = new Byte((byte) 1); - _wrapperCharacter = new Character('A'); - _wrapperShort = new Short((short) 2); - _wrapperInteger = new Integer(3); - _wrapperLong = new Long(4); - _wrapperFloat = new Float(1.5f); - _wrapperDouble = new Double(2.5); + _wrapperByte = Byte.valueOf((byte) 1); + _wrapperCharacter = Character.valueOf('A'); + _wrapperShort = Short.valueOf((short) 2); + _wrapperInteger = Integer.valueOf(3); + _wrapperLong = Long.valueOf(4); + _wrapperFloat = Float.valueOf(1.5f); + _wrapperDouble = Double.valueOf(2.5); _string2Varchar = "VARCHAR"; _string2Clob = "CLOB"; _bigDecimal = new BigDecimal("42.42"); @@ -189,26 +189,26 @@ public void fill() { _primitiveByteArray2Blob[i] = (byte) i; } - _wrapperByteArray2Binary = new Byte[] { new Byte((byte) 0), new Byte((byte) 1), new Byte((byte) 2), new Byte((byte) 3), - new Byte((byte) 4), new Byte((byte) 5), new Byte((byte) 6), new Byte((byte) 7) }; + _wrapperByteArray2Binary = new Byte[] { Byte.valueOf((byte) 0), Byte.valueOf((byte) 1), Byte.valueOf((byte) 2), Byte.valueOf((byte) 3), + Byte.valueOf((byte) 4), Byte.valueOf((byte) 5), Byte.valueOf((byte) 6), Byte.valueOf((byte) 7) }; _wrapperByteArray2Longvarbinary = new Byte[1111]; for (int i = 0; i < _wrapperByteArray2Longvarbinary.length; i++) { - _wrapperByteArray2Longvarbinary[i] = new Byte((byte) i); + _wrapperByteArray2Longvarbinary[i] = Byte.valueOf((byte) i); } _wrapperByteArray2Blob = new Byte[3333]; for (int i = 0; i < _wrapperByteArray2Blob.length; i++) { - _wrapperByteArray2Blob[i] = new Byte((byte) i); + _wrapperByteArray2Blob[i] = Byte.valueOf((byte) i); } _primitiveCharArray2Varchar = new char[] { 'V', 'A', 'R', 'C', 'A', 'R' }; _primitiveCharArray2Clob = new char[] { 'C', 'L', 'O', 'B' }; - _wrapperCharacterArray2Varchar = new Character[] { new Character('V'), new Character('A'), new Character('R'), - new Character('C'), new Character('H'), new Character('A'), new Character('R') }; - _wrapperCharacterArray2Clob = new Character[] { new Character('C'), new Character('L'), new Character('O'), - new Character('B') }; + _wrapperCharacterArray2Varchar = new Character[] { Character.valueOf('V'), Character.valueOf('A'), Character.valueOf('R'), + Character.valueOf('C'), Character.valueOf('H'), Character.valueOf('A'), Character.valueOf('R') }; + _wrapperCharacterArray2Clob = new Character[] { Character.valueOf('C'), Character.valueOf('L'), Character.valueOf('O'), + Character.valueOf('B') }; _serializable = new UserDefinedSerializable("REGEN"); // BLOB _enumOrdinal = UserDefinedEnum.EMIL; diff --git a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/embedded/TestEmbeddingWithFieldAccess.java b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/embedded/TestEmbeddingWithFieldAccess.java index f34847459b4..a25a947aed4 100644 --- a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/embedded/TestEmbeddingWithFieldAccess.java +++ b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/embedded/TestEmbeddingWithFieldAccess.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2023 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2015 SAP. All rights reserved. * * This program and the accompanying materials are made available under the @@ -43,14 +43,14 @@ public void testInsert() { em.persist(obj); env.commitTransactionAndClear(em); verify(true, "no Exception"); - obj = em.find(EmbeddingFieldAccess.class, new Integer(0)); + obj = em.find(EmbeddingFieldAccess.class, Integer.valueOf(0)); } finally { closeEntityManager(em); } } private EmbeddingFieldAccess find(EntityManager em, int id) { - return em.find(EmbeddingFieldAccess.class, new Integer(id)); + return em.find(EmbeddingFieldAccess.class, Integer.valueOf(id)); } private void validateMutable(final int id, MutableValidator validator, String fieldName) { diff --git a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/embedded/TestEmbeddingWithPropertyAccess.java b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/embedded/TestEmbeddingWithPropertyAccess.java index e36b408a8c2..3b4bc2ad700 100644 --- a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/embedded/TestEmbeddingWithPropertyAccess.java +++ b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/embedded/TestEmbeddingWithPropertyAccess.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2023 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2015 SAP. All rights reserved. * * This program and the accompanying materials are made available under the @@ -44,14 +44,14 @@ public void testInsert() { em.persist(obj); env.commitTransactionAndClear(em); verify(true, "no Exception"); - obj = em.find(EmbeddingPropertyAccess.class, new Integer(0)); + obj = em.find(EmbeddingPropertyAccess.class, Integer.valueOf(0)); } finally { closeEntityManager(em); } } private EmbeddingPropertyAccess find(EntityManager em, int id) { - return em.find(EmbeddingPropertyAccess.class, new Integer(id)); + return em.find(EmbeddingPropertyAccess.class, Integer.valueOf(id)); } private void validateMutable(final int id, MutableValidator validator, String fieldName) { diff --git a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestCascadeFlush.java b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestCascadeFlush.java index 5dac4d1ce77..68363f756bb 100644 --- a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestCascadeFlush.java +++ b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestCascadeFlush.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2023 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2015 SAP. All rights reserved. * * This program and the accompanying materials are made available under the @@ -178,7 +178,7 @@ public void testSimpleCascadeToDetached2b() throws SQLException { em.persist(existing); env.commitTransactionAndClear(em); env.beginTransaction(em); - existing = em.find(CascadingNode.class, new Integer(existing.getId())); // known object in state managed + existing = em.find(CascadingNode.class, Integer.valueOf(existing.getId())); // known object in state managed em.persist(parent); CascadingNode child = new CascadingNode(existing.getId(), parent); child.setParent(null); // to avoid circular cascade @@ -213,7 +213,7 @@ public void testSimpleCascadeToDetached2c() throws SQLException { em.persist(existing); env.commitTransactionAndClear(em); env.beginTransaction(em); - existing = em.find(CascadingNode.class, new Integer(existing.getId())); + existing = em.find(CascadingNode.class, Integer.valueOf(existing.getId())); em.remove(existing); // known object in state deleted em.persist(parent); CascadingNode child = new CascadingNode(existing.getId(), parent); @@ -253,7 +253,7 @@ public void testSimpleCascadeToRemoved() throws SQLException { env.beginTransaction(em); CascadingNode parent = new CascadingNode(32, null); em.persist(parent); - child = em.find(CascadingNode.class, new Integer(child.getId())); + child = em.find(CascadingNode.class, Integer.valueOf(child.getId())); em.remove(child); parent.addChild(child); verify(em.contains(parent), "Parent not contained in persistence context after persist"); diff --git a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestCascadeMerge.java b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestCascadeMerge.java index 59ed107004e..0c9c9ac2bdd 100644 --- a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestCascadeMerge.java +++ b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestCascadeMerge.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2023 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2015 SAP. All rights reserved. * * This program and the accompanying materials are made available under the @@ -146,8 +146,8 @@ public void testCascadeDetached() { CascadingNodeDescription grandchildDescription = new CascadingNodeDescription(106, null, "new grandchild"); grandchild.setDescription(grandchildDescription); child.addChild(grandchild); - CascadingNode managedChild = em.find(CascadingNode.class, new Integer(child.getId())); - CascadingNodeDescription managedChildDescription = em.find(CascadingNodeDescription.class, new Integer( + CascadingNode managedChild = em.find(CascadingNode.class, Integer.valueOf(child.getId())); + CascadingNodeDescription managedChildDescription = em.find(CascadingNodeDescription.class, Integer.valueOf( childDescription.getId())); CascadingNode managedGrandchild = new CascadingNode(grandchild.getId(), null); CascadingNodeDescription managedGrandchildDescription = new CascadingNodeDescription(grandchildDescription.getId(), @@ -253,14 +253,14 @@ public void testCascadeDetachedRemoved() { verifyExistence(em, grandchild); verifyExistence(em, grandchildDescription); env.beginTransaction(em); - CascadingNode managedParent = em.find(CascadingNode.class, new Integer(parent.getId())); - CascadingNodeDescription managedParentDescription = em.find(CascadingNodeDescription.class, new Integer( + CascadingNode managedParent = em.find(CascadingNode.class, Integer.valueOf(parent.getId())); + CascadingNodeDescription managedParentDescription = em.find(CascadingNodeDescription.class, Integer.valueOf( parentDescription.getId())); - CascadingNode managedChild = em.find(CascadingNode.class, new Integer(child.getId())); - CascadingNodeDescription managedChildDescription = em.find(CascadingNodeDescription.class, new Integer( + CascadingNode managedChild = em.find(CascadingNode.class, Integer.valueOf(child.getId())); + CascadingNodeDescription managedChildDescription = em.find(CascadingNodeDescription.class, Integer.valueOf( childDescription.getId())); - CascadingNode managedGrandchild = em.find(CascadingNode.class, new Integer(grandchild.getId())); - CascadingNodeDescription managedGrandchildDescription = em.find(CascadingNodeDescription.class, new Integer( + CascadingNode managedGrandchild = em.find(CascadingNode.class, Integer.valueOf(grandchild.getId())); + CascadingNodeDescription managedGrandchildDescription = em.find(CascadingNodeDescription.class, Integer.valueOf( grandchildDescription.getId())); managedParent.setChildren(null); em.remove(managedChild); @@ -365,7 +365,7 @@ public void testCircularCascadeWithSamePks() { env.commitTransactionAndClear(em); verifyExistence(em, managedNode); env.beginTransaction(em); - managedNode = em.find(CascadingNode.class, new Integer(managedNode.getId())); + managedNode = em.find(CascadingNode.class, Integer.valueOf(managedNode.getId())); managedNode.addChild(detachedNode); detachedNode.addChild(managedNode); CascadingNode mergedNode = em.merge(detachedNode); @@ -416,7 +416,7 @@ public void testCascadeManaged() { verifyAbsence(em, child); verifyAbsence(em, childDescription); env.beginTransaction(em); - parent = em.find(CascadingNode.class, new Integer(parent.getId())); + parent = em.find(CascadingNode.class, Integer.valueOf(parent.getId())); parent.addChild(child); // setup complete CascadingNode mergedNode = em.merge(parent); @@ -480,7 +480,7 @@ public void testCascadeRemoved() { verifyExistence(em, child); verifyExistence(em, childDescription); env.beginTransaction(em); - child = em.find(CascadingNode.class, new Integer(child.getId())); + child = em.find(CascadingNode.class, Integer.valueOf(child.getId())); em.remove(child); parent.addChild(child); verify(!em.contains(parent), "parent not new"); @@ -521,11 +521,11 @@ public void testCascadeRemoved() { private void verifyExistence(EntityManager em, Object entity) { if (entity instanceof CascadingNode) { CascadingNode node = (CascadingNode) entity; - CascadingNode found = em.find(CascadingNode.class, new Integer(node.getId())); + CascadingNode found = em.find(CascadingNode.class, Integer.valueOf(node.getId())); verify(found != null, "cascading node with id " + node.getId() + " not found"); } else if (entity instanceof CascadingNodeDescription) { CascadingNodeDescription desc = (CascadingNodeDescription) entity; - CascadingNodeDescription found = em.find(CascadingNodeDescription.class, new Integer(desc.getId())); + CascadingNodeDescription found = em.find(CascadingNodeDescription.class, Integer.valueOf(desc.getId())); verify(found != null, "cascading node description with id " + desc.getId() + " not found"); } else { throw new IllegalArgumentException("not supported"); @@ -535,11 +535,11 @@ private void verifyExistence(EntityManager em, Object entity) { private void verifyAbsence(EntityManager em, Object entity) { if (entity instanceof CascadingNode) { CascadingNode node = (CascadingNode) entity; - CascadingNode found = em.find(CascadingNode.class, new Integer(node.getId())); + CascadingNode found = em.find(CascadingNode.class, Integer.valueOf(node.getId())); verify(found == null, "cascading node with id " + node.getId() + " found"); } else if (entity instanceof CascadingNodeDescription) { CascadingNodeDescription desc = (CascadingNodeDescription) entity; - CascadingNodeDescription found = em.find(CascadingNodeDescription.class, new Integer(desc.getId())); + CascadingNodeDescription found = em.find(CascadingNodeDescription.class, Integer.valueOf(desc.getId())); verify(found == null, "cascading node description with id " + desc.getId() + " found"); } else { throw new IllegalArgumentException("not supported"); diff --git a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestCascadePersist.java b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestCascadePersist.java index 831da2c83c4..f7bbc98314c 100644 --- a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestCascadePersist.java +++ b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestCascadePersist.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2023 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2015 SAP. All rights reserved. * * This program and the accompanying materials are made available under the @@ -80,7 +80,7 @@ public void testSimpleCascadeManaged() throws SQLException { env.commitTransactionAndClear(em); // cascade from parent to child env.beginTransaction(em); - parent = em.find(CascadingNode.class, new Integer(parent.getId())); // parent is now managed + parent = em.find(CascadingNode.class, Integer.valueOf(parent.getId())); // parent is now managed CascadingNode child = new CascadingNode(12, parent); child.setParent(null); // to avoid circular cascade em.persist(parent); @@ -183,7 +183,7 @@ public void testSimpleCascadeDetached() throws SQLException { env.commitTransactionAndClear(em); env.beginTransaction(em); - existing = em.find(CascadingNode.class, new Integer(existing.getId())); // known object in state managed + existing = em.find(CascadingNode.class, Integer.valueOf(existing.getId())); // known object in state managed persistFailed = false; immediateException = false; try { @@ -221,7 +221,7 @@ public void testSimpleCascadeDetached() throws SQLException { env.commitTransactionAndClear(em); env.beginTransaction(em); - existing = em.find(CascadingNode.class, new Integer(existing.getId())); + existing = em.find(CascadingNode.class, Integer.valueOf(existing.getId())); em.remove(existing); // known object in state deleted persistFailed = false; immediateException = false; diff --git a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestCascadeRefresh.java b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestCascadeRefresh.java index 364b4ff9e41..05618e7a034 100644 --- a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestCascadeRefresh.java +++ b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestCascadeRefresh.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2023 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2015 SAP. All rights reserved. * * This program and the accompanying materials are made available under the @@ -60,8 +60,8 @@ public void testCascade() { em.persist(parent); verify(em.contains(parent), "parent is not managed"); verify(em.contains(parentDescription), "parentDescription is not managed"); - child = em.find(CascadingNode.class, new Integer(child.getId())); - childDescription = em.find(CascadingNodeDescription.class, new Integer(childDescription.getId())); + child = em.find(CascadingNode.class, Integer.valueOf(child.getId())); + childDescription = em.find(CascadingNodeDescription.class, Integer.valueOf(childDescription.getId())); childDescription.setDescription("updated"); parent.addChild(child); child.setChildren(null); @@ -115,11 +115,11 @@ public void testCascade() { private void verifyExistence(EntityManager em, Object entity) { if (entity instanceof CascadingNode) { CascadingNode node = (CascadingNode) entity; - CascadingNode found = em.find(CascadingNode.class, new Integer(node.getId())); + CascadingNode found = em.find(CascadingNode.class, Integer.valueOf(node.getId())); verify(found != null, "cascading node with id " + node.getId() + " not found"); } else if (entity instanceof CascadingNodeDescription) { CascadingNodeDescription desc = (CascadingNodeDescription) entity; - CascadingNodeDescription found = em.find(CascadingNodeDescription.class, new Integer(desc.getId())); + CascadingNodeDescription found = em.find(CascadingNodeDescription.class, Integer.valueOf(desc.getId())); verify(found != null, "cascading node description with id " + desc.getId() + " not found"); } else { throw new IllegalArgumentException("not supported"); @@ -129,11 +129,11 @@ private void verifyExistence(EntityManager em, Object entity) { private void verifyAbsence(EntityManager em, Object entity) { if (entity instanceof CascadingNode) { CascadingNode node = (CascadingNode) entity; - CascadingNode found = em.find(CascadingNode.class, new Integer(node.getId())); + CascadingNode found = em.find(CascadingNode.class, Integer.valueOf(node.getId())); verify(found == null, "cascading node with id " + node.getId() + " found"); } else if (entity instanceof CascadingNodeDescription) { CascadingNodeDescription desc = (CascadingNodeDescription) entity; - CascadingNodeDescription found = em.find(CascadingNodeDescription.class, new Integer(desc.getId())); + CascadingNodeDescription found = em.find(CascadingNodeDescription.class, Integer.valueOf(desc.getId())); verify(found == null, "cascading node description with id " + desc.getId() + " found"); } else { throw new IllegalArgumentException("not supported"); @@ -141,7 +141,7 @@ private void verifyAbsence(EntityManager em, Object entity) { } private void verifyDescription(EntityManager em, CascadingNodeDescription desc, String expectedDescription) { - CascadingNodeDescription found = em.find(CascadingNodeDescription.class, new Integer(desc.getId())); + CascadingNodeDescription found = em.find(CascadingNodeDescription.class, Integer.valueOf(desc.getId())); verify(found != null, "cascading node description with id " + desc.getId() + " not found"); if (found != null) { verify(expectedDescription.equals(found.getDescription()), "cascading node " + found.getId() diff --git a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestCascadeRemove.java b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestCascadeRemove.java index dd501ea1432..2a40a51d9ba 100644 --- a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestCascadeRemove.java +++ b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestCascadeRemove.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2023 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2015 SAP. All rights reserved. * * This program and the accompanying materials are made available under the @@ -63,7 +63,7 @@ public void testSimpleCascadeNew() throws SQLException { em.persist(child); env.commitTransactionAndClear(em); env.beginTransaction(em); - child = em.find(CascadingNode.class, new Integer(child.getId())); + child = em.find(CascadingNode.class, Integer.valueOf(child.getId())); CascadingNode parent = new CascadingNode(2, null); parent.addChild(child); verify(!em.contains(parent), "Parent not a new entity"); @@ -78,7 +78,7 @@ public void testSimpleCascadeNew() throws SQLException { em.persist(description); env.commitTransactionAndClear(em); env.beginTransaction(em); - description = em.find(CascadingNodeDescription.class, new Integer(description.getId())); + description = em.find(CascadingNodeDescription.class, Integer.valueOf(description.getId())); parent = new CascadingNode(4, null); parent.setDescription(description); description.setNode(parent); @@ -107,7 +107,7 @@ public void testSimpleCascadeManaged() throws SQLException { env.beginTransaction(em); CascadingNode parent = new CascadingNode(102, null); em.persist(parent); - child = em.find(CascadingNode.class, new Integer(child.getId())); + child = em.find(CascadingNode.class, Integer.valueOf(child.getId())); parent.addChild(child); verify(em.contains(parent), "Parent not managed"); verify(em.contains(child), "Child not managed"); @@ -123,7 +123,7 @@ public void testSimpleCascadeManaged() throws SQLException { env.beginTransaction(em); parent = new CascadingNode(104, null); em.persist(parent); - description = em.find(CascadingNodeDescription.class, new Integer(description.getId())); + description = em.find(CascadingNodeDescription.class, Integer.valueOf(description.getId())); parent.setDescription(description); description.setNode(parent); verify(em.contains(parent), "Parent not managed"); @@ -141,8 +141,8 @@ public void testSimpleCascadeManaged() throws SQLException { em.persist(child); env.commitTransactionAndClear(em); env.beginTransaction(em); - parent = em.find(CascadingNode.class, new Integer(parent.getId())); - child = em.find(CascadingNode.class, new Integer(child.getId())); + parent = em.find(CascadingNode.class, Integer.valueOf(parent.getId())); + child = em.find(CascadingNode.class, Integer.valueOf(child.getId())); parent.addChild(child); verify(em.contains(parent), "Parent not managed"); verify(em.contains(child), "Child not managed"); @@ -158,7 +158,7 @@ public void testSimpleCascadeManaged() throws SQLException { em.persist(parent); env.commitTransactionAndClear(em); env.beginTransaction(em); - parent = em.find(CascadingNode.class, new Integer(parent.getId())); + parent = em.find(CascadingNode.class, Integer.valueOf(parent.getId())); description = parent.getDescription(); verify(em.contains(parent), "Parent not managed"); verify(em.contains(description), "Description not managed"); @@ -185,7 +185,7 @@ public void testSimpleCascadeDetached() throws SQLException { em.persist(child); env.commitTransactionAndClear(em); env.beginTransaction(em); - child = em.find(CascadingNode.class, new Integer(child.getId())); + child = em.find(CascadingNode.class, Integer.valueOf(child.getId())); parent.addChild(child); verify(!em.contains(parent), "Parent not detached"); verify(em.contains(child), "Child not managed"); @@ -222,7 +222,7 @@ public void testSimpleCascadeDetached() throws SQLException { em.persist(description); env.commitTransactionAndClear(em); env.beginTransaction(em); - description = em.find(CascadingNodeDescription.class, new Integer(description.getId())); + description = em.find(CascadingNodeDescription.class, Integer.valueOf(description.getId())); parent.setDescription(description); verify(!em.contains(parent), "Parent not detached"); verify(em.contains(description), "Description not managed"); @@ -262,7 +262,7 @@ public void testSimpleCascadeDetached() throws SQLException { env.commitTransactionAndClear(em); env.beginTransaction(em); em.persist(existing); // status FOR_INSERT - child = em.find(CascadingNode.class, new Integer(child.getId())); + child = em.find(CascadingNode.class, Integer.valueOf(child.getId())); parent.addChild(child); verify(!em.contains(parent), "Parent not detached"); verify(em.contains(existing), "Existing not managed"); @@ -302,7 +302,7 @@ public void testSimpleCascadeDetached() throws SQLException { env.commitTransactionAndClear(em); env.beginTransaction(em); em.persist(existing); // status FOR_INSERT - description = em.find(CascadingNodeDescription.class, new Integer(description.getId())); + description = em.find(CascadingNodeDescription.class, Integer.valueOf(description.getId())); parent.setDescription(description); verify(!em.contains(parent), "Parent not detached"); verify(em.contains(existing), "Existing not managed"); @@ -343,8 +343,8 @@ public void testSimpleCascadeDetached() throws SQLException { em.persist(child); env.commitTransactionAndClear(em); env.beginTransaction(em); - existing = em.find(CascadingNode.class, new Integer(existing.getId())); // state FOR_UPADTE - child = em.find(CascadingNode.class, new Integer(child.getId())); + existing = em.find(CascadingNode.class, Integer.valueOf(existing.getId())); // state FOR_UPADTE + child = em.find(CascadingNode.class, Integer.valueOf(child.getId())); parent.addChild(child); verify(!em.contains(parent), "Parent not detached"); verify(em.contains(existing), "Existing not managed"); @@ -384,8 +384,8 @@ public void testSimpleCascadeDetached() throws SQLException { em.persist(description); env.commitTransactionAndClear(em); env.beginTransaction(em); - existing = em.find(CascadingNode.class, new Integer(existing.getId())); // state FOR_UPADTE - description = em.find(CascadingNodeDescription.class, new Integer(description.getId())); + existing = em.find(CascadingNode.class, Integer.valueOf(existing.getId())); // state FOR_UPADTE + description = em.find(CascadingNodeDescription.class, Integer.valueOf(description.getId())); parent.setDescription(description); verify(!em.contains(parent), "Parent not detached"); verify(em.contains(existing), "Existing not managed"); @@ -426,9 +426,9 @@ public void testSimpleCascadeDetached() throws SQLException { em.persist(child); env.commitTransactionAndClear(em); env.beginTransaction(em); - existing = em.find(CascadingNode.class, new Integer(existing.getId())); + existing = em.find(CascadingNode.class, Integer.valueOf(existing.getId())); em.remove(existing); // state FOR_REMOVE - child = em.find(CascadingNode.class, new Integer(child.getId())); + child = em.find(CascadingNode.class, Integer.valueOf(child.getId())); parent.addChild(child); verify(!em.contains(parent), "Parent not detached"); verify(!em.contains(existing), "Existing not removed"); @@ -467,9 +467,9 @@ public void testSimpleCascadeDetached() throws SQLException { em.persist(description); env.commitTransactionAndClear(em); env.beginTransaction(em); - existing = em.find(CascadingNode.class, new Integer(existing.getId())); + existing = em.find(CascadingNode.class, Integer.valueOf(existing.getId())); em.remove(existing); // state FOR_REMOVE - description = em.find(CascadingNodeDescription.class, new Integer(description.getId())); + description = em.find(CascadingNodeDescription.class, Integer.valueOf(description.getId())); parent.setDescription(description); verify(!em.contains(parent), "Parent not detached"); verify(!em.contains(existing), "Existing not removed"); @@ -518,9 +518,9 @@ public void testSimpleCascadeRemoved() throws SQLException { em.persist(child); env.commitTransactionAndClear(em); env.beginTransaction(em); - parent = em.find(CascadingNode.class, new Integer(parent.getId())); + parent = em.find(CascadingNode.class, Integer.valueOf(parent.getId())); em.remove(parent); - child = em.find(CascadingNode.class, new Integer(child.getId())); + child = em.find(CascadingNode.class, Integer.valueOf(child.getId())); parent.addChild(child); verify(!em.contains(parent), "Parent not removed"); verify(em.contains(child), "Child not managed"); @@ -536,9 +536,9 @@ public void testSimpleCascadeRemoved() throws SQLException { em.persist(description); env.commitTransactionAndClear(em); env.beginTransaction(em); - parent = em.find(CascadingNode.class, new Integer(parent.getId())); + parent = em.find(CascadingNode.class, Integer.valueOf(parent.getId())); em.remove(parent); - description = em.find(CascadingNodeDescription.class, new Integer(description.getId())); + description = em.find(CascadingNodeDescription.class, Integer.valueOf(description.getId())); parent.setDescription(description); verify(!em.contains(parent), "Parent not removed"); verify(em.contains(description), "Description not managed"); @@ -567,8 +567,8 @@ public void testCircularCascade() throws SQLException { verifyExistenceInNodeTable(node1.getId()); verifyExistenceInNodeTable(node2.getId()); env.beginTransaction(em); - node1 = em.find(CascadingNode.class, new Integer(node1.getId())); - node2 = em.find(CascadingNode.class, new Integer(node2.getId())); + node1 = em.find(CascadingNode.class, Integer.valueOf(node1.getId())); + node2 = em.find(CascadingNode.class, Integer.valueOf(node2.getId())); em.remove(node1); env.commitTransactionAndClear(em); verifyAbsenceFromNodeTable(node1.getId()); diff --git a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestClear.java b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestClear.java index f3bba4e1f12..082d1df44b9 100644 --- a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestClear.java +++ b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestClear.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2023 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2015 SAP. All rights reserved. * * This program and the accompanying materials are made available under the @@ -36,7 +36,7 @@ public void testClearActiveTransaction() { em.persist(dep1); env.commitTransactionAndClear(em); env.beginTransaction(em); - dep1 = em.find(Department.class, new Integer(dep1.getId())); + dep1 = em.find(Department.class, Integer.valueOf(dep1.getId())); em.persist(dep2); verify(em.contains(dep1), "entity not managed"); verify(em.contains(dep2), "entity not managed"); @@ -45,10 +45,10 @@ public void testClearActiveTransaction() { verify(!em.contains(dep1), "entity managed"); verify(!em.contains(dep2), "entity managed"); env.commitTransactionAndClear(em); - Department dep = em.find(Department.class, new Integer(dep1.getId())); + Department dep = em.find(Department.class, Integer.valueOf(dep1.getId())); verify(dep != null, "department with id " + dep1.getId() + " does not exist"); verify("one".equals(dep.getName()), "department has wrong name: " + dep.getName()); - dep = em.find(Department.class, new Integer(dep2.getId())); + dep = em.find(Department.class, Integer.valueOf(dep2.getId())); verify(dep == null, "department with id " + dep2.getId() + " exists"); } finally { closeEntityManager(em); @@ -66,7 +66,7 @@ public void testClearNoTransaction() { env.beginTransaction(em); em.persist(dep1); env.commitTransactionAndClear(em); - dep1 = em.find(Department.class, new Integer(dep1.getId())); + dep1 = em.find(Department.class, Integer.valueOf(dep1.getId())); if (extended) { em.persist(dep2); verify(em.contains(dep1), "entity not managed"); diff --git a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestClose.java b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestClose.java index 31e6e116ec8..99c28cbf4ee 100644 --- a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestClose.java +++ b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestClose.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2023 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2015 SAP. All rights reserved. * * This program and the accompanying materials are made available under the @@ -101,7 +101,7 @@ public void testFindClosed() { em.close(); verify(!em.isOpen(), "EntityManager is not closed"); try { - em.find(Department.class, new Integer(1)); + em.find(Department.class, Integer.valueOf(1)); flop("operation on a closed entity manager did not throw IllegalStateException"); } catch (IllegalStateException e) { // $JL-EXC$ expected behavior @@ -118,7 +118,7 @@ public void testGetReferenceClosed() { em.close(); verify(!em.isOpen(), "EntityManager is not closed"); try { - em.getReference(Department.class, new Integer(1)); + em.getReference(Department.class, Integer.valueOf(1)); flop("operation on a closed entity manager did not throw IllegalStateException"); } catch (IllegalStateException e) { // $JL-EXC$ expected behavior @@ -373,7 +373,7 @@ public void testCloseActiveTransaction() { em.persist(dep1); env.commitTransactionAndClear(em); env.beginTransaction(em); - dep1 = em.find(Department.class, new Integer(dep1.getId())); + dep1 = em.find(Department.class, Integer.valueOf(dep1.getId())); em.persist(dep2); em.close(); // persistence context should remain active try { diff --git a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestContains.java b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestContains.java index 0905d9f8844..1df4098e9a9 100644 --- a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestContains.java +++ b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestContains.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2023 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2015 SAP. All rights reserved. * * This program and the accompanying materials are made available under the @@ -52,7 +52,7 @@ public void testContainsManaged() { em.persist(dep); env.commitTransactionAndClear(em); // 1. managed after find ouside tx - Object obj = em.find(Department.class, new Integer(11)); + Object obj = em.find(Department.class, Integer.valueOf(11)); if (extended) { verify(em.contains(obj), "object retrieved by find outside of transaction is not contained"); } else { @@ -61,7 +61,7 @@ public void testContainsManaged() { em.clear(); // 2. managed after find inside tx env.beginTransaction(em); - obj = em.find(Department.class, new Integer(11)); + obj = em.find(Department.class, Integer.valueOf(11)); verify(em.contains(obj), "object retrieved by find inside transaction is not contained"); env.rollbackTransactionAndClear(em); verify(!em.contains(obj), "object contained after rollback and clear"); @@ -94,7 +94,7 @@ public void testContainsRemoved() { verify(!em.contains(dep), "object contained after commit"); // 1. remove found object env.beginTransaction(em); - Object obj = em.find(Department.class, new Integer(21)); + Object obj = em.find(Department.class, Integer.valueOf(21)); verify(em.contains(obj), "object not contained after find inside tx"); em.remove(obj); verify(!em.contains(obj), "object contained after remove"); @@ -136,7 +136,7 @@ public void testContainsDetached() { verify(!em.contains(detachedDep), "detached object contained, another object with same pk is in state MANAGED_NEW"); env.commitTransactionAndClear(em); env.beginTransaction(em); - dep = em.find(Department.class, new Integer(id)); // object is now in state MANAGED + dep = em.find(Department.class, Integer.valueOf(id)); // object is now in state MANAGED verify(!em.contains(detachedDep), "detached object contained, another object with same pk is in state MANAGED"); em.remove(dep); // object is now in state DELETED verify(!em.contains(detachedDep), "detached object contained, another object with same pk is in state DELETED"); diff --git a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestEntityManagerFactory.java b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestEntityManagerFactory.java index 4488fc3acd0..d4d4e311926 100644 --- a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestEntityManagerFactory.java +++ b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestEntityManagerFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2023 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2015 SAP. All rights reserved. * * This program and the accompanying materials are made available under the @@ -82,7 +82,7 @@ public void testEntityManagerFactoryCloseActiveTransaction() throws NamingExcept em.persist(dep1); env.commitTransactionAndClear(em); env.beginTransaction(em); - dep1 = em.find(Department.class, new Integer(dep1.getId())); + dep1 = em.find(Department.class, Integer.valueOf(dep1.getId())); em.persist(dep2); try { emf.close(); // persistence context should remain active diff --git a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestExtendedPersistenceContext.java b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestExtendedPersistenceContext.java index 433123fcf78..dde7f19cc8f 100644 --- a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestExtendedPersistenceContext.java +++ b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestExtendedPersistenceContext.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2023 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2015 SAP. All rights reserved. * * This program and the accompanying materials are made available under the @@ -46,7 +46,7 @@ public void testPersistOutsideTx() { env.commitTransaction(em); verify(em.contains(dep), "persistence context does not contain entity"); em.clear(); - dep = em.find(Department.class, new Integer(dep.getId())); + dep = em.find(Department.class, Integer.valueOf(dep.getId())); verify(dep != null, "entity not found"); } finally { closeEntityManager(em); @@ -63,14 +63,14 @@ public void testUpdateOutsideTx() { env.beginTransaction(em); em.persist(dep); env.commitTransactionAndClear(em); - dep = em.find(Department.class, new Integer(dep.getId())); + dep = em.find(Department.class, Integer.valueOf(dep.getId())); dep.setName("modified"); env.beginTransaction(em); verify(em.contains(dep), "persistence context does not contain entity"); env.commitTransaction(em); verify(em.contains(dep), "persistence context does not contain entity"); em.clear(); - dep = em.find(Department.class, new Integer(dep.getId())); + dep = em.find(Department.class, Integer.valueOf(dep.getId())); verify("modified".equals(dep.getName()), "entity not updated"); } finally { closeEntityManager(em); @@ -90,7 +90,7 @@ public void testRemoveOutsideTx() { em.remove(dep); env.beginTransaction(em); env.commitTransactionAndClear(em); - dep = em.find(Department.class, new Integer(dep.getId())); + dep = em.find(Department.class, Integer.valueOf(dep.getId())); verify(dep == null, "entity not removed"); } finally { closeEntityManager(em); @@ -112,7 +112,7 @@ public void testMergeOutsideTx() { verify("detached".equals(dep.getName()), "entity not merged"); env.beginTransaction(em); env.commitTransactionAndClear(em); - dep = em.find(Department.class, new Integer(dep.getId())); + dep = em.find(Department.class, Integer.valueOf(dep.getId())); verify("detached".equals(dep.getName()), "entity not merged"); } finally { closeEntityManager(em); @@ -134,7 +134,7 @@ public void testRefreshOutsideTx() { verify("test".equals(dep.getName()), "entity not refreshed"); env.beginTransaction(em); env.commitTransactionAndClear(em); - dep = em.find(Department.class, new Integer(dep.getId())); + dep = em.find(Department.class, Integer.valueOf(dep.getId())); verify("test".equals(dep.getName()), "entity not refreshed"); } finally { closeEntityManager(em); diff --git a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestFind.java b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestFind.java index 7009770e786..d8d813ee7a7 100644 --- a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestFind.java +++ b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestFind.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2023 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2015 SAP. All rights reserved. * * This program and the accompanying materials are made available under the @@ -31,7 +31,7 @@ public class TestFind extends JPA1Base { private final Department _dep = new Department(1, "eins"); private final Employee _emp = new Employee(7, "first", "last", _dep); - private final Cubicle _cub = new Cubicle(new Integer(1), new Integer(2), "yellow", _emp); + private final Cubicle _cub = new Cubicle(Integer.valueOf(1), Integer.valueOf(2), "yellow", _emp); @Override public void setup() { @@ -57,13 +57,13 @@ public void testPositivTx() { final EntityManager em = env.getEntityManager(); try { env.beginTransaction(em); - Employee emp = em.find(Employee.class, new Integer(7)); + Employee emp = em.find(Employee.class, Integer.valueOf(7)); verify(em.contains(emp), "Object not loaded"); verify(emp.getId() == 7, "wrong id"); verify(emp.getDepartment().getName().equals("eins"), "wrong department"); - emp = em.find(Employee.class, new Integer(7)); + emp = em.find(Employee.class, Integer.valueOf(7)); verify(emp.getId() == 7, "wrong id"); - Department dep = em.find(Department.class, new Integer(1)); + Department dep = em.find(Department.class, Integer.valueOf(1)); verify(em.contains(dep), "Object not loaded"); verify(dep.getId() == 1, "wrong id"); env.rollbackTransactionAndClear(em); @@ -76,12 +76,12 @@ public void testPositivTx() { public void testPositivNonTx() { final EntityManager em = getEnvironment().getEntityManager(); try { - Employee emp = em.find(Employee.class, new Integer(7)); + Employee emp = em.find(Employee.class, Integer.valueOf(7)); verify(emp.getId() == 7, "wrong id"); verify(emp.getDepartment().getName().equals("eins"), "wrong department"); - emp = em.find(Employee.class, new Integer(7)); + emp = em.find(Employee.class, Integer.valueOf(7)); verify(emp.getId() == 7, "wrong id"); - Department dep = em.find(Department.class, new Integer(1)); + Department dep = em.find(Department.class, Integer.valueOf(1)); verify(dep.getId() == 1, "wrong id"); } finally { closeEntityManager(em); @@ -92,7 +92,7 @@ public void testPositivNonTx() { public void testNegativ() { final EntityManager em = getEnvironment().getEntityManager(); try { - Object result = em.find(Employee.class, new Integer(17 + 4)); + Object result = em.find(Employee.class, Integer.valueOf(17 + 4)); verify(result == null, "found something"); } finally { closeEntityManager(em); @@ -108,7 +108,7 @@ public void testIllegalArguments() { final EntityManager em = getEnvironment().getEntityManager(); try { try { - em.find(String.class, new Integer(17 + 4)); + em.find(String.class, Integer.valueOf(17 + 4)); flop("no IllegalArgumentException thrown"); } catch (IllegalArgumentException ex) { verify(true, ""); @@ -140,8 +140,8 @@ public void testIllegalArguments() { public void testFindWithCompositeKey() { final EntityManager em = getEnvironment().getEntityManager(); try { - Integer one = new Integer(1); - Integer two = new Integer(2); + Integer one = Integer.valueOf(1); + Integer two = Integer.valueOf(2); CubiclePrimaryKeyClass cubKey = new CubiclePrimaryKeyClass(one, two); Cubicle cub = em.find(Cubicle.class, cubKey); verify(cub.getFloor().equals(one) && cub.getPlace().equals(two), "wrong cubicle"); diff --git a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestFlush.java b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestFlush.java index 7f23f1030b4..4a51f8fd05e 100644 --- a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestFlush.java +++ b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestFlush.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2023 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2015 SAP. All rights reserved. * * This program and the accompanying materials are made available under the @@ -51,7 +51,7 @@ public void testRelationshipToNew() { // case 1: direct relationship Employee -> Cubicle (new) - 1:1 Department dep = new Department(1, "dep"); Employee emp1 = new Employee(2, "first", "last", dep); - Cubicle cub1 = new Cubicle(new Integer(3), new Integer(3), "color", emp1); + Cubicle cub1 = new Cubicle(Integer.valueOf(3), Integer.valueOf(3), "color", emp1); emp1.setCubicle(cub1); env.beginTransaction(em); em.persist(dep); @@ -174,7 +174,7 @@ public void testRelationshipToRemoved() { // case 1: direct relationship Employee -> Cubicle (FOR_DELETE) - 1:1 Department dep = new Department(101, "dep"); Employee emp1 = new Employee(102, "first", "last", dep); - Cubicle cub1 = new Cubicle(new Integer(103), new Integer(103), "color", emp1); + Cubicle cub1 = new Cubicle(Integer.valueOf(103), Integer.valueOf(103), "color", emp1); emp1.setCubicle(cub1); env.beginTransaction(em); em.persist(dep); @@ -183,7 +183,7 @@ public void testRelationshipToRemoved() { env.commitTransactionAndClear(em); env.beginTransaction(em); - emp1 = em.find(Employee.class, new Integer(emp1.getId())); + emp1 = em.find(Employee.class, Integer.valueOf(emp1.getId())); cub1 = em.find(Cubicle.class, cub1.getId()); cub1.setEmployee(null); // added as suggested by Tom em.remove(cub1); @@ -226,7 +226,7 @@ public void testRelationshipToRemoved() { em.persist(emp1); env.commitTransactionAndClear(em); env.beginTransaction(em); - emp1 = em.find(Employee.class, new Integer(emp1.getId())); + emp1 = em.find(Employee.class, Integer.valueOf(emp1.getId())); proj = em.find(Project.class, proj.getId()); emp1.getProjects().size(); em.remove(proj); @@ -275,8 +275,8 @@ public void testRelationshipToRemoved() { em.persist(emp2); env.commitTransactionAndClear(em); env.beginTransaction(em); - emp1 = em.find(Employee.class, new Integer(emp1.getId())); - emp2 = em.find(Employee.class, new Integer(emp2.getId())); + emp1 = em.find(Employee.class, Integer.valueOf(emp1.getId())); + emp2 = em.find(Employee.class, Integer.valueOf(emp2.getId())); proj = em.find(Project.class, proj.getId()); emp1.getProjects().size(); proj.getEmployees().size(); @@ -307,14 +307,14 @@ public void testRelationshipToRemoved() { // case 1b: direct relationship Employee -> Cubicle (DELETE_EXECUTED) - 1:1 dep = new Department(111, "dep"); emp1 = new Employee(112, "first", "last", dep); - cub1 = new Cubicle(new Integer(113), new Integer(112), "color", emp1); + cub1 = new Cubicle(Integer.valueOf(113), Integer.valueOf(112), "color", emp1); env.beginTransaction(em); em.persist(dep); em.persist(emp1); em.persist(cub1); env.commitTransactionAndClear(em); env.beginTransaction(em); - emp1 = em.find(Employee.class, new Integer(emp1.getId())); + emp1 = em.find(Employee.class, Integer.valueOf(emp1.getId())); cub1 = em.find(Cubicle.class, cub1.getId()); em.remove(cub1); em.flush(); @@ -352,7 +352,7 @@ public void testRelationshipToRemoved() { em.persist(proj); env.commitTransactionAndClear(em); env.beginTransaction(em); - emp1 = em.find(Employee.class, new Integer(emp1.getId())); + emp1 = em.find(Employee.class, Integer.valueOf(emp1.getId())); proj = em.find(Project.class, proj.getId()); em.remove(proj); em.flush(); @@ -403,8 +403,8 @@ public void testRelationshipToRemoved() { em.persist(emp2); env.commitTransactionAndClear(em); env.beginTransaction(em); - emp1 = em.find(Employee.class, new Integer(emp1.getId())); - emp2 = em.find(Employee.class, new Integer(emp2.getId())); + emp1 = em.find(Employee.class, Integer.valueOf(emp1.getId())); + emp2 = em.find(Employee.class, Integer.valueOf(emp2.getId())); proj = em.find(Project.class, proj.getId()); emp1.getProjects().size(); projEmployees = proj.getEmployees(); @@ -475,10 +475,10 @@ public void testRelationshipToRemovedLazy() { env.commitTransactionAndClear(em); env.beginTransaction(em); - dep = em.find(Department.class, new Integer(dep.getId())); + dep = em.find(Department.class, Integer.valueOf(dep.getId())); proj = em.find(Project.class, proj.getId()); em.remove(proj); - emp1 = em.find(Employee.class, new Integer(emp1.getId())); + emp1 = em.find(Employee.class, Integer.valueOf(emp1.getId())); // copy all projects from emp1 to emp2 with out actually touching them Employee emp2 = new Employee(203, "aaa", "bbb", dep); proj.addEmployee(emp2); // added as suggested by Tom @@ -523,10 +523,10 @@ public void testRelationshipToRemovedLazy() { em.persist(emp1); env.commitTransactionAndClear(em); env.beginTransaction(em); - dep = em.find(Department.class, new Integer(dep.getId())); + dep = em.find(Department.class, Integer.valueOf(dep.getId())); proj = em.find(Project.class, proj.getId()); em.remove(proj); - emp1 = em.find(Employee.class, new Integer(emp1.getId())); + emp1 = em.find(Employee.class, Integer.valueOf(emp1.getId())); // copy all projects from emp1 to emp2 with out actually touching them emp2 = new Employee(206, "aaa", "bbb", dep); emp2.setProjects(emp1.getProjects()); diff --git a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestGetReference.java b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestGetReference.java index 551e7a1c8a3..1d1a91e0523 100644 --- a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestGetReference.java +++ b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestGetReference.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2023 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2015 SAP. All rights reserved. * * This program and the accompanying materials are made available under the @@ -44,7 +44,7 @@ public class TestGetReference extends JPA1Base { private final Department _dep = new Department(1, "eins"); private final Department _dep2 = new Department(2, "zwei"); private final Employee _emp = new Employee(7, "first", "last", _dep); - private final Cubicle _cub = new Cubicle(new Integer(1), new Integer(2), "yellow", _emp); + private final Cubicle _cub = new Cubicle(Integer.valueOf(1), Integer.valueOf(2), "yellow", _emp); private final Patent _pat = new Patent("12345", 2007, "whatever", Date.valueOf("2007-01-01")); private final CreditCardAccount _ccacc = new CreditCardAccount(); @@ -78,7 +78,7 @@ public void testSimple() { final EntityManager em = env.getEntityManager(); try { env.beginTransaction(em); - Employee emp = em.getReference(Employee.class, new Integer(7)); + Employee emp = em.getReference(Employee.class, Integer.valueOf(7)); verify(em.contains(emp), "Object not managed"); env.commitTransactionAndClear(em); } finally { @@ -92,13 +92,13 @@ public void testPositivTx() { final EntityManager em = env.getEntityManager(); try { env.beginTransaction(em); - Employee emp = em.getReference(Employee.class, new Integer(7)); + Employee emp = em.getReference(Employee.class, Integer.valueOf(7)); verify(em.contains(emp), "Object not managed"); verify(emp.getId() == 7, "wrong id"); verify(emp.getDepartment().getName().equals("eins"), "wrong department"); - emp = em.getReference(Employee.class, new Integer(7)); + emp = em.getReference(Employee.class, Integer.valueOf(7)); verify(emp.getId() == 7, "wrong id"); - Department dep = em.getReference(Department.class, new Integer(1)); + Department dep = em.getReference(Department.class, Integer.valueOf(1)); verify(em.contains(dep), "Object not loaded"); verify(dep.getId() == 1, "wrong id"); env.rollbackTransactionAndClear(em); @@ -111,13 +111,13 @@ public void testPositivTx() { public void testPositivNonTx() { final EntityManager em = getEnvironment().getEntityManager(); try { - Employee emp = em.getReference(Employee.class, new Integer(7)); + Employee emp = em.getReference(Employee.class, Integer.valueOf(7)); try { verify(emp.getId() == 7, "wrong id"); verify(emp.getDepartment().getName().equals("eins"), "wrong department"); - emp = em.getReference(Employee.class, new Integer(7)); + emp = em.getReference(Employee.class, Integer.valueOf(7)); verify(emp.getId() == 7, "wrong id"); - Department dep = em.getReference(Department.class, new Integer(1)); + Department dep = em.getReference(Department.class, Integer.valueOf(1)); verify(dep.getId() == 1, "wrong id"); } catch (PersistenceException e) { if (getEnvironment().usesExtendedPC()) { @@ -181,7 +181,7 @@ public void testNegativ() { boolean operationFailed = false; env.beginTransaction(em); try { - employee = em.getReference(Employee.class, new Integer(17 + 4)); + employee = em.getReference(Employee.class, Integer.valueOf(17 + 4)); } catch (EntityNotFoundException e) { // $JL-EXC$ expected behavior operationFailed = true; @@ -210,7 +210,7 @@ public void testIllegalArguments() { final EntityManager em = getEnvironment().getEntityManager(); try { try { - em.getReference(String.class, new Integer(17 + 4)); + em.getReference(String.class, Integer.valueOf(17 + 4)); flop("no IllegalArgumentException thrown"); } catch (IllegalArgumentException ex) { verify(true, ""); @@ -244,8 +244,8 @@ public void testFindWithCompositeKey() { final EntityManager em = env.getEntityManager(); try { env.beginTransaction(em); - Integer one = new Integer(1); - Integer two = new Integer(2); + Integer one = Integer.valueOf(1); + Integer two = Integer.valueOf(2); CubiclePrimaryKeyClass cubKey = new CubiclePrimaryKeyClass(one, two); Cubicle cub = em.getReference(Cubicle.class, cubKey); verify(cub.getFloor().equals(one) && cub.getPlace().equals(two), "wrong cubicle"); @@ -656,7 +656,7 @@ public void testSerializeLoaded() throws IOException, ClassNotFoundException { final EntityManager em = env.getEntityManager(); try { // case 1: entity with standard serialization - Employee emp = em.getReference(Employee.class, new Integer(7)); + Employee emp = em.getReference(Employee.class, Integer.valueOf(7)); // load entity emp.getFirstName(); Employee resultEmp = AbstractBaseTest.serializeDeserialize(emp); @@ -665,7 +665,7 @@ public void testSerializeLoaded() throws IOException, ClassNotFoundException { em.clear(); // case 2: entity with writeReplace - Department dep = em.getReference(Department.class, new Integer(1)); + Department dep = em.getReference(Department.class, Integer.valueOf(1)); // load entity dep.getName(); Department resultDep = AbstractBaseTest.serializeDeserialize(dep); @@ -674,9 +674,9 @@ public void testSerializeLoaded() throws IOException, ClassNotFoundException { em.clear(); // case 3: related entities - emp = em.getReference(Employee.class, new Integer(7)); + emp = em.getReference(Employee.class, Integer.valueOf(7)); emp.getFirstName(); - dep = em.getReference(Department.class, new Integer(2)); + dep = em.getReference(Department.class, Integer.valueOf(2)); dep.getName(); emp.setDepartment(dep); Cubicle cub = em.getReference(Cubicle.class, new CubiclePrimaryKeyClass(1, 2)); @@ -698,7 +698,7 @@ public void testSerializeHollow() throws IOException, ClassNotFoundException { final EntityManager em = env.getEntityManager(); try { // case 1: entity with standard serialization - Employee emp = em.getReference(Employee.class, new Integer(7)); + Employee emp = em.getReference(Employee.class, Integer.valueOf(7)); boolean shouldFail = isHollow(emp); try { Employee resultEmp = AbstractBaseTest.serializeDeserialize(emp); @@ -712,7 +712,7 @@ public void testSerializeHollow() throws IOException, ClassNotFoundException { em.clear(); // case 2: entity with writeReplace - Department dep = em.getReference(Department.class, new Integer(1)); + Department dep = em.getReference(Department.class, Integer.valueOf(1)); shouldFail = isHollow(dep); try { Department resultDep = AbstractBaseTest.serializeDeserialize(dep); diff --git a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestMerge.java b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestMerge.java index b32821b0957..af48575be26 100644 --- a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestMerge.java +++ b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestMerge.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2023 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2015 SAP. All rights reserved. * * This program and the accompanying materials are made available under the @@ -105,12 +105,12 @@ public void testMergeDetachedWithRelation() { env.commitTransactionAndClear(em); env.beginTransaction(em); // relations of the managed employee - Employee empManaged = em.find(Employee.class, new Integer(empDetached.getId())); + Employee empManaged = em.find(Employee.class, Integer.valueOf(empDetached.getId())); empManaged.setFirstName("Adrian"); - revManaged = em.find(Review.class, new Integer(revManaged.getId())); - Review revSamePKAsDetached = em.find(Review.class, new Integer(revDetached.getId())); + revManaged = em.find(Review.class, Integer.valueOf(revManaged.getId())); + Review revSamePKAsDetached = em.find(Review.class, Integer.valueOf(revDetached.getId())); revSamePKAsDetached.setReviewText("same PK as detached review"); - revAddedInManagedEmp = em.find(Review.class, new Integer(revAddedInManagedEmp.getId())); + revAddedInManagedEmp = em.find(Review.class, Integer.valueOf(revAddedInManagedEmp.getId())); em.persist(revAddedInManagedEmp); empManaged.addReview(revManaged); empManaged.addReview(revSamePKAsDetached); @@ -218,7 +218,7 @@ public void testMergeManaged() { em.persist(dep); env.commitTransactionAndClear(em); env.beginTransaction(em); - dep = em.find(Department.class, new Integer(id)); // object is now in state MANAGED + dep = em.find(Department.class, Integer.valueOf(id)); // object is now in state MANAGED checkDepartment(dep, id, "MANAGED"); verify(em.contains(dep), "entity manager does not contain object"); mergeResult = em.merge(dep); // this should be ignored @@ -247,7 +247,7 @@ public void testMergeRemoved() { em.persist(dep); env.commitTransactionAndClear(em); env.beginTransaction(em); - dep = em.find(Department.class, new Integer(id1)); + dep = em.find(Department.class, Integer.valueOf(id1)); em.remove(dep); // now the entity should be REMOVED boolean failed = false; @@ -277,7 +277,7 @@ public void testMergeRemoved() { em.persist(depEM); env.commitTransactionAndClear(em); env.beginTransaction(em); - depEM = em.find(Department.class, new Integer(id)); + depEM = em.find(Department.class, Integer.valueOf(id)); checkDepartment(depEM, id, "REMOVE"); em.remove(depEM); // this is now in state REMOVED failed = false; @@ -302,7 +302,7 @@ public void testMergeRemoved() { em.persist(dep); env.commitTransactionAndClear(em); env.beginTransaction(em); - dep = em.find(Department.class, new Integer(id1)); + dep = em.find(Department.class, Integer.valueOf(id1)); em.remove(dep); em.flush(); // now the entity should be in state DELETE_EXECUTED @@ -376,11 +376,11 @@ public void testMergeDetached() { em.persist(depEM); env.commitTransactionAndClear(em); env.beginTransaction(em); - depClient = em.find(Department.class, new Integer(id)); + depClient = em.find(Department.class, Integer.valueOf(id)); env.commitTransactionAndClear(em); env.beginTransaction(em); depClient.setName(("NEW_NAME")); - depEM = em.find(Department.class, new Integer(id)); // this is now in state managed + depEM = em.find(Department.class, Integer.valueOf(id)); // this is now in state managed checkDepartment(depEM, id, "ORIGINAL"); verify(em.contains(depEM), "entity manager does not contain department -> it cannot be merged"); mergeResult = em.merge(depClient); @@ -396,7 +396,7 @@ public void testMergeDetached() { private void verifyExistence(final EntityManager em, int id, String name) { Department dep; - dep = em.find(Department.class, new Integer(id)); + dep = em.find(Department.class, Integer.valueOf(id)); verify(dep != null, "department not found"); verify(name.equals(dep.getName()), "department has wrong name: " + dep.getName()); } @@ -458,8 +458,8 @@ public void testMergeNewWithRelation() { em.persist(hobbyDetachedNotInPC); env.commitTransactionAndClear(em); env.beginTransaction(em); - revManaged = em.find(Review.class, new Integer(revManaged.getId())); - Review revSamePKAsDetached = em.find(Review.class, new Integer(revDetached.getId())); + revManaged = em.find(Review.class, Integer.valueOf(revManaged.getId())); + Review revSamePKAsDetached = em.find(Review.class, Integer.valueOf(revDetached.getId())); revSamePKAsDetached.setReviewText("same PK as detached review"); empNew.addReview(revManaged); empNew.addReview(revDetached); @@ -552,10 +552,10 @@ public void testWithLazyRelationPending() { em.persist(hobby2); env.commitTransactionAndClear(em); env.beginTransaction(em); - Employee empDetached = em.find(Employee.class, new Integer(emp.getId())); + Employee empDetached = em.find(Employee.class, Integer.valueOf(emp.getId())); env.commitTransactionAndClear(em); env.beginTransaction(em); - emp = em.find(Employee.class, new Integer(emp.getId())); + emp = em.find(Employee.class, Integer.valueOf(emp.getId())); emp.setFirstName("Managed"); emp = em.merge(empDetached); verify(empDetached.getFirstName().equals(emp.getFirstName()), "Merged employee has wrong first name"); @@ -564,11 +564,11 @@ public void testWithLazyRelationPending() { env.commitTransactionAndClear(em); // Case 2: Change observer pending in detached object and loaded but unchanged in managed object env.beginTransaction(em); - empDetached = em.find(Employee.class, new Integer(emp.getId())); + empDetached = em.find(Employee.class, Integer.valueOf(emp.getId())); emp.setFirstName("Detached"); env.commitTransactionAndClear(em); env.beginTransaction(em); - emp = em.find(Employee.class, new Integer(emp.getId())); + emp = em.find(Employee.class, Integer.valueOf(emp.getId())); emp.setFirstName("Managed"); Set reviews = emp.getReviews(); verify(reviews.size() == 2, "Employee has " + reviews.size() + " reviews, expected 2"); diff --git a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestPersist.java b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestPersist.java index 18f056b2c42..6ca35a9eea5 100644 --- a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestPersist.java +++ b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestPersist.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2023 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2015 SAP. All rights reserved. * * This program and the accompanying materials are made available under the @@ -141,7 +141,7 @@ private void verifyPersistManaged(boolean flushBeforePersist) { env.commitTransactionAndClear(em); env.beginTransaction(em); // find a department in the state MANAGED - dep = em.find(Department.class, new Integer(id1)); + dep = em.find(Department.class, Integer.valueOf(id1)); verify(dep != null, "department not found"); dep.setName("CHANGED"); if (flushBeforePersist) { @@ -186,7 +186,7 @@ private void verifyPersistRemoved(boolean flushBeforePersist) { env.commitTransactionAndClear(em); env.beginTransaction(em); - dep = em.find(Department.class, new Integer(id1)); + dep = em.find(Department.class, Integer.valueOf(id1)); em.remove(dep); // now, the entity should be REMOVED if (flushBeforePersist) { @@ -197,7 +197,7 @@ private void verifyPersistRemoved(boolean flushBeforePersist) { dep.setName("REINVIGORATED"); env.commitTransactionAndClear(em); - dep = em.find(Department.class, new Integer(id1)); + dep = em.find(Department.class, Integer.valueOf(id1)); verify(dep != null, "department not found"); verify("REINVIGORATED".equals(dep.getName()), "department has wrong name: " + dep.getName()); @@ -214,7 +214,7 @@ private void verifyPersistRemoved(boolean flushBeforePersist) { dep.setName("REINVIGORATED"); env.commitTransactionAndClear(em); - dep = em.find(Department.class, new Integer(id2)); + dep = em.find(Department.class, Integer.valueOf(id2)); verify(dep != null, "department not found"); verify("REINVIGORATED".equals(dep.getName()), "department has wrong name: " + dep.getName()); } finally { @@ -315,7 +315,7 @@ public void testPersistDetached() throws SQLException { env.commitTransactionAndClear(em); verifyExistenceOnDatabase(id, "TMP_DEP"); env.beginTransaction(em); - dep = em.find(Department.class, new Integer(id)); // this is now in state managed + dep = em.find(Department.class, Integer.valueOf(id)); // this is now in state managed try { em.persist(detachedDep); } catch (EntityExistsException e) { @@ -343,7 +343,7 @@ public void testPersistDetached() throws SQLException { env.commitTransactionAndClear(em); verifyExistenceOnDatabase(id, "TMP_DEP"); env.beginTransaction(em); - dep = em.find(Department.class, new Integer(id)); + dep = em.find(Department.class, Integer.valueOf(id)); em.remove(dep); // this is now in state deleted try { em.persist(detachedDep); @@ -388,7 +388,7 @@ public void testPersistDeleteExecuted() throws SQLException { env.commitTransactionAndClear(em); verifyExistenceOnDatabase(id, "TMP_DEP"); env.beginTransaction(em); - dep = em.find(Department.class, new Integer(id)); + dep = em.find(Department.class, Integer.valueOf(id)); em.remove(dep); em.flush(); try { diff --git a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestRefresh.java b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestRefresh.java index 99c49bb69c1..8e1cc171c58 100644 --- a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestRefresh.java +++ b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestRefresh.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2023 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2015 SAP. All rights reserved. * * This program and the accompanying materials are made available under the @@ -101,7 +101,7 @@ public void testRefreshManagedNew() throws SQLException { dep.setName("UPDATED"); env.commitTransactionAndClear(em); // verify that updated name present on db - dep = em.find(Department.class, new Integer(id)); + dep = em.find(Department.class, Integer.valueOf(id)); checkDepartment(dep, id, "UPDATED"); } finally { closeEntityManager(em); @@ -152,7 +152,7 @@ public void testRefreshManaged() throws SQLException { em.persist(dep); env.commitTransactionAndClear(em); env.beginTransaction(em); - dep = em.find(Department.class, new Integer(id)); // this is now in + dep = em.find(Department.class, Integer.valueOf(id)); // this is now in // state MANAGED dep.setName("UPDATED"); em.refresh(dep); @@ -160,7 +160,7 @@ public void testRefreshManaged() throws SQLException { verify(em.contains(dep), "Department is not managed"); env.commitTransactionAndClear(em); // verify that original name present on db - dep = em.find(Department.class, new Integer(id)); + dep = em.find(Department.class, Integer.valueOf(id)); checkDepartment(dep, id, "MANAGED"); // case 2: refresh with data changed on db in a different tx id = 22; @@ -170,7 +170,7 @@ public void testRefreshManaged() throws SQLException { em.persist(dep); env.commitTransactionAndClear(em); env.beginTransaction(em); - dep = em.find(Department.class, new Integer(id)); // this is now in + dep = em.find(Department.class, Integer.valueOf(id)); // this is now in // state MANAGED updateDepartmentOnDatabase(updatedDep); em.refresh(dep); @@ -179,7 +179,7 @@ public void testRefreshManaged() throws SQLException { dep.setName("MANAGED"); env.commitTransactionAndClear(em); // verify that original name present on db - dep = em.find(Department.class, new Integer(id)); + dep = em.find(Department.class, Integer.valueOf(id)); checkDepartment(dep, id, "MANAGED"); } finally { closeEntityManager(em); @@ -208,7 +208,7 @@ public void testRefreshManagedCheckContains() throws SQLException { em.persist(dep); env.commitTransactionAndClear(em); env.beginTransaction(em); - dep = em.find(Department.class, new Integer(id)); // this is now in + dep = em.find(Department.class, Integer.valueOf(id)); // this is now in // state MANAGED deleteDepartmentFromDatabase(id); verifyAbsenceFromDatabase(em, id); @@ -235,7 +235,7 @@ private void doRefreshDeleted(int id, boolean flush) throws SQLException { env.commitTransactionAndClear(em); env.beginTransaction(em); - dep = em.find(Department.class, new Integer(id)); + dep = em.find(Department.class, Integer.valueOf(id)); em.remove(dep); if (flush) { em.flush(); // this is now in state DELETE_EXECUTED @@ -316,7 +316,7 @@ public void testRefreshDetached() { em.persist(dep); env.commitTransactionAndClear(em); env.beginTransaction(em); - dep = em.find(Department.class, new Integer(id)); // this is now in + dep = em.find(Department.class, Integer.valueOf(id)); // this is now in // state MANAGED try { em.refresh(detachedDep); // this object is detached @@ -333,7 +333,7 @@ public void testRefreshDetached() { em.persist(dep); env.commitTransactionAndClear(em); env.beginTransaction(em); - dep = em.find(Department.class, new Integer(id)); + dep = em.find(Department.class, Integer.valueOf(id)); em.remove(dep); // this is now in state DELETED try { em.refresh(detachedDep); // this object is detached @@ -417,8 +417,8 @@ public void testRefreshManagedWithRelationships() { em.persist(rev2); env.commitTransactionAndClear(em); env.beginTransaction(em); - emp = em.find(Employee.class, new Integer(emp.getId())); - rev1 = em.find(Review.class, new Integer(rev1.getId())); + emp = em.find(Employee.class, Integer.valueOf(emp.getId())); + rev1 = em.find(Review.class, Integer.valueOf(rev1.getId())); Review rev3 = new Review(105, Date.valueOf("2006-02-05"), "Test coverage"); Set reviews = new HashSet(); reviews.add(rev1); @@ -436,7 +436,7 @@ public void testRefreshManagedWithRelationships() { } env.commitTransactionAndClear(em); // verify that original name present on db - rev1 = em.find(Review.class, new Integer(rev1.getId())); + rev1 = em.find(Review.class, Integer.valueOf(rev1.getId())); verify("UPDATED".equals(rev1.getReviewText()), "Rev1 has wrong text: " + rev1.getReviewText()); } finally { closeEntityManager(em); diff --git a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestRemove.java b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestRemove.java index 7a263b520f9..f04e14955c3 100644 --- a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestRemove.java +++ b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestRemove.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2023 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2015 SAP. All rights reserved. * * This program and the accompanying materials are made available under the @@ -96,7 +96,7 @@ private void verifyRemoveManaged(boolean flushBeforeRemove) throws SQLException env.commitTransactionAndClear(em); env.beginTransaction(em); // find a department in the state MANAGED - dep = em.find(Department.class, new Integer(id1)); + dep = em.find(Department.class, Integer.valueOf(id1)); verify(dep != null, "department not found"); dep.setName("NEW"); if (flushBeforeRemove) { @@ -147,7 +147,7 @@ private void verifyRemoveRemoved(boolean flushBeforePersist) throws SQLException em.persist(dep); env.commitTransactionAndClear(em); env.beginTransaction(em); - dep = em.find(Department.class, new Integer(id1)); + dep = em.find(Department.class, Integer.valueOf(id1)); em.remove(dep); // no, the entity should be REMOVED if (flushBeforePersist) { @@ -251,7 +251,7 @@ public void testRemoveDetached() { em.persist(dep); env.commitTransactionAndClear(em); env.beginTransaction(em); - dep = em.find(Department.class, new Integer(id)); // object is now in state MANAGED + dep = em.find(Department.class, Integer.valueOf(id)); // object is now in state MANAGED try { em.remove(detachedDep); } catch (IllegalArgumentException e) { @@ -275,7 +275,7 @@ public void testRemoveDetached() { em.persist(dep); env.commitTransactionAndClear(em); env.beginTransaction(em); - dep = em.find(Department.class, new Integer(id)); + dep = em.find(Department.class, Integer.valueOf(id)); em.remove(dep); // object is now in state DELETED try { em.remove(detachedDep); @@ -318,7 +318,7 @@ public void testRemoveFlushRemoveAgain() { em.persist(dep); env.commitTransactionAndClear(em); env.beginTransaction(em); - dep = em.find(Department.class, new Integer(id)); + dep = em.find(Department.class, Integer.valueOf(id)); em.remove(dep); em.flush(); try { @@ -373,8 +373,8 @@ public void testRemoveWithCompositeKey() { final JPAEnvironment env = getEnvironment(); final EntityManager em = env.getEntityManager(); try { - Cubicle cub = new Cubicle(new Integer(30), new Integer(31), "green", null /* employee */); - CubiclePrimaryKeyClass cubKey = new CubiclePrimaryKeyClass(new Integer(30), new Integer(31)); + Cubicle cub = new Cubicle(Integer.valueOf(30), Integer.valueOf(31), "green", null /* employee */); + CubiclePrimaryKeyClass cubKey = new CubiclePrimaryKeyClass(Integer.valueOf(30), Integer.valueOf(31)); env.beginTransaction(em); em.persist(cub); env.commitTransactionAndClear(em); diff --git a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestUpdate.java b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestUpdate.java index 90cb3d172ac..4267ec83490 100644 --- a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestUpdate.java +++ b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/entitymanager/TestUpdate.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2023 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2015 SAP. All rights reserved. * * This program and the accompanying materials are made available under the @@ -33,7 +33,7 @@ public void testUpdateOfComposoiteKey() { final JPAEnvironment env = getEnvironment(); final EntityManager em = env.getEntityManager(); try { - CubiclePrimaryKeyClass cubKey = new CubiclePrimaryKeyClass(new Integer(40), new Integer(41)); + CubiclePrimaryKeyClass cubKey = new CubiclePrimaryKeyClass(Integer.valueOf(40), Integer.valueOf(41)); Cubicle cub = new Cubicle(cubKey, "green", null /* employee */ ); env.beginTransaction(em); @@ -59,8 +59,8 @@ public void testUpdateRelationWithCompositeKey() { try { Employee emp = new Employee(17, "first", "last", null /* department */ ); - CubiclePrimaryKeyClass key1 = new CubiclePrimaryKeyClass(new Integer(98), new Integer(99)); - CubiclePrimaryKeyClass key2 = new CubiclePrimaryKeyClass(new Integer(5), new Integer(6)); + CubiclePrimaryKeyClass key1 = new CubiclePrimaryKeyClass(Integer.valueOf(98), Integer.valueOf(99)); + CubiclePrimaryKeyClass key2 = new CubiclePrimaryKeyClass(Integer.valueOf(5), Integer.valueOf(6)); Cubicle cub1 = new Cubicle(key1, "orange", emp); env.beginTransaction(em); emp.setCubicle(cub1); @@ -68,12 +68,12 @@ public void testUpdateRelationWithCompositeKey() { em.persist(cub1); env.commitTransactionAndClear(em); env.beginTransaction(em); - emp = em.find(Employee.class, new Integer(17)); + emp = em.find(Employee.class, Integer.valueOf(17)); Cubicle cub2 = new Cubicle(key2, "dusky pink", emp); emp.setCubicle(cub2); em.persist(cub2); env.commitTransactionAndClear(em); - emp = em.find(Employee.class, new Integer(17)); + emp = em.find(Employee.class, Integer.valueOf(17)); verify(emp != null, "employee lost"); verify(emp.getCubicle() != null, "cubicle lost"); CubiclePrimaryKeyClass key = emp.getCubicle().getId(); diff --git a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/lock/TestLockMethod.java b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/lock/TestLockMethod.java index ffbb127f477..b105c2e7b4e 100644 --- a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/lock/TestLockMethod.java +++ b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/lock/TestLockMethod.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2023 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2015 SAP. All rights reserved. * * This program and the accompanying materials are made available under the @@ -256,11 +256,11 @@ private void lockOldVersion(int id, LockModeType lockMode) { env.commitTransactionAndClear(em1); // read first version env.beginTransaction(em1); - dep1 = em1.find(Department.class, new Integer(id)); + dep1 = em1.find(Department.class, Integer.valueOf(id)); verify(dep1 != null, "Department is null"); // change entity meanwhile env.beginTransaction(em2); - Department dep2 = em2.find(Department.class, new Integer(id)); + Department dep2 = em2.find(Department.class, Integer.valueOf(id)); dep2.setName("dep" + id + "x"); env.commitTransactionAndClear(em2); // try to lock first version diff --git a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/lock/TestOptimistic.java b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/lock/TestOptimistic.java index 870c2d0d007..91bedfd2561 100644 --- a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/lock/TestOptimistic.java +++ b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/lock/TestOptimistic.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2023 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2015 SAP. All rights reserved. * * This program and the accompanying materials are made available under the @@ -58,14 +58,14 @@ public void testOptimisticLockExceptionUpdateUpdate() { env.commitTransactionAndClear(em1); env.beginTransaction(em1); - rev1 = em1.find(Review.class, new Integer(id)); + rev1 = em1.find(Review.class, Integer.valueOf(id)); verify(rev1 != null, "Review is null"); rev1.getVersion(); EntityManager em2 = env.getEntityManagerFactory().createEntityManager(); try { env.beginTransaction(em2); - Review rev2 = em2.find(Review.class, new Integer(id)); + Review rev2 = em2.find(Review.class, Integer.valueOf(id)); rev2.setReviewText("two"); // 1 update env.commitTransactionAndClear(em2); } finally { @@ -109,10 +109,10 @@ public void testOptimisticLockExceptionDeleteUpdate() { env.commitTransactionAndClear(em1); env.beginTransaction(em1); - rev1 = em1.find(Review.class, new Integer(id)); + rev1 = em1.find(Review.class, Integer.valueOf(id)); verify(rev1 != null, "Review is null"); env.beginTransaction(em2); - Review rev2 = em2.find(Review.class, new Integer(id)); + Review rev2 = em2.find(Review.class, Integer.valueOf(id)); em2.remove(rev2); // 1 delete env.commitTransactionAndClear(em2); rev1.setReviewText("1"); // 2 update @@ -149,10 +149,10 @@ public void testOptimisticLockExceptionUpdateDelete() { em1.persist(rev1); env.commitTransactionAndClear(em1); env.beginTransaction(em1); - rev1 = em1.find(Review.class, new Integer(id)); + rev1 = em1.find(Review.class, Integer.valueOf(id)); verify(rev1 != null, "Review is null"); env.beginTransaction(em2); - Review rev2 = em2.find(Review.class, new Integer(id)); + Review rev2 = em2.find(Review.class, Integer.valueOf(id)); rev2.setReviewDate(Date.valueOf("2005-12-23")); // 1 update env.commitTransactionAndClear(em2); em1.remove(rev1); // 2 delete @@ -186,10 +186,10 @@ public void testOptimisticLockExceptionDeleteDelete() { em1.persist(rev1); env.commitTransactionAndClear(em1); env.beginTransaction(em1); - rev1 = em1.find(Review.class, new Integer(id)); + rev1 = em1.find(Review.class, Integer.valueOf(id)); verify(rev1 != null, "Review is null"); env.beginTransaction(em2); - Review rev2 = em2.find(Review.class, new Integer(id)); + Review rev2 = em2.find(Review.class, Integer.valueOf(id)); em2.remove(rev2); // 1 delete env.commitTransactionAndClear(em2); em1.remove(rev1); // 2 delete @@ -218,7 +218,7 @@ public void testNoChange() { env.commitTransactionAndClear(em); version = rev.getVersion(); env.beginTransaction(em); - rev = em.find(Review.class, new Integer(id)); + rev = em.find(Review.class, Integer.valueOf(id)); verify(rev != null, "Review is null"); rev.setReviewText(rev.getReviewText()); // no change env.commitTransactionAndClear(em); @@ -297,7 +297,7 @@ public void testFlushWithVersion() { rev = em.merge(rev); em.flush(); env.commitTransactionAndClear(em); // still 4th version - rev = em.find(Review.class, new Integer(id)); + rev = em.find(Review.class, Integer.valueOf(id)); verify(rev.getReviewText().equals("BBB"), "wrong reviewText"); verify(rev.getReviewDate().equals(Date.valueOf("2005-12-23")), "wrong reviewDate"); verify(rev.getVersion() == startVersion + 3, "wrong version"); @@ -340,10 +340,10 @@ public void testRefreshWithVersion() { em1.persist(rev1); env.commitTransactionAndClear(em1); env.beginTransaction(em1); - rev1 = em1.find(Review.class, new Integer(id)); + rev1 = em1.find(Review.class, Integer.valueOf(id)); verify(rev1 != null, "Review is null"); env.beginTransaction(em2); - Review rev2 = em2.find(Review.class, new Integer(id)); + Review rev2 = em2.find(Review.class, Integer.valueOf(id)); rev2.setReviewDate(Date.valueOf("2005-12-23")); env.commitTransactionAndClear(em2); em1.refresh(rev1); @@ -368,9 +368,9 @@ public void testVersion() { env.commitTransactionAndClear(em); for (int i = 0; i < 3; i++) { env.beginTransaction(em); - rev = em.find(Review.class, new Integer(id)); + rev = em.find(Review.class, Integer.valueOf(id)); verify(rev != null, "Review is null"); - rev.setReviewText(new Integer(i).toString()); + rev.setReviewText(Integer.valueOf(i).toString()); env.commitTransactionAndClear(em); verify(version < rev.getVersion(), "new version to small"); version = rev.getVersion(); @@ -391,7 +391,7 @@ public void testPersistAgain() { em.persist(rev1); env.commitTransactionAndClear(em); env.beginTransaction(em); - rev1 = em.find(Review.class, new Integer(id)); + rev1 = em.find(Review.class, Integer.valueOf(id)); verify(rev1 != null, "Review is null"); em.persist(rev1); verify(rev1.getVersion() > 0, "Version reset"); @@ -417,17 +417,17 @@ public void testIsoLevel() throws SQLException { em1.persist(rev1); env.commitTransactionAndClear(em1); env.beginTransaction(em1); // Tx1 read and flush change - rev1 = em1.find(Review.class, new Integer(id)); + rev1 = em1.find(Review.class, Integer.valueOf(id)); verify(rev1 != null, "Review is null"); rev1.setReviewText("2"); em1.flush(); env.beginTransaction(em2); // Tx2 read flushed entity ? - Review rev2 = em2.find(Review.class, new Integer(id)); + Review rev2 = em2.find(Review.class, Integer.valueOf(id)); verify(rev2 != null, "Review is null"); env.rollbackTransactionAndClear(em1); // Tx1 rollback first change // and commit second env.beginTransaction(em1); - rev1 = em1.find(Review.class, new Integer(id)); + rev1 = em1.find(Review.class, Integer.valueOf(id)); verify(rev1 != null, "Review is null"); rev1.setReviewText("3"); env.commitTransactionAndClear(em1); @@ -458,7 +458,7 @@ public void testNode() { em.persist(first); for (int i = 1; i < NUMBER_OF_NODES; i++) { Node tmp = new Node(i, parent); - tmp.setName(new Integer(i).toString()); + tmp.setName(Integer.valueOf(i).toString()); em.persist(tmp); parent = tmp; } @@ -473,7 +473,7 @@ public void testNode() { private void updateNodes(JPAEnvironment env, EntityManager em, String newName) { env.beginTransaction(em); - Node tmp = em.find(Node.class, new Integer(0)); + Node tmp = em.find(Node.class, Integer.valueOf(0)); verify(tmp.getVersion() != 0, "wrong version"); while (tmp != null) { tmp.setName(newName); diff --git a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/query/TestArguments.java b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/query/TestArguments.java index fa2b7143e2c..750b400f1fd 100644 --- a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/query/TestArguments.java +++ b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/query/TestArguments.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2023 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2015 SAP. All rights reserved. * * This program and the accompanying materials are made available under the @@ -88,7 +88,7 @@ public void testArgumentInArithmeticExpr() throws SQLException { Query updateQuery = em .createQuery("UPDATE Employee e SET e.salary = e.salary*(1+(:percent/100)) WHERE EXISTS (SELECT p FROM e.projects p WHERE p.name LIKE :projectName)"); - updateQuery.setParameter("percent", new Integer(15)); + updateQuery.setParameter("percent", Integer.valueOf(15)); updateQuery.setParameter("projectName", "testing project"); updateQuery.executeUpdate(); @@ -279,7 +279,7 @@ public void testPrimitiveBoolean() { @Test public void testPrimitiveByte() { - assertValidParameterForBasicTypesFieldAccess("primititveByte", new Byte((byte) 2)); + assertValidParameterForBasicTypesFieldAccess("primititveByte", Byte.valueOf((byte) 2)); } @Test @@ -315,42 +315,42 @@ public void testPrimitiveDouble() { // wrappers of primitive types @Test public void testWrapperBoolean() { - assertValidParameterForBasicTypesFieldAccess("wrapperBoolean", new Boolean(true)); + assertValidParameterForBasicTypesFieldAccess("wrapperBoolean", Boolean.valueOf(true)); } @Test public void testWrapperByte() { - assertValidParameterForBasicTypesFieldAccess("wrapperByte", new Byte((byte) 2)); + assertValidParameterForBasicTypesFieldAccess("wrapperByte", Byte.valueOf((byte) 2)); } @Test public void testWrapperCharacter() { - assertValidParameterForBasicTypesFieldAccess("wrapperCharacter", new Character('c')); + assertValidParameterForBasicTypesFieldAccess("wrapperCharacter", Character.valueOf('c')); } @Test public void testWrapperShort() { - assertValidParameterForBasicTypesFieldAccess("wrapperShort", new Short((short) 1)); + assertValidParameterForBasicTypesFieldAccess("wrapperShort", Short.valueOf((short) 1)); } @Test public void testWrapperInteger() { - assertValidParameterForBasicTypesFieldAccess("wrapperInteger", new Integer(1)); + assertValidParameterForBasicTypesFieldAccess("wrapperInteger", Integer.valueOf(1)); } @Test public void testWrapperLong() { - assertValidParameterForBasicTypesFieldAccess("wrapperLong", new Long(1L)); + assertValidParameterForBasicTypesFieldAccess("wrapperLong", Long.valueOf(1L)); } @Test public void testWrapperDouble() { - assertValidParameterForBasicTypesFieldAccess("wrapperDouble", new Double(0.00)); + assertValidParameterForBasicTypesFieldAccess("wrapperDouble", Double.valueOf(0.00)); } @Test public void testWrapperFloat() { - assertValidParameterForBasicTypesFieldAccess("wrapperFloat", new Float(1F)); + assertValidParameterForBasicTypesFieldAccess("wrapperFloat", Float.valueOf(1F)); } // immutable reference types diff --git a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/query/TestExtendedQueries.java b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/query/TestExtendedQueries.java index 533e1e668c2..8f6be74e8c9 100644 --- a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/query/TestExtendedQueries.java +++ b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/query/TestExtendedQueries.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2023 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2015 SAP. All rights reserved. * * This program and the accompanying materials are made available under the @@ -98,7 +98,7 @@ protected void resetData() { protected String getRandomSurname() { String tmpName = SURNAMES[nameRandomizer.nextInt(SURNAMES.length)]; if (!NUMBER_OF_SURNAMES_USED.containsKey(tmpName)) { - NUMBER_OF_SURNAMES_USED.put(tmpName, new Integer(1)); + NUMBER_OF_SURNAMES_USED.put(tmpName, Integer.valueOf(1)); } else { Integer tmpNum = NUMBER_OF_SURNAMES_USED.get(tmpName); tmpNum = Integer.valueOf(tmpNum.intValue() + 1); @@ -110,7 +110,7 @@ protected String getRandomSurname() { protected String getRandomGivenName() { String tmpName = GIVEN_NAMES[nameRandomizer.nextInt(GIVEN_NAMES.length)]; if (!NUMBER_OF_GIVEN_NAMES_USED.containsKey(tmpName)) { - NUMBER_OF_GIVEN_NAMES_USED.put(tmpName, new Integer(1)); + NUMBER_OF_GIVEN_NAMES_USED.put(tmpName, Integer.valueOf(1)); } else { Integer tmpNum = NUMBER_OF_GIVEN_NAMES_USED.get(tmpName); tmpNum = Integer.valueOf(tmpNum.intValue() + 1); @@ -282,7 +282,7 @@ public void testQueryWithBuiltinAbs() throws Exception { try { // test string-mapping of enums Query query = em.createQuery("Select DISTINCT Object(emp) From Employee emp WHERE emp.salary > ABS(:dbl)"); - query.setParameter("dbl", new Double(1180D)); + query.setParameter("dbl", Double.valueOf(1180D)); query.getResultList(); } finally { closeEntityManager(em); diff --git a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/query/TestParameterTypes.java b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/query/TestParameterTypes.java index 4384e755049..bebb83e6930 100644 --- a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/query/TestParameterTypes.java +++ b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/query/TestParameterTypes.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2023 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2015 SAP. All rights reserved. * * This program and the accompanying materials are made available under the @@ -45,7 +45,7 @@ public void testInsert() { em.persist(obj); env.commitTransactionAndClear(em); verify(true, "no Exception"); - obj = em.find(BasicTypesFieldAccess.class, new Integer(0)); + obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(0)); } finally { closeEntityManager(em); } @@ -295,7 +295,7 @@ public boolean isComparableJdbcType() { public void testWrapperByte() { Validator validator = new Validator() { public void set(BasicTypesFieldAccess obj) { - obj.setWrapperByte(new Byte((byte) 17)); + obj.setWrapperByte(Byte.valueOf((byte) 17)); } public boolean isComparableJdbcType() { @@ -314,7 +314,7 @@ public Query createQuery(EntityManager em, int id) { public void testWrapperCharacter() { Validator validator = new Validator() { public void set(BasicTypesFieldAccess obj) { - obj.setWrapperCharacter(new Character('A')); + obj.setWrapperCharacter(Character.valueOf('A')); } public boolean isComparableJdbcType() { @@ -333,7 +333,7 @@ public Query createQuery(EntityManager em, int id) { public void testWrapperShort() { Validator validator = new Validator() { public void set(BasicTypesFieldAccess obj) { - obj.setWrapperShort(new Short((short) 1)); + obj.setWrapperShort(Short.valueOf((short) 1)); } public boolean isComparableJdbcType() { @@ -352,7 +352,7 @@ public Query createQuery(EntityManager em, int id) { public void testWrapperInteger() { Validator validator = new Validator() { public void set(BasicTypesFieldAccess obj) { - obj.setWrapperInteger(new Integer(1)); + obj.setWrapperInteger(Integer.valueOf(1)); } public boolean isComparableJdbcType() { @@ -371,7 +371,7 @@ public Query createQuery(EntityManager em, int id) { public void testWrapperLong() { Validator validator = new Validator() { public void set(BasicTypesFieldAccess obj) { - obj.setWrapperLong(new Long(1)); + obj.setWrapperLong(Long.valueOf(1)); } public boolean isComparableJdbcType() { @@ -390,7 +390,7 @@ public Query createQuery(EntityManager em, int id) { public void testWrapperDouble() { Validator validator = new Validator() { public void set(BasicTypesFieldAccess obj) { - obj.setWrapperDouble(new Double(1)); + obj.setWrapperDouble(Double.valueOf(1)); } public boolean isComparableJdbcType() { @@ -409,7 +409,7 @@ public Query createQuery(EntityManager em, int id) { public void testWrapperFloat() { Validator validator = new Validator() { public void set(BasicTypesFieldAccess obj) { - obj.setWrapperFloat(new Float(1)); + obj.setWrapperFloat(Float.valueOf(1)); } public boolean isComparableJdbcType() { diff --git a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/query/TestQueryAPI.java b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/query/TestQueryAPI.java index e60512249e2..a9430756a48 100644 --- a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/query/TestQueryAPI.java +++ b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/query/TestQueryAPI.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2023 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2015 SAP. All rights reserved. * * This program and the accompanying materials are made available under the @@ -129,11 +129,11 @@ public void testParameterSetting() { // test invalid typed ordered param Query q3 = em.createQuery(queryStringOrderedParam); - assertOrderedParameterInvalid(q3, 1, new Integer(2)); + assertOrderedParameterInvalid(q3, 1, Integer.valueOf(2)); // test invalid typed named param Query q4 = em.createQuery(queryStringNamedParam); - assertNamedParameterInvalid(q4, "firstname", new Integer(3)); + assertNamedParameterInvalid(q4, "firstname", Integer.valueOf(3)); // test invalid named ordered param Query q5 = em.createQuery(queryStringOrderedParam); diff --git a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/query/TestSelectListTypes.java b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/query/TestSelectListTypes.java index 179368cf613..bcc837d256e 100644 --- a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/query/TestSelectListTypes.java +++ b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/query/TestSelectListTypes.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2023 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2015 SAP. All rights reserved. * * This program and the accompanying materials are made available under the @@ -46,7 +46,7 @@ protected void setup() throws SQLException { env.beginTransaction(em); em.persist(obj); env.commitTransactionAndClear(em); - obj = em.find(BasicTypesFieldAccess.class, new Integer(0)); + obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(0)); } finally { closeEntityManager(em); } diff --git a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/query/TestSimpleQuery.java b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/query/TestSimpleQuery.java index c5aac7408c7..12e35e5dd6c 100644 --- a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/query/TestSimpleQuery.java +++ b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/query/TestSimpleQuery.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2023 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2015 SAP. All rights reserved. * * This program and the accompanying materials are made available under the @@ -210,11 +210,11 @@ private void verifyComparisonPrepdicateResult(EntityManager em, String txt, int. Set actual = new HashSet(); for (Object object : result) { BasicTypesFieldAccess fa = (BasicTypesFieldAccess) object; - actual.add(new Integer(fa.getId())); + actual.add(Integer.valueOf(fa.getId())); } Set expected = new HashSet(); for (int i : ids) { - expected.add(new Integer(i)); + expected.add(Integer.valueOf(i)); } verify(expected.equals(actual), "expecetd and actual sets are different for query >>" + txt + "<<"); } @@ -549,7 +549,7 @@ public void testQueryWithFlush() throws SQLException { em.persist(dep10); env.commitTransactionAndClear(em); env.beginTransaction(em); - Department dep = em.find(Department.class, new Integer(10)); + Department dep = em.find(Department.class, Integer.valueOf(10)); dep.setName("newName"); em.flush(); Query query = em.createQuery("select d from Department d where d.name = :name"); diff --git a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestBidirectionalManyToMany.java b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestBidirectionalManyToMany.java index 0ba7b967169..bf4985e7349 100644 --- a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestBidirectionalManyToMany.java +++ b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestBidirectionalManyToMany.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2023 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2015 SAP. All rights reserved. * * This program and the accompanying materials are made available under the @@ -47,10 +47,10 @@ public class TestBidirectionalManyToMany extends JPA1Base { private static final int HANS_ID_VALUE = 1; - private static final Integer HANS_ID = new Integer(HANS_ID_VALUE); + private static final Integer HANS_ID = Integer.valueOf(HANS_ID_VALUE); private static final Set HANS_SET = new HashSet(); private static final int FRED_ID_VALUE = 2; - private static final Integer FRED_ID = new Integer(FRED_ID_VALUE); + private static final Integer FRED_ID = Integer.valueOf(FRED_ID_VALUE); private static final Set FRED_SET = new HashSet(); private static final Set SEED_SET = new HashSet(); private static final Project PUHLEN = new Project("G\u00fcrteltiere puhlen"); @@ -348,7 +348,7 @@ public void testExchange() throws SQLException { } private void verifyEmployees(EntityManager em, int id, int size) { - Project project = em.find(Project.class, new Integer(id)); + Project project = em.find(Project.class, Integer.valueOf(id)); verify(project != null, "project not found"); Set employees = project.getEmployees(); verify(employees.size() == size, "wrong number of employees: " + employees.size() + " expected: " + size); @@ -388,7 +388,7 @@ public void testCopyProjectsToNew() throws SQLException { } checkJoinTable(expected); env.beginTransaction(em); - paul = em.find(Employee.class, new Integer(newId)); + paul = em.find(Employee.class, Integer.valueOf(newId)); verify(paul.getProjects().size() == HANS_SET.size(), "Paul has wrong number of projects"); env.rollbackTransactionAndClear(em); } finally { diff --git a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestBidirectionalOneToOne.java b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestBidirectionalOneToOne.java index 1e4e270b008..fda67104f99 100644 --- a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestBidirectionalOneToOne.java +++ b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestBidirectionalOneToOne.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2023 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2015 SAP. All rights reserved. * * This program and the accompanying materials are made available under the @@ -33,10 +33,10 @@ public class TestBidirectionalOneToOne extends JPA1Base { private static final int HANS_ID_VALUE = 1; private static final int FRED_ID_VALUE = 2; - private static final Integer HANS_ID = new Integer(HANS_ID_VALUE); - private static final Integer FRED_ID = new Integer(FRED_ID_VALUE); - private static final CubiclePrimaryKeyClass GREEN_CUBICLE_ID = new CubiclePrimaryKeyClass(new Integer(10), new Integer(20)); - private static final CubiclePrimaryKeyClass BLUE_CUBICLE_ID = new CubiclePrimaryKeyClass(new Integer(33), new Integer(44)); + private static final Integer HANS_ID = Integer.valueOf(HANS_ID_VALUE); + private static final Integer FRED_ID = Integer.valueOf(FRED_ID_VALUE); + private static final CubiclePrimaryKeyClass GREEN_CUBICLE_ID = new CubiclePrimaryKeyClass(Integer.valueOf(10), Integer.valueOf(20)); + private static final CubiclePrimaryKeyClass BLUE_CUBICLE_ID = new CubiclePrimaryKeyClass(Integer.valueOf(33), Integer.valueOf(44)); @Before public void seedDataModel() throws SQLException { diff --git a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestEmployeePatent.java b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestEmployeePatent.java index 2fe13106772..2d95308e7af 100644 --- a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestEmployeePatent.java +++ b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestEmployeePatent.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2023 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2015 SAP. All rights reserved. * * This program and the accompanying materials are made available under the @@ -38,8 +38,8 @@ import org.junit.Test; public class TestEmployeePatent extends JPA1Base { - private static final Integer EDISON = new Integer(26); - private static final Integer TESLA = new Integer(32); + private static final Integer EDISON = Integer.valueOf(26); + private static final Integer TESLA = Integer.valueOf(32); @Override public void setup() { diff --git a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestEmployee_Cubicle.java b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestEmployee_Cubicle.java index ec89b40031e..bee9e9f5b57 100644 --- a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestEmployee_Cubicle.java +++ b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestEmployee_Cubicle.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2023 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2015 SAP. All rights reserved. * * This program and the accompanying materials are made available under the @@ -35,7 +35,7 @@ public void setup() { env.beginTransaction(em); Department dep = new Department(9, "neun"); Employee emp = new Employee(5, "first", "last", dep); - Cubicle cub = new Cubicle(new Integer(3), new Integer(4), "red", emp); + Cubicle cub = new Cubicle(Integer.valueOf(3), Integer.valueOf(4), "red", emp); emp.setCubicle(cub); em.persist(dep); em.persist(emp); @@ -51,7 +51,7 @@ public void setup() { public void testRelationToCompositeKey() { final EntityManager em = getEnvironment().getEntityManager(); try { - Employee employee = em.find(Employee.class, new Integer(5)); + Employee employee = em.find(Employee.class, Integer.valueOf(5)); verify(employee.getId() == 5, "wrong employee"); verify(employee.getCubicle() != null, "cubicle is null"); verify(employee.getCubicle().getFloor() != null, "floor is null"); diff --git a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestEmployee_Review.java b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestEmployee_Review.java index cae02554c98..f56d0c3e991 100644 --- a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestEmployee_Review.java +++ b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestEmployee_Review.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2023 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2015 SAP. All rights reserved. * * This program and the accompanying materials are made available under the @@ -55,11 +55,11 @@ public void setup() { em.persist(_review2); em.flush(); env.commitTransactionAndClear(em); - Review rev = em.find(Review.class, new Integer(12)); + Review rev = em.find(Review.class, Integer.valueOf(12)); verify(rev != null, "Review null"); verify(rev.getId() == 12, "wrong review"); env.beginTransaction(em); - Employee employee = em.find(Employee.class, new Integer(7)); + Employee employee = em.find(Employee.class, Integer.valueOf(7)); verify(employee != null, "employee not found"); Set reviews = employee.getReviews(); verify(reviews.size() == 2, "set has wrong size"); @@ -74,7 +74,7 @@ public void setup() { public void testFindIndividualReview() { final EntityManager em = getEnvironment().getEntityManager(); try { - Review rev = em.find(Review.class, new Integer(12)); + Review rev = em.find(Review.class, Integer.valueOf(12)); verify(rev != null, "Review null"); verify(rev.getId() == 12, "wrong review"); } finally { @@ -88,7 +88,7 @@ public void testNavigateReviewsInTransaction() { final EntityManager em = env.getEntityManager(); try { env.beginTransaction(em); - Employee employee = em.find(Employee.class, new Integer(7)); + Employee employee = em.find(Employee.class, Integer.valueOf(7)); verify(employee != null, "employee not found"); Set reviews = employee.getReviews(); verify(reviews.size() == 2, "set has wrong size"); @@ -118,7 +118,7 @@ public void testNavigateReviewsOutsideTransaction() { } else { failureExpected = true; } - Employee employee = em.find(Employee.class, new Integer(7)); + Employee employee = em.find(Employee.class, Integer.valueOf(7)); verify(employee != null, "employee not found"); Set reviews = employee.getReviews(); try { @@ -142,7 +142,7 @@ public void testNavigateDeserializedEmployeeFails() throws IOException, ClassNot final EntityManager em = env.getEntityManager(); try { env.beginTransaction(em); - Employee employee = em.find(Employee.class, new Integer(7)); + Employee employee = em.find(Employee.class, Integer.valueOf(7)); verify(employee != null, "employee not found"); employee = AbstractBaseTest.serializeDeserialize(employee); Set reviews = employee.getReviews(); @@ -167,7 +167,7 @@ public void testNavigatedReviewsCanBeDeserialized() throws IOException, ClassNot final EntityManager em = env.getEntityManager(); try { env.beginTransaction(em); - Employee employee = em.find(Employee.class, new Integer(7)); + Employee employee = em.find(Employee.class, Integer.valueOf(7)); verify(employee != null, "employee not found"); Set reviews = employee.getReviews(); // touch the set diff --git a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestMultipleRelationships.java b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestMultipleRelationships.java index 46646823565..ae679b14e04 100644 --- a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestMultipleRelationships.java +++ b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestMultipleRelationships.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2023 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2015 SAP. All rights reserved. * * This program and the accompanying materials are made available under the @@ -37,7 +37,7 @@ public class TestMultipleRelationships extends JPA1Base { private static final int HANS_ID_VALUE = 1; private static final int FRED_ID_VALUE = 2; - private static final Integer HANS_ID = new Integer(HANS_ID_VALUE); + private static final Integer HANS_ID = Integer.valueOf(HANS_ID_VALUE); private static final Project PUHLEN = new Project("G\u00fcrteltiere puhlen"); private static final Project PINSELN = new Project("B\u00e4uche pinseln"); private static final Project FALTEN = new Project("Zitronen falten"); diff --git a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestNode.java b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestNode.java index 4a6abae3cc0..a47edf3d0bf 100644 --- a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestNode.java +++ b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestNode.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2023 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2015 SAP. All rights reserved. * * This program and the accompanying materials are made available under the @@ -41,7 +41,7 @@ public void testRoot() { em.persist(root); env.commitTransactionAndClear(em); env.beginTransaction(em); - Node found = em.find(Node.class, new Integer(rootId)); + Node found = em.find(Node.class, Integer.valueOf(rootId)); verify(found != null, "no node found"); verify(found.getParent() == null, "parent not null"); verify(found.getChildren().size() == 0, "unexpected children"); @@ -67,13 +67,13 @@ public void testTwoGenerations() { em.persist(child2); env.commitTransactionAndClear(em); env.beginTransaction(em); - Node found = em.find(Node.class, new Integer(rootId)); + Node found = em.find(Node.class, Integer.valueOf(rootId)); verify(found != null, "no node found"); verify(found.getParent() == null, "parent not null"); verify(found.getChildren().size() == 2, "unexpected children"); env.rollbackTransactionAndClear(em); env.beginTransaction(em); - found = em.find(Node.class, new Integer(child1Id)); + found = em.find(Node.class, Integer.valueOf(child1Id)); verify(found != null, "no node found"); Node parent = found.getParent(); verify(em.contains(parent), "parent not contained in em"); @@ -106,9 +106,9 @@ public void testChangeParent() { env.commitTransactionAndClear(em); // change the parent env.beginTransaction(em); - child = em.find(Node.class, new Integer(childId)); + child = em.find(Node.class, Integer.valueOf(childId)); Node parent = child.getParent(); - root2 = em.find(Node.class, new Integer(root2Id)); + root2 = em.find(Node.class, Integer.valueOf(root2Id)); Set children = parent.getChildren(); parent.setChildren(null); child.setParent(root2); @@ -119,16 +119,16 @@ public void testChangeParent() { verify(child.postUpdateWasCalled(), "child was not updated but it is the owning side of the relationship"); // check the relationship env.beginTransaction(em); - child = em.find(Node.class, new Integer(childId)); + child = em.find(Node.class, Integer.valueOf(childId)); verify(child != null, "child is null"); parent = child.getParent(); verify(parent != null, "parent is null"); - root2 = em.find(Node.class, new Integer(root2Id)); + root2 = em.find(Node.class, Integer.valueOf(root2Id)); verify(root2 == parent, "root2 != parent"); verify(children != null, "children is null"); children = root2.getChildren(); verify(children.contains(child), "child not contained in set of children"); - root1 = em.find(Node.class, new Integer(root1Id)); + root1 = em.find(Node.class, Integer.valueOf(root1Id)); Set children1 = root1.getChildren(); verify(children1 == null || children1.isEmpty(), "children of root1 not null or empty"); env.rollbackTransactionAndClear(em); @@ -153,7 +153,7 @@ public void testCircle() { em.persist(root); env.commitTransactionAndClear(em); env.beginTransaction(em); - Node found = em.find(Node.class, new Integer(rootId)); + Node found = em.find(Node.class, Integer.valueOf(rootId)); verify(found != null, "no node found"); verify(found.getParent() == found, "parent != root"); verify(found.getChildren().size() == 1, "unexpected children"); diff --git a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestUnidirectionalOneToMany.java b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestUnidirectionalOneToMany.java index 2bcb091ed0b..666bf07e22e 100644 --- a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestUnidirectionalOneToMany.java +++ b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestUnidirectionalOneToMany.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2023 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2015 SAP. All rights reserved. * * This program and the accompanying materials are made available under the @@ -40,7 +40,7 @@ public class TestUnidirectionalOneToMany extends JPA1Base { private static final int EMP_ID_VALUE = 4; - private static final Integer EMP_ID = new Integer(EMP_ID_VALUE); + private static final Integer EMP_ID = Integer.valueOf(EMP_ID_VALUE); private static final Set SEED_SET = new HashSet(); static { SEED_SET.add(new Pair(EMP_ID_VALUE, 1)); @@ -179,7 +179,7 @@ public void testDeleteReview() throws SQLException { emp = em.find(Employee.class, EMP_ID); reviews = emp.getReviews(); verify(reviews.size() == 2, "not exactly 2 reviews but " + reviews.size()); - Object object = em.find(Review.class, new Integer(removedId)); + Object object = em.find(Review.class, Integer.valueOf(removedId)); verify(object == null, "review found"); env.rollbackTransactionAndClear(em); } finally { diff --git a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestUnidirectionalOneToOne.java b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestUnidirectionalOneToOne.java index aa3b28c94eb..cf2335a5a44 100644 --- a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestUnidirectionalOneToOne.java +++ b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/relation/TestUnidirectionalOneToOne.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2023 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2015 SAP. All rights reserved. * * This program and the accompanying materials are made available under the @@ -32,8 +32,8 @@ public class TestUnidirectionalOneToOne extends JPA1Base { private static final int HANS_ID_VALUE = 1; private static final int FRED_ID_VALUE = 2; - private static final Integer HANS_ID = new Integer(HANS_ID_VALUE); - private static final Integer FRED_ID = new Integer(FRED_ID_VALUE); + private static final Integer HANS_ID = Integer.valueOf(HANS_ID_VALUE); + private static final Integer FRED_ID = Integer.valueOf(FRED_ID_VALUE); private static final byte[] SMOKER_GUID = new byte[16]; private static final byte[] NON_SMOKER_GUID = new byte[16]; static { diff --git a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/simple/SimpleTest.java b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/simple/SimpleTest.java index c7a06910364..912811f62a8 100644 --- a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/simple/SimpleTest.java +++ b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/simple/SimpleTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2023 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2015 SAP. All rights reserved. * * This program and the accompanying materials are made available under the @@ -47,21 +47,21 @@ public void testSimple() { em.flush(); env.commitTransactionAndClear(em); env.beginTransaction(em); - dep = em.find(Department.class, new Integer(8)); + dep = em.find(Department.class, Integer.valueOf(8)); verify(dep != null, "department is null"); - Department dep2 = em.find(Department.class, new Integer(8)); + Department dep2 = em.find(Department.class, Integer.valueOf(8)); verify(dep == dep2, "department is not unique"); - emp = em.find(Employee.class, new Integer(3)); + emp = em.find(Employee.class, Integer.valueOf(3)); verify(emp != null, "employee is null"); - Employee emp2 = em.find(Employee.class, new Integer(3)); + Employee emp2 = em.find(Employee.class, Integer.valueOf(3)); verify(emp == emp2, "employee is not unique"); emp.setLastName(HASTIG); dep.setName("88888888"); em.flush(); env.commitTransactionAndClear(em); env.beginTransaction(em); - emp = em.find(Employee.class, new Integer(3)); - dep = em.find(Department.class, new Integer(8)); + emp = em.find(Employee.class, Integer.valueOf(3)); + dep = em.find(Department.class, Integer.valueOf(8)); verify(emp != null, "employee is null"); verify(HASTIG.equals(emp.getLastName()), "employee has wrong last name: " + emp.getLastName()); em.remove(emp); diff --git a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/simple/TestBasicFieldTypes.java b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/simple/TestBasicFieldTypes.java index a9b59f6bf33..818d6acf965 100644 --- a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/simple/TestBasicFieldTypes.java +++ b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/simple/TestBasicFieldTypes.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2023 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2015 SAP. All rights reserved. * * This program and the accompanying materials are made available under the @@ -51,7 +51,7 @@ public void testInsert() { em.persist(obj); env.commitTransactionAndClear(em); verify(true, "no Exception"); - obj = em.find(BasicTypesFieldAccess.class, new Integer(0)); + obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(0)); } finally { closeEntityManager(em); } @@ -68,24 +68,24 @@ private void validatePrimitive(final int id, Validator validator, String fieldNa em.persist(obj); env.commitTransactionAndClear(em); verify(true, "no Exception"); - obj = em.find(BasicTypesFieldAccess.class, new Integer(id)); + obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(id)); verify(!validator.isChanged(obj), fieldName + " not persisted"); // update unchanged object env.beginTransaction(em); - obj = em.find(BasicTypesFieldAccess.class, new Integer(id)); + obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(id)); obj.clearPostUpdate(); env.commitTransactionAndClear(em); verify(!obj.postUpdateWasCalled(), "postUpdate was called"); - obj = em.find(BasicTypesFieldAccess.class, new Integer(id)); + obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(id)); verify(!validator.isChanged(obj), fieldName + " is changed"); // update changed object env.beginTransaction(em); - obj = em.find(BasicTypesFieldAccess.class, new Integer(id)); + obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(id)); obj.clearPostUpdate(); validator.change(obj); env.commitTransactionAndClear(em); verify(obj.postUpdateWasCalled(), "postUpdate was not called"); - obj = em.find(BasicTypesFieldAccess.class, new Integer(id)); + obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(id)); verify(validator.isChanged(obj), fieldName + " is unchanged"); } finally { closeEntityManager(em); @@ -101,11 +101,11 @@ private void validateReference(final int id, ReferenceValidator validator, Strin env.beginTransaction(em); em.persist(obj); env.commitTransactionAndClear(em); - obj = em.find(BasicTypesFieldAccess.class, new Integer(id)); + obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(id)); verify(validator.isNull(obj), fieldName + " is not null"); // delete the object again env.beginTransaction(em); - em.remove(em.find(BasicTypesFieldAccess.class, new Integer(id))); + em.remove(em.find(BasicTypesFieldAccess.class, Integer.valueOf(id))); env.commitTransactionAndClear(em); // insert object with non-null field env.beginTransaction(em); @@ -113,33 +113,33 @@ private void validateReference(final int id, ReferenceValidator validator, Strin em.persist(obj); env.commitTransactionAndClear(em); verify(true, "no Exception"); - obj = em.find(BasicTypesFieldAccess.class, new Integer(id)); + obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(id)); verify(!validator.isChanged(obj), fieldName + " not persisted"); // update unchanged env.beginTransaction(em); - obj = em.find(BasicTypesFieldAccess.class, new Integer(id)); + obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(id)); obj.clearPostUpdate(); env.commitTransactionAndClear(em); verify(!obj.postUpdateWasCalled(), "postUpdate was called"); - obj = em.find(BasicTypesFieldAccess.class, new Integer(id)); + obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(id)); verify(!validator.isChanged(obj), fieldName + " is changed"); // update changed object env.beginTransaction(em); - obj = em.find(BasicTypesFieldAccess.class, new Integer(id)); + obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(id)); obj.clearPostUpdate(); validator.change(obj); env.commitTransactionAndClear(em); verify(obj.postUpdateWasCalled(), "postUpdate was not called"); - obj = em.find(BasicTypesFieldAccess.class, new Integer(id)); + obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(id)); verify(validator.isChanged(obj), fieldName + " is unchanged"); // update to null env.beginTransaction(em); - obj = em.find(BasicTypesFieldAccess.class, new Integer(id)); + obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(id)); obj.clearPostUpdate(); validator.setNull(obj); env.commitTransactionAndClear(em); verify(obj.postUpdateWasCalled(), "postUpdate was not called"); - obj = em.find(BasicTypesFieldAccess.class, new Integer(id)); + obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(id)); verify(validator.isNull(obj), fieldName + " is not null"); } finally { closeEntityManager(em); @@ -155,11 +155,11 @@ private void validateMutable(final int id, MutableValidator validator, String fi env.beginTransaction(em); em.persist(obj); env.commitTransactionAndClear(em); - obj = em.find(BasicTypesFieldAccess.class, new Integer(id)); + obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(id)); verify(validator.isNull(obj), fieldName + " is not null"); // delete the object again env.beginTransaction(em); - em.remove(em.find(BasicTypesFieldAccess.class, new Integer(id))); + em.remove(em.find(BasicTypesFieldAccess.class, Integer.valueOf(id))); env.commitTransactionAndClear(em); // insert object with non-null field env.beginTransaction(em); @@ -167,49 +167,49 @@ private void validateMutable(final int id, MutableValidator validator, String fi em.persist(obj); env.commitTransactionAndClear(em); verify(true, "no Exception"); - obj = em.find(BasicTypesFieldAccess.class, new Integer(id)); + obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(id)); verify(!validator.isChanged(obj), fieldName + " not persisted"); // update unchanged env.beginTransaction(em); - obj = em.find(BasicTypesFieldAccess.class, new Integer(id)); + obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(id)); obj.clearPostUpdate(); env.commitTransactionAndClear(em); verify(!obj.postUpdateWasCalled(), "postUpdate was not called"); - obj = em.find(BasicTypesFieldAccess.class, new Integer(id)); + obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(id)); verify(!validator.isChanged(obj), fieldName + " is changed"); // update changed env.beginTransaction(em); - obj = em.find(BasicTypesFieldAccess.class, new Integer(id)); + obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(id)); obj.clearPostUpdate(); validator.setNull(obj); env.commitTransactionAndClear(em); verify(obj.postUpdateWasCalled(), "postUpdate was not called"); - obj = em.find(BasicTypesFieldAccess.class, new Integer(id)); + obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(id)); verify(validator.isNull(obj), fieldName + " is not null"); // update original env.beginTransaction(em); - obj = em.find(BasicTypesFieldAccess.class, new Integer(id)); + obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(id)); validator.set(obj); env.commitTransactionAndClear(em); - obj = em.find(BasicTypesFieldAccess.class, new Integer(id)); + obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(id)); verify(!validator.isChanged(obj), fieldName + " not persisted"); // mutate env.beginTransaction(em); - obj = em.find(BasicTypesFieldAccess.class, new Integer(id)); + obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(id)); obj.clearPostUpdate(); validator.mutate(obj); env.commitTransactionAndClear(em); verify(obj.postUpdateWasCalled(), "postUpdate was not called"); - obj = em.find(BasicTypesFieldAccess.class, new Integer(id)); + obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(id)); verify(validator.isChanged(obj), fieldName + " not mutated"); // update to null env.beginTransaction(em); - obj = em.find(BasicTypesFieldAccess.class, new Integer(id)); + obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(id)); obj.clearPostUpdate(); validator.setNull(obj); env.commitTransactionAndClear(em); verify(obj.postUpdateWasCalled(), "postUpdate was not called"); - obj = em.find(BasicTypesFieldAccess.class, new Integer(id)); + obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(id)); verify(validator.isNull(obj), fieldName + " is not null"); } finally { closeEntityManager(em); @@ -392,11 +392,11 @@ public boolean isChanged(BasicTypesFieldAccess obj) { public void testWrapperByte() { ReferenceValidator validator = new ReferenceValidator() { public void set(BasicTypesFieldAccess obj) { - obj.setWrapperByte(new Byte((byte) 17)); + obj.setWrapperByte(Byte.valueOf((byte) 17)); } public void change(BasicTypesFieldAccess obj) { - obj.setWrapperByte(new Byte((byte) 18)); + obj.setWrapperByte(Byte.valueOf((byte) 18)); } public void setNull(BasicTypesFieldAccess obj) { @@ -408,7 +408,7 @@ public boolean isNull(BasicTypesFieldAccess obj) { } public boolean isChanged(BasicTypesFieldAccess obj) { - return !obj.getWrapperByte().equals(new Byte((byte) 17)); + return !obj.getWrapperByte().equals(Byte.valueOf((byte) 17)); } }; validateReference(12, validator, "wrapperByte"); @@ -418,11 +418,11 @@ public boolean isChanged(BasicTypesFieldAccess obj) { public void testWrapperCharacter() { ReferenceValidator validator = new ReferenceValidator() { public void set(BasicTypesFieldAccess obj) { - obj.setWrapperCharacter(new Character('A')); + obj.setWrapperCharacter(Character.valueOf('A')); } public void change(BasicTypesFieldAccess obj) { - obj.setWrapperCharacter(new Character('B')); + obj.setWrapperCharacter(Character.valueOf('B')); } public void setNull(BasicTypesFieldAccess obj) { @@ -434,7 +434,7 @@ public boolean isNull(BasicTypesFieldAccess obj) { } public boolean isChanged(BasicTypesFieldAccess obj) { - return !obj.getWrapperCharacter().equals(new Character('A')); + return !obj.getWrapperCharacter().equals(Character.valueOf('A')); } }; validateReference(13, validator, "wrapperCharacter"); @@ -444,11 +444,11 @@ public boolean isChanged(BasicTypesFieldAccess obj) { public void testWrapperShort() { ReferenceValidator validator = new ReferenceValidator() { public void set(BasicTypesFieldAccess obj) { - obj.setWrapperShort(new Short((short) 1)); + obj.setWrapperShort(Short.valueOf((short) 1)); } public void change(BasicTypesFieldAccess obj) { - obj.setWrapperShort(new Short((short) 2)); + obj.setWrapperShort(Short.valueOf((short) 2)); } public void setNull(BasicTypesFieldAccess obj) { @@ -460,7 +460,7 @@ public boolean isNull(BasicTypesFieldAccess obj) { } public boolean isChanged(BasicTypesFieldAccess obj) { - return !obj.getWrapperShort().equals(new Short((short) 1)); + return !obj.getWrapperShort().equals(Short.valueOf((short) 1)); } }; validateReference(14, validator, "wrapperShort"); @@ -470,11 +470,11 @@ public boolean isChanged(BasicTypesFieldAccess obj) { public void testWrapperInteger() { ReferenceValidator validator = new ReferenceValidator() { public void set(BasicTypesFieldAccess obj) { - obj.setWrapperInteger(new Integer(1)); + obj.setWrapperInteger(Integer.valueOf(1)); } public void change(BasicTypesFieldAccess obj) { - obj.setWrapperInteger(new Integer(2)); + obj.setWrapperInteger(Integer.valueOf(2)); } public void setNull(BasicTypesFieldAccess obj) { @@ -486,7 +486,7 @@ public boolean isNull(BasicTypesFieldAccess obj) { } public boolean isChanged(BasicTypesFieldAccess obj) { - return !obj.getWrapperInteger().equals(new Integer(1)); + return !obj.getWrapperInteger().equals(Integer.valueOf(1)); } }; validateReference(15, validator, "wrapperInteger"); @@ -496,11 +496,11 @@ public boolean isChanged(BasicTypesFieldAccess obj) { public void testWrapperLong() { ReferenceValidator validator = new ReferenceValidator() { public void set(BasicTypesFieldAccess obj) { - obj.setWrapperLong(new Long(1)); + obj.setWrapperLong(Long.valueOf(1)); } public void change(BasicTypesFieldAccess obj) { - obj.setWrapperLong(new Long(2)); + obj.setWrapperLong(Long.valueOf(2)); } public void setNull(BasicTypesFieldAccess obj) { @@ -512,7 +512,7 @@ public boolean isNull(BasicTypesFieldAccess obj) { } public boolean isChanged(BasicTypesFieldAccess obj) { - return !obj.getWrapperLong().equals(new Long(1)); + return !obj.getWrapperLong().equals(Long.valueOf(1)); } }; validateReference(16, validator, "wrapperLong"); @@ -522,11 +522,11 @@ public boolean isChanged(BasicTypesFieldAccess obj) { public void testWrapperDouble() { ReferenceValidator validator = new ReferenceValidator() { public void set(BasicTypesFieldAccess obj) { - obj.setWrapperDouble(new Double(1)); + obj.setWrapperDouble(Double.valueOf(1)); } public void change(BasicTypesFieldAccess obj) { - obj.setWrapperDouble(new Double(2)); + obj.setWrapperDouble(Double.valueOf(2)); } public void setNull(BasicTypesFieldAccess obj) { @@ -538,7 +538,7 @@ public boolean isNull(BasicTypesFieldAccess obj) { } public boolean isChanged(BasicTypesFieldAccess obj) { - return !obj.getWrapperDouble().equals(new Double(1)); + return !obj.getWrapperDouble().equals(Double.valueOf(1)); } }; validateReference(18, validator, "wrapperDouble"); @@ -548,11 +548,11 @@ public boolean isChanged(BasicTypesFieldAccess obj) { public void testWrapperFloat() { ReferenceValidator validator = new ReferenceValidator() { public void set(BasicTypesFieldAccess obj) { - obj.setWrapperFloat(new Float(1)); + obj.setWrapperFloat(Float.valueOf(1)); } public void change(BasicTypesFieldAccess obj) { - obj.setWrapperFloat(new Float(2)); + obj.setWrapperFloat(Float.valueOf(2)); } public void setNull(BasicTypesFieldAccess obj) { @@ -564,7 +564,7 @@ public boolean isNull(BasicTypesFieldAccess obj) { } public boolean isChanged(BasicTypesFieldAccess obj) { - return !obj.getWrapperFloat().equals(new Float(1)); + return !obj.getWrapperFloat().equals(Float.valueOf(1)); } }; validateReference(17, validator, "wrapperFloat"); @@ -1265,7 +1265,7 @@ public void testNullsFAshort() throws SQLException { con.close(); } - obj = em.find(BasicTypesFieldAccess.class, new Integer(7777)); + obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(7777)); flop("missing Exception"); } catch (PersistenceException iae) { // $JL-EXC$ expected behavior @@ -1303,7 +1303,7 @@ public void testNullsFAint() throws SQLException { con.close(); } - obj = em.find(BasicTypesFieldAccess.class, new Integer(7778)); + obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(7778)); flop("missing exception"); } catch (PersistenceException iae) { // $JL-EXC$ expected behavior diff --git a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/simple/TestBasicPropertyTypes.java b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/simple/TestBasicPropertyTypes.java index b43785b591e..d6de03da329 100644 --- a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/simple/TestBasicPropertyTypes.java +++ b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/simple/TestBasicPropertyTypes.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2023 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2015 SAP. All rights reserved. * * This program and the accompanying materials are made available under the @@ -51,7 +51,7 @@ public void testInsert() { em.persist(obj); env.commitTransactionAndClear(em); verify(true, "no Exception"); - obj = em.find(BasicTypesPropertyAccess.class, new Integer(0)); + obj = em.find(BasicTypesPropertyAccess.class, Integer.valueOf(0)); } finally { closeEntityManager(em); } @@ -68,24 +68,24 @@ private void validatePrimitive(final int id, Validator validator, String fieldNa em.persist(obj); env.commitTransactionAndClear(em); verify(true, "no Exception"); - obj = em.find(BasicTypesPropertyAccess.class, new Integer(id)); + obj = em.find(BasicTypesPropertyAccess.class, Integer.valueOf(id)); verify(!validator.isChanged(obj), fieldName + " not persisted"); // update unchanged object env.beginTransaction(em); - obj = em.find(BasicTypesPropertyAccess.class, new Integer(id)); + obj = em.find(BasicTypesPropertyAccess.class, Integer.valueOf(id)); obj.clearPostUpdate(); env.commitTransactionAndClear(em); verify(!obj.postUpdateWasCalled(), "postUpdate was called -> before image fails"); - obj = em.find(BasicTypesPropertyAccess.class, new Integer(id)); + obj = em.find(BasicTypesPropertyAccess.class, Integer.valueOf(id)); verify(!validator.isChanged(obj), fieldName + " is changed"); // update changed object env.beginTransaction(em); - obj = em.find(BasicTypesPropertyAccess.class, new Integer(id)); + obj = em.find(BasicTypesPropertyAccess.class, Integer.valueOf(id)); obj.clearPostUpdate(); validator.change(obj); env.commitTransactionAndClear(em); verify(obj.postUpdateWasCalled(), "postUpdate was not called -> before image fails"); - obj = em.find(BasicTypesPropertyAccess.class, new Integer(id)); + obj = em.find(BasicTypesPropertyAccess.class, Integer.valueOf(id)); verify(validator.isChanged(obj), fieldName + " is unchanged"); } finally { closeEntityManager(em); @@ -101,11 +101,11 @@ private void validateReference(final int id, ReferenceValidator validator, Strin env.beginTransaction(em); em.persist(obj); env.commitTransactionAndClear(em); - obj = em.find(BasicTypesPropertyAccess.class, new Integer(id)); + obj = em.find(BasicTypesPropertyAccess.class, Integer.valueOf(id)); verify(validator.isNull(obj), fieldName + " is not null"); // delete the object again env.beginTransaction(em); - em.remove(em.find(BasicTypesPropertyAccess.class, new Integer(id))); + em.remove(em.find(BasicTypesPropertyAccess.class, Integer.valueOf(id))); env.commitTransactionAndClear(em); // insert object with non-null field env.beginTransaction(em); @@ -113,33 +113,33 @@ private void validateReference(final int id, ReferenceValidator validator, Strin em.persist(obj); env.commitTransactionAndClear(em); verify(true, "no Exception"); - obj = em.find(BasicTypesPropertyAccess.class, new Integer(id)); + obj = em.find(BasicTypesPropertyAccess.class, Integer.valueOf(id)); verify(!validator.isChanged(obj), fieldName + " not persisted"); // update unchanged env.beginTransaction(em); - obj = em.find(BasicTypesPropertyAccess.class, new Integer(id)); + obj = em.find(BasicTypesPropertyAccess.class, Integer.valueOf(id)); obj.clearPostUpdate(); env.commitTransactionAndClear(em); verify(!obj.postUpdateWasCalled(), "postUpdate was called"); - obj = em.find(BasicTypesPropertyAccess.class, new Integer(id)); + obj = em.find(BasicTypesPropertyAccess.class, Integer.valueOf(id)); verify(!validator.isChanged(obj), fieldName + " is changed"); // update changed object env.beginTransaction(em); - obj = em.find(BasicTypesPropertyAccess.class, new Integer(id)); + obj = em.find(BasicTypesPropertyAccess.class, Integer.valueOf(id)); obj.clearPostUpdate(); validator.change(obj); env.commitTransactionAndClear(em); verify(obj.postUpdateWasCalled(), "postUpdate was not called"); - obj = em.find(BasicTypesPropertyAccess.class, new Integer(id)); + obj = em.find(BasicTypesPropertyAccess.class, Integer.valueOf(id)); verify(validator.isChanged(obj), fieldName + " is unchanged"); // update to null env.beginTransaction(em); - obj = em.find(BasicTypesPropertyAccess.class, new Integer(id)); + obj = em.find(BasicTypesPropertyAccess.class, Integer.valueOf(id)); obj.clearPostUpdate(); validator.setNull(obj); env.commitTransactionAndClear(em); verify(obj.postUpdateWasCalled(), "postUpdate was not called"); - obj = em.find(BasicTypesPropertyAccess.class, new Integer(id)); + obj = em.find(BasicTypesPropertyAccess.class, Integer.valueOf(id)); verify(validator.isNull(obj), fieldName + " is not null"); } finally { closeEntityManager(em); @@ -155,11 +155,11 @@ private void validateMutable(final int id, MutableValidator validator, String fi env.beginTransaction(em); em.persist(obj); env.commitTransactionAndClear(em); - obj = em.find(BasicTypesPropertyAccess.class, new Integer(id)); + obj = em.find(BasicTypesPropertyAccess.class, Integer.valueOf(id)); verify(validator.isNull(obj), fieldName + " is not null"); // delete the object again env.beginTransaction(em); - em.remove(em.find(BasicTypesPropertyAccess.class, new Integer(id))); + em.remove(em.find(BasicTypesPropertyAccess.class, Integer.valueOf(id))); env.commitTransactionAndClear(em); // insert object with non-null field env.beginTransaction(em); @@ -167,49 +167,49 @@ private void validateMutable(final int id, MutableValidator validator, String fi em.persist(obj); env.commitTransactionAndClear(em); verify(true, "no Exception"); - obj = em.find(BasicTypesPropertyAccess.class, new Integer(id)); + obj = em.find(BasicTypesPropertyAccess.class, Integer.valueOf(id)); verify(!validator.isChanged(obj), fieldName + " not persisted"); // update unchanged env.beginTransaction(em); - obj = em.find(BasicTypesPropertyAccess.class, new Integer(id)); + obj = em.find(BasicTypesPropertyAccess.class, Integer.valueOf(id)); obj.clearPostUpdate(); env.commitTransactionAndClear(em); verify(!obj.postUpdateWasCalled(), "postUpdate was not called"); - obj = em.find(BasicTypesPropertyAccess.class, new Integer(id)); + obj = em.find(BasicTypesPropertyAccess.class, Integer.valueOf(id)); verify(!validator.isChanged(obj), fieldName + " is changed"); // update changed env.beginTransaction(em); - obj = em.find(BasicTypesPropertyAccess.class, new Integer(id)); + obj = em.find(BasicTypesPropertyAccess.class, Integer.valueOf(id)); obj.clearPostUpdate(); validator.setNull(obj); env.commitTransactionAndClear(em); verify(obj.postUpdateWasCalled(), "postUpdate was not called"); - obj = em.find(BasicTypesPropertyAccess.class, new Integer(id)); + obj = em.find(BasicTypesPropertyAccess.class, Integer.valueOf(id)); verify(validator.isNull(obj), fieldName + " is not null"); // update original env.beginTransaction(em); - obj = em.find(BasicTypesPropertyAccess.class, new Integer(id)); + obj = em.find(BasicTypesPropertyAccess.class, Integer.valueOf(id)); validator.set(obj); env.commitTransactionAndClear(em); - obj = em.find(BasicTypesPropertyAccess.class, new Integer(id)); + obj = em.find(BasicTypesPropertyAccess.class, Integer.valueOf(id)); verify(!validator.isChanged(obj), fieldName + " not persisted"); // mutate env.beginTransaction(em); - obj = em.find(BasicTypesPropertyAccess.class, new Integer(id)); + obj = em.find(BasicTypesPropertyAccess.class, Integer.valueOf(id)); obj.clearPostUpdate(); validator.mutate(obj); env.commitTransactionAndClear(em); verify(obj.postUpdateWasCalled(), "postUpdate was not called"); - obj = em.find(BasicTypesPropertyAccess.class, new Integer(id)); + obj = em.find(BasicTypesPropertyAccess.class, Integer.valueOf(id)); verify(validator.isChanged(obj), fieldName + " not mutated"); // update to null env.beginTransaction(em); - obj = em.find(BasicTypesPropertyAccess.class, new Integer(id)); + obj = em.find(BasicTypesPropertyAccess.class, Integer.valueOf(id)); obj.clearPostUpdate(); validator.setNull(obj); env.commitTransactionAndClear(em); verify(obj.postUpdateWasCalled(), "postUpdate was not called"); - obj = em.find(BasicTypesPropertyAccess.class, new Integer(id)); + obj = em.find(BasicTypesPropertyAccess.class, Integer.valueOf(id)); verify(validator.isNull(obj), fieldName + " is not null"); } finally { closeEntityManager(em); @@ -392,11 +392,11 @@ public boolean isChanged(BasicTypesPropertyAccess obj) { public void testWrapperByte() { ReferenceValidator validator = new ReferenceValidator() { public void set(BasicTypesPropertyAccess obj) { - obj.setWrapperByte(new Byte((byte) 17)); + obj.setWrapperByte(Byte.valueOf((byte) 17)); } public void change(BasicTypesPropertyAccess obj) { - obj.setWrapperByte(new Byte((byte) 18)); + obj.setWrapperByte(Byte.valueOf((byte) 18)); } public void setNull(BasicTypesPropertyAccess obj) { @@ -408,7 +408,7 @@ public boolean isNull(BasicTypesPropertyAccess obj) { } public boolean isChanged(BasicTypesPropertyAccess obj) { - return !obj.getWrapperByte().equals(new Byte((byte) 17)); + return !obj.getWrapperByte().equals(Byte.valueOf((byte) 17)); } }; validateReference(12, validator, "wrapperByte"); @@ -418,11 +418,11 @@ public boolean isChanged(BasicTypesPropertyAccess obj) { public void testWrapperCharacter() { ReferenceValidator validator = new ReferenceValidator() { public void set(BasicTypesPropertyAccess obj) { - obj.setWrapperCharacter(new Character('A')); + obj.setWrapperCharacter(Character.valueOf('A')); } public void change(BasicTypesPropertyAccess obj) { - obj.setWrapperCharacter(new Character('B')); + obj.setWrapperCharacter(Character.valueOf('B')); } public void setNull(BasicTypesPropertyAccess obj) { @@ -434,7 +434,7 @@ public boolean isNull(BasicTypesPropertyAccess obj) { } public boolean isChanged(BasicTypesPropertyAccess obj) { - return !obj.getWrapperCharacter().equals(new Character('A')); + return !obj.getWrapperCharacter().equals(Character.valueOf('A')); } }; validateReference(13, validator, "wrapperCharacter"); @@ -444,11 +444,11 @@ public boolean isChanged(BasicTypesPropertyAccess obj) { public void testWrapperShort() { ReferenceValidator validator = new ReferenceValidator() { public void set(BasicTypesPropertyAccess obj) { - obj.setWrapperShort(new Short((short) 1)); + obj.setWrapperShort(Short.valueOf((short) 1)); } public void change(BasicTypesPropertyAccess obj) { - obj.setWrapperShort(new Short((short) 2)); + obj.setWrapperShort(Short.valueOf((short) 2)); } public void setNull(BasicTypesPropertyAccess obj) { @@ -460,7 +460,7 @@ public boolean isNull(BasicTypesPropertyAccess obj) { } public boolean isChanged(BasicTypesPropertyAccess obj) { - return !obj.getWrapperShort().equals(new Short((short) 1)); + return !obj.getWrapperShort().equals(Short.valueOf((short) 1)); } }; validateReference(14, validator, "wrapperShort"); @@ -470,11 +470,11 @@ public boolean isChanged(BasicTypesPropertyAccess obj) { public void testWrapperInteger() { ReferenceValidator validator = new ReferenceValidator() { public void set(BasicTypesPropertyAccess obj) { - obj.setWrapperInteger(new Integer(1)); + obj.setWrapperInteger(Integer.valueOf(1)); } public void change(BasicTypesPropertyAccess obj) { - obj.setWrapperInteger(new Integer(2)); + obj.setWrapperInteger(Integer.valueOf(2)); } public void setNull(BasicTypesPropertyAccess obj) { @@ -486,7 +486,7 @@ public boolean isNull(BasicTypesPropertyAccess obj) { } public boolean isChanged(BasicTypesPropertyAccess obj) { - return !obj.getWrapperInteger().equals(new Integer(1)); + return !obj.getWrapperInteger().equals(Integer.valueOf(1)); } }; validateReference(15, validator, "wrapperInteger"); @@ -496,11 +496,11 @@ public boolean isChanged(BasicTypesPropertyAccess obj) { public void testWrapperLong() { ReferenceValidator validator = new ReferenceValidator() { public void set(BasicTypesPropertyAccess obj) { - obj.setWrapperLong(new Long(1)); + obj.setWrapperLong(Long.valueOf(1)); } public void change(BasicTypesPropertyAccess obj) { - obj.setWrapperLong(new Long(2)); + obj.setWrapperLong(Long.valueOf(2)); } public void setNull(BasicTypesPropertyAccess obj) { @@ -512,7 +512,7 @@ public boolean isNull(BasicTypesPropertyAccess obj) { } public boolean isChanged(BasicTypesPropertyAccess obj) { - return !obj.getWrapperLong().equals(new Long(1)); + return !obj.getWrapperLong().equals(Long.valueOf(1)); } }; validateReference(16, validator, "wrapperLong"); @@ -522,11 +522,11 @@ public boolean isChanged(BasicTypesPropertyAccess obj) { public void testWrapperDouble() { ReferenceValidator validator = new ReferenceValidator() { public void set(BasicTypesPropertyAccess obj) { - obj.setWrapperDouble(new Double(1)); + obj.setWrapperDouble(Double.valueOf(1)); } public void change(BasicTypesPropertyAccess obj) { - obj.setWrapperDouble(new Double(2)); + obj.setWrapperDouble(Double.valueOf(2)); } public void setNull(BasicTypesPropertyAccess obj) { @@ -538,7 +538,7 @@ public boolean isNull(BasicTypesPropertyAccess obj) { } public boolean isChanged(BasicTypesPropertyAccess obj) { - return !obj.getWrapperDouble().equals(new Double(1)); + return !obj.getWrapperDouble().equals(Double.valueOf(1)); } }; validateReference(18, validator, "wrapperDouble"); @@ -548,11 +548,11 @@ public boolean isChanged(BasicTypesPropertyAccess obj) { public void testWrapperFloat() { ReferenceValidator validator = new ReferenceValidator() { public void set(BasicTypesPropertyAccess obj) { - obj.setWrapperFloat(new Float(1)); + obj.setWrapperFloat(Float.valueOf(1)); } public void change(BasicTypesPropertyAccess obj) { - obj.setWrapperFloat(new Float(2)); + obj.setWrapperFloat(Float.valueOf(2)); } public void setNull(BasicTypesPropertyAccess obj) { @@ -564,7 +564,7 @@ public boolean isNull(BasicTypesPropertyAccess obj) { } public boolean isChanged(BasicTypesPropertyAccess obj) { - return !obj.getWrapperFloat().equals(new Float(1)); + return !obj.getWrapperFloat().equals(Float.valueOf(1)); } }; validateReference(17, validator, "wrapperFloat"); @@ -1265,7 +1265,7 @@ public void testNullsPAshort() throws SQLException { con.close(); } - obj = em.find(BasicTypesPropertyAccess.class, new Integer(8888)); + obj = em.find(BasicTypesPropertyAccess.class, Integer.valueOf(8888)); flop("missing exception"); } catch (PersistenceException iae) { // $JL-EXC$ expected behavior @@ -1303,7 +1303,7 @@ public void testNullsPAint() throws SQLException { con.close(); } - obj = em.find(BasicTypesPropertyAccess.class, new Integer(8889)); + obj = em.find(BasicTypesPropertyAccess.class, Integer.valueOf(8889)); flop("missing exception"); } catch (PersistenceException iae) { // $JL-EXC$ expected behavior diff --git a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/simple/TestEmbeddedField.java b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/simple/TestEmbeddedField.java index 35bb14c478e..8a2a7aff355 100644 --- a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/simple/TestEmbeddedField.java +++ b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/simple/TestEmbeddedField.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2023 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2015 SAP. All rights reserved. * * This program and the accompanying materials are made available under the @@ -36,7 +36,7 @@ public void testSimple() { final JPAEnvironment env = getEnvironment(); final EntityManager em = env.getEntityManager(); try { - final Integer employeeId = new Integer(25); + final Integer employeeId = Integer.valueOf(25); final Department department = new Department(9, "R&D"); final Employee employee = new Employee(employeeId.intValue(), "Emil", "Bahr", department); final EmploymentPeriod period = new EmploymentPeriod(); @@ -70,7 +70,7 @@ public void testNullPeriod() { final JPAEnvironment env = getEnvironment(); final EntityManager em = env.getEntityManager(); try { - final Integer employeeId = new Integer(26); + final Integer employeeId = Integer.valueOf(26); final Department department = new Department(10, "R&D"); final Employee employee = new Employee(employeeId.intValue(), "Emil", "Bahr", department); env.beginTransaction(em); @@ -108,7 +108,7 @@ public void testDirty() { final JPAEnvironment env = getEnvironment(); final EntityManager em = env.getEntityManager(); try { - final Integer employeeId = new Integer(27); + final Integer employeeId = Integer.valueOf(27); final Department department = new Department(11, "R&D"); final Employee employee = new Employee(employeeId.intValue(), "Emil", "Bahr", department); final EmploymentPeriod period = new EmploymentPeriod(); diff --git a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/simple/TestTemporalFieldTypes.java b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/simple/TestTemporalFieldTypes.java index 581ed2fc50e..216be9657fd 100644 --- a/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/simple/TestTemporalFieldTypes.java +++ b/jpa/eclipselink.jpa.wdf.test/src/org/eclipse/persistence/testing/tests/wdf/jpa1/simple/TestTemporalFieldTypes.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2023 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2015 SAP. All rights reserved. * * This program and the accompanying materials are made available under the @@ -47,60 +47,60 @@ private void validateMutable(final int id, MutableValidator validator, String fi env.beginTransaction(em); em.persist(obj); env.commitTransactionAndClear(em); - obj = em.find(BasicTypesFieldAccess.class, new Integer(id)); + obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(id)); Assert.assertTrue(fieldName + " is not null", validator.isNull(obj)); // delete the object again env.beginTransaction(em); - em.remove(em.find(BasicTypesFieldAccess.class, new Integer(id))); + em.remove(em.find(BasicTypesFieldAccess.class, Integer.valueOf(id))); env.commitTransactionAndClear(em); // insert object with non-null field env.beginTransaction(em); validator.set(obj); em.persist(obj); env.commitTransactionAndClear(em); - obj = em.find(BasicTypesFieldAccess.class, new Integer(id)); + obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(id)); Assert.assertTrue(fieldName + " not persisted", !validator.isChanged(obj)); // update unchanged env.beginTransaction(em); - obj = em.find(BasicTypesFieldAccess.class, new Integer(id)); + obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(id)); obj.clearPostUpdate(); env.commitTransactionAndClear(em); Assert.assertTrue("postUpdate was not called", !obj.postUpdateWasCalled()); - obj = em.find(BasicTypesFieldAccess.class, new Integer(id)); + obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(id)); Assert.assertTrue(fieldName + " is changed", !validator.isChanged(obj)); // update changed env.beginTransaction(em); - obj = em.find(BasicTypesFieldAccess.class, new Integer(id)); + obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(id)); obj.clearPostUpdate(); validator.setNull(obj); env.commitTransactionAndClear(em); Assert.assertTrue("postUpdate was not called", obj.postUpdateWasCalled()); - obj = em.find(BasicTypesFieldAccess.class, new Integer(id)); + obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(id)); Assert.assertTrue(fieldName + " is not null", validator.isNull(obj)); // update original env.beginTransaction(em); - obj = em.find(BasicTypesFieldAccess.class, new Integer(id)); + obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(id)); validator.set(obj); env.commitTransactionAndClear(em); - obj = em.find(BasicTypesFieldAccess.class, new Integer(id)); + obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(id)); Assert.assertTrue(fieldName + " not persisted", !validator.isChanged(obj)); // mutate env.beginTransaction(em); - obj = em.find(BasicTypesFieldAccess.class, new Integer(id)); + obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(id)); obj.clearPostUpdate(); validator.mutate(obj); env.commitTransactionAndClear(em); Assert.assertTrue("postUpdate was not called", obj.postUpdateWasCalled()); - obj = em.find(BasicTypesFieldAccess.class, new Integer(id)); + obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(id)); Assert.assertTrue(fieldName + " not mutated", validator.isChanged(obj)); // update to null env.beginTransaction(em); - obj = em.find(BasicTypesFieldAccess.class, new Integer(id)); + obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(id)); obj.clearPostUpdate(); validator.setNull(obj); env.commitTransactionAndClear(em); Assert.assertTrue("postUpdate was not called", obj.postUpdateWasCalled()); - obj = em.find(BasicTypesFieldAccess.class, new Integer(id)); + obj = em.find(BasicTypesFieldAccess.class, Integer.valueOf(id)); Assert.assertTrue(fieldName + " is not null", validator.isNull(obj)); } finally { closeEntityManager(em); diff --git a/jpa/org.eclipse.persistence.jpa/src/org/eclipse/persistence/internal/jpa/weaving/ClassWeaver.java b/jpa/org.eclipse.persistence.jpa/src/org/eclipse/persistence/internal/jpa/weaving/ClassWeaver.java index 6e5fefeff64..5b769270eb3 100644 --- a/jpa/org.eclipse.persistence.jpa/src/org/eclipse/persistence/internal/jpa/weaving/ClassWeaver.java +++ b/jpa/org.eclipse.persistence.jpa/src/org/eclipse/persistence/internal/jpa/weaving/ClassWeaver.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -535,7 +535,7 @@ public void addSetterMethodForValueHolder(ClassDetails classDetails, AttributeDe * _persistence_checkFetchedForSet("variableName"); * _persistence_initialize_variableName_vh(); * _persistence_propertyChange("variableName", this.variableName, argument); - * // if change tracking enabled, wrapping primitives, i.e. new Long(item) + * // if change tracking enabled, wrapping primitives, i.e. Long.valueOf(item) * this.variableName = argument; * _persistence_variableName_vh.setValue(variableName); // if lazy enabled } */ @@ -583,7 +583,7 @@ public void addSetterMethodForFieldAccess(ClassDetails classDetails, AttributeDe cv_set.visitLdcInsn(attribute); // if the attribute is a primitive, wrap it - // e.g. if it is an integer: new Integer(attribute) + // e.g. if it is an integer: Integer.valueOf(attribute) // This is the first part of the wrapping String wrapper = ClassWeaver.wrapperFor(attributeDetails.getReferenceClassType().getSort()); if (wrapper != null) { @@ -597,11 +597,11 @@ public void addSetterMethodForFieldAccess(ClassDetails classDetails, AttributeDe if (wrapper != null) { // invoke the constructor for wrapping - // e.g. new Integer(variableName) + // e.g. Integer.valueOf(variableName) cv_set.visitMethodInsn(INVOKESPECIAL, wrapper, "", "(" + attributeDetails.getReferenceClassType().getDescriptor() + ")V", false); // wrap the method argument - // e.g. new Integer(argument) + // e.g. Integer.valueOf(argument) cv_set.visitTypeInsn(NEW, wrapper); cv_set.visitInsn(DUP); cv_set.visitVarInsn(opcode, 1); diff --git a/jpa/org.eclipse.persistence.jpa/src/org/eclipse/persistence/internal/jpa/weaving/MethodWeaver.java b/jpa/org.eclipse.persistence.jpa/src/org/eclipse/persistence/internal/jpa/weaving/MethodWeaver.java index 538de48b841..87d04b02341 100644 --- a/jpa/org.eclipse.persistence.jpa/src/org/eclipse/persistence/internal/jpa/weaving/MethodWeaver.java +++ b/jpa/org.eclipse.persistence.jpa/src/org/eclipse/persistence/internal/jpa/weaving/MethodWeaver.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -238,7 +238,7 @@ public void weaveAttributesIfRequired(int opcode, String owner, String name, Str * AttributeType oldAttribute = getAttribute() * // for primitives * AttributeWrapperType oldAttribute = new AttributeWrapperType(getAttribute()); - * e.g. Double oldAttribute = new Double(getAttribute()); + * e.g. Double oldAttribute = Double.valueOf(getAttribute()); * else * _persistence_checkFetchedForSet("attributeName"); * _persistence_propertyChange("attributeName", oldAttribute, argument); @@ -249,7 +249,7 @@ public void weaveAttributesIfRequired(int opcode, String owner, String name, Str * AttributeType oldAttribute = getAttribute() * // for primitives * AttributeWrapperType oldAttribute = new AttributeWrapperType(getAttribute()); - * e.g. Double oldAttribute = new Double(getAttribute()); + * e.g. Double oldAttribute = Double.valueOf(getAttribute()); * _persistence_propertyChange("attributeName", oldAttribute, argument); * * // if not weaving for change tracking, but for fetch groups only: diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/JAXBTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/JAXBTestCases.java index a8d59d4a3dc..40340efce42 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/JAXBTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/JAXBTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -578,7 +578,7 @@ public void testObjectToXMLStreamWriter() throws Exception { StringWriter writer = new StringWriter(); XMLOutputFactory factory = XMLOutputFactory.newInstance(); - factory.setProperty(factory.IS_REPAIRING_NAMESPACES, new Boolean(false)); + factory.setProperty(factory.IS_REPAIRING_NAMESPACES, Boolean.valueOf(false)); XMLStreamWriter streamWriter= factory.createXMLStreamWriter(writer); Object objectToWrite = getWriteControlObject(); @@ -618,7 +618,7 @@ public void testObjectToXMLStreamWriterRecord() throws Exception { StringWriter writer = new StringWriter(); XMLOutputFactory factory = XMLOutputFactory.newInstance(); - factory.setProperty(factory.IS_REPAIRING_NAMESPACES, new Boolean(false)); + factory.setProperty(factory.IS_REPAIRING_NAMESPACES, Boolean.valueOf(false)); XMLStreamWriter streamWriter= factory.createXMLStreamWriter(writer); Object objectToWrite = getWriteControlObject(); @@ -660,7 +660,7 @@ public void testObjectToXMLEventWriter() throws Exception { StringWriter writer = new StringWriter(); XMLOutputFactory factory = XMLOutputFactory.newInstance(); - factory.setProperty(factory.IS_REPAIRING_NAMESPACES, new Boolean(false)); + factory.setProperty(factory.IS_REPAIRING_NAMESPACES, Boolean.valueOf(false)); XMLEventWriter eventWriter= factory.createXMLEventWriter(writer); Object objectToWrite = getWriteControlObject(); diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/annotations/xmlpaths/XmlPathsTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/annotations/xmlpaths/XmlPathsTestCases.java index d43bef27be8..ae57212cb37 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/annotations/xmlpaths/XmlPathsTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/annotations/xmlpaths/XmlPathsTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -55,7 +55,7 @@ public XmlPathsTestCases(String name) throws Exception { */ public Employee getControlObject() { Employee emp = new Employee(); - emp.thing = new Integer(INT_VAL); + emp.thing = Integer.valueOf(INT_VAL); return emp; } diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/annotations/xmlpaths/override/XmlPathsOverrideTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/annotations/xmlpaths/override/XmlPathsOverrideTestCases.java index ae996eddd06..376773ae782 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/annotations/xmlpaths/override/XmlPathsOverrideTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/annotations/xmlpaths/override/XmlPathsOverrideTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -68,7 +68,7 @@ public Map getProperties(){ */ public Employee getControlObject() { Employee emp = new Employee(); - emp.thing = new Integer(INT_VAL); + emp.thing = Integer.valueOf(INT_VAL); return emp; } diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/annotations/xmlproperty/XmlPropertyTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/annotations/xmlproperty/XmlPropertyTestCases.java index d10ece40d2d..3e5c146b59c 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/annotations/xmlproperty/XmlPropertyTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/annotations/xmlproperty/XmlPropertyTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -49,7 +49,7 @@ public void testClassProperties() { assertTrue("Incorrect value for property", property.equals("value1")); property = properties.get(CLASS_PROPERTY_2_NAME); assertNotNull(property); - assertTrue("Incorrect value for property", property.equals(new Integer("121"))); + assertTrue("Incorrect value for property", property.equals(Integer.valueOf("121"))); } public void testXmlPropertyOnField() { diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/cycle/Employee.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/cycle/Employee.java index 6be773df8fc..97487f29a0f 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/cycle/Employee.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/cycle/Employee.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -33,7 +33,7 @@ public Object onCycleDetected(Context arg0) { if (id < 1000) { // Return an object of a built-in Java type - return new Integer(this.id); + return Integer.valueOf(this.id); } else { // Return an object of a diffenet type (one that is known to this context) EmployeePointer p = new EmployeePointer(); diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/dynamic/DynamicJAXBFromSessionsXMLTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/dynamic/DynamicJAXBFromSessionsXMLTestCases.java index 54fe62913ff..d190c5a75a5 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/dynamic/DynamicJAXBFromSessionsXMLTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/dynamic/DynamicJAXBFromSessionsXMLTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -182,10 +182,10 @@ protected Object getControlObject() { collRef.add(collRef2); root.set("collRef", collRef); - root.set("choice", new Integer(2112)); + root.set("choice", Integer.valueOf(2112)); Vector choiceColl = new Vector(3); - choiceColl.add(new Double(3.14159)); + choiceColl.add(Double.valueOf(3.14159)); choiceColl.add("Pi"); choiceColl.add(Boolean.TRUE); root.set("choiceColl", choiceColl); diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/events/JAXBElementTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/events/JAXBElementTestCases.java index ecc34ce53c9..a9e432e12de 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/events/JAXBElementTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/events/JAXBElementTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -54,7 +54,7 @@ public void setUp() throws Exception { } private Object getControlObjectUnmapped() { - return new JAXBElement(new QName("year"), Integer.class, new Integer(1942)); + return new JAXBElement(new QName("year"), Integer.class, Integer.valueOf(1942)); } private Object getControlObjectMapped() { diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/events/JAXBMarshalListenerImpl.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/events/JAXBMarshalListenerImpl.java index 3f00a6e1b78..d83ba583a2c 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/events/JAXBMarshalListenerImpl.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/events/JAXBMarshalListenerImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -20,12 +20,12 @@ public class JAXBMarshalListenerImpl extends Marshaller.Listener { - static Integer EMPLOYEE_BEFORE_MARSHAL = new Integer(0); - static Integer ADDRESS_BEFORE_MARSHAL = new Integer(1); - static Integer PHONE_BEFORE_MARSHAL = new Integer(2); - static Integer EMPLOYEE_AFTER_MARSHAL = new Integer(3); - static Integer ADDRESS_AFTER_MARSHAL = new Integer(4); - static Integer PHONE_AFTER_MARSHAL = new Integer(5); + static Integer EMPLOYEE_BEFORE_MARSHAL = Integer.valueOf(0); + static Integer ADDRESS_BEFORE_MARSHAL = Integer.valueOf(1); + static Integer PHONE_BEFORE_MARSHAL = Integer.valueOf(2); + static Integer EMPLOYEE_AFTER_MARSHAL = Integer.valueOf(3); + static Integer ADDRESS_AFTER_MARSHAL = Integer.valueOf(4); + static Integer PHONE_AFTER_MARSHAL = Integer.valueOf(5); public ArrayList events = null; diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/events/JAXBUnmarshalListenerImpl.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/events/JAXBUnmarshalListenerImpl.java index 5bf981ca9a1..fa40c091005 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/events/JAXBUnmarshalListenerImpl.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/events/JAXBUnmarshalListenerImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -19,12 +19,12 @@ import javax.xml.bind.Unmarshaller; public class JAXBUnmarshalListenerImpl extends Unmarshaller.Listener { - static Integer EMPLOYEE_BEFORE_UNMARSHAL = new Integer(0); - static Integer ADDRESS_BEFORE_UNMARSHAL = new Integer(1); - static Integer PHONE_BEFORE_UNMARSHAL = new Integer(2); - static Integer EMPLOYEE_AFTER_UNMARSHAL = new Integer(3); - static Integer ADDRESS_AFTER_UNMARSHAL = new Integer(4); - static Integer PHONE_AFTER_UNMARSHAL = new Integer(5); + static Integer EMPLOYEE_BEFORE_UNMARSHAL = Integer.valueOf(0); + static Integer ADDRESS_BEFORE_UNMARSHAL = Integer.valueOf(1); + static Integer PHONE_BEFORE_UNMARSHAL = Integer.valueOf(2); + static Integer EMPLOYEE_AFTER_UNMARSHAL = Integer.valueOf(3); + static Integer ADDRESS_AFTER_UNMARSHAL = Integer.valueOf(4); + static Integer PHONE_AFTER_UNMARSHAL = Integer.valueOf(5); public ArrayList events = null; diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/externalizedmetadata/exceptions/contextfactory/ExceptionHandlingTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/externalizedmetadata/exceptions/contextfactory/ExceptionHandlingTestCases.java index 21b3e78eae7..05e66751129 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/externalizedmetadata/exceptions/contextfactory/ExceptionHandlingTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/externalizedmetadata/exceptions/contextfactory/ExceptionHandlingTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -137,7 +137,7 @@ public void testInvalidMapParameterTypeNullValue() { public void testInvalidParameterTypeBadOxmXmlValue() { Map> properties = new HashMap>(); ArrayList ints = new ArrayList(); - ints.add(new Integer(666)); + ints.add(Integer.valueOf(666)); properties.put(JAXBContextFactory.ECLIPSELINK_OXM_XML_KEY, ints); try { JAXBContextFactory.createContext(CONTEXT_PATH, getClass().getClassLoader(), properties); diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/externalizedmetadata/mappings/choice/ChoiceMappingEmployeeTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/externalizedmetadata/mappings/choice/ChoiceMappingEmployeeTestCases.java index d80baef80c3..01b9d170997 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/externalizedmetadata/mappings/choice/ChoiceMappingEmployeeTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/externalizedmetadata/mappings/choice/ChoiceMappingEmployeeTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -49,9 +49,9 @@ public ChoiceMappingEmployeeTestCases(String name) throws Exception { public Object getWriteControlObject() { if(ctrlObject ==null){ Employee emp = new Employee(); - emp.thing = new Integer(INT_VAL); - emp.readOnlyThing = new Float(FLT_VAL); - emp.writeOnlyThing = new Integer(INT_VAL); + emp.thing = Integer.valueOf(INT_VAL); + emp.readOnlyThing = Float.valueOf(FLT_VAL); + emp.writeOnlyThing = Integer.valueOf(INT_VAL); ctrlObject = emp; } return ctrlObject; @@ -60,8 +60,8 @@ public Object getWriteControlObject() { public Object getControlObject() { if(ctrlObject ==null){ Employee emp = new Employee(); - emp.thing = new Integer(INT_VAL); - emp.readOnlyThing = new Float(FLT_VAL); + emp.thing = Integer.valueOf(INT_VAL); + emp.readOnlyThing = Float.valueOf(FLT_VAL); ctrlObject = emp; } return ctrlObject; diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/externalizedmetadata/mappings/choicecollection/ChoiceCollectionMappingTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/externalizedmetadata/mappings/choicecollection/ChoiceCollectionMappingTestCases.java index 43159ddecf1..75b06424b0d 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/externalizedmetadata/mappings/choicecollection/ChoiceCollectionMappingTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/externalizedmetadata/mappings/choicecollection/ChoiceCollectionMappingTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -63,14 +63,14 @@ public ChoiceCollectionMappingTestCases(String name) throws Exception { public Object getWriteControlObject() { if(writeCtrlObject == null){ List things = new ArrayList(); - things.add(new Integer(INT_VAL66)); - things.add(new Integer(INT_VAL99)); - things.add(new Float(FLOAT_VAL)); + things.add(Integer.valueOf(INT_VAL66)); + things.add(Integer.valueOf(INT_VAL99)); + things.add(Float.valueOf(FLOAT_VAL)); List roThings = new ArrayList(); - roThings.add(new Integer(RO_INT_VAL)); - roThings.add(new Float(RO_FLOAT_VAL)); + roThings.add(Integer.valueOf(RO_INT_VAL)); + roThings.add(Float.valueOf(RO_FLOAT_VAL)); List woThings = new ArrayList(); - woThings.add(new Integer(WO_INT_VAL)); + woThings.add(Integer.valueOf(WO_INT_VAL)); Employee emp = new Employee(); emp.things = things; emp.readOnlyThings = roThings; @@ -83,12 +83,12 @@ public Object getWriteControlObject() { public Object getControlObject() { List things = new ArrayList(); - things.add(new Integer(INT_VAL66)); - things.add(new Integer(INT_VAL99)); - things.add(new Float(FLOAT_VAL)); + things.add(Integer.valueOf(INT_VAL66)); + things.add(Integer.valueOf(INT_VAL99)); + things.add(Float.valueOf(FLOAT_VAL)); List roThings = new ArrayList(); - roThings.add(new Integer(RO_INT_VAL)); - roThings.add(new Float(RO_FLOAT_VAL)); + roThings.add(Integer.valueOf(RO_INT_VAL)); + roThings.add(Float.valueOf(RO_FLOAT_VAL)); Employee emp = new Employee(); emp.things = things; diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmlelementrefs/ObjectFactory.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmlelementrefs/ObjectFactory.java index 13bb314361c..c9a1cd3c920 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmlelementrefs/ObjectFactory.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmlelementrefs/ObjectFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -23,7 +23,7 @@ public javax.xml.bind.JAXBElement createRoot() { @javax.xml.bind.annotation.XmlElementDecl(namespace="myns", name="integer-root") public javax.xml.bind.JAXBElement createIntegerRoot() { - return new javax.xml.bind.JAXBElement(new javax.xml.namespace.QName("myns", "integer-root"), Integer.class, new Integer(0)); + return new javax.xml.bind.JAXBElement(new javax.xml.namespace.QName("myns", "integer-root"), Integer.class, Integer.valueOf(0)); } @javax.xml.bind.annotation.XmlElementDecl(name="a") diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmlelements/XMLElementsWithWrapperTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmlelements/XMLElementsWithWrapperTestCases.java index bd4e1002b7b..d3d1c8c14a2 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmlelements/XMLElementsWithWrapperTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmlelements/XMLElementsWithWrapperTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -75,8 +75,8 @@ protected Object getControlObject() { // setup control objects Foo foo = new Foo(); List theItems = new ArrayList(); - theItems.add(new Float(2.5)); - theItems.add(new Integer(1)); + theItems.add(2.5f); + theItems.add(1); foo.items = theItems; return foo; } diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmlelements/XmlElementsTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmlelements/XmlElementsTestCases.java index 74c75d21df6..6aa07fda431 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmlelements/XmlElementsTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmlelements/XmlElementsTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -90,8 +90,8 @@ protected Object getControlObject() { // setup control objects Foo foo = new Foo(); List theItems = new ArrayList(); - theItems.add(new Float(2.5)); - theItems.add(new Integer(1)); + theItems.add(2.5f); + theItems.add(1); foo.items = theItems; return foo; } diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmlschematypes/XmlSchemaTypesTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmlschematypes/XmlSchemaTypesTestCases.java index 20649b5507c..1f8814b70d2 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmlschematypes/XmlSchemaTypesTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmlschematypes/XmlSchemaTypesTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -73,7 +73,7 @@ protected Object getControlObject() { //setup control Employee GregorianCalendar calendar = new GregorianCalendar(); - Date theDate = new Date(new Long("1262840400000")); + Date theDate = new Date(Long.valueOf("1262840400000")); calendar.setTime(theDate); emp.hireDate = calendar; diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmlvalue/XmlValueTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmlvalue/XmlValueTestCases.java index 33b2b4f3e96..f719bd1f014 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmlvalue/XmlValueTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmlvalue/XmlValueTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -65,7 +65,7 @@ public Map getProperties(){ public Object getControlObject() { MyValueClass mvc = new MyValueClass(); - mvc.blah = new Boolean("true"); + mvc.blah = Boolean.valueOf("true"); return mvc; } diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmlvalue/adapter/MyValueAdapter.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmlvalue/adapter/MyValueAdapter.java index b1440f6fcf5..5ac960fd15e 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmlvalue/adapter/MyValueAdapter.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmlvalue/adapter/MyValueAdapter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -23,7 +23,7 @@ public class MyValueAdapter extends XmlAdapter { public Boolean unmarshal(String v) throws Exception { - return new Boolean(v.equals("T") ? "true" : "false"); + return Boolean.valueOf(v.equals("T") ? "true" : "false"); } public String marshal(Boolean v) throws Exception { diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/inheritance/ns/JAXBInheritanceNSSeparatorTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/inheritance/ns/JAXBInheritanceNSSeparatorTestCases.java index 62555da6215..d31e1221038 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/inheritance/ns/JAXBInheritanceNSSeparatorTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/inheritance/ns/JAXBInheritanceNSSeparatorTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -58,7 +58,7 @@ public void testObjectToXMLStreamWriterRecordJSON() throws Exception { StringWriter writer = new StringWriter(); XMLOutputFactory factory = XMLOutputFactory.newInstance(); - factory.setProperty(factory.IS_REPAIRING_NAMESPACES, new Boolean(false)); + factory.setProperty(factory.IS_REPAIRING_NAMESPACES, Boolean.valueOf(false)); XMLStreamWriter streamWriter= factory.createXMLStreamWriter(writer); Object objectToWrite = getWriteControlObject(); diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/javadoc/xmlelements/XmlElementsListOfElementTest.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/javadoc/xmlelements/XmlElementsListOfElementTest.java index 592c46325b2..83387467be2 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/javadoc/xmlelements/XmlElementsListOfElementTest.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/javadoc/xmlelements/XmlElementsListOfElementTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -34,8 +34,8 @@ public XmlElementsListOfElementTest(String name) throws Exception { protected Object getControlObject() { XmlElementsListOfElement example = new XmlElementsListOfElement(); example.items = new ArrayList(); - example.items.add(new Integer(1)); - example.items.add(new Float(2.5)); + example.items.add(1); + example.items.add(2.5f); return example; } } diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/javadoc/xmlelements/XmlElementsListOfElementWrappedTest.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/javadoc/xmlelements/XmlElementsListOfElementWrappedTest.java index 2a64204d37d..f57487b7d1f 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/javadoc/xmlelements/XmlElementsListOfElementWrappedTest.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/javadoc/xmlelements/XmlElementsListOfElementWrappedTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -37,8 +37,8 @@ public XmlElementsListOfElementWrappedTest(String name) throws Exception { protected Object getControlObject() { XmlElementsListOfElementWrapped example = new XmlElementsListOfElementWrapped(); example.items = new ArrayList(); - example.items.add(new Integer(1)); - example.items.add(new Float(2.5)); + example.items.add(1); + example.items.add(2.5f); return example; } } diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/jaxbelement/simple/JAXBElementCharacterTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/jaxbelement/simple/JAXBElementCharacterTestCases.java index 555af841eed..afbcae4dcd7 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/jaxbelement/simple/JAXBElementCharacterTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/jaxbelement/simple/JAXBElementCharacterTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -44,7 +44,7 @@ public Class getUnmarshalClass(){ } protected Object getControlObject() { - Character character = new Character('s'); + Character character = Character.valueOf('s'); JAXBElement jbe = new JAXBElement(new QName("a", "b"),Character.class, character); return jbe; } diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/json/characters/EscapeCharactersTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/json/characters/EscapeCharactersTestCases.java index e792a9fab59..ff5d2021043 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/json/characters/EscapeCharactersTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/json/characters/EscapeCharactersTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -34,29 +34,29 @@ protected Object getControlObject() { holder.stringValue = "a\"a\\a/a\ba\fa\na\ra\t\b\u0003\u001Caaa\\TESThttp://this/is/my/test"; List characters = new ArrayList(); - characters.add(new Character('a')); - characters.add(new Character('"')); - characters.add(new Character('a')); - characters.add(new Character('\\')); - characters.add(new Character('a')); - characters.add(new Character('/')); - characters.add(new Character('a')); - characters.add(new Character('\b')); - characters.add(new Character('a')); - characters.add(new Character('\f')); - characters.add(new Character('a')); - characters.add(new Character('\n')); - characters.add(new Character('a')); - characters.add(new Character('\r')); - characters.add(new Character('a')); - characters.add(new Character('\t')); - characters.add(new Character('\b')); - characters.add(new Character('\u0003')); - characters.add(new Character('\u001C')); - characters.add(new Character('a')); - characters.add(new Character('a')); - characters.add(new Character('a')); - characters.add(new Character('\\')); + characters.add(Character.valueOf('a')); + characters.add(Character.valueOf('"')); + characters.add(Character.valueOf('a')); + characters.add(Character.valueOf('\\')); + characters.add(Character.valueOf('a')); + characters.add(Character.valueOf('/')); + characters.add(Character.valueOf('a')); + characters.add(Character.valueOf('\b')); + characters.add(Character.valueOf('a')); + characters.add(Character.valueOf('\f')); + characters.add(Character.valueOf('a')); + characters.add(Character.valueOf('\n')); + characters.add(Character.valueOf('a')); + characters.add(Character.valueOf('\r')); + characters.add(Character.valueOf('a')); + characters.add(Character.valueOf('\t')); + characters.add(Character.valueOf('\b')); + characters.add(Character.valueOf('\u0003')); + characters.add(Character.valueOf('\u001C')); + characters.add(Character.valueOf('a')); + characters.add(Character.valueOf('a')); + characters.add(Character.valueOf('a')); + characters.add(Character.valueOf('\\')); holder.characters = characters; return holder; } diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/json/norootelement/IncludeRootFalseWithXMLRootElementTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/json/norootelement/IncludeRootFalseWithXMLRootElementTestCases.java index f2d2e2ecd4b..ad25b07e672 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/json/norootelement/IncludeRootFalseWithXMLRootElementTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/json/norootelement/IncludeRootFalseWithXMLRootElementTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -70,7 +70,7 @@ public void testJSONSchemaGeneration() throws Exception{ public Map getProperties() { HashMap m = new HashMap(); - m.put(JAXBContextProperties.JSON_INCLUDE_ROOT, new Boolean(false)); + m.put(JAXBContextProperties.JSON_INCLUDE_ROOT, Boolean.valueOf(false)); return m; } diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/listofobjects/JAXBEmployeesAndIntegersTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/listofobjects/JAXBEmployeesAndIntegersTestCases.java index 1a578ae5c62..8a98437b6c6 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/listofobjects/JAXBEmployeesAndIntegersTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/listofobjects/JAXBEmployeesAndIntegersTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -91,10 +91,10 @@ public List< InputStream> getControlSchemaFiles(){ protected Object getControlObject() { List integers = new ArrayList(); - integers.add(new Integer("10")); - integers.add(new Integer("20")); - integers.add(new Integer("30")); - integers.add(new Integer("40")); + integers.add(Integer.valueOf("10")); + integers.add(Integer.valueOf("20")); + integers.add(Integer.valueOf("30")); + integers.add(Integer.valueOf("40")); QName qname = new QName("examplenamespace", "root"); JAXBElement jaxbElement = new JAXBElement(qname, Object.class, null); diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/listofobjects/JAXBIntegerLinkedListTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/listofobjects/JAXBIntegerLinkedListTestCases.java index efed560a202..403ca99f155 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/listofobjects/JAXBIntegerLinkedListTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/listofobjects/JAXBIntegerLinkedListTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -59,10 +59,10 @@ protected Type getTypeToUnmarshalTo() throws Exception { protected Object getControlObject() { LinkedList integers = new LinkedList(); - integers.add(new Integer("10")); - integers.add(new Integer("20")); - integers.add(new Integer("30")); - integers.add(new Integer("40")); + integers.add(Integer.valueOf("10")); + integers.add(Integer.valueOf("20")); + integers.add(Integer.valueOf("30")); + integers.add(Integer.valueOf("40")); QName qname = new QName("examplenamespace", "root"); JAXBElement jaxbElement = new JAXBElement(qname, Object.class, null); diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/listofobjects/JAXBIntegerListTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/listofobjects/JAXBIntegerListTestCases.java index 2fd20b930f4..366e2463c6a 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/listofobjects/JAXBIntegerListTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/listofobjects/JAXBIntegerListTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -58,10 +58,10 @@ protected Type getTypeToUnmarshalTo() throws Exception { protected Object getControlObject() { ArrayList integers = new ArrayList(); - integers.add(new Integer("10")); - integers.add(new Integer("20")); - integers.add(new Integer("30")); - integers.add(new Integer("40")); + integers.add(Integer.valueOf("10")); + integers.add(Integer.valueOf("20")); + integers.add(Integer.valueOf("30")); + integers.add(Integer.valueOf("40")); QName qname = new QName("examplenamespace", "root"); JAXBElement jaxbElement = new JAXBElement(qname, Object.class, null); diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/listofobjects/JAXBIntegerMyListTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/listofobjects/JAXBIntegerMyListTestCases.java index 0645ea9a274..6d547d035f6 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/listofobjects/JAXBIntegerMyListTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/listofobjects/JAXBIntegerMyListTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -61,10 +61,10 @@ protected Type getTypeToUnmarshalTo() throws Exception { protected Object getControlObject() { MyList integers = new MyList(); - integers.add(new Integer("10")); - integers.add(new Integer("20")); - integers.add(new Integer("30")); - integers.add(new Integer("40")); + integers.add(Integer.valueOf("10")); + integers.add(Integer.valueOf("20")); + integers.add(Integer.valueOf("30")); + integers.add(Integer.valueOf("40")); QName qname = new QName("examplenamespace", "root"); JAXBElement jaxbElement = new JAXBElement(qname, Object.class, null); diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/listofobjects/JAXBListOfObjectsNoJSONTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/listofobjects/JAXBListOfObjectsNoJSONTestCases.java index 0013ff0356b..48cebb5161a 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/listofobjects/JAXBListOfObjectsNoJSONTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/listofobjects/JAXBListOfObjectsNoJSONTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -266,7 +266,7 @@ public void testObjectToXMLStreamWriterWithTypeMappingInfo() throws Exception { StringWriter writer = new StringWriter(); javax.xml.stream.XMLOutputFactory factory = javax.xml.stream.XMLOutputFactory.newInstance(); - factory.setProperty(factory.IS_REPAIRING_NAMESPACES, new Boolean(false)); + factory.setProperty(factory.IS_REPAIRING_NAMESPACES, Boolean.valueOf(false)); javax.xml.stream.XMLStreamWriter streamWriter= factory.createXMLStreamWriter(writer); Object objectToWrite = getWriteControlObject(); @@ -289,7 +289,7 @@ public void testObjectToXMLEventWriterWithTypeMappingInfo() throws Exception { StringWriter writer = new StringWriter(); javax.xml.stream.XMLOutputFactory factory = javax.xml.stream.XMLOutputFactory.newInstance(); - factory.setProperty(factory.IS_REPAIRING_NAMESPACES, new Boolean(false)); + factory.setProperty(factory.IS_REPAIRING_NAMESPACES, Boolean.valueOf(false)); javax.xml.stream.XMLEventWriter eventWriter= factory.createXMLEventWriter(writer); Object objectToWrite = getWriteControlObject(); diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/listofobjects/JAXBListOfObjectsNonRootTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/listofobjects/JAXBListOfObjectsNonRootTestCases.java index 073b28d6c9d..b77ef60acbd 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/listofobjects/JAXBListOfObjectsNonRootTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/listofobjects/JAXBListOfObjectsNonRootTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -81,18 +81,18 @@ protected Object getControlObject() { ListofObjects listofObjects = new ListofObjects(); Vector integers = new Vector(); - integers.add(new Integer("10")); - integers.add(new Integer("20")); - integers.add(new Integer("30")); - integers.add(new Integer("40")); + integers.add(Integer.valueOf("10")); + integers.add(Integer.valueOf("20")); + integers.add(Integer.valueOf("30")); + integers.add(Integer.valueOf("40")); listofObjects.setIntegerList(integers); TreeSet integerSet = new TreeSet(); - integerSet.add(new Integer("20")); - integerSet.add(new Integer("40")); - integerSet.add(new Integer("60")); + integerSet.add(Integer.valueOf("20")); + integerSet.add(Integer.valueOf("40")); + integerSet.add(Integer.valueOf("60")); listofObjects.setIntegerSet(integerSet); Integer[] integerArray = new Integer[4]; @@ -125,21 +125,21 @@ protected Object getControlObject() { listofObjects.setBooleanArray(booleans); HashMap stringIntegerMap = new HashMap(); - stringIntegerMap.put("string1", new Integer(10)); - stringIntegerMap.put("string2", new Integer(20)); - stringIntegerMap.put("string3", new Integer(30)); + stringIntegerMap.put("string1", Integer.valueOf(10)); + stringIntegerMap.put("string2", Integer.valueOf(20)); + stringIntegerMap.put("string3", Integer.valueOf(30)); listofObjects.setStringIntegerHashMap(stringIntegerMap); ConcurrentHashMap stringIntegerConcurrentMap = new ConcurrentHashMap(); - stringIntegerConcurrentMap.put("string1", new Integer(10)); - stringIntegerConcurrentMap.put("string2", new Integer(20)); - stringIntegerConcurrentMap.put("string3", new Integer(30)); + stringIntegerConcurrentMap.put("string1", Integer.valueOf(10)); + stringIntegerConcurrentMap.put("string2", Integer.valueOf(20)); + stringIntegerConcurrentMap.put("string3", Integer.valueOf(30)); listofObjects.setStringIntegerConcurrentMap(stringIntegerConcurrentMap); LinkedList integersLinkedList = new LinkedList(); - integersLinkedList.add(new Integer(5)); - integersLinkedList.add(new Integer(15)); - integersLinkedList.add(new Integer(25)); + integersLinkedList.add(Integer.valueOf(5)); + integersLinkedList.add(Integer.valueOf(15)); + integersLinkedList.add(Integer.valueOf(25)); listofObjects.setIntegerLinkedList(integersLinkedList); Hashtable stringEmployeeTable = new Hashtable(); diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/listofobjects/JAXBListOfObjectsTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/listofobjects/JAXBListOfObjectsTestCases.java index 609144c95e7..bf0f7615b1e 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/listofobjects/JAXBListOfObjectsTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/listofobjects/JAXBListOfObjectsTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -270,7 +270,7 @@ public void testObjectToXMLStreamWriterWithTypeMappingInfo() throws Exception { StringWriter writer = new StringWriter(); javax.xml.stream.XMLOutputFactory factory = javax.xml.stream.XMLOutputFactory.newInstance(); - factory.setProperty(factory.IS_REPAIRING_NAMESPACES, new Boolean(false)); + factory.setProperty(factory.IS_REPAIRING_NAMESPACES, Boolean.valueOf(false)); javax.xml.stream.XMLStreamWriter streamWriter= factory.createXMLStreamWriter(writer); Object objectToWrite = getWriteControlObject(); @@ -293,7 +293,7 @@ public void testObjectToXMLEventWriterWithTypeMappingInfo() throws Exception { StringWriter writer = new StringWriter(); javax.xml.stream.XMLOutputFactory factory = javax.xml.stream.XMLOutputFactory.newInstance(); - factory.setProperty(factory.IS_REPAIRING_NAMESPACES, new Boolean(false)); + factory.setProperty(factory.IS_REPAIRING_NAMESPACES, Boolean.valueOf(false)); javax.xml.stream.XMLEventWriter eventWriter= factory.createXMLEventWriter(writer); Object objectToWrite = getWriteControlObject(); diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/listofobjects/JAXBStringIntegerHashMapTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/listofobjects/JAXBStringIntegerHashMapTestCases.java index 74068598356..c633d8fb9a3 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/listofobjects/JAXBStringIntegerHashMapTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/listofobjects/JAXBStringIntegerHashMapTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -62,9 +62,9 @@ protected Type getTypeToUnmarshalTo() throws Exception { protected Object getControlObject() { HashMap theMap = new HashMap(); - theMap.put("thekey", new Integer(10)); - theMap.put("thekey2", new Integer(20)); - theMap.put("thekey3", new Integer(30)); + theMap.put("thekey", Integer.valueOf(10)); + theMap.put("thekey2", Integer.valueOf(20)); + theMap.put("thekey3", Integer.valueOf(30)); QName qname = new QName("examplenamespace", "root"); JAXBElement jaxbElement = new JAXBElement(qname, Object.class, null); diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/listofobjects/externalizedmetadata/JAXBMultipleMapsNamespaceTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/listofobjects/externalizedmetadata/JAXBMultipleMapsNamespaceTestCases.java index 5e4418834aa..2bef809ab6d 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/listofobjects/externalizedmetadata/JAXBMultipleMapsNamespaceTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/listofobjects/externalizedmetadata/JAXBMultipleMapsNamespaceTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -112,8 +112,8 @@ public List getControlSchemaFiles() { protected Object getControlObject() { Map theMap = new HashMap(); - theMap.put("aaa", new Integer(1)); - theMap.put("bbb", new Integer(2)); + theMap.put("aaa", Integer.valueOf(1)); + theMap.put("bbb", Integer.valueOf(2)); QName qname = new QName("root"); JAXBElement jaxbElement = new JAXBElement(qname, Object.class, null); diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/listofobjects/externalizedmetadata/JAXBMultipleMapsTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/listofobjects/externalizedmetadata/JAXBMultipleMapsTestCases.java index 592de99b029..19b6ffe3db4 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/listofobjects/externalizedmetadata/JAXBMultipleMapsTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/listofobjects/externalizedmetadata/JAXBMultipleMapsTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -110,8 +110,8 @@ public List getControlSchemaFiles() { protected Object getControlObject() { Map theMap = new HashMap(); - theMap.put("aaa", new Integer(1)); - theMap.put("bbb", new Integer(2)); + theMap.put("aaa", Integer.valueOf(1)); + theMap.put("bbb", Integer.valueOf(2)); QName qname = new QName("root"); JAXBElement jaxbElement = new JAXBElement(qname, Object.class, null); diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/namespaceuri/inheritance/InheritanceRootChoiceOnlyTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/namespaceuri/inheritance/InheritanceRootChoiceOnlyTestCases.java index e55f1ba13c3..5669e935f1b 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/namespaceuri/inheritance/InheritanceRootChoiceOnlyTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/namespaceuri/inheritance/InheritanceRootChoiceOnlyTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -61,10 +61,10 @@ protected Object getControlObject() { List choiceList = new ArrayList(); choiceList.add(new String("choice string test2")); choiceList.add(anotherPackageSubType); - choiceList.add(new Integer(400)); + choiceList.add(Integer.valueOf(400)); choiceList.add(subTypeLevel2); choiceList.add(new String("choice string test")); - choiceList.add(new Integer(500)); + choiceList.add(Integer.valueOf(500)); root.choiceList = choiceList; return root; } diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/namespaceuri/inheritance/InheritanceRootCompositeCollectionObjectOnlyNSTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/namespaceuri/inheritance/InheritanceRootCompositeCollectionObjectOnlyNSTestCases.java index 325dc61b801..8f421b0d4d7 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/namespaceuri/inheritance/InheritanceRootCompositeCollectionObjectOnlyNSTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/namespaceuri/inheritance/InheritanceRootCompositeCollectionObjectOnlyNSTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -68,7 +68,7 @@ protected Object getControlObject() { List objectList = new ArrayList(baseTypes); objectList.add(new String("string test")); - objectList.add(new Integer(500)); + objectList.add(Integer.valueOf(500)); root.objectList = objectList; return root; diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/namespaceuri/inheritance/InheritanceRootCompositeCollectionObjectOnlyTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/namespaceuri/inheritance/InheritanceRootCompositeCollectionObjectOnlyTestCases.java index 6de37df4298..6b7d04bbd89 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/namespaceuri/inheritance/InheritanceRootCompositeCollectionObjectOnlyTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/namespaceuri/inheritance/InheritanceRootCompositeCollectionObjectOnlyTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -65,7 +65,7 @@ protected Object getControlObject() { List objectList = new ArrayList(baseTypes); objectList.add(new String("string test")); - objectList.add(new Integer(500)); + objectList.add(Integer.valueOf(500)); root.objectList = objectList; return root; diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/namespaceuri/inheritance/InheritanceRootCompositeCollectionObjectOnlyXMLTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/namespaceuri/inheritance/InheritanceRootCompositeCollectionObjectOnlyXMLTestCases.java index c549cc0fc97..1e1e2aef936 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/namespaceuri/inheritance/InheritanceRootCompositeCollectionObjectOnlyXMLTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/namespaceuri/inheritance/InheritanceRootCompositeCollectionObjectOnlyXMLTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -48,7 +48,7 @@ protected Object getControlObject() { List objectList = new ArrayList(baseTypes); objectList.add(new String("string test")); - objectList.add(new Integer(500)); + objectList.add(Integer.valueOf(500)); root.objectList = objectList; return root; diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/namespaceuri/inheritance/InheritanceWithMultiplePackagesBackwardCompatibilityTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/namespaceuri/inheritance/InheritanceWithMultiplePackagesBackwardCompatibilityTestCases.java index 0ca2937ebae..4ea1d7babad 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/namespaceuri/inheritance/InheritanceWithMultiplePackagesBackwardCompatibilityTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/namespaceuri/inheritance/InheritanceWithMultiplePackagesBackwardCompatibilityTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -61,7 +61,7 @@ protected Object getControlObject() { List objectList = new ArrayList(baseTypes); objectList.add(new String("string test")); - objectList.add(new Integer(500)); + objectList.add(Integer.valueOf(500)); root.objectList = objectList; List anyObjectList = new ArrayList(baseTypes); @@ -71,7 +71,7 @@ protected Object getControlObject() { choiceList.add(anotherPackageSubType); choiceList.add(subTypeLevel2); choiceList.add(new String("choice string test")); - choiceList.add(new Integer(500)); + choiceList.add(Integer.valueOf(500)); root.choiceList = choiceList; return root; } diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/namespaceuri/inheritance/InheritanceWithMultiplePackagesNSTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/namespaceuri/inheritance/InheritanceWithMultiplePackagesNSTestCases.java index 209df9d1970..4477aed57e1 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/namespaceuri/inheritance/InheritanceWithMultiplePackagesNSTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/namespaceuri/inheritance/InheritanceWithMultiplePackagesNSTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -73,7 +73,7 @@ protected Object getControlObject() { List objectList = new ArrayList(baseTypes); objectList.add(new String("string test")); - objectList.add(new Integer(500)); + objectList.add(Integer.valueOf(500)); root.objectList = objectList; List anyObjectList = new ArrayList(baseTypes); @@ -83,7 +83,7 @@ protected Object getControlObject() { choiceList.add(anotherPackageSubType); choiceList.add(subTypeLevel2); choiceList.add(new String("choice string test")); - choiceList.add(new Integer(500)); + choiceList.add(Integer.valueOf(500)); root.choiceList = choiceList; return root; } diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/namespaceuri/inheritance/InheritanceWithMultiplePackagesTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/namespaceuri/inheritance/InheritanceWithMultiplePackagesTestCases.java index 1c12704dbee..c23c0b33b00 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/namespaceuri/inheritance/InheritanceWithMultiplePackagesTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/namespaceuri/inheritance/InheritanceWithMultiplePackagesTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -67,7 +67,7 @@ protected Object getControlObject() { List objectList = new ArrayList(baseTypes); objectList.add(new String("string test")); - objectList.add(new Integer(500)); + objectList.add(Integer.valueOf(500)); root.objectList = objectList; List anyObjectList = new ArrayList(baseTypes); @@ -77,7 +77,7 @@ protected Object getControlObject() { choiceList.add(anotherPackageSubType); choiceList.add(subTypeLevel2); choiceList.add(new String("choice string test")); - choiceList.add(new Integer(500)); + choiceList.add(Integer.valueOf(500)); root.choiceList = choiceList; return root; } diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/namespaceuri/inheritance/InheritanceWithMultiplePackagesXMLTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/namespaceuri/inheritance/InheritanceWithMultiplePackagesXMLTestCases.java index caf717895aa..d01692e3886 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/namespaceuri/inheritance/InheritanceWithMultiplePackagesXMLTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/namespaceuri/inheritance/InheritanceWithMultiplePackagesXMLTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -50,7 +50,7 @@ protected Object getControlObject() { List objectList = new ArrayList(baseTypes); objectList.add(new String("string test")); - objectList.add(new Integer(500)); + objectList.add(Integer.valueOf(500)); root.objectList = objectList; List anyObjectList = new ArrayList(baseTypes); @@ -60,7 +60,7 @@ protected Object getControlObject() { choiceList.add(anotherPackageSubType); choiceList.add(subTypeLevel2); choiceList.add(new String("choice string test")); - choiceList.add(new Integer(500)); + choiceList.add(Integer.valueOf(500)); root.choiceList = choiceList; return root; } diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/prefixmapper/PrefixMapperContextTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/prefixmapper/PrefixMapperContextTestCases.java index ab9d92d1cb1..21e1a2dd558 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/prefixmapper/PrefixMapperContextTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/prefixmapper/PrefixMapperContextTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -43,7 +43,7 @@ public void testMarshalWithContextualNamespaces() throws Exception { JAXBContext ctx = JAXBContextFactory.createContext(new Class[]{EmployeeContext.class}, null); Marshaller m = ctx.createMarshaller(); m.setProperty(MarshallerProperties.NAMESPACE_PREFIX_MAPPER, new ContextPrefixMapper()); - m.setProperty(XMLConstants.JAXB_FRAGMENT, new Boolean(true)); + m.setProperty(XMLConstants.JAXB_FRAGMENT, Boolean.valueOf(true)); EmployeeContext emp = new EmployeeContext(); emp.firstName = "Jon"; emp.lastName = "Doe"; diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/simpledocument/SimpleDocumentByteArrayTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/simpledocument/SimpleDocumentByteArrayTestCases.java index f8fb1256b29..f853f1a96c4 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/simpledocument/SimpleDocumentByteArrayTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/simpledocument/SimpleDocumentByteArrayTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -39,7 +39,7 @@ public SimpleDocumentByteArrayTestCases(String name) throws Exception { protected Object getControlObject() { JAXBElement value = new ByteArrayObjectFactory().createBase64Root(); - value.setValue(new Byte[]{new Byte((byte)1), new Byte((byte)2), new Byte((byte)3), new Byte((byte)4), new Byte((byte)5), new Byte((byte)6), new Byte((byte)7)}); + value.setValue(new Byte[]{Byte.valueOf((byte)1), Byte.valueOf((byte)2), Byte.valueOf((byte)3), Byte.valueOf((byte)4), Byte.valueOf((byte)5), Byte.valueOf((byte)6), Byte.valueOf((byte)7)}); return value; } diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/simpledocument/SimpleDocumentIntegerTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/simpledocument/SimpleDocumentIntegerTestCases.java index 3c587c7e025..24e0298eaaa 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/simpledocument/SimpleDocumentIntegerTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/simpledocument/SimpleDocumentIntegerTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -42,7 +42,7 @@ public SimpleDocumentIntegerTestCases(String name) throws Exception { protected Object getControlObject() { JAXBElement value = new IntegerObjectFactory().createIntegerRoot(); - value.setValue(new Integer(27)); + value.setValue(Integer.valueOf(27)); return value; } diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/stax/XMLStreamWriterDefaultNamespaceTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/stax/XMLStreamWriterDefaultNamespaceTestCases.java index db78ff597be..d2e4c16c9d7 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/stax/XMLStreamWriterDefaultNamespaceTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/stax/XMLStreamWriterDefaultNamespaceTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -47,7 +47,7 @@ public void testDefaultNamespaceOverride() throws Exception { streamWriter.writeStartElement("", "root", "someNamespace"); streamWriter.writeDefaultNamespace("someNamespace"); Marshaller marshaller = ctx.createMarshaller(); - marshaller.setProperty(Marshaller.JAXB_FRAGMENT, new Boolean(true)); + marshaller.setProperty(Marshaller.JAXB_FRAGMENT, Boolean.valueOf(true)); marshaller.marshal(new JAXBElement(new QName("employee"), Employee.class, new Employee()), streamWriter); streamWriter.writeEndElement(); @@ -74,7 +74,7 @@ public void testDuplicateDefaultNamespace() throws Exception { XMLOutputFactory factory = XMLOutputFactory.newInstance(); // Set IS_REPAIRING_NAMESPACES to true. - factory.setProperty(factory.IS_REPAIRING_NAMESPACES, new Boolean(true)); + factory.setProperty(factory.IS_REPAIRING_NAMESPACES, Boolean.valueOf(true)); XMLStreamWriter streamWriter = factory.createXMLStreamWriter(writer); diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/typemappinginfo/MapStringIntegerTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/typemappinginfo/MapStringIntegerTestCases.java index 2293347a994..5175691f650 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/typemappinginfo/MapStringIntegerTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/typemappinginfo/MapStringIntegerTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -66,7 +66,7 @@ public Object getReadControlObject() { protected Object getControlObject() { HashMap theMap = new HashMap(); - theMap.put("thekey", new Integer(10)); + theMap.put("thekey", Integer.valueOf(10)); return theMap; diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/typemappinginfo/MultipleMapTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/typemappinginfo/MultipleMapTestCases.java index 79eb73ba8bb..b35e6dbc9fb 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/typemappinginfo/MultipleMapTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/typemappinginfo/MultipleMapTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -79,7 +79,7 @@ protected TypeMappingInfo getTypeMappingInfo2()throws Exception { protected Object getControlObject() { HashMap theMap = new HashMap(); - theMap.put("thekey", new Integer(10)); + theMap.put("thekey", Integer.valueOf(10)); return theMap; } diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/typemappinginfo/TypeMappingInfoTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/typemappinginfo/TypeMappingInfoTestCases.java index 5b944afa1b0..3ab6632c756 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/typemappinginfo/TypeMappingInfoTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/typemappinginfo/TypeMappingInfoTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -200,7 +200,7 @@ public void testObjectToXMLStreamWriterWithTypeMappingInfo() throws Exception { StringWriter writer = new StringWriter(); XMLOutputFactory factory = XMLOutputFactory.newInstance(); - factory.setProperty(factory.IS_REPAIRING_NAMESPACES, new Boolean(false)); + factory.setProperty(factory.IS_REPAIRING_NAMESPACES, Boolean.valueOf(false)); XMLStreamWriter streamWriter= factory.createXMLStreamWriter(writer); Object objectToWrite = getWriteControlObject(); @@ -233,7 +233,7 @@ public void testObjectToXMLEventWriterWithTypeMappingInfo() throws Exception { StringWriter writer = new StringWriter(); XMLOutputFactory factory = XMLOutputFactory.newInstance(); - factory.setProperty(factory.IS_REPAIRING_NAMESPACES, new Boolean(false)); + factory.setProperty(factory.IS_REPAIRING_NAMESPACES, Boolean.valueOf(false)); XMLEventWriter eventWriter= factory.createXMLEventWriter(writer); Object objectToWrite = getWriteControlObject(); diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/unmarshaller/autodetect/AutoDetectMediaTypeTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/unmarshaller/autodetect/AutoDetectMediaTypeTestCases.java index 04852317d27..cae20857e23 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/unmarshaller/autodetect/AutoDetectMediaTypeTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/unmarshaller/autodetect/AutoDetectMediaTypeTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -52,11 +52,11 @@ public AutoDetectMediaTypeTestCases(String name) throws Exception { protected Object getControlObject() { EmployeeCollection employee = new EmployeeCollection(); ArrayList choices = new ArrayList(); - choices.add(new JAXBElement(new QName("integer-root"), Integer.class, new Integer(21))); + choices.add(new JAXBElement(new QName("integer-root"), Integer.class, Integer.valueOf(21))); choices.add(new JAXBElement(new QName("root"), String.class, "Value1")); EmployeeCollection nestedEmployee = new EmployeeCollection(); nestedEmployee.refs = new ArrayList(); - nestedEmployee.refs.add(new JAXBElement(new QName("integer-root"), Integer.class, new Integer(29))); + nestedEmployee.refs.add(new JAXBElement(new QName("integer-root"), Integer.class, Integer.valueOf(29))); choices.add(nestedEmployee); choices.add(new JAXBElement(new QName("root"), String.class, "Value2")); employee.refs = choices; @@ -68,13 +68,13 @@ protected Object getJSONReadControlObject(){ //same as getReadControl Except order is different EmployeeCollection employee = new EmployeeCollection(); ArrayList choices = new ArrayList(); - choices.add(new JAXBElement(new QName("integer-root"), Integer.class, new Integer(21))); + choices.add(new JAXBElement(new QName("integer-root"), Integer.class, Integer.valueOf(21))); choices.add(new JAXBElement(new QName("root"), String.class, "Value1")); choices.add(new JAXBElement(new QName("root"), String.class, "Value2")); EmployeeCollection nestedEmployee = new EmployeeCollection(); nestedEmployee.refs = new ArrayList(); - nestedEmployee.refs.add(new JAXBElement(new QName("integer-root"), Integer.class, new Integer(29))); + nestedEmployee.refs.add(new JAXBElement(new QName("integer-root"), Integer.class, Integer.valueOf(29))); choices.add(nestedEmployee); employee.refs = choices; return employee; diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/unmarshaller/autodetect/TestObjectFactory.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/unmarshaller/autodetect/TestObjectFactory.java index 72b14d1b2a2..61a4bc29798 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/unmarshaller/autodetect/TestObjectFactory.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/unmarshaller/autodetect/TestObjectFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -27,7 +27,7 @@ public JAXBElement createRoot() { @XmlElementDecl(name="integer-root") public JAXBElement createIntegerRoot() { - return new JAXBElement(new QName("integer-root"), Integer.class, new Integer(0)); + return new JAXBElement(new QName("integer-root"), Integer.class, Integer.valueOf(0)); } public EmployeeCollection createEmployeeCollection() { diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/xmladapter/choice/AdapterWithElementsTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/xmladapter/choice/AdapterWithElementsTestCases.java index f85fa0cd212..8cfccfc1506 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/xmladapter/choice/AdapterWithElementsTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/xmladapter/choice/AdapterWithElementsTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -43,7 +43,7 @@ protected Object getControlObject() { barC.a = "a"; barC.b = "b"; foo.collectionChoice.add(barC); - foo.collectionChoice.add(new Integer(123)); + foo.collectionChoice.add(Integer.valueOf(123)); return foo; } diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/xmladapter/enumeration/ByteToExampleEnumAdapter.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/xmladapter/enumeration/ByteToExampleEnumAdapter.java index 29a70a457f2..3a51d499dcc 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/xmladapter/enumeration/ByteToExampleEnumAdapter.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/xmladapter/enumeration/ByteToExampleEnumAdapter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -30,6 +30,6 @@ public ExampleEnum marshal(Byte v) throws Exception { } public Byte unmarshal(ExampleEnum v) throws Exception { - return new Byte((byte)v.getValue()); + return Byte.valueOf((byte)v.getValue()); } } diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/xmlanyelement/ns2/DefaultNamespace2TestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/xmlanyelement/ns2/DefaultNamespace2TestCases.java index 80d84520669..11665c19523 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/xmlanyelement/ns2/DefaultNamespace2TestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/xmlanyelement/ns2/DefaultNamespace2TestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -88,7 +88,7 @@ public void testObjectToXMLStreamWriterRepairing() throws Exception { StringWriter writer = new StringWriter(); XMLOutputFactory factory = XMLOutputFactory.newInstance(); - factory.setProperty(factory.IS_REPAIRING_NAMESPACES, new Boolean(true)); + factory.setProperty(factory.IS_REPAIRING_NAMESPACES, Boolean.valueOf(true)); XMLStreamWriter streamWriter= factory.createXMLStreamWriter(writer); Object objectToWrite = getWriteControlObject(); @@ -128,7 +128,7 @@ public void testObjectToXMLStreamWriterRepairingRecord() throws Exception { StringWriter writer = new StringWriter(); XMLOutputFactory factory = XMLOutputFactory.newInstance(); - factory.setProperty(factory.IS_REPAIRING_NAMESPACES, new Boolean(true)); + factory.setProperty(factory.IS_REPAIRING_NAMESPACES, Boolean.valueOf(true)); XMLStreamWriter streamWriter= factory.createXMLStreamWriter(writer); Object objectToWrite = getWriteControlObject(); diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/xmlelementref/EmployeeCollectionTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/xmlelementref/EmployeeCollectionTestCases.java index c82008dac8a..57180c70022 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/xmlelementref/EmployeeCollectionTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/xmlelementref/EmployeeCollectionTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -38,13 +38,13 @@ protected Object getJSONReadControlObject(){ //same as getReadControl Except order is different EmployeeCollection employee = new EmployeeCollection(); ArrayList choices = new ArrayList(); - choices.add(new JAXBElement(new QName("myns", "integer-root"), Integer.class, new Integer(21))); + choices.add(new JAXBElement(new QName("myns", "integer-root"), Integer.class, Integer.valueOf(21))); choices.add(new JAXBElement(new QName("root"), String.class, "Value1")); choices.add(new JAXBElement(new QName("root"), String.class, "Value2")); EmployeeCollection nestedEmployee = new EmployeeCollection(); nestedEmployee.refs = new ArrayList(); - nestedEmployee.refs.add(new JAXBElement(new QName("myns", "integer-root"), Integer.class, new Integer(29))); + nestedEmployee.refs.add(new JAXBElement(new QName("myns", "integer-root"), Integer.class, Integer.valueOf(29))); choices.add(nestedEmployee); employee.refs = choices; return employee; @@ -53,11 +53,11 @@ protected Object getJSONReadControlObject(){ protected Object getControlObject() { EmployeeCollection employee = new EmployeeCollection(); ArrayList choices = new ArrayList(); - choices.add(new JAXBElement(new QName("myns", "integer-root"), Integer.class, new Integer(21))); + choices.add(new JAXBElement(new QName("myns", "integer-root"), Integer.class, Integer.valueOf(21))); choices.add(new JAXBElement(new QName("root"), String.class, "Value1")); EmployeeCollection nestedEmployee = new EmployeeCollection(); nestedEmployee.refs = new ArrayList(); - nestedEmployee.refs.add(new JAXBElement(new QName("myns", "integer-root"), Integer.class, new Integer(29))); + nestedEmployee.refs.add(new JAXBElement(new QName("myns", "integer-root"), Integer.class, Integer.valueOf(29))); choices.add(nestedEmployee); choices.add(new JAXBElement(new QName("root"), String.class, "Value2")); employee.refs = choices; diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/xmlelementref/EmployeeSingleTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/xmlelementref/EmployeeSingleTestCases.java index 23f8c83a7ef..1d85a94ecb4 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/xmlelementref/EmployeeSingleTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/xmlelementref/EmployeeSingleTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -34,7 +34,7 @@ public EmployeeSingleTestCases(String name) throws Exception { protected Object getControlObject() { EmployeeSingle employee = new EmployeeSingle(); - employee.intRoot = new JAXBElement(new QName("myns", "integer-root"), Integer.class, new Integer(21)); + employee.intRoot = new JAXBElement(new QName("myns", "integer-root"), Integer.class, Integer.valueOf(21)); return employee; } diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/xmlelementref/TestObjectFactory.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/xmlelementref/TestObjectFactory.java index a18d3fdbd48..3e9db4212c5 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/xmlelementref/TestObjectFactory.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/xmlelementref/TestObjectFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -27,7 +27,7 @@ public JAXBElement createRoot() { @XmlElementDecl(namespace="myns", name="integer-root") public JAXBElement createIntegerRoot() { - return new JAXBElement(new QName("myns", "integer-root"), Integer.class, new Integer(0)); + return new JAXBElement(new QName("myns", "integer-root"), Integer.class, Integer.valueOf(0)); } public EmployeeSingle createEmployeeSingle() { diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/xmlelementref/duplicatename/ObjectFactory.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/xmlelementref/duplicatename/ObjectFactory.java index 8c3399994fa..e708c92e555 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/xmlelementref/duplicatename/ObjectFactory.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/xmlelementref/duplicatename/ObjectFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -37,7 +37,7 @@ public JAXBElement createBeanAValue() { @XmlElementDecl(name="value", scope=BeanB.class) public JAXBElement createBeanBValue() { - return new JAXBElement(new QName("value"), Integer.class, new Integer(12)); + return new JAXBElement(new QName("value"), Integer.class, Integer.valueOf(12)); } @XmlElementDecl(name="value") diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/xmlelements/XmlElementsArrayTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/xmlelements/XmlElementsArrayTestCases.java index 100d207cd8b..4d977053b6b 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/xmlelements/XmlElementsArrayTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/xmlelements/XmlElementsArrayTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -42,13 +42,13 @@ protected Object getControlObject() { EmployeeArray employee = new EmployeeArray(); employee.id = CONTROL_ID; Object[] choices =new Object[5]; - choices[0]= new Integer(12); + choices[0]= Integer.valueOf(12); choices[1]="String Value"; Address addr = new Address(); addr.city = "Ottawa"; addr.street = "123 Fake Street"; choices[2]=addr; - choices[3]=new Integer(5); + choices[3]=Integer.valueOf(5); choices[4] = ""; employee.choice = choices; return employee; @@ -58,8 +58,8 @@ protected Object getJSONReadControlObject() { EmployeeArray employee = new EmployeeArray(); employee.id = CONTROL_ID; Object[] choices =new Object[5]; - choices[0]= new Integer(12); - choices[1]=new Integer(5); + choices[0]= Integer.valueOf(12); + choices[1]=Integer.valueOf(5); choices[2]="String Value"; choices[3] = ""; Address addr = new Address(); diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/xmlelements/XmlElementsCollectionTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/xmlelements/XmlElementsCollectionTestCases.java index 0b69c26754b..dc55518bbc2 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/xmlelements/XmlElementsCollectionTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/xmlelements/XmlElementsCollectionTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -39,13 +39,13 @@ protected Object getControlObject() { EmployeeCollection employee = new EmployeeCollection(); employee.id = CONTROL_ID; ArrayList choices = new ArrayList(); - choices.add(new Integer(12)); + choices.add(Integer.valueOf(12)); choices.add("String Value"); Address addr = new Address(); addr.city = "Ottawa"; addr.street = "123 Fake Street"; choices.add(addr); - choices.add(new Integer(5)); + choices.add(Integer.valueOf(5)); choices.add(""); employee.choice = choices; return employee; @@ -55,8 +55,8 @@ protected Object getJSONReadControlObject() { EmployeeCollection employee = new EmployeeCollection(); employee.id = CONTROL_ID; ArrayList choices = new ArrayList(); - choices.add(new Integer(12)); - choices.add(new Integer(5)); + choices.add(Integer.valueOf(12)); + choices.add(Integer.valueOf(5)); choices.add("String Value"); choices.add(""); Address addr = new Address(); diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/xmlelements/XmlElementsInheritanceTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/xmlelements/XmlElementsInheritanceTestCases.java index 2158bd9056d..2a92c63cd6c 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/xmlelements/XmlElementsInheritanceTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/xmlelements/XmlElementsInheritanceTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -45,14 +45,14 @@ protected Object getControlObject() { EmployeeCollection employee = new EmployeeCollection(); employee.id = CONTROL_ID; ArrayList choices = new ArrayList(); - choices.add(new Integer(12)); + choices.add(Integer.valueOf(12)); choices.add("String Value"); CanadianAddress addr = new CanadianAddress(); addr.city = "Ottawa"; addr.street = "123 Fake Street"; addr.postalCode = "A1A 1A1"; choices.add(addr); - choices.add(new Integer(5)); + choices.add(Integer.valueOf(5)); employee.choice = choices; return employee; } @@ -61,8 +61,8 @@ protected Object getJSONReadControlObject() { EmployeeCollection employee = new EmployeeCollection(); employee.id = CONTROL_ID; ArrayList choices = new ArrayList(); - choices.add(new Integer(12)); - choices.add(new Integer(5)); + choices.add(Integer.valueOf(12)); + choices.add(Integer.valueOf(5)); choices.add("String Value"); CanadianAddress addr = new CanadianAddress(); addr.city = "Ottawa"; diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/xmlelements/XmlElementsIntegerTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/xmlelements/XmlElementsIntegerTestCases.java index 5801dc72127..8b23a2fb508 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/xmlelements/XmlElementsIntegerTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/xmlelements/XmlElementsIntegerTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -38,7 +38,7 @@ public XmlElementsIntegerTestCases(String name) throws Exception { protected Object getControlObject() { Employee employee = new Employee(); employee.id = CONTROL_ID; - employee.choice = new Integer(12); + employee.choice = Integer.valueOf(12); return employee; } } diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/xmlmarshaller/MarshallerEncodingTest.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/xmlmarshaller/MarshallerEncodingTest.java index e4da97cca7a..39648f4d443 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/xmlmarshaller/MarshallerEncodingTest.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/xmlmarshaller/MarshallerEncodingTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -63,7 +63,7 @@ public void setUp() throws Exception { originalEncoding = (String)marshaller.getProperty(Marshaller.JAXB_ENCODING); originalFormatting = (Boolean)marshaller.getProperty(Marshaller.JAXB_FORMATTED_OUTPUT); marshaller.setProperty(Marshaller.JAXB_ENCODING, encoding); - marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, new Boolean(false)); + marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.valueOf(false)); controlObject = setupControlObject(); } diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/xmlmarshaller/MarshallerFormattingTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/xmlmarshaller/MarshallerFormattingTestCases.java index 33864a347c8..d9805553224 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/xmlmarshaller/MarshallerFormattingTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/xmlmarshaller/MarshallerFormattingTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -71,7 +71,7 @@ public void testFormattingTrue() throws Exception { public void testInvalidFormatting() throws Exception { try { - Object value = new Integer(10); + Object value = Integer.valueOf(10); marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, value); } catch (PropertyException e) { this.assertTrue(true); @@ -87,7 +87,7 @@ private void formatTest(boolean isFormatted, String controlString) throws Except StringWriter writer = new StringWriter(); Boolean originalSetting = (Boolean) marshaller.getProperty(Marshaller.JAXB_FORMATTED_OUTPUT); - marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, new Boolean(isFormatted)); + marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.valueOf(isFormatted)); marshaller.marshal(controlObject, writer); log("Expected:" + controlString); diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/xmlmarshaller/MarshallerFragmentTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/xmlmarshaller/MarshallerFragmentTestCases.java index 5801a968409..33980b8d783 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/xmlmarshaller/MarshallerFragmentTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/xmlmarshaller/MarshallerFragmentTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -48,7 +48,7 @@ public void setUp() throws Exception { marshaller = jaxbContext.createMarshaller(); originalSetting = (Boolean)marshaller.getProperty(XMLConstants.JAXB_FRAGMENT); - marshaller.setProperty(XMLConstants.JAXB_FRAGMENT, new Boolean(true)); + marshaller.setProperty(XMLConstants.JAXB_FRAGMENT, Boolean.valueOf(true)); //set up controlObject controlObject = new Employee(); diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/events/MarshalListenerImpl.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/events/MarshalListenerImpl.java index 0c7c5734401..30682e64f58 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/events/MarshalListenerImpl.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/events/MarshalListenerImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -25,12 +25,12 @@ */ public class MarshalListenerImpl implements XMLMarshalListener { - static Integer EMPLOYEE_BEFORE_MARSHAL = new Integer(0); - static Integer ADDRESS_BEFORE_MARSHAL = new Integer(1); - static Integer PHONE_BEFORE_MARSHAL = new Integer(2); - static Integer EMPLOYEE_AFTER_MARSHAL = new Integer(3); - static Integer ADDRESS_AFTER_MARSHAL = new Integer(4); - static Integer PHONE_AFTER_MARSHAL = new Integer(5); + static Integer EMPLOYEE_BEFORE_MARSHAL = Integer.valueOf(0); + static Integer ADDRESS_BEFORE_MARSHAL = Integer.valueOf(1); + static Integer PHONE_BEFORE_MARSHAL = Integer.valueOf(2); + static Integer EMPLOYEE_AFTER_MARSHAL = Integer.valueOf(3); + static Integer ADDRESS_AFTER_MARSHAL = Integer.valueOf(4); + static Integer PHONE_AFTER_MARSHAL = Integer.valueOf(5); public ArrayList events = null; diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/events/UnmarshalListenerImpl.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/events/UnmarshalListenerImpl.java index 8265f49f352..5254d5ff875 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/events/UnmarshalListenerImpl.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/events/UnmarshalListenerImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -25,12 +25,12 @@ */ public class UnmarshalListenerImpl implements XMLUnmarshalListener { - static Integer EMPLOYEE_BEFORE_UNMARSHAL = new Integer(0); - static Integer ADDRESS_BEFORE_UNMARSHAL = new Integer(1); - static Integer PHONE_BEFORE_UNMARSHAL = new Integer(2); - static Integer EMPLOYEE_AFTER_UNMARSHAL = new Integer(3); - static Integer ADDRESS_AFTER_UNMARSHAL = new Integer(4); - static Integer PHONE_AFTER_UNMARSHAL = new Integer(5); + static Integer EMPLOYEE_BEFORE_UNMARSHAL = Integer.valueOf(0); + static Integer ADDRESS_BEFORE_UNMARSHAL = Integer.valueOf(1); + static Integer PHONE_BEFORE_UNMARSHAL = Integer.valueOf(2); + static Integer EMPLOYEE_AFTER_UNMARSHAL = Integer.valueOf(3); + static Integer ADDRESS_AFTER_UNMARSHAL = Integer.valueOf(4); + static Integer PHONE_AFTER_UNMARSHAL = Integer.valueOf(5); public ArrayList events = null; diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/events/descriptor/PostBuildEventTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/events/descriptor/PostBuildEventTestCases.java index a6f72f62973..f44d6d5373a 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/events/descriptor/PostBuildEventTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/events/descriptor/PostBuildEventTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -24,8 +24,8 @@ import org.w3c.dom.Document; public class PostBuildEventTestCases extends XMLMappingTestCases { - static Integer EMPLOYEE_POST_BUILD = new Integer(0); - static Integer ADDRESS_POST_BUILD = new Integer(1); + static Integer EMPLOYEE_POST_BUILD = Integer.valueOf(0); + static Integer ADDRESS_POST_BUILD = Integer.valueOf(1); EmployeeProject project; public PostBuildEventTestCases(String name) throws Exception { diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/XMLMappingTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/XMLMappingTestCases.java index 9380a04a7b4..c5b774dd807 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/XMLMappingTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/XMLMappingTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -487,7 +487,7 @@ public void testObjectToXMLStreamWriter() throws Exception { if(XML_OUTPUT_FACTORY != null && staxResultClass != null) { StringWriter writer = new StringWriter(); XMLOutputFactory factory = XMLOutputFactory.newInstance(); - factory.setProperty(factory.IS_REPAIRING_NAMESPACES, new Boolean(false)); + factory.setProperty(factory.IS_REPAIRING_NAMESPACES, Boolean.valueOf(false)); XMLStreamWriter streamWriter= factory.createXMLStreamWriter(writer); Object objectToWrite = getWriteControlObject(); @@ -532,7 +532,7 @@ public void testObjectToXMLEventWriter() throws Exception { if(XML_OUTPUT_FACTORY != null && staxResultClass != null) { StringWriter writer = new StringWriter(); XMLOutputFactory factory = XMLOutputFactory.newInstance(); - factory.setProperty(factory.IS_REPAIRING_NAMESPACES, new Boolean(false)); + factory.setProperty(factory.IS_REPAIRING_NAMESPACES, Boolean.valueOf(false)); XMLEventWriter eventWriter= factory.createXMLEventWriter(writer); Object objectToWrite = getWriteControlObject(); diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/anycollection/withgroupingelement/AnyCollectionWithGroupingWithXMLRootTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/anycollection/withgroupingelement/AnyCollectionWithGroupingWithXMLRootTestCases.java index ce25dd4d1bb..8618cdbcee0 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/anycollection/withgroupingelement/AnyCollectionWithGroupingWithXMLRootTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/anycollection/withgroupingelement/AnyCollectionWithGroupingWithXMLRootTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -76,7 +76,7 @@ public Object getControlObject() { XMLRoot xmlroot2 = new XMLRoot(); - xmlroot2.setObject(new Integer(15)); + xmlroot2.setObject(Integer.valueOf(15)); //xmlroot2.setObject("15"); xmlroot2.setLocalName("myns:theInteger"); xmlroot2.setNamespaceURI("www.example.com/some-dir/some.xsd"); @@ -149,7 +149,7 @@ public Object getJSONReadControlObject(){ XMLRoot xmlroot2 = new XMLRoot(); - xmlroot2.setObject(new Integer(15)); + xmlroot2.setObject(Integer.valueOf(15)); //xmlroot2.setObject("15"); xmlroot2.setLocalName("theInteger"); xmlroot2.setNamespaceURI("www.example.com/some-dir/some.xsd"); diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/anycollection/withoutgroupingelement/AnyCollectionWithoutGroupingWithXMLRootTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/anycollection/withoutgroupingelement/AnyCollectionWithoutGroupingWithXMLRootTestCases.java index 580392535d8..bd8cf858358 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/anycollection/withoutgroupingelement/AnyCollectionWithoutGroupingWithXMLRootTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/anycollection/withoutgroupingelement/AnyCollectionWithoutGroupingWithXMLRootTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -58,7 +58,7 @@ public Object getControlObject() { XMLRoot xmlroot2 = new XMLRoot(); - xmlroot2.setObject(new Integer(15)); + xmlroot2.setObject(Integer.valueOf(15)); xmlroot2.setLocalName("theInteger"); xmlroot2.setSchemaType(XMLConstants.INT_QNAME); any.addElement(xmlroot2); diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/binarydata/identifiedbyname/BinaryDataByteObjectArrayTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/binarydata/identifiedbyname/BinaryDataByteObjectArrayTestCases.java index e3dc7c4cd27..47e8c19d4cd 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/binarydata/identifiedbyname/BinaryDataByteObjectArrayTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/binarydata/identifiedbyname/BinaryDataByteObjectArrayTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -51,7 +51,7 @@ protected Object getControlObject() { Byte[] objectBytes = new Byte[bytes.length]; for (int index = 0; index < bytes.length; index++) { - objectBytes[index] = new Byte(bytes[index]); + objectBytes[index] = Byte.valueOf(bytes[index]); } emp.setPhoto(objectBytes); emp.setData(new DataHandler("THISISATEXTSTRINGFORTHISDATAHANDLER", "text")); diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/binarydata/identifiedbyname/EmployeeWithByteObjectArray.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/binarydata/identifiedbyname/EmployeeWithByteObjectArray.java index 11bc8d5fbd8..1f6f526b506 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/binarydata/identifiedbyname/EmployeeWithByteObjectArray.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/binarydata/identifiedbyname/EmployeeWithByteObjectArray.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -47,7 +47,7 @@ public static EmployeeWithByteObjectArray example1() { byte[] bytes = MyAttachmentUnmarshaller.PHOTO_BASE64.getBytes(); Byte[] objectBytes = new Byte[bytes.length]; for (int index = 0; index < bytes.length; index++) { - objectBytes[index] = new Byte(bytes[index]); + objectBytes[index] = Byte.valueOf(bytes[index]); } return new EmployeeWithByteObjectArray(DEFAULT_ID, objectBytes); } diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/binarydatacollection/EmployeeWithByteArrayObject.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/binarydatacollection/EmployeeWithByteArrayObject.java index ca2c17447c3..57cb1236649 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/binarydatacollection/EmployeeWithByteArrayObject.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/binarydatacollection/EmployeeWithByteArrayObject.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -47,7 +47,7 @@ public static Employee example1() { byte[] bytes = MyAttachmentUnmarshaller.PHOTO_BASE64.getBytes(); Byte[] objectBytes = new Byte[bytes.length]; for (int index = 0; index < bytes.length; index++) { - objectBytes[index] = new Byte(bytes[index]); + objectBytes[index] = Byte.valueOf(bytes[index]); } photos.addElement(objectBytes); photos.addElement(objectBytes); diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/binarydatacollection/identifiedbyname/withgroupingelement/BinaryDataCollectionByteObjectArrayTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/binarydatacollection/identifiedbyname/withgroupingelement/BinaryDataCollectionByteObjectArrayTestCases.java index a6fdee345fe..b103e8667f2 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/binarydatacollection/identifiedbyname/withgroupingelement/BinaryDataCollectionByteObjectArrayTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/binarydatacollection/identifiedbyname/withgroupingelement/BinaryDataCollectionByteObjectArrayTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -50,7 +50,7 @@ protected Object getControlObject() { Byte[] objectBytes = new Byte[bytes.length]; for (int index = 0; index < bytes.length; index++) { - objectBytes[index] = new Byte(bytes[index]); + objectBytes[index] = Byte.valueOf(bytes[index]); } photos.addElement(objectBytes); diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/choice/XMLChoiceMappingNonStringValueTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/choice/XMLChoiceMappingNonStringValueTestCases.java index 470678b42ea..b4eeae8a2c5 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/choice/XMLChoiceMappingNonStringValueTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/choice/XMLChoiceMappingNonStringValueTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -34,7 +34,7 @@ protected Object getControlObject() { Employee employee = new Employee(); employee.name = "Jane Doe"; - employee.choice = new Integer(12); + employee.choice = Integer.valueOf(12); employee.phone = "123-4567"; diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/choicecollection/XMLChoiceCollectionMappingMixedTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/choicecollection/XMLChoiceCollectionMappingMixedTestCases.java index a95fcc5c806..1a0f459a5a5 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/choicecollection/XMLChoiceCollectionMappingMixedTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/choicecollection/XMLChoiceCollectionMappingMixedTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -45,12 +45,12 @@ public Object getReadControlObject() { employee.choice = new java.util.Vector(); employee.choice.add("123 Fake Street"); - employee.choice.add(new Integer(12)); + employee.choice.add(Integer.valueOf(12)); Address addr = new Address(); addr.city = "Ottawa"; addr.street = "45 O'Connor"; employee.choice.add(addr); - employee.choice.add(new Integer(14)); + employee.choice.add(Integer.valueOf(14)); employee.choice.add("addressString"); @@ -65,12 +65,12 @@ protected Object getControlObject() { employee.choice = new java.util.Vector(); employee.choice.add("123 Fake Street"); - employee.choice.add(new Integer(12)); + employee.choice.add(Integer.valueOf(12)); Address addr = new Address(); addr.city = "Ottawa"; addr.street = "45 O'Connor"; employee.choice.add(addr); - employee.choice.add(new Integer(14)); + employee.choice.add(Integer.valueOf(14)); XMLRoot xmlRoot = new XMLRoot(); xmlRoot.setLocalName("simpleAddress"); @@ -88,8 +88,8 @@ public Object getJSONReadControlObject() { employee.choice = new java.util.Vector(); employee.choice.add("123 Fake Street"); - employee.choice.add(new Integer(12)); - employee.choice.add(new Integer(14)); + employee.choice.add(Integer.valueOf(12)); + employee.choice.add(Integer.valueOf(14)); Address addr = new Address(); addr.city = "Ottawa"; addr.street = "45 O'Connor"; diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/choicecollection/XMLChoiceCollectionWithGroupingElementTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/choicecollection/XMLChoiceCollectionWithGroupingElementTestCases.java index 01a7f08e150..fab991a9284 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/choicecollection/XMLChoiceCollectionWithGroupingElementTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/choicecollection/XMLChoiceCollectionWithGroupingElementTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -43,12 +43,12 @@ protected Object getControlObject() { employee.choice = new java.util.Vector(); employee.choice.add("123 Fake Street"); - employee.choice.add(new Integer(12)); + employee.choice.add(Integer.valueOf(12)); Address addr = new Address(); addr.city = "Ottawa"; addr.street = "45 O'Connor"; employee.choice.add(addr); - employee.choice.add(new Integer(14)); + employee.choice.add(Integer.valueOf(14)); employee.phone = "123-4567"; @@ -62,8 +62,8 @@ public Object getJSONReadControlObject() { employee.choice = new java.util.Vector(); employee.choice.add("123 Fake Street"); - employee.choice.add(new Integer(12)); - employee.choice.add(new Integer(14)); + employee.choice.add(Integer.valueOf(12)); + employee.choice.add(Integer.valueOf(14)); Address addr = new Address(); addr.city = "Ottawa"; addr.street = "45 O'Connor"; diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/choicecollection/reuse/ChoiceCollectionReuseTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/choicecollection/reuse/ChoiceCollectionReuseTestCases.java index ba7f2b5cc0a..faad5ed1321 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/choicecollection/reuse/ChoiceCollectionReuseTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/choicecollection/reuse/ChoiceCollectionReuseTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -38,12 +38,12 @@ public Object getReadControlObject() { employee.choice = new LinkedList(); employee.choice.add("123 Fake Street"); - employee.choice.add(new Integer(12)); + employee.choice.add(Integer.valueOf(12)); Address addr = new Address(); addr.city = "Ottawa"; addr.street = "45 O'Connor"; employee.choice.add(addr); - employee.choice.add(new Integer(14)); + employee.choice.add(Integer.valueOf(14)); employee.choice.add("addressString"); @@ -58,12 +58,12 @@ protected Object getControlObject() { employee.choice = new LinkedList(); employee.choice.add("123 Fake Street"); - employee.choice.add(new Integer(12)); + employee.choice.add(Integer.valueOf(12)); Address addr = new Address(); addr.city = "Ottawa"; addr.street = "45 O'Connor"; employee.choice.add(addr); - employee.choice.add(new Integer(14)); + employee.choice.add(Integer.valueOf(14)); XMLRoot xmlRoot = new XMLRoot(); xmlRoot.setLocalName("simpleAddress"); diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/compositecollection/identifiedbynamespace/withgroupingelement/CompositeCollectionWithGroupingTextTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/compositecollection/identifiedbynamespace/withgroupingelement/CompositeCollectionWithGroupingTextTestCases.java index fd12836c347..b670f672caf 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/compositecollection/identifiedbynamespace/withgroupingelement/CompositeCollectionWithGroupingTextTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/compositecollection/identifiedbynamespace/withgroupingelement/CompositeCollectionWithGroupingTextTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -70,7 +70,7 @@ protected Object getControlObject() { mailingAddress2.setPostalCode(CONTROL_MAILING_ADDRESS_2_POSTAL_CODE); employee.getMailingAddresses().add(mailingAddress2); - employee.getMailingAddresses().add(new Integer(5)); + employee.getMailingAddresses().add(Integer.valueOf(5)); return employee; } diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directcollection/identifiedbyname/withgroupingelement/DirectCollectionWithGroupingElementIdentifiedByNameIntegerTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directcollection/identifiedbyname/withgroupingelement/DirectCollectionWithGroupingElementIdentifiedByNameIntegerTestCases.java index 477624c7f97..9294ced869d 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directcollection/identifiedbyname/withgroupingelement/DirectCollectionWithGroupingElementIdentifiedByNameIntegerTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directcollection/identifiedbyname/withgroupingelement/DirectCollectionWithGroupingElementIdentifiedByNameIntegerTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -24,9 +24,9 @@ public class DirectCollectionWithGroupingElementIdentifiedByNameIntegerTestCases private final static String XML_RESOURCE = "org/eclipse/persistence/testing/oxm/mappings/directcollection/identifiedbyname/withgroupingelement/DirectCollectionWithGroupingElementIntegerIdentifiedByName.xml"; private final static int CONTROL_ID = 123; - private final static Integer CONTROL_RESPONSIBILITY1 = new Integer(100); - private final static Integer CONTROL_RESPONSIBILITY2 = new Integer(200); - private final static Integer CONTROL_RESPONSIBILITY3 = new Integer(300); + private final static Integer CONTROL_RESPONSIBILITY1 = Integer.valueOf(100); + private final static Integer CONTROL_RESPONSIBILITY2 = Integer.valueOf(200); + private final static Integer CONTROL_RESPONSIBILITY3 = Integer.valueOf(300); public DirectCollectionWithGroupingElementIdentifiedByNameIntegerTestCases(String name) throws Exception { super(name); diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directcollection/identifiedbyname/withgroupingelement/DirectCollectionWithGroupingElementIntegerSingleNodeTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directcollection/identifiedbyname/withgroupingelement/DirectCollectionWithGroupingElementIntegerSingleNodeTestCases.java index 2dfdf2e2a5d..82f96bb8e98 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directcollection/identifiedbyname/withgroupingelement/DirectCollectionWithGroupingElementIntegerSingleNodeTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directcollection/identifiedbyname/withgroupingelement/DirectCollectionWithGroupingElementIntegerSingleNodeTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -23,9 +23,9 @@ public class DirectCollectionWithGroupingElementIntegerSingleNodeTestCases extends XMLMappingTestCases { private final static String XML_RESOURCE = "org/eclipse/persistence/testing/oxm/mappings/directcollection/identifiedbyname/withgroupingelement/DirectCollectionWithGroupingElementIntegerSingleNode.xml"; private final static int CONTROL_ID = 123; - private final static Integer CONTROL_RESPONSIBILITY1 = new Integer(100); - private final static Integer CONTROL_RESPONSIBILITY2 = new Integer(200); - private final static Integer CONTROL_RESPONSIBILITY3 = new Integer(300); + private final static Integer CONTROL_RESPONSIBILITY1 = Integer.valueOf(100); + private final static Integer CONTROL_RESPONSIBILITY2 = Integer.valueOf(200); + private final static Integer CONTROL_RESPONSIBILITY3 = Integer.valueOf(300); public DirectCollectionWithGroupingElementIntegerSingleNodeTestCases(String name) throws Exception { super(name); diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directcollection/identifiedbyname/withoutgroupingelement/DirectCollectionWithoutGroupingElementIdentifiedByNameIntegerTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directcollection/identifiedbyname/withoutgroupingelement/DirectCollectionWithoutGroupingElementIdentifiedByNameIntegerTestCases.java index a5bd024ca1a..349dac8b265 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directcollection/identifiedbyname/withoutgroupingelement/DirectCollectionWithoutGroupingElementIdentifiedByNameIntegerTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directcollection/identifiedbyname/withoutgroupingelement/DirectCollectionWithoutGroupingElementIdentifiedByNameIntegerTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -23,9 +23,9 @@ public class DirectCollectionWithoutGroupingElementIdentifiedByNameIntegerTestCa private final static String XML_RESOURCE = "org/eclipse/persistence/testing/oxm/mappings/directcollection/identifiedbyname/withoutgroupingelement/DirectCollectionWithoutGroupingElementIntegerIdentifiedByName.xml"; private final static int CONTROL_ID = 123; - private final static Integer CONTROL_RESPONSIBILITY1 = new Integer(100); - private final static Integer CONTROL_RESPONSIBILITY2 = new Integer(200); - private final static Integer CONTROL_RESPONSIBILITY3 = new Integer(300); + private final static Integer CONTROL_RESPONSIBILITY1 = Integer.valueOf(100); + private final static Integer CONTROL_RESPONSIBILITY2 = Integer.valueOf(200); + private final static Integer CONTROL_RESPONSIBILITY3 = Integer.valueOf(300); public DirectCollectionWithoutGroupingElementIdentifiedByNameIntegerTestCases(String name) throws Exception { super(name); diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directcollection/identifiedbyname/withoutgroupingelement/DirectCollectionWithoutGroupingElementIntegerWithCommentsTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directcollection/identifiedbyname/withoutgroupingelement/DirectCollectionWithoutGroupingElementIntegerWithCommentsTestCases.java index feecd3a99bd..58ddd502928 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directcollection/identifiedbyname/withoutgroupingelement/DirectCollectionWithoutGroupingElementIntegerWithCommentsTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directcollection/identifiedbyname/withoutgroupingelement/DirectCollectionWithoutGroupingElementIntegerWithCommentsTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -27,9 +27,9 @@ public class DirectCollectionWithoutGroupingElementIntegerWithCommentsTestCases extends XMLMappingTestCases { private final static String XML_RESOURCE = "org/eclipse/persistence/testing/oxm/mappings/directcollection/identifiedbyname/withoutgroupingelement/DirectCollectionWithoutGroupingElementIntegerWithComment.xml"; private final static int CONTROL_ID = 123; - private final static Integer CONTROL_RESPONSIBILITY1 = new Integer(100); - private final static Integer CONTROL_RESPONSIBILITY2 = new Integer(200); - private final static Integer CONTROL_RESPONSIBILITY3 = new Integer(300); + private final static Integer CONTROL_RESPONSIBILITY1 = Integer.valueOf(100); + private final static Integer CONTROL_RESPONSIBILITY2 = Integer.valueOf(200); + private final static Integer CONTROL_RESPONSIBILITY3 = Integer.valueOf(300); public DirectCollectionWithoutGroupingElementIntegerWithCommentsTestCases(String name) throws Exception { super(name); diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directcollection/typeattribute/identifiedbyname/withgroupingelement/WithGroupingElementIdentifiedByNameIntegerTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directcollection/typeattribute/identifiedbyname/withgroupingelement/WithGroupingElementIdentifiedByNameIntegerTestCases.java index 13bebb08e53..9d088fe7293 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directcollection/typeattribute/identifiedbyname/withgroupingelement/WithGroupingElementIdentifiedByNameIntegerTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directcollection/typeattribute/identifiedbyname/withgroupingelement/WithGroupingElementIdentifiedByNameIntegerTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -24,9 +24,9 @@ public class WithGroupingElementIdentifiedByNameIntegerTestCases extends XMLMapp private final static String XML_RESOURCE = "org/eclipse/persistence/testing/oxm/mappings/directcollection/typeattribute/identifiedbyname/withgroupingelement/WithGroupingElementIntegerIdentifiedByName.xml"; private final static int CONTROL_ID = 123; - private final static Integer CONTROL_RESPONSIBILITY1 = new Integer(100); - private final static Integer CONTROL_RESPONSIBILITY2 = new Integer(200); - private final static Integer CONTROL_RESPONSIBILITY3 = new Integer(300); + private final static Integer CONTROL_RESPONSIBILITY1 = Integer.valueOf(100); + private final static Integer CONTROL_RESPONSIBILITY2 = Integer.valueOf(200); + private final static Integer CONTROL_RESPONSIBILITY3 = Integer.valueOf(300); public WithGroupingElementIdentifiedByNameIntegerTestCases(String name) throws Exception { super(name); diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directcollection/typeattribute/identifiedbyname/withoutgroupingelement/WithoutGroupingElementIdentifiedByNameIntegerTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directcollection/typeattribute/identifiedbyname/withoutgroupingelement/WithoutGroupingElementIdentifiedByNameIntegerTestCases.java index 32bafcd12db..aaa3b1824b8 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directcollection/typeattribute/identifiedbyname/withoutgroupingelement/WithoutGroupingElementIdentifiedByNameIntegerTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directcollection/typeattribute/identifiedbyname/withoutgroupingelement/WithoutGroupingElementIdentifiedByNameIntegerTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -23,9 +23,9 @@ public class WithoutGroupingElementIdentifiedByNameIntegerTestCases extends XMLM private final static String XML_RESOURCE = "org/eclipse/persistence/testing/oxm/mappings/directcollection/typeattribute/identifiedbyname/withoutgroupingelement/WithoutGroupingElementIntegerIdentifiedByName.xml"; private final static int CONTROL_ID = 123; - private final static Integer CONTROL_RESPONSIBILITY1 = new Integer(100); - private final static Integer CONTROL_RESPONSIBILITY2 = new Integer(200); - private final static Integer CONTROL_RESPONSIBILITY3 = new Integer(300); + private final static Integer CONTROL_RESPONSIBILITY1 = Integer.valueOf(100); + private final static Integer CONTROL_RESPONSIBILITY2 = Integer.valueOf(200); + private final static Integer CONTROL_RESPONSIBILITY3 = Integer.valueOf(300); public WithoutGroupingElementIdentifiedByNameIntegerTestCases(String name) throws Exception { super(name); diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directcollection/union/UnionWithTypeAttributeTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directcollection/union/UnionWithTypeAttributeTestCases.java index d3d47b19dd4..3b20af07a9b 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directcollection/union/UnionWithTypeAttributeTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directcollection/union/UnionWithTypeAttributeTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -25,7 +25,7 @@ public class UnionWithTypeAttributeTestCases extends XMLMappingTestCases { private final static String XML_RESOURCE = "org/eclipse/persistence/testing/oxm/mappings/directcollection/union/UnionWithTypeAttribute.xml"; - protected final static Integer CONTROL_ITEM = new Integer(10); + protected final static Integer CONTROL_ITEM = Integer.valueOf(10); protected final static String CONTROL_FIRST_NAME = "Jane"; protected final static String CONTROL_LAST_NAME = "Doe"; diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directtofield/defaultnullvalue/xmlattribute/DefaultNullValueAttributeProject.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directtofield/defaultnullvalue/xmlattribute/DefaultNullValueAttributeProject.java index a47cb5c11cd..abed20e21f4 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directtofield/defaultnullvalue/xmlattribute/DefaultNullValueAttributeProject.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directtofield/defaultnullvalue/xmlattribute/DefaultNullValueAttributeProject.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -37,7 +37,7 @@ private XMLDescriptor getEmployeeDescriptor() { idMapping.setAttributeName("id"); idMapping.getAttributeName(); idMapping.setXPath("@id"); - idMapping.setNullValue(new Integer(CONTROL_ID)); + idMapping.setNullValue(Integer.valueOf(CONTROL_ID)); xmlDescriptor.addMapping(idMapping); //XMLDirectMapping firstNameMapping = new XMLDirectMapping(); diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directtofield/defaultnullvalue/xmlelement/DefaultNullValueElementProject.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directtofield/defaultnullvalue/xmlelement/DefaultNullValueElementProject.java index d74479745a1..c53018ebf5e 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directtofield/defaultnullvalue/xmlelement/DefaultNullValueElementProject.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directtofield/defaultnullvalue/xmlelement/DefaultNullValueElementProject.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -36,13 +36,13 @@ private XMLDescriptor getEmployeeDescriptor() { XMLDirectMapping idMapping = new XMLDirectMapping(); idMapping.setAttributeName("id"); idMapping.setXPath("id/text()"); - idMapping.setNullValue(new Integer(CONTROL_ID)); + idMapping.setNullValue(Integer.valueOf(CONTROL_ID)); xmlDescriptor.addMapping(idMapping); XMLDirectMapping numericNoNullValueMapping = new XMLDirectMapping(); numericNoNullValueMapping.setAttributeName("numericNoNullValue"); numericNoNullValueMapping.setXPath("numeric-no-null-value/text()"); - //numericNoNullValueMapping.setNullValue(new Integer(CONTROL_ID)); + //numericNoNullValueMapping.setNullValue(Integer.valueOf(CONTROL_ID)); xmlDescriptor.addMapping(numericNoNullValueMapping); XMLDirectMapping firstNameMapping = new XMLDirectMapping(); diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directtofield/doubletest/DirectToFieldDoubleTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directtofield/doubletest/DirectToFieldDoubleTestCases.java index 00c9df8fb8e..5b71c1a7d82 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directtofield/doubletest/DirectToFieldDoubleTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directtofield/doubletest/DirectToFieldDoubleTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -22,7 +22,7 @@ public class DirectToFieldDoubleTestCases extends XMLMappingTestCases { private final static int CONTROL_ID = 123; private final static String CONTROL_FIRST_NAME = "Jane"; private final static String CONTROL_LAST_NAME = "Doe"; - private final static Double CONTROL_SALARY = new Double(100000.0); + private final static Double CONTROL_SALARY = Double.valueOf(100000.0); public DirectToFieldDoubleTestCases(String name) throws Exception { super(name); diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directtofield/floattest/DirectToFieldFloatTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directtofield/floattest/DirectToFieldFloatTestCases.java index c8154ed2feb..ab4393c13bc 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directtofield/floattest/DirectToFieldFloatTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directtofield/floattest/DirectToFieldFloatTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -22,7 +22,7 @@ public class DirectToFieldFloatTestCases extends XMLMappingTestCases { private final static int CONTROL_ID = 123; private final static String CONTROL_FIRST_NAME = "Jane"; private final static String CONTROL_LAST_NAME = "Doe"; - private final static Float CONTROL_SALARY = new Float(100000.0); + private final static Float CONTROL_SALARY = 100000.0f; public DirectToFieldFloatTestCases(String name) throws Exception { super(name); diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directtofield/identifiedbyname/xmlelement/DirectToXMLElementIdentifiedByNameProject.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directtofield/identifiedbyname/xmlelement/DirectToXMLElementIdentifiedByNameProject.java index 0951bfc3983..ad670855834 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directtofield/identifiedbyname/xmlelement/DirectToXMLElementIdentifiedByNameProject.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directtofield/identifiedbyname/xmlelement/DirectToXMLElementIdentifiedByNameProject.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -46,7 +46,7 @@ private XMLDescriptor getEmployeeDescriptor() { XMLDirectMapping marriedMapping = new XMLDirectMapping(); marriedMapping.setAttributeName("married"); - marriedMapping.setNullValue(new Boolean(false)); + marriedMapping.setNullValue(Boolean.valueOf(false)); marriedMapping.setXPath("married/text()"); descriptor.addMapping(marriedMapping); diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directtofield/nillable/DirectIsSetNullPolicyElementAbsentIsSetAbsentFalseWithParamsTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directtofield/nillable/DirectIsSetNullPolicyElementAbsentIsSetAbsentFalseWithParamsTestCases.java index 108f9c1ced2..4583d984796 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directtofield/nillable/DirectIsSetNullPolicyElementAbsentIsSetAbsentFalseWithParamsTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directtofield/nillable/DirectIsSetNullPolicyElementAbsentIsSetAbsentFalseWithParamsTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -46,7 +46,7 @@ public DirectIsSetNullPolicyElementAbsentIsSetAbsentFalseWithParamsTestCases(Str // TODO: verify EMPTY_STRING behavior //Object[] isSetParameters = {"x","y", false, (int)1, (short)1, (long)1, (double)1.0, (float)1.0, (byte)1}; - Object[] isSetParameters = {"x","y", new Boolean(true), new Integer(255), new Short((short)32767), new Long(1), new Double(1.0), new Float(-1.0), new Byte((byte)32), new Character('C')}; + Object[] isSetParameters = {"x","y", Boolean.TRUE, 255, (short) 32767, 1L, 1.0, -1.0f, (byte) 32, 'C'}; //Object[] isSetParameters = {"x","y"}; ((IsSetNullPolicy)aNullPolicy).setIsSetMethodName("isSetFirstName"); diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directtofield/schematype/SchemaTypeBase64TestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directtofield/schematype/SchemaTypeBase64TestCases.java index f9dd6a2eb5c..4eaf9a686b6 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directtofield/schematype/SchemaTypeBase64TestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directtofield/schematype/SchemaTypeBase64TestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -49,7 +49,7 @@ protected Object getControlObject() { Byte[] byteObjects = new Byte[bytes.length]; for (int i = 0; i < bytes.length; i++) { - byteObjects[i] = new Byte(bytes[i]); + byteObjects[i] = Byte.valueOf(bytes[i]); } byteHolder.setBytes(byteObjects); diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directtofield/schematype/SchemaTypeHexTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directtofield/schematype/SchemaTypeHexTestCases.java index e05e4242a2d..47bc671dec4 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directtofield/schematype/SchemaTypeHexTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directtofield/schematype/SchemaTypeHexTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -47,7 +47,7 @@ protected Object getControlObject() { Byte[] byteObjects = new Byte[bytes.length]; for (int i = 0; i < bytes.length; i++) { - byteObjects[i] = new Byte(bytes[i]); + byteObjects[i] = Byte.valueOf(bytes[i]); } byteHolder.setBytes(byteObjects); diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directtofield/singleattribute/Employee.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directtofield/singleattribute/Employee.java index 9864c9b78db..ea8f5e07cfc 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directtofield/singleattribute/Employee.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directtofield/singleattribute/Employee.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -27,7 +27,7 @@ public int getID() { } public void setID(int newID) { - id = new Integer(newID); + id = Integer.valueOf(newID); } public Integer getIntegerId() { return id; diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directtofield/typeattribute/TypeAttributeCustomAddTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directtofield/typeattribute/TypeAttributeCustomAddTestCases.java index 1f9482cdefc..197bd71c563 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directtofield/typeattribute/TypeAttributeCustomAddTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directtofield/typeattribute/TypeAttributeCustomAddTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -18,7 +18,7 @@ public class TypeAttributeCustomAddTestCases extends XMLMappingTestCases { private final static String XML_RESOURCE = "org/eclipse/persistence/testing/oxm/mappings/directtofield/typeattribute/TypeAttributeCustomAdd.xml"; - private final static Integer CONTROL_ID = new Integer(123); + private final static Integer CONTROL_ID = Integer.valueOf(123); private final static String CONTROL_FIRST_NAME = "Jane"; private final static String CONTROL_LAST_NAME = "Doe"; diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directtofield/typeattribute/TypeAttributeDoubleTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directtofield/typeattribute/TypeAttributeDoubleTestCases.java index 1e0ffc15bbb..c8985a274e4 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directtofield/typeattribute/TypeAttributeDoubleTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directtofield/typeattribute/TypeAttributeDoubleTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -18,7 +18,7 @@ public class TypeAttributeDoubleTestCases extends XMLMappingTestCases { private final static String XML_RESOURCE = "org/eclipse/persistence/testing/oxm/mappings/directtofield/typeattribute/TypeAttributeDouble.xml"; - private final static Double CONTROL_ID = new Double(123.0); + private final static Double CONTROL_ID = Double.valueOf(123.0); private final static String CONTROL_FIRST_NAME = "Jane"; private final static String CONTROL_LAST_NAME = "Doe"; diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directtofield/typeattribute/TypeAttributeFloatTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directtofield/typeattribute/TypeAttributeFloatTestCases.java index 78ddc172d07..a59125751f2 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directtofield/typeattribute/TypeAttributeFloatTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directtofield/typeattribute/TypeAttributeFloatTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -18,7 +18,7 @@ public class TypeAttributeFloatTestCases extends XMLMappingTestCases { private final static String XML_RESOURCE = "org/eclipse/persistence/testing/oxm/mappings/directtofield/typeattribute/TypeAttributeFloat.xml"; - private final static Float CONTROL_ID = new Float(123.0); + private final static Float CONTROL_ID = 123.0f; private final static String CONTROL_FIRST_NAME = "Jane"; private final static String CONTROL_LAST_NAME = "Doe"; diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directtofield/typeattribute/TypeAttributeIntegerTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directtofield/typeattribute/TypeAttributeIntegerTestCases.java index 3bd38bd6240..d3541ad8506 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directtofield/typeattribute/TypeAttributeIntegerTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directtofield/typeattribute/TypeAttributeIntegerTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -18,7 +18,7 @@ public class TypeAttributeIntegerTestCases extends XMLMappingTestCases { private final static String XML_RESOURCE = "org/eclipse/persistence/testing/oxm/mappings/directtofield/typeattribute/TypeAttributeInteger.xml"; - private final static Integer CONTROL_ID = new Integer(123); + private final static Integer CONTROL_ID = Integer.valueOf(123); private final static String CONTROL_FIRST_NAME = "Jane"; private final static String CONTROL_LAST_NAME = "Doe"; diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directtofield/typeattribute/TypeAttributeNonXsiPrefixTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directtofield/typeattribute/TypeAttributeNonXsiPrefixTestCases.java index 5ae24635869..0dffcd396af 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directtofield/typeattribute/TypeAttributeNonXsiPrefixTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directtofield/typeattribute/TypeAttributeNonXsiPrefixTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -18,7 +18,7 @@ public class TypeAttributeNonXsiPrefixTestCases extends XMLMappingTestCases { private final static String XML_RESOURCE = "org/eclipse/persistence/testing/oxm/mappings/directtofield/typeattribute/TypeAttributeNonXsiPrefix.xml"; - private final static Integer CONTROL_ID = new Integer(123); + private final static Integer CONTROL_ID = Integer.valueOf(123); private final static String CONTROL_FIRST_NAME = "Jane"; private final static String CONTROL_LAST_NAME = "Doe"; diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directtofield/typeattribute/TypeAttributeNullTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directtofield/typeattribute/TypeAttributeNullTestCases.java index b2870ac17d4..b32c7aed11c 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directtofield/typeattribute/TypeAttributeNullTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directtofield/typeattribute/TypeAttributeNullTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -31,7 +31,7 @@ protected Object getControlObject() { Employee employee = new Employee(); Identifier id = new Identifier(); id.setInitials("AAA"); - id.setSinNumber(new Integer(123)); + id.setSinNumber(Integer.valueOf(123)); employee.setIdentifier(id); employee.setFirstName(CONTROL_FIRST_NAME); employee.setLastName(CONTROL_LAST_NAME); diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directtofield/typeattribute/TypeAttributeUserTypeNamespaceOnChildTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directtofield/typeattribute/TypeAttributeUserTypeNamespaceOnChildTestCases.java index 63f60a3f261..3a57a710cc3 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directtofield/typeattribute/TypeAttributeUserTypeNamespaceOnChildTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directtofield/typeattribute/TypeAttributeUserTypeNamespaceOnChildTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -18,7 +18,7 @@ public class TypeAttributeUserTypeNamespaceOnChildTestCases extends XMLMappingTestCases { private final static String XML_RESOURCE = "org/eclipse/persistence/testing/oxm/mappings/directtofield/typeattribute/TypeAttributeUserType1.xml"; - private final static Integer CONTROL_ID = new Integer(123); + private final static Integer CONTROL_ID = Integer.valueOf(123); private final static String CONTROL_FIRST_NAME = "Jane"; private final static String CONTROL_LAST_NAME = "Doe"; diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directtofield/typeattribute/TypeAttributeUserTypeNamespaceOnParentTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directtofield/typeattribute/TypeAttributeUserTypeNamespaceOnParentTestCases.java index 8acf91dac20..1f21bb7dce3 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directtofield/typeattribute/TypeAttributeUserTypeNamespaceOnParentTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directtofield/typeattribute/TypeAttributeUserTypeNamespaceOnParentTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -18,7 +18,7 @@ public class TypeAttributeUserTypeNamespaceOnParentTestCases extends XMLMappingTestCases { private final static String XML_RESOURCE = "org/eclipse/persistence/testing/oxm/mappings/directtofield/typeattribute/TypeAttributeUserType2.xml"; - private final static Integer CONTROL_ID = new Integer(123); + private final static Integer CONTROL_ID = Integer.valueOf(123); private final static String CONTROL_FIRST_NAME = "Jane"; private final static String CONTROL_LAST_NAME = "Doe"; diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directtofield/union/UnionWithTypeAttributeTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directtofield/union/UnionWithTypeAttributeTestCases.java index 7a6026abc6a..d092af05854 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directtofield/union/UnionWithTypeAttributeTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/directtofield/union/UnionWithTypeAttributeTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -25,7 +25,7 @@ public class UnionWithTypeAttributeTestCases extends XMLMappingTestCases { private final static String XML_RESOURCE = "org/eclipse/persistence/testing/oxm/mappings/directtofield/union/UnionWithTypeAttribute.xml"; - protected final static Integer CONTROL_AGE = new Integer(10); + protected final static Integer CONTROL_AGE = Integer.valueOf(10); protected final static String CONTROL_FIRST_NAME = "Jane"; protected final static String CONTROL_LAST_NAME = "Doe"; diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/simpletypes/typetranslator/childelement/TypeTranslatorTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/simpletypes/typetranslator/childelement/TypeTranslatorTestCases.java index 759ea690711..973cae60622 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/simpletypes/typetranslator/childelement/TypeTranslatorTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/simpletypes/typetranslator/childelement/TypeTranslatorTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -25,7 +25,7 @@ public class TypeTranslatorTestCases extends XMLMappingTestCases { private final static String XML_RESOURCE = "org/eclipse/persistence/testing/oxm/mappings/simpletypes/typetranslator/TypeTranslatorTest.xml"; private final static String CONTROL_EMPLOYEE_NAME = "Jane Doh"; - private final static Integer CONTROL_EMPLOYEE_PHONE = new Integer(4441234); + private final static Integer CONTROL_EMPLOYEE_PHONE = Integer.valueOf(4441234); private XMLMarshaller xmlMarshaller; public TypeTranslatorTestCases(String name) throws Exception { diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/simpletypes/typetranslator/rootelement/TypeTranslatorTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/simpletypes/typetranslator/rootelement/TypeTranslatorTestCases.java index cb558c74f31..c21e48434fd 100644 --- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/simpletypes/typetranslator/rootelement/TypeTranslatorTestCases.java +++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/simpletypes/typetranslator/rootelement/TypeTranslatorTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -41,7 +41,7 @@ protected Object getControlObject() { Byte[] byteObjects = new Byte[bytes.length]; for(int i=0; i getControlTypes() { //prop.setAttribute(true); //prop.setElement(false); prop.setXsd(true); - prop.setDefault(new Integer(0)); + prop.setDefault(Integer.valueOf(0)); prop.setXsdLocalName("myAttr"); customerSDOType.addDeclaredProperty(prop); @@ -67,7 +67,7 @@ public List getControlTypes() { //prop2.setElement(true); prop2.setInstanceProperty(SDOConstants.XMLELEMENT_PROPERTY, Boolean.TRUE); prop2.setXsd(true); - prop2.setDefault(new Integer(0)); + prop2.setDefault(Integer.valueOf(0)); prop2.setXsdLocalName("myNonSpecified"); prop2.setXsdType(XMLConstants.INT_QNAME); @@ -86,7 +86,7 @@ public List getControlTypes() { prop3.setXsdLocalName("myNonNillable"); prop3.setContainment(true); - prop3.setDefault(new Integer(0)); + prop3.setDefault(Integer.valueOf(0)); customerSDOType.addDeclaredProperty(prop3); @@ -95,7 +95,7 @@ public List getControlTypes() { prop4.setType(intType); //prop4.setAttribute(false); prop4.setXsd(true); - prop4.setDefault(new Integer(0)); + prop4.setDefault(Integer.valueOf(0)); prop4.setContainment(true); //prop4.setElement(true); diff --git a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetBooleanByPositionalPathTest.java b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetBooleanByPositionalPathTest.java index abb3187e14e..4fe41af2184 100644 --- a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetBooleanByPositionalPathTest.java +++ b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetBooleanByPositionalPathTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -39,7 +39,7 @@ public void testGetBooleanConversionWithPathFromDefinedBooleanPropertyBracketPos ((SDOProperty)dataObject_c.getInstanceProperty(PROPERTY_NAME_C)).setType(SDOConstants.SDO_BOOLEAN); ((SDOProperty)dataObject_c.getInstanceProperty(PROPERTY_NAME_C)).setMany(true); - Boolean bb = new Boolean(true); + Boolean bb = Boolean.valueOf(true); List b = new ArrayList(); //b.add(bb); @@ -57,7 +57,7 @@ public void testGetBooleanConversionWithPathFromDefinedBooleanPropertyDotPositio ((SDOProperty)dataObject_c.getInstanceProperty(PROPERTY_NAME_C)).setType(SDOConstants.SDO_BOOLEAN); ((SDOProperty)dataObject_c.getInstanceProperty(PROPERTY_NAME_C)).setMany(true); - Boolean bb = new Boolean(true); + Boolean bb = Boolean.valueOf(true); List b = new ArrayList(); dataObject_c.set(property_c, b);// c dataobject's a property has value boolean 'true' @@ -74,7 +74,7 @@ public void testGetBooleanConversionWithPathFromDefinedBooleanPropertyDotPositio public void testGetBooleanConversionWithPathFromDefinedBooleanPropertyBracketInPathMiddle() { ((SDOProperty)dataObject_c.getInstanceProperty(PROPERTY_NAME_C)).setType(SDOConstants.SDO_BOOLEAN); - Boolean b = new Boolean(true); + Boolean b = Boolean.valueOf(true); dataObject_a.setBoolean(property1, true);// c dataobject's a property has value boolean 'true' @@ -89,7 +89,7 @@ public void testGetBooleanConversionWithPathFromDefinedBooleanPropertyBracketInP type_c.addDeclaredProperty(property_c); dataObject_c.setType(type_c); - Boolean bb = new Boolean(true); + Boolean bb = Boolean.valueOf(true); List b = new ArrayList(); dataObject_c.set(property_c, b);// c dataobject's a property has value boolean 'true' @@ -225,7 +225,7 @@ public void testGetBooleanConversionFromDefinedStringProperty() { ((SDOProperty)dataObject_c.getInstanceProperty(PROPERTY_NAME_C)).setType(SDOConstants.SDO_STRING); String str = "true"; - Boolean B_STR = new Boolean(str); + Boolean B_STR = Boolean.valueOf(str); dataObject_c.setString(property_c, str);// add it to instance list this.assertEquals(B_STR.booleanValue(), dataObject_a.getBoolean(property)); @@ -238,7 +238,7 @@ public void testGetBooleanConversionWithPathFromDefinedBooleanStringBracketPosit ((SDOProperty)dataObject_c.getInstanceProperty(PROPERTY_NAME_C)).setMany(true); String str = "true"; - Boolean bb = new Boolean(str); + Boolean bb = Boolean.valueOf(str); List b = new ArrayList(); //b.add(bb); @@ -258,7 +258,7 @@ public void testGetBooleanConversionWithPathFromDefinedStringPropertyDotPosition ((SDOProperty)dataObject_c.getInstanceProperty(PROPERTY_NAME_C)).setMany(true); String str = "true"; - Boolean bb = new Boolean(str); + Boolean bb = Boolean.valueOf(str); List b = new ArrayList(); dataObject_c.set(property_c, b);// c dataobject's a property has value boolean 'true' @@ -274,7 +274,7 @@ public void testGetBooleanConversionWithPathFromDefinedStringPropertyBracketInPa ((SDOProperty)dataObject_c.getInstanceProperty(PROPERTY_NAME_C)).setType(SDOConstants.SDO_BOOLEAN); String str = "true"; - Boolean b = new Boolean(str); + Boolean b = Boolean.valueOf(str); dataObject_a.set(property1, b);// c dataobject's a property has value boolean 'true' @@ -290,7 +290,7 @@ public void testGetBooleanConversionWithPathFromDefinedStringPropertyBracketInPa dataObject_c.setType(type_c); String str = "true"; - Boolean bb = new Boolean(str); + Boolean bb = Boolean.valueOf(str); List b = new ArrayList(); dataObject_c.set(property_c, b);// c dataobject's a property has value boolean 'true' diff --git a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetBooleanConversionTest.java b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetBooleanConversionTest.java index b1a2bf29e9a..09ece4211fd 100644 --- a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetBooleanConversionTest.java +++ b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetBooleanConversionTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -80,7 +80,7 @@ public void testGetBooleanFromCharacter() { SDOProperty property = ((SDOProperty)dataObject.getInstanceProperty(PROPERTY_NAME)); property.setType(SDOConstants.SDO_CHARACTER); - Character b = new Character('1'); + Character b = '1'; dataObject.setChar(property, b.charValue());// add it to instance list @@ -102,7 +102,7 @@ public void testGetBooleanFromDouble() { SDOProperty property = ((SDOProperty)dataObject.getInstanceProperty(PROPERTY_NAME)); property.setType(SDOConstants.SDO_DOUBLE); - Double b = new Double(0); + Double b = (double) 0; dataObject.setDouble(property, b.doubleValue());// add it to instance list @@ -124,7 +124,7 @@ public void testGetBooleanFromFloat() { SDOProperty property = ((SDOProperty)dataObject.getInstanceProperty(PROPERTY_NAME)); property.setType(SDOConstants.SDO_FLOAT); - Float b = new Float(1.20); + Float b = 1.20f; dataObject.setFloat(property, b.floatValue());// add it to instance list @@ -146,7 +146,7 @@ public void testGetBooleanFromInt() { SDOProperty property = ((SDOProperty)dataObject.getInstanceProperty(PROPERTY_NAME)); property.setType(SDOConstants.SDO_INT); - Integer b = new Integer(0); + Integer b = 0; dataObject.setInt(property, b.intValue());// add it to instance list @@ -168,7 +168,7 @@ public void testGetBooleanFromLong() { SDOProperty property = ((SDOProperty)dataObject.getInstanceProperty(PROPERTY_NAME)); property.setType(SDOConstants.SDO_LONG); - Double b = new Double(0); + Double b = 0.0; dataObject.setDouble(property, b.doubleValue());// add it to instance list @@ -191,7 +191,7 @@ public void testGetBooleanFromShort() { property.setType(SDOConstants.SDO_SHORT); short s = 12; - Short b = new Short(s); + Short b = Short.valueOf(s); dataObject.setShort(property, b.shortValue());// add it to instance list @@ -215,7 +215,7 @@ public void testGetBooleanConversionFromDefinedStringProperty() { property.setType(SDOConstants.SDO_STRING); String str = "true"; - Boolean B_STR = new Boolean(str); + Boolean B_STR = Boolean.valueOf(str); dataObject.setString(property, str);// add it to instance list assertEquals(B_STR.booleanValue(), dataObject.getBoolean(property)); @@ -315,7 +315,7 @@ public void testGetBooleanConversionFromDefinedBooleanObjectProperty() { public void testGetBooleanFromByteObject() { SDOProperty property = (SDOProperty)dataObject.getInstanceProperty(PROPERTY_NAME); property.setType(SDOConstants.SDO_BYTEOBJECT); - Byte theValue = new Byte("10"); + Byte theValue = Byte.valueOf("10"); dataObject.set(property, theValue); try { boolean value = dataObject.getBoolean(property); @@ -332,7 +332,7 @@ public void testGetBooleanFromCharacterObject() { SDOProperty property = (SDOProperty)dataObject.getInstanceProperty(PROPERTY_NAME); property.setType(SDOConstants.SDO_CHARACTEROBJECT); - Character b = new Character('1'); + Character b = Character.valueOf('1'); dataObject.setChar(property, b.charValue());// add it to instance list @@ -354,7 +354,7 @@ public void testGetBooleanFromDoubleObject() { SDOProperty property = ((SDOProperty)dataObject.getInstanceProperty(PROPERTY_NAME)); property.setType(SDOConstants.SDO_DOUBLEOBJECT); - Double b = new Double(0); + Double b = Double.valueOf(0); dataObject.setDouble(property, b.doubleValue());// add it to instance list @@ -375,7 +375,7 @@ public void testGetBooleanFromFloatObject() { SDOProperty property = ((SDOProperty)dataObject.getInstanceProperty(PROPERTY_NAME)); property.setType(SDOConstants.SDO_FLOATOBJECT); - Float b = new Float(1.20); + Float b = 1.20f; dataObject.setFloat(property, b.floatValue());// add it to instance list @@ -397,7 +397,7 @@ public void testGetBooleanFromIntObject() { SDOProperty property = ((SDOProperty)dataObject.getInstanceProperty(PROPERTY_NAME)); property.setType(SDOConstants.SDO_INTOBJECT); - Integer b = new Integer(0); + Integer b = Integer.valueOf(0); dataObject.setInt(property, b.intValue());// add it to instance list @@ -419,7 +419,7 @@ public void testGetBooleanFromShortObject() { property.setType(SDOConstants.SDO_SHORTOBJECT); short s = 12; - Short b = new Short(s); + Short b = Short.valueOf(s); dataObject.setShort(property, b.shortValue());// add it to instance list @@ -441,7 +441,7 @@ public void testGetBooleanFromCharacterT() { SDOProperty property = ((SDOProperty)dataObject.getInstanceProperty(PROPERTY_NAME)); property.setType(SDOConstants.SDO_CHARACTEROBJECT); - Character b = new Character('t'); + Character b = Character.valueOf('t'); dataObject.setChar(property, b.charValue());// add it to instance list @@ -460,7 +460,7 @@ public void testGetBooleanFromCharacterF() { SDOProperty property = ((SDOProperty)dataObject.getInstanceProperty(PROPERTY_NAME)); property.setType(SDOConstants.SDO_CHARACTEROBJECT); - Character b = new Character('f'); + Character b = Character.valueOf('f'); dataObject.setChar(property, b.charValue());// add it to instance list diff --git a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetBooleanConversionWithPathTest.java b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetBooleanConversionWithPathTest.java index c74bb1d5b47..d9f2926105a 100644 --- a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetBooleanConversionWithPathTest.java +++ b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetBooleanConversionWithPathTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -94,7 +94,7 @@ public void testGetBooleanFromCharacterT() { char s = 't'; - //Short c = new Short(s); + //Short c = Short.valueOf(s); dataObject_a.setChar(property, s);// c dataobject's a property has value boolean 'true' try { @@ -128,7 +128,7 @@ public void testGetBooleanFromCharacterF() { char s = 'f'; - //Short c = new Short(s); + //Short c = Short.valueOf(s); dataObject_a.setChar(property, s);// c dataobject's a property has value boolean 'true' try { @@ -151,7 +151,7 @@ public void testGetBooleanFromDouble() { double s = 0; - //Short c = new Short(s); + //Short c = Short.valueOf(s); dataObject_a.setDouble(property, s);// c dataobject's a property has value boolean 'true' this.assertEquals(false, dataObject_a.getBoolean(property)); @@ -177,9 +177,9 @@ public void testGetBooleanFromFloat() { type_c.addDeclaredProperty(property_c); dataObject_c._setType(type_c); - Float s = new Float(0); + Float s = Float.valueOf(0); - //Short c = new Short(s); + //Short c = Short.valueOf(s); dataObject_a.setFloat(property, s.floatValue());// c dataobject's a property has value boolean 'true' this.assertEquals(false, dataObject_a.getBoolean(property)); @@ -207,7 +207,7 @@ public void testGetBooleanFromInt() { int s = 1; - //Short c = new Short(s); + //Short c = Short.valueOf(s); dataObject_a.setInt(property, s);// c dataobject's a property has value boolean 'true' this.assertEquals(true, dataObject_a.getBoolean(property)); @@ -235,7 +235,7 @@ public void testGetBooleanFromLong() { long s = 0; - //Short c = new Short(s); + //Short c = Short.valueOf(s); dataObject_a.setLong(property, s);// c dataobject's a property has value boolean 'true' this.assertEquals(false, dataObject_a.getBoolean(property)); @@ -263,7 +263,7 @@ public void testGetBooleanFromShort() { short s = 0; - //Short c = new Short(s); + //Short c = Short.valueOf(s); dataObject_a.setShort(property, s);// c dataobject's a property has value boolean 'true' this.assertEquals(false, dataObject_a.getBoolean(property)); @@ -290,7 +290,7 @@ public void testGetBooleanConversionFromDefinedStringProperty() { dataObject_c._setType(type_c); String str = "true"; - Boolean B_STR = new Boolean(str); + Boolean B_STR = Boolean.valueOf(str); dataObject_a.setString(property, str);// add it to instance list this.assertEquals(B_STR.booleanValue(), dataObject_a.getBoolean("PName-a/PName-b/PName-c")); diff --git a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetBooleanWithIndexConversionTest.java b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetBooleanWithIndexConversionTest.java index 05a245d7c8d..27c56535fe1 100644 --- a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetBooleanWithIndexConversionTest.java +++ b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetBooleanWithIndexConversionTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -79,7 +79,7 @@ public void testGetBooleanFromCharacter() { SDOProperty property = ((SDOProperty)type.getProperty(PROPERTY_NAME)); property.setType(SDOConstants.SDO_CHARACTER); - Character b = new Character('0'); + Character b = Character.valueOf('0'); dataObject.setChar(PROPERTY_INDEX, b.charValue());// add it to instance list @@ -102,7 +102,7 @@ public void testGetBooleanFromDouble() { SDOProperty property = ((SDOProperty)type.getProperty(PROPERTY_NAME)); property.setType(SDOConstants.SDO_DOUBLE); - Double b = new Double(0); + Double b = Double.valueOf(0); dataObject.setDouble(PROPERTY_INDEX, b.doubleValue());// add it to instance list @@ -125,7 +125,7 @@ public void testGetBooleanFromFloat() { SDOProperty property = ((SDOProperty)type.getProperty(PROPERTY_NAME)); property.setType(SDOConstants.SDO_FLOAT); - Float b = new Float(1.01); + Float b = 1.01f; dataObject.setFloat(PROPERTY_INDEX, b.floatValue());// add it to instance list @@ -148,7 +148,7 @@ public void testGetBooleanFromInt() { SDOProperty property = ((SDOProperty)type.getProperty(PROPERTY_NAME)); property.setType(SDOConstants.SDO_INT); - Integer b = new Integer(1); + Integer b = Integer.valueOf(1); dataObject.setLong(PROPERTY_INDEX, b.intValue());// add it to instance list @@ -171,7 +171,7 @@ public void testGetBooleanFromLong() { SDOProperty property = ((SDOProperty)type.getProperty(PROPERTY_NAME)); property.setType(SDOConstants.SDO_LONG); - Long b = new Long(1); + Long b = Long.valueOf(1); dataObject.setLong(PROPERTY_INDEX, b.longValue());// add it to instance list @@ -211,7 +211,7 @@ public void testGetBooleanConversionFromDefinedStringProperty() { property.setType(SDOConstants.SDO_STRING); String str = "true"; - Boolean B_STR = new Boolean(str); + Boolean B_STR = Boolean.valueOf(str); dataObject.setString(PROPERTY_INDEX, str);// add it to instance list this.assertEquals(B_STR.booleanValue(), dataObject.getBoolean(PROPERTY_INDEX)); diff --git a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetByteByPositionalPathTest.java b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetByteByPositionalPathTest.java index c5f94a59ad3..93ed50982be 100644 --- a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetByteByPositionalPathTest.java +++ b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetByteByPositionalPathTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -206,7 +206,7 @@ public void testGetByteConversionFromDefinedStringProperty() { ((SDOProperty)dataObject_c.getInstanceProperty(PROPERTY_NAME_C)).setType(SDOConstants.SDO_STRING); String str = "12"; - Byte s_d = new Byte(str); + Byte s_d = Byte.valueOf(str); dataObject_a.setString(propertyPath_a_b_c, str);// add it to instance list this.assertEquals(s_d.byteValue(), dataObject_a.getByte(property)); diff --git a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetByteConversionTest.java b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetByteConversionTest.java index 03b942d03a9..6747c36c27d 100644 --- a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetByteConversionTest.java +++ b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetByteConversionTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -215,7 +215,7 @@ public void testGetByteConversionFromDefinedStringProperty() { property.setType(SDOConstants.SDO_STRING); String str = "12"; - Byte s_d = new Byte(str); + Byte s_d = Byte.valueOf(str); dataObject.setString(property, str);// add it to instance list this.assertEquals(s_d.byteValue(), dataObject.getByte(property)); diff --git a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetByteConversionWithPathTest.java b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetByteConversionWithPathTest.java index 2a6fe1d6fa8..00653f56543 100644 --- a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetByteConversionWithPathTest.java +++ b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetByteConversionWithPathTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -246,7 +246,7 @@ public void testGetByteConversionFromDefinedStringProperty() { dataObject_c._setType(type_c); String str = "12"; - Byte s_d = new Byte(str); + Byte s_d = Byte.valueOf(str); dataObject_a.setString(propertyPath_a_b_c, str);// add it to instance list this.assertEquals(s_d.byteValue(), dataObject_a.getByte(property)); diff --git a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetByteWithIndexConversionTest.java b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetByteWithIndexConversionTest.java index deea1d6efd4..f1835d1a56a 100644 --- a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetByteWithIndexConversionTest.java +++ b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetByteWithIndexConversionTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -155,7 +155,7 @@ public void testGetByteConversionFromDefinedStringProperty() { property.setType(SDOConstants.SDO_STRING); String str = "12"; - Byte s_d = new Byte(str); + Byte s_d = Byte.valueOf(str); dataObject.setString(PROPERTY_INDEX, str);// add it to instance list this.assertEquals(s_d.byteValue(), dataObject.getByte(PROPERTY_INDEX)); diff --git a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetCharacterByPositionalPathTest.java b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetCharacterByPositionalPathTest.java index b90308ea5e7..ba611a0d158 100644 --- a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetCharacterByPositionalPathTest.java +++ b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetCharacterByPositionalPathTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -230,7 +230,7 @@ public void testGetCharacterConversionFromDefinedStringProperty() { ((SDOProperty)dataObject_c.getInstanceProperty(PROPERTY_NAME_C)).setType(SDOConstants.SDO_STRING); char str = 'c'; - Character B_STR = new Character(str); + Character B_STR = Character.valueOf(str); dataObject_a.setString(propertyPath_a_b_c, B_STR.toString());// add it to instance list this.assertEquals(str, dataObject_a.getChar(property)); diff --git a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetCharacterConversionTest.java b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetCharacterConversionTest.java index c43d886f708..99dc8506cd9 100644 --- a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetCharacterConversionTest.java +++ b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetCharacterConversionTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -168,7 +168,7 @@ public void testGetCharacterConversionFromDefinedStringProperty() { property.setType(SDOConstants.SDO_STRING); char str = 'c'; - Character B_STR = new Character(str); + Character B_STR = Character.valueOf(str); dataObject.setString(property, B_STR.toString());// add it to instance list this.assertEquals(str, dataObject.getChar(property)); @@ -268,7 +268,7 @@ public void testGetCharacterObjectFromBoolean() { public void testGetCharacterFromByteObject() { SDOProperty property = (SDOProperty)dataObject.getInstanceProperty(PROPERTY_NAME); property.setType(SDOConstants.SDO_BYTEOBJECT); - Byte theValue = new Byte("10"); + Byte theValue = Byte.valueOf("10"); dataObject.set(property, theValue); try { char value = dataObject.getChar(property); @@ -292,7 +292,7 @@ public void testGetCharacterConversionFromDefinedCharacterObject() { public void testGetCharacterFromDoubleObject() { SDOProperty property = (SDOProperty)dataObject.getInstanceProperty(PROPERTY_NAME); property.setType(SDOConstants.SDO_DOUBLEOBJECT); - Double theValue = new Double("1"); + Double theValue = Double.valueOf("1"); dataObject.set(property, theValue); try { char value = dataObject.getChar(property); @@ -306,7 +306,7 @@ public void testGetCharacterFromDoubleObject() { public void testGetCharacterFromFloatObject() { SDOProperty property = (SDOProperty)dataObject.getInstanceProperty(PROPERTY_NAME); property.setType(SDOConstants.SDO_FLOATOBJECT); - Float theValue = new Float("1"); + Float theValue = Float.valueOf("1"); dataObject.set(property, theValue); try { @@ -322,7 +322,7 @@ public void testGetCharacterFromFloatObject() { public void testGetCharacterFromIntObject() { SDOProperty property = (SDOProperty)dataObject.getInstanceProperty(PROPERTY_NAME); property.setType(SDOConstants.SDO_INTOBJECT); - Integer theValue = new Integer("1"); + Integer theValue = Integer.valueOf("1"); dataObject.set(property, theValue); try { @@ -338,7 +338,7 @@ public void testGetCharacterFromIntObject() { public void testGetCharacterFromLongObject() { SDOProperty property = (SDOProperty)dataObject.getInstanceProperty(PROPERTY_NAME); property.setType(SDOConstants.SDO_LONGOBJECT); - Long theValue = new Long("1"); + Long theValue = Long.valueOf("1"); dataObject.set(property, theValue); try { @@ -354,7 +354,7 @@ public void testGetCharacterFromLongObject() { public void testGetCharacterFromShortObject() { SDOProperty property = (SDOProperty)dataObject.getInstanceProperty(PROPERTY_NAME); property.setType(SDOConstants.SDO_SHORTOBJECT); - Short theValue = new Short("1"); + Short theValue = Short.valueOf("1"); dataObject.set(property, theValue); try { char value = dataObject.getChar(property); diff --git a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetCharacterConversionWithPathTest.java b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetCharacterConversionWithPathTest.java index 34ccd9bc342..6448bdee6e9 100644 --- a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetCharacterConversionWithPathTest.java +++ b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetCharacterConversionWithPathTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -201,7 +201,7 @@ public void testGetCharacterConversionFromDefinedStringProperty() { dataObject_c._setType(type_c); char str = 'c'; - Character B_STR = new Character(str); + Character B_STR = Character.valueOf(str); dataObject_a.setString(propertyPath_a_b_c, B_STR.toString());// add it to instance list this.assertEquals(str, dataObject_a.getChar(property)); diff --git a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetCharacterWithIndexConversionTest.java b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetCharacterWithIndexConversionTest.java index 00ef0e372cf..7dad1b44331 100644 --- a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetCharacterWithIndexConversionTest.java +++ b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetCharacterWithIndexConversionTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -173,7 +173,7 @@ public void testGetCharacterConversionFromDefinedStringProperty() { type.addDeclaredProperty(property); char str = 'c'; - Character B_STR = new Character(str); + Character B_STR = Character.valueOf(str); dataObject.setString(PROPERTY_INDEX, B_STR.toString());// add it to instance list this.assertEquals(str, dataObject.getChar(PROPERTY_INDEX)); diff --git a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDataObjectByPositionalPathTest.java b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDataObjectByPositionalPathTest.java index 67f59805b75..c3385805bfd 100644 --- a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDataObjectByPositionalPathTest.java +++ b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDataObjectByPositionalPathTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -125,7 +125,7 @@ public void testGetDataObjectConversionFromUndefinedProperty() { ((SDOProperty)dataObject_c.getInstanceProperty(PROPERTY_NAME_C)).setType(SDOConstants.SDO_BOOLEAN); boolean c = true; - Boolean C = new Boolean(c); + Boolean C = Boolean.valueOf(c); dataObject_c.set(property_c, C); diff --git a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDataObjectConversionWithPathTest.java b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDataObjectConversionWithPathTest.java index c5fbdf4ff12..e1376f7942c 100644 --- a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDataObjectConversionWithPathTest.java +++ b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDataObjectConversionWithPathTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -62,7 +62,7 @@ public void testGetDataObjectConversionFromUndefinedProperty() { dataObject_c._setType(type_c); boolean c = true; - Boolean C = new Boolean(c); + Boolean C = Boolean.valueOf(c); dataObject_c.set(property_c, C); diff --git a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDateConversionTest.java b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDateConversionTest.java index 8378b8e17cd..dbb93a0fdb7 100644 --- a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDateConversionTest.java +++ b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDateConversionTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -211,7 +211,7 @@ public void testGetDateFromDecimal() { public void testGetDateFromInteger() { SDOProperty property = (SDOProperty)dataObject.getInstanceProperty(PROPERTY_NAME); property.setType(SDOConstants.SDO_INTEGER); - dataObject.set(property, new Integer(2)); + dataObject.set(property, Integer.valueOf(2)); try { dataObject.getDate(property); fail("ClassCastException should be thrown."); diff --git a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDateConversionWithPathTest.java b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDateConversionWithPathTest.java index 1e04bb65665..27c8fa3c5bf 100644 --- a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDateConversionWithPathTest.java +++ b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDateConversionWithPathTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -252,7 +252,7 @@ public void testGetDateFromInteger() { property_c.setType(SDOConstants.SDO_INTEGER); type_c.addDeclaredProperty(property_c); dataObject_c._setType(type_c); - Integer value = new Integer(3); + Integer value = Integer.valueOf(3); dataObject_c.set(property_c, value); try { dataObject_a.getDate(propertyPath_a_b_c); diff --git a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDateWithIndexConversionTest.java b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDateWithIndexConversionTest.java index 2d123e3c7e8..3786817b238 100644 --- a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDateWithIndexConversionTest.java +++ b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDateWithIndexConversionTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -202,7 +202,7 @@ public void testGetDateFromDecimal() { public void testGetDateFromInteger() { SDOProperty property = ((SDOProperty)type.getProperty(PROPERTY_NAME)); property.setType(SDOConstants.SDO_INTEGER); - dataObject.set(property, new Integer(2)); + dataObject.set(property, Integer.valueOf(2)); try { dataObject.getDate(PROPERTY_INDEX); fail("ClassCastException should be thrown."); diff --git a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDecimalConversionTest.java b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDecimalConversionTest.java index 497eeca8a7a..fe3050e858d 100644 --- a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDecimalConversionTest.java +++ b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDecimalConversionTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -64,7 +64,7 @@ public void testGetDecimalFromByte() { public void testGetDecimalFromCharacter() { SDOProperty property = (SDOProperty)dataObject.getInstanceProperty(PROPERTY_NAME); property.setType(SDOConstants.SDO_CHARACTER); - dataObject.set(property, new Character('y')); + dataObject.set(property, Character.valueOf('y')); try { dataObject.getBigDecimal(property); fail("ClassCastException should be thrown."); diff --git a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDecimalWithIndexConversionTest.java b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDecimalWithIndexConversionTest.java index 5397c232c27..d70dd59abff 100644 --- a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDecimalWithIndexConversionTest.java +++ b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDecimalWithIndexConversionTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -92,7 +92,7 @@ public void testGetIntConversionFromDefinedFloatProperty() { property.setName(PROPERTY_NAME); property.setType(SDOConstants.SDO_FLOAT); - Float fl = new Float(12); + Float fl = Float.valueOf(12); BigDecimal bd = new BigDecimal(fl); dataObject.setFloat(PROPERTY_INDEX, fl);// add it to instance list diff --git a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDoubleByPositionalPathTest.java b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDoubleByPositionalPathTest.java index 8746f4bca21..c85055b766a 100644 --- a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDoubleByPositionalPathTest.java +++ b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDoubleByPositionalPathTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -218,7 +218,7 @@ public void testGetDoubleConversionFromDefinedStringProperty() { // dataObject's type add int property ((SDOProperty)dataObject_c.getInstanceProperty(PROPERTY_NAME_C)).setType(SDOConstants.SDO_STRING); String str = "12"; - Double s_d = new Double(str); + Double s_d = Double.valueOf(str); double delta = 0.0; dataObject_a.setString(propertyPath_a_b_c, str);// add it to instance list diff --git a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDoubleConversionTest.java b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDoubleConversionTest.java index 30e0b0bbdeb..61dd786dc63 100644 --- a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDoubleConversionTest.java +++ b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDoubleConversionTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -222,7 +222,7 @@ public void testGetDoubleConversionFromDefinedStringProperty() { property.setType(SDOConstants.SDO_STRING); String str = "12"; - Double s_d = new Double(str); + Double s_d = Double.valueOf(str); double delta = 0.0; dataObject.setString(property, str);// add it to instance list diff --git a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDoubleConversionWithPathTest.java b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDoubleConversionWithPathTest.java index c2051393c6f..c37a71ee242 100644 --- a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDoubleConversionWithPathTest.java +++ b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDoubleConversionWithPathTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -260,7 +260,7 @@ public void testGetDoubleConversionFromDefinedStringProperty() { dataObject_c._setType(type_c); String str = "12"; - Double s_d = new Double(str); + Double s_d = Double.valueOf(str); double delta = 0.0; dataObject_a.setString(propertyPath_a_b_c, str);// add it to instance list diff --git a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDoubleWithIndexConversionTest.java b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDoubleWithIndexConversionTest.java index f3d741a3226..5b51b8bc64b 100644 --- a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDoubleWithIndexConversionTest.java +++ b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetDoubleWithIndexConversionTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -155,7 +155,7 @@ public void testGetDoubleConversionFromDefinedStringProperty() { property.setType(SDOConstants.SDO_STRING); String str = "12"; - Double s_d = new Double(str); + Double s_d = Double.valueOf(str); double delta = 0.0; dataObject.setString(PROPERTY_INDEX, str);// add it to instance list diff --git a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetFloatByPositionalPathTest.java b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetFloatByPositionalPathTest.java index 5388ea147f6..ca053c632c6 100644 --- a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetFloatByPositionalPathTest.java +++ b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetFloatByPositionalPathTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -219,7 +219,7 @@ public void testGetFloatConversionFromDefinedStringProperty() { ((SDOProperty)dataObject_c.getInstanceProperty(PROPERTY_NAME_C)).setType(SDOConstants.SDO_STRING); String str = "12"; - Float s_d = new Float(str); + Float s_d = Float.valueOf(str); float delta = 0; dataObject_a.setString(propertyPath_a_b_c, str);// add it to instance list diff --git a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetFloatConversionTest.java b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetFloatConversionTest.java index 339005b8afe..69e02690cad 100644 --- a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetFloatConversionTest.java +++ b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetFloatConversionTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -220,7 +220,7 @@ public void testGetFloatConversionFromDefinedStringProperty() { property.setType(SDOConstants.SDO_STRING); String str = "12"; - Float s_d = new Float(str); + Float s_d = Float.valueOf(str); float delta = 0; dataObject.setString(property, str);// add it to instance list @@ -356,7 +356,7 @@ public void testGetFloatConversionFromDefinedByteObject() { public void testGetFloatFromCharacterObject() { SDOProperty property = (SDOProperty)dataObject.getInstanceProperty(PROPERTY_NAME); property.setType(SDOConstants.SDO_CHARACTEROBJECT); - dataObject.set(property, new Character('y')); + dataObject.set(property, Character.valueOf('y')); try { dataObject.getFloat(property); fail("ClassCastException should be thrown."); diff --git a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetFloatConversionWithPathTest.java b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetFloatConversionWithPathTest.java index 9b98d9e1b16..66eb45889c0 100644 --- a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetFloatConversionWithPathTest.java +++ b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetFloatConversionWithPathTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -262,7 +262,7 @@ public void testGetFloatConversionFromDefinedStringProperty() { dataObject_c._setType(type_c); String str = "12"; - Float s_d = new Float(str); + Float s_d = Float.valueOf(str); float delta = 0; dataObject_a.setString(propertyPath_a_b_c, str);// add it to instance list diff --git a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetFloatWithIndexConversionTest.java b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetFloatWithIndexConversionTest.java index 0942656380d..8edeac3c2f4 100644 --- a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetFloatWithIndexConversionTest.java +++ b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetFloatWithIndexConversionTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -168,7 +168,7 @@ public void testGetFloatConversionFromDefinedStringProperty() { type.addDeclaredProperty(property); String str = "12"; - Float s_d = new Float(str); + Float s_d = Float.valueOf(str); float delta = 0; dataObject.setString(PROPERTY_INDEX, str);// add it to instance list diff --git a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetIntByPositionalPathTest.java b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetIntByPositionalPathTest.java index 45916ab0d60..a81320c93cd 100644 --- a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetIntByPositionalPathTest.java +++ b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetIntByPositionalPathTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -205,7 +205,7 @@ public void testGetIntConversionFromDefinedStringProperty() { ((SDOProperty)dataObject_c.getInstanceProperty(PROPERTY_NAME_C)).setType(SDOConstants.SDO_STRING); String str = "12"; - Integer s_d = new Integer(str); + Integer s_d = Integer.valueOf(str); dataObject_a.setString(propertyPath_a_b_c, str);// add it to instance list this.assertEquals(s_d.intValue(), dataObject_a.getInt(propertyPath_a_b_c)); diff --git a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetIntConversionTest.java b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetIntConversionTest.java index 8a93dfab0ee..193b663ce46 100644 --- a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetIntConversionTest.java +++ b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetIntConversionTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -227,7 +227,7 @@ public void testGetIntConversionFromDefinedStringProperty() { property.setType(SDOConstants.SDO_STRING); String str = "12"; - Integer s_d = new Integer(str); + Integer s_d = Integer.valueOf(str); dataObject.setString(property, str);// add it to instance list this.assertEquals(s_d.intValue(), dataObject.getInt(property)); diff --git a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetIntConversionWithPathTest.java b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetIntConversionWithPathTest.java index b16098b9d08..0e78a46a6ac 100644 --- a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetIntConversionWithPathTest.java +++ b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetIntConversionWithPathTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -254,7 +254,7 @@ public void testGetIntConversionFromDefinedStringProperty() { dataObject_c._setType(type_c); String str = "12"; - Integer s_d = new Integer(str); + Integer s_d = Integer.valueOf(str); dataObject_a.setString(propertyPath_a_b_c, str);// add it to instance list this.assertEquals(s_d.intValue(), dataObject_a.getInt(propertyPath_a_b_c)); diff --git a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetIntWithIndexConversionTest.java b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetIntWithIndexConversionTest.java index 36cbce7f8a7..e4ed9f50ced 100644 --- a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetIntWithIndexConversionTest.java +++ b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetIntWithIndexConversionTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -153,7 +153,7 @@ public void testGetIntConversionFromDefinedStringProperty() { property.setType(SDOConstants.SDO_STRING); String str = "12"; - Integer s_d = new Integer(str); + Integer s_d = Integer.valueOf(str); dataObject.setString(PROPERTY_INDEX, str);// add it to instance list this.assertEquals(s_d.intValue(), dataObject.getInt(PROPERTY_INDEX)); diff --git a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetListByPositionalPathTest.java b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetListByPositionalPathTest.java index 9a8ee860389..46f14a83c86 100644 --- a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetListByPositionalPathTest.java +++ b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetListByPositionalPathTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -30,7 +30,7 @@ public void testGetBooleanConversionWithPathFromDefinedBooleanPropertyBracketPos ((SDOProperty)dataObject_c.getInstanceProperty(PROPERTY_NAME_C)).setType(SDOConstants.SDO_BOOLEAN); ((SDOProperty)dataObject_c.getInstanceProperty(PROPERTY_NAME_C)).setMany(true); - Boolean bb = new Boolean(true); + Boolean bb = Boolean.valueOf(true); List b = new ArrayList(); //b.add(bb); @@ -65,7 +65,7 @@ public void testGetBooleanConversionWithPathFromDefinedBooleanPropertyDotPositio type_c.addDeclaredProperty(property_c); dataObject_c.setType(type_c); - Boolean bb = new Boolean(true); + Boolean bb = Boolean.valueOf(true); List b = new ArrayList(); dataObject_a.setList("PName-a/PName-b[number=1]/PName-c", b);// c dataobject's a property has value boolean 'true' diff --git a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetLongByPositionalPathTest.java b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetLongByPositionalPathTest.java index 36c6e887058..2deab390141 100644 --- a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetLongByPositionalPathTest.java +++ b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetLongByPositionalPathTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -201,7 +201,7 @@ public void testGetLongConversionFromDefinedStringProperty() { ((SDOProperty)dataObject_c.getInstanceProperty(PROPERTY_NAME_C)).setType(SDOConstants.SDO_STRING); String str = "12"; - Long s_d = new Long(str); + Long s_d = Long.valueOf(str); dataObject_a.setString(propertyPath_a_b_c, str);// add it to instance list this.assertEquals(s_d.longValue(), dataObject_a.getLong(propertyPath_a_b_c)); diff --git a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetLongConversionTest.java b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetLongConversionTest.java index 377eb6a2444..7425f69b19a 100644 --- a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetLongConversionTest.java +++ b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetLongConversionTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -214,7 +214,7 @@ public void testGetLongConversionFromDefinedStringProperty() { property.setType(SDOConstants.SDO_STRING); String str = "12"; - Long s_d = new Long(str); + Long s_d = Long.valueOf(str); dataObject.setString(property, str);// add it to instance list this.assertEquals(s_d.longValue(), dataObject.getLong(property)); @@ -360,7 +360,7 @@ public void testGetLongConversionFromDefinedByteObject() { public void testGetLongFromCharacterObject() { SDOProperty property = (SDOProperty)dataObject.getInstanceProperty(PROPERTY_NAME); property.setType(SDOConstants.SDO_CHARACTEROBJECT); - dataObject.set(property, new Character('v')); + dataObject.set(property, Character.valueOf('v')); try { dataObject.getLong(property); fail("ClassCastException should be thrown."); diff --git a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetLongConversionWithPathTest.java b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetLongConversionWithPathTest.java index 4177b524e81..3506c36b242 100644 --- a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetLongConversionWithPathTest.java +++ b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetLongConversionWithPathTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -254,7 +254,7 @@ public void testGetLongConversionFromDefinedStringProperty() { dataObject_c._setType(type_c); String str = "12"; - Long s_d = new Long(str); + Long s_d = Long.valueOf(str); dataObject_a.setString(propertyPath_a_b_c, str);// add it to instance list this.assertEquals(s_d.longValue(), dataObject_a.getLong(propertyPath_a_b_c)); diff --git a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetLongWithIndexConversionTest.java b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetLongWithIndexConversionTest.java index dfd9fc5e8db..b176e2ce53e 100644 --- a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetLongWithIndexConversionTest.java +++ b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetLongWithIndexConversionTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -153,7 +153,7 @@ public void testGetLongConversionFromDefinedStringProperty() { property.setType(SDOConstants.SDO_STRING); String str = "12"; - Long s_d = new Long(str); + Long s_d = Long.valueOf(str); dataObject.setString(PROPERTY_INDEX, str);// add it to instance list this.assertEquals(s_d.longValue(), dataObject.getLong(PROPERTY_INDEX)); diff --git a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetShortByPositionalPathTest.java b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetShortByPositionalPathTest.java index a44226fe6f8..888df2b36b3 100644 --- a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetShortByPositionalPathTest.java +++ b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetShortByPositionalPathTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -214,7 +214,7 @@ public void testGetShortConversionFromDefinedStringProperty() { ((SDOProperty)dataObject_c.getInstanceProperty(PROPERTY_NAME_C)).setType(SDOConstants.SDO_STRING); String str = "12"; - Short s_d = new Short(str); + Short s_d = Short.valueOf(str); dataObject_a.setString(propertyPath_a_b_c, str);// add it to instance list this.assertEquals(s_d.shortValue(), dataObject_a.getShort(propertyPath_a_b_c)); diff --git a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetShortConversionTest.java b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetShortConversionTest.java index aa6a4c1a17d..df9eab6e1db 100644 --- a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetShortConversionTest.java +++ b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetShortConversionTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -215,7 +215,7 @@ public void testGetShortConversionFromDefinedStringProperty() { property.setType(SDOConstants.SDO_STRING); String str = "12"; - Short s_d = new Short(str); + Short s_d = Short.valueOf(str); dataObject.setString(property, str);// add it to instance list this.assertEquals(s_d.shortValue(), dataObject.getShort(property)); @@ -265,7 +265,7 @@ public void testGetShortFromDecimal() { public void testGetShortFromInteger() { SDOProperty property = (SDOProperty)dataObject.getInstanceProperty(PROPERTY_NAME); property.setType(SDOConstants.SDO_INTEGER); - dataObject.set(property, new Integer("123")); + dataObject.set(property, Integer.valueOf("123")); try { short value = dataObject.getShort(property); //TODO: conversion not supported by sdo spec but is supported by TopLink @@ -324,7 +324,7 @@ public void testGetShortConversionFromDefinedBytePbject() { public void testGetShortFromCharacterObject() { SDOProperty property = (SDOProperty)dataObject.getInstanceProperty(PROPERTY_NAME); property.setType(SDOConstants.SDO_CHARACTEROBJECT); - dataObject.set(property,new Character('a')); + dataObject.set(property,Character.valueOf('a')); try { dataObject.getShort(property); fail("ClassCastException should be thrown."); diff --git a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetShortConversionWithPathTest.java b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetShortConversionWithPathTest.java index d7aace72a27..87962ac89a0 100644 --- a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetShortConversionWithPathTest.java +++ b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetShortConversionWithPathTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -254,7 +254,7 @@ public void testGetShortConversionFromDefinedStringProperty() { dataObject_c._setType(type_c); String str = "12"; - Short s_d = new Short(str); + Short s_d = Short.valueOf(str); dataObject_a.setString(propertyPath_a_b_c, str);// add it to instance list this.assertEquals(s_d.shortValue(), dataObject_a.getShort(propertyPath_a_b_c)); diff --git a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetShortWithIndexConversionTest.java b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetShortWithIndexConversionTest.java index c95490019f1..3e7bc906491 100644 --- a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetShortWithIndexConversionTest.java +++ b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetShortWithIndexConversionTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -148,7 +148,7 @@ public void testGetShortConversionFromDefinedStringProperty() { property.setType(SDOConstants.SDO_STRING); String str = "12"; - Short s_d = new Short(str); + Short s_d = Short.valueOf(str); dataObject.setString(PROPERTY_INDEX, str);// add it to instance list this.assertEquals(s_d.shortValue(), dataObject.getShort(PROPERTY_INDEX)); diff --git a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetStringByPositionalPathTest.java b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetStringByPositionalPathTest.java index bdf0c116256..b0032d8a39a 100644 --- a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetStringByPositionalPathTest.java +++ b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetStringByPositionalPathTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -43,7 +43,7 @@ public void testGetStringConversionFromDefinedBoolean() { ((SDOProperty)dataObject_c.getInstanceProperty(PROPERTY_NAME_C)).setType(SDOConstants.SDO_BOOLEAN); boolean str = true; - Boolean B_STR = new Boolean(str); + Boolean B_STR = Boolean.valueOf(str); dataObject_a.setBoolean(propertyPath_a_b_c, str);// add it to instance list this.assertEquals(B_STR.toString(), dataObject_a.getString(propertyPath_a_b_c)); diff --git a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetStringConversion.java b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetStringConversion.java index 878be4af337..09582ae2d91 100644 --- a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetStringConversion.java +++ b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetStringConversion.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -44,7 +44,7 @@ public void testGetStringConversionFromDefinedBoolean() { property.setType(SDOConstants.SDO_BOOLEAN); boolean str = true; - Boolean B_STR = new Boolean(str); + Boolean B_STR = Boolean.valueOf(str); dataObject.setBoolean(property, str);// add it to instance list this.assertEquals(B_STR.toString(), dataObject.getString(property)); diff --git a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetStringConversionWithPathTest.java b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetStringConversionWithPathTest.java index 9e4e2d55674..5d0699d761d 100644 --- a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetStringConversionWithPathTest.java +++ b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetStringConversionWithPathTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -44,7 +44,7 @@ public void testGetStringConversionFromDefinedBoolean() { dataObject_c._setType(type_c); boolean str = true; - Boolean B_STR = new Boolean(str); + Boolean B_STR = Boolean.valueOf(str); dataObject_a.setBoolean(propertyPath_a_b_c, str);// add it to instance list this.assertEquals(B_STR.toString(), dataObject_a.getString(propertyPath_a_b_c)); diff --git a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetStringWithIndexConversionTest.java b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetStringWithIndexConversionTest.java index b6f9d79b171..bc29c0b38e9 100644 --- a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetStringWithIndexConversionTest.java +++ b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetStringWithIndexConversionTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -44,7 +44,7 @@ public void testGetStringConversionFromDefinedBoolean() { property.setType(SDOConstants.SDO_BOOLEAN); boolean str = true; - Boolean B_STR = new Boolean(str); + Boolean B_STR = Boolean.valueOf(str); dataObject.setBoolean(PROPERTY_INDEX, str);// add it to instance list this.assertEquals(B_STR.toString(), dataObject.getString(PROPERTY_INDEX)); diff --git a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetWithPathTest.java b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetWithPathTest.java index 0281e33b222..3415ef68aab 100644 --- a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetWithPathTest.java +++ b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectGetWithPathTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -34,7 +34,7 @@ public void testGetConversionWithFullPath() { dataObject_c._setType(type_c); boolean c = true; - Boolean C = new Boolean(c); + Boolean C = Boolean.valueOf(c); //dataObject_a.setBoolean("PName-a/PName-b/PName-c", c);// c dataobject's a property has value boolean 'true' dataObject_a.set("PName-a/PName-b/PName-c", C); @@ -51,7 +51,7 @@ public void testGetBooleanConversionWithFullPath() { dataObject_c._setType(type_c); boolean c = true; - Boolean C = new Boolean(c); + Boolean C = Boolean.valueOf(c); dataObject_a.setBoolean("PName-a/PName-b/PName-c", c);// c dataobject's a property has value boolean 'true' //dataObject_a.set("PName-a/PName-b/PName-c", C); @@ -68,7 +68,7 @@ public void testSetConversionFromWrongPath() { dataObject_c_bNotSDODataOject._setType(type_c_bNotSDODataOject); boolean c = true; - Boolean C = new Boolean(c); + Boolean C = Boolean.valueOf(c); //dataObject_c_bNotSDODataOject.setBoolean(property_c_bNotSDODataOject, c);// c dataobject's a property has value boolean 'true' try { @@ -90,7 +90,7 @@ public void testSetBooleanConversionFromWrongPath() { dataObject_c_bNotSDODataOject._setType(type_c_bNotSDODataOject); boolean c = true; - //Boolean C = new Boolean(c); + //Boolean C = Boolean.valueOf(c); //dataObject_c_bNotSDODataOject.setBoolean(property_c_bNotSDODataOject, c);// c dataobject's a property has value boolean 'true' try { @@ -112,7 +112,7 @@ public void testGetBooleanConversionFromWrongPath() { dataObject_c_bNotSDODataOject._setType(type_c_bNotSDODataOject); boolean c = true; - //Boolean C = new Boolean(c); + //Boolean C = Boolean.valueOf(c); dataObject_c_bNotSDODataOject.setBoolean(property_c_bNotSDODataOject, c);// c dataobject's a property has value boolean 'true' assertNull(dataObject_a_bNotSDODataOject.get("PName-a/PName-b/PName-c")); @@ -123,7 +123,7 @@ public void testGetBooleanConversionFromWrongPath() { public void testGetBooleanConversionFromPathWithLength_1() { property_a_pathLength_1.setType(SDOConstants.SDO_BOOLEAN); boolean b = true; - Boolean B = new Boolean(b); + Boolean B = Boolean.valueOf(b); dataObject_a_pathLength_1.setBoolean("PName-a-length-1", b); @@ -175,7 +175,7 @@ public void testGetConversionWithNullValueInPath() { aDataObject_a.set(aProperty_a, aDataObject_b);// a dataobject's a property has value b dataobject aDataObject_b.set(aProperty_b, null);// b dataobject's b property has value c dataobject - //Boolean C = new Boolean(true); + //Boolean C = Boolean.valueOf(true); //dataObject_a.setBoolean("PName-a/PName-b/PName-c", true);// c dataobject's a property has value boolean 'true' // null pointer is not handled yet diff --git a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectOpenContentBug6011530TestCases.java b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectOpenContentBug6011530TestCases.java index 2bf0007d0cb..a95f02932e7 100644 --- a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectOpenContentBug6011530TestCases.java +++ b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SDODataObjectOpenContentBug6011530TestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -116,7 +116,7 @@ public void testSetDefineOpenContentManyPropertyContainmentChild() throws Except public void testSetDefineOpenContentManySimpleProperty() throws Exception { List value = new ArrayList(); - value.add(new Integer(4)); + value.add(Integer.valueOf(4)); rootDataObject.set("addressOpenContent", value); Property openProp = rootDataObject.getInstanceProperty("addressOpenContent"); assertNotNull(openProp); diff --git a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SetAndGetWithManyPropertyTestCases.java b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SetAndGetWithManyPropertyTestCases.java index b54fb69260c..b0442447f93 100644 --- a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SetAndGetWithManyPropertyTestCases.java +++ b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SetAndGetWithManyPropertyTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -53,7 +53,7 @@ public void testMyBigDecimalProperty() { DataObject myProp = myDO.createDataObject("property"); myProp.set("name", "myBigDecimal"); myProp.set("type", SDOConstants.SDO_DECIMAL); - myProp.set("many", new Boolean("true")); + myProp.set("many", Boolean.valueOf("true")); Type myDOType = typeHelper.define(myDO); SDOProperty prop = (SDOProperty) myDOType.getProperty("myBigDecimal"); double db = 12; @@ -75,7 +75,7 @@ public void testMyBigIntegerProperty() { DataObject myProp = myDO.createDataObject("property"); myProp.set("name", "myBigInteger"); myProp.set("type", SDOConstants.SDO_INTEGER); - myProp.set("many", new Boolean("true")); + myProp.set("many", Boolean.valueOf("true")); Type myDOType = typeHelper.define(myDO); SDOProperty prop = (SDOProperty) myDOType.getProperty("myBigInteger"); double db = 12; @@ -97,10 +97,10 @@ public void testMyBooleanProperty() { DataObject myProp = myDO.createDataObject("property"); myProp.set("name", "myBoolean"); myProp.set("type", SDOConstants.SDO_BOOLEAN); - myProp.set("many", new Boolean("true")); + myProp.set("many", Boolean.valueOf("true")); Type myDOType = typeHelper.define(myDO); SDOProperty prop = (SDOProperty) myDOType.getProperty("myBoolean"); - boolean b = new Boolean("true").booleanValue(); + boolean b = Boolean.valueOf("true").booleanValue(); myDO.setBoolean(prop, b); boolean myboolean = myDO.getBoolean(prop); assertTrue("Expected Boolean [" + b + "], but was [" + myboolean + "]", myboolean == b); @@ -117,10 +117,10 @@ public void testMyByteProperty() { DataObject myProp = myDO.createDataObject("property"); myProp.set("name", "myByte"); myProp.set("type", SDOConstants.SDO_BYTE); - myProp.set("many", new Boolean("true")); + myProp.set("many", Boolean.valueOf("true")); Type myDOType = typeHelper.define(myDO); SDOProperty prop = (SDOProperty) myDOType.getProperty("myByte"); - byte b = new Byte("8").byteValue(); + byte b = Byte.valueOf("8").byteValue(); myDO.setByte(prop, b); byte mybyte = myDO.getByte(prop); assertTrue("Expected byte [" + b + "], but was [" + mybyte + "]", mybyte == b); @@ -138,11 +138,11 @@ public void testMyBytesProperty() { DataObject myProp = myDO.createDataObject("property"); myProp.set("name", "myBytes"); myProp.set("type", SDOConstants.SDO_BYTES); - myProp.set("many", new Boolean("true")); + myProp.set("many", Boolean.valueOf("true")); Type myDOType = typeHelper.define(myDO); SDOProperty prop = (SDOProperty) myDOType.getProperty("myBytes"); - byte b1 = new Byte("16").byteValue(); - byte b2 = new Byte("8").byteValue(); + byte b1 = Byte.valueOf("16").byteValue(); + byte b2 = Byte.valueOf("8").byteValue(); byte[] bytes = new byte[] {b1, b2}; myDO.setBytes(prop, bytes); @@ -162,7 +162,7 @@ public void testMyCharProperty() { DataObject myProp = myDO.createDataObject("property"); myProp.set("name", "myChar"); myProp.set("type", SDOConstants.SDO_CHARACTER); - myProp.set("many", new Boolean("true")); + myProp.set("many", Boolean.valueOf("true")); Type myDOType = typeHelper.define(myDO); SDOProperty prop = (SDOProperty) myDOType.getProperty("myChar"); char c = 'x'; @@ -182,7 +182,7 @@ public void testMyDateProperty() { DataObject myProp = myDO.createDataObject("property"); myProp.set("name", "myDate"); myProp.set("type", SDOConstants.SDO_DATE); - myProp.set("many", new Boolean("true")); + myProp.set("many", Boolean.valueOf("true")); Type myDOType = typeHelper.define(myDO); Calendar controlCalendar = Calendar.getInstance(TimeZone.getTimeZone("GMT")); controlCalendar.clear(); @@ -208,7 +208,7 @@ public void testMyDoubleProperty() { DataObject myProp = myDO.createDataObject("property"); myProp.set("name", "myDouble"); myProp.set("type", SDOConstants.SDO_DOUBLE); - myProp.set("many", new Boolean("true")); + myProp.set("many", Boolean.valueOf("true")); Type myDOType = typeHelper.define(myDO); SDOProperty prop = (SDOProperty) myDOType.getProperty("myDouble"); double db = 12; @@ -228,7 +228,7 @@ public void testMyFloatProperty() { DataObject myProp = myDO.createDataObject("property"); myProp.set("name", "myFloat"); myProp.set("type", SDOConstants.SDO_FLOAT); - myProp.set("many", new Boolean("true")); + myProp.set("many", Boolean.valueOf("true")); Type myDOType = typeHelper.define(myDO); SDOProperty prop = (SDOProperty) myDOType.getProperty("myFloat"); float fl = 12; @@ -248,7 +248,7 @@ public void testMyIntProperty() { DataObject myProp = myDO.createDataObject("property"); myProp.set("name", "myInt"); myProp.set("type", SDOConstants.SDO_INT); - myProp.set("many", new Boolean("true")); + myProp.set("many", Boolean.valueOf("true")); Type myDOType = typeHelper.define(myDO); SDOProperty prop = (SDOProperty) myDOType.getProperty("myInt"); int i = 69; @@ -270,7 +270,7 @@ public void testMyLongProperty() { DataObject myProp = myDO.createDataObject("property"); myProp.set("name", "myLong"); myProp.set("type", SDOConstants.SDO_LONG); - myProp.set("many", new Boolean("true")); + myProp.set("many", Boolean.valueOf("true")); Type myDOType = typeHelper.define(myDO); SDOProperty prop = (SDOProperty) myDOType.getProperty("myLong"); long l = 666L; @@ -290,10 +290,10 @@ public void testMyShortProperty() { DataObject myProp = myDO.createDataObject("property"); myProp.set("name", "myShort"); myProp.set("type", SDOConstants.SDO_SHORT); - myProp.set("many", new Boolean("true")); + myProp.set("many", Boolean.valueOf("true")); Type myDOType = typeHelper.define(myDO); SDOProperty prop = (SDOProperty) myDOType.getProperty("myShort"); - short s = new Short("66").shortValue(); + short s = Short.valueOf("66").shortValue(); myDO.setShort(prop, s); short myshort = myDO.getShort(prop); assertTrue("Expected short [" + s + "], but was [" + myshort + "]", myshort == s); @@ -310,7 +310,7 @@ public void testMyStringProperty() { DataObject myProp = myDO.createDataObject("property"); myProp.set("name", "myString"); myProp.set("type", SDOConstants.SDO_STRING); - myProp.set("many", new Boolean("true")); + myProp.set("many", Boolean.valueOf("true")); Type myDOType = typeHelper.define(myDO); SDOProperty prop = (SDOProperty) myDOType.getProperty("myString"); String s = new String("This is my string."); diff --git a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SetAndGetWithManyPropertyViaPathTestCases.java b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SetAndGetWithManyPropertyViaPathTestCases.java index 48e250d75fd..b6f4c237638 100644 --- a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SetAndGetWithManyPropertyViaPathTestCases.java +++ b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/SetAndGetWithManyPropertyViaPathTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -53,7 +53,7 @@ public void testMyBigDecimalProperty() { DataObject myProp = myDO.createDataObject("property"); myProp.set("name", "myBigDecimal"); myProp.set("type", SDOConstants.SDO_DECIMAL); - myProp.set("many", new Boolean("true")); + myProp.set("many", Boolean.valueOf("true")); Type myDOType = typeHelper.define(myDO); double db = 12; BigDecimal bd = new BigDecimal(db); @@ -71,7 +71,7 @@ public void testMyBigIntegerProperty() { DataObject myProp = myDO.createDataObject("property"); myProp.set("name", "myBigInteger"); myProp.set("type", SDOConstants.SDO_INTEGER); - myProp.set("many", new Boolean("true")); + myProp.set("many", Boolean.valueOf("true")); Type myDOType = typeHelper.define(myDO); double db = 12; BigInteger bi = new BigInteger(String.valueOf((int)db)); @@ -92,9 +92,9 @@ public void testMyBooleanProperty() { DataObject myProp = myDO.createDataObject("property"); myProp.set("name", "myBoolean"); myProp.set("type", SDOConstants.SDO_BOOLEAN); - myProp.set("many", new Boolean("true")); + myProp.set("many", Boolean.valueOf("true")); Type myDOType = typeHelper.define(myDO); - boolean b = new Boolean("true").booleanValue(); + boolean b = Boolean.valueOf("true").booleanValue(); myDO.setBoolean("myBoolean", b); boolean myboolean = myDO.getBoolean("myBoolean"); assertTrue("Expected Boolean [" + b + "], but was [" + myboolean + "]", myboolean == b); @@ -111,9 +111,9 @@ public void testMyByteProperty() { DataObject myProp = myDO.createDataObject("property"); myProp.set("name", "myByte"); myProp.set("type", SDOConstants.SDO_BYTE); - myProp.set("many", new Boolean("true")); + myProp.set("many", Boolean.valueOf("true")); Type myDOType = typeHelper.define(myDO); - byte b = new Byte("8").byteValue(); + byte b = Byte.valueOf("8").byteValue(); myDO.setByte("myByte", b); byte mybyte = myDO.getByte("myByte"); assertTrue("Expected byte [" + b + "], but was [" + mybyte + "]", mybyte == b); @@ -131,10 +131,10 @@ public void testMyBytesProperty() { DataObject myProp = myDO.createDataObject("property"); myProp.set("name", "myBytes"); myProp.set("type", SDOConstants.SDO_BYTES); - myProp.set("many", new Boolean("true")); + myProp.set("many", Boolean.valueOf("true")); Type myDOType = typeHelper.define(myDO); - byte b1 = new Byte("16").byteValue(); - byte b2 = new Byte("8").byteValue(); + byte b1 = Byte.valueOf("16").byteValue(); + byte b2 = Byte.valueOf("8").byteValue(); byte[] bytes = new byte[] {b1, b2}; myDO.setBytes("myBytes", bytes); @@ -154,7 +154,7 @@ public void testMyCharProperty() { DataObject myProp = myDO.createDataObject("property"); myProp.set("name", "myChar"); myProp.set("type", SDOConstants.SDO_CHARACTER); - myProp.set("many", new Boolean("true")); + myProp.set("many", Boolean.valueOf("true")); Type myDOType = typeHelper.define(myDO); char c = 'x'; myDO.setChar("myCharDO", c); @@ -173,7 +173,7 @@ public void testMyDateProperty() { DataObject myProp = myDO.createDataObject("property"); myProp.set("name", "myDate"); myProp.set("type", SDOConstants.SDO_DATE); - myProp.set("many", new Boolean("true")); + myProp.set("many", Boolean.valueOf("true")); Type myDOType = typeHelper.define(myDO); Calendar controlCalendar = Calendar.getInstance(TimeZone.getTimeZone("GMT")); controlCalendar.clear(); @@ -198,7 +198,7 @@ public void testMyDoubleProperty() { DataObject myProp = myDO.createDataObject("property"); myProp.set("name", "myDouble"); myProp.set("type", SDOConstants.SDO_DOUBLE); - myProp.set("many", new Boolean("true")); + myProp.set("many", Boolean.valueOf("true")); Type myDOType = typeHelper.define(myDO); double db = 12; myDO.setDouble("myDouble", db); @@ -217,7 +217,7 @@ public void testMyFloatProperty() { DataObject myProp = myDO.createDataObject("property"); myProp.set("name", "myFloat"); myProp.set("type", SDOConstants.SDO_FLOAT); - myProp.set("many", new Boolean("true")); + myProp.set("many", Boolean.valueOf("true")); Type myDOType = typeHelper.define(myDO); float fl = 12; myDO.setFloat("myFloat", fl); @@ -236,7 +236,7 @@ public void testMyIntProperty() { DataObject myProp = myDO.createDataObject("property"); myProp.set("name", "myInt"); myProp.set("type", SDOConstants.SDO_INT); - myProp.set("many", new Boolean("true")); + myProp.set("many", Boolean.valueOf("true")); Type myDOType = typeHelper.define(myDO); int i = 69; myDO.setInt("myInt", i); @@ -257,7 +257,7 @@ public void testMyLongProperty() { DataObject myProp = myDO.createDataObject("property"); myProp.set("name", "myLong"); myProp.set("type", SDOConstants.SDO_LONG); - myProp.set("many", new Boolean("true")); + myProp.set("many", Boolean.valueOf("true")); Type myDOType = typeHelper.define(myDO); long l = 666L; myDO.setLong("myLong", l); @@ -276,9 +276,9 @@ public void testMyShortProperty() { DataObject myProp = myDO.createDataObject("property"); myProp.set("name", "myShort"); myProp.set("type", SDOConstants.SDO_SHORT); - myProp.set("many", new Boolean("true")); + myProp.set("many", Boolean.valueOf("true")); Type myDOType = typeHelper.define(myDO); - short s = new Short("66").shortValue(); + short s = Short.valueOf("66").shortValue(); myDO.setShort("myShort", s); short myshort = myDO.getShort("myShort"); assertTrue("Expected short [" + s + "], but was [" + myshort + "]", myshort == s); @@ -295,7 +295,7 @@ public void testMyStringProperty() { DataObject myProp = myDO.createDataObject("property"); myProp.set("name", "myString"); myProp.set("type", SDOConstants.SDO_STRING); - myProp.set("many", new Boolean("true")); + myProp.set("many", Boolean.valueOf("true")); Type myDOType = typeHelper.define(myDO); String s = new String("This is my string."); myDO.setString("myString", s); diff --git a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathengine/XPathHelperTestCases.java b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathengine/XPathHelperTestCases.java index 8042e1a7b80..3a9c1491255 100644 --- a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathengine/XPathHelperTestCases.java +++ b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathengine/XPathHelperTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -153,13 +153,13 @@ public void testGetCDNPricedItem() { // 20070618: an unset value with an IsSetNodeNullPolicy will return the default value increasing the list size to 4 assertTrue(returnValue != null && returnValue.size() == 4); Float price = (Float) returnValue.get(0); - assertEquals(new Float("0.00"), price); + assertEquals(Float.valueOf("0.00"), price); price = (Float) returnValue.get(1); - assertEquals(new Float("39.98"), price); + assertEquals(Float.valueOf("39.98"), price); price = (Float) returnValue.get(2); - assertEquals(new Float("2.98"), price); + assertEquals(Float.valueOf("2.98"), price); price = (Float) returnValue.get(3); - assertEquals(new Float("12.98"), price); + assertEquals(Float.valueOf("12.98"), price); } public void testMultipleBracketExpression() { diff --git a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathpositional/SDODataObjectGetBooleanByPositionalPathTest.java b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathpositional/SDODataObjectGetBooleanByPositionalPathTest.java index 7562831fa01..0dcec438ae2 100644 --- a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathpositional/SDODataObjectGetBooleanByPositionalPathTest.java +++ b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathpositional/SDODataObjectGetBooleanByPositionalPathTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -42,7 +42,7 @@ public void testGetBooleanConversionWithPathFromDefinedBooleanPropertyBracketPos type_c.addDeclaredProperty(property_c); dataObject_c._setType(type_c); - Boolean bb = new Boolean(true); + Boolean bb = Boolean.valueOf(true); List b = new ArrayList(); //b.add(bb); @@ -63,7 +63,7 @@ public void testGetBooleanConversionWithPathFromDefinedBooleanPropertyDotPositio type_c.addDeclaredProperty(property_c); dataObject_c._setType(type_c); - Boolean bb = new Boolean(true); + Boolean bb = Boolean.valueOf(true); List b = new ArrayList(); dataObject_c.set(property_c, b);// c dataobject's a property has value boolean 'true' @@ -81,7 +81,7 @@ public void testGetBooleanConversionWithPathFromDefinedBooleanPropertyBracketInP type_c.addDeclaredProperty(property_c); dataObject_c._setType(type_c); - Boolean b = new Boolean(true); + Boolean b = Boolean.valueOf(true); dataObject_a.setBoolean(property1, true);// c dataobject's a property has value boolean 'true' @@ -96,7 +96,7 @@ public void testGetBooleanConversionWithPathFromDefinedBooleanPropertyBracketInP type_c.addDeclaredProperty(property_c); dataObject_c.setType(type_c); - Boolean bb = new Boolean(true); + Boolean bb = Boolean.valueOf(true); List b = new ArrayList(); dataObject_c.set(property_c, b);// c dataobject's a property has value boolean 'true' @@ -148,7 +148,7 @@ public void testGetBooleanFromCharacter() { type_c.addDeclaredProperty(property_c); dataObject_c._setType(type_c); - Character bb = new Character('1'); + Character bb = Character.valueOf('1'); List b = new ArrayList(); dataObject_c.set(property_c, b);// c dataobject's a property has value boolean 'true' @@ -178,7 +178,7 @@ public void testGetBooleanFromDouble() { type_c.addDeclaredProperty(property_c); dataObject_c._setType(type_c); - Double bb = new Double(1); + Double bb = Double.valueOf(1); List b = new ArrayList(); dataObject_c.set(property_c, b);// c dataobject's a property has value boolean 'true' @@ -208,7 +208,7 @@ public void testGetBooleanFromFloat() { type_c.addDeclaredProperty(property_c); dataObject_c._setType(type_c); - Float bb = new Float(1); + Float bb = Float.valueOf(1); List b = new ArrayList(); dataObject_c.set(property_c, b);// c dataobject's a property has value boolean 'true' @@ -239,7 +239,7 @@ public void testGetBooleanFromInt() { dataObject_c._setType(type_c); //short s = 1; - Integer bb = new Integer(1); + Integer bb = Integer.valueOf(1); List b = new ArrayList(); dataObject_c.set(property_c, b);// c dataobject's a property has value boolean 'true' @@ -270,7 +270,7 @@ public void testGetBooleanFromLong() { dataObject_c._setType(type_c); long s = 1; - Long bb = new Long(s); + Long bb = Long.valueOf(s); List b = new ArrayList(); dataObject_c.set(property_c, b);// c dataobject's a property has value boolean 'true' @@ -301,7 +301,7 @@ public void testGetBooleanFromShort() { dataObject_c._setType(type_c); short s = 1; - Short bb = new Short(s); + Short bb = Short.valueOf(s); List b = new ArrayList(); dataObject_c.set(property_c, b);// c dataobject's a property has value boolean 'true' @@ -331,7 +331,7 @@ public void testGetBooleanConversionFromDefinedStringProperty() { dataObject_c._setType(type_c); String str = "true"; - Boolean B_STR = new Boolean(str); + Boolean B_STR = Boolean.valueOf(str); dataObject_c.setString(property_c, str);// add it to instance list this.assertEquals(B_STR.booleanValue(), dataObject_a.getBoolean(property)); @@ -348,7 +348,7 @@ public void testGetBooleanConversionWithPathFromDefinedBooleanStringBracketPosit dataObject_c._setType(type_c); String str = "true"; - Boolean bb = new Boolean(str); + Boolean bb = Boolean.valueOf(str); List b = new ArrayList(); //b.add(bb); @@ -370,7 +370,7 @@ public void testGetBooleanConversionWithPathFromDefinedStringPropertyDotPosition dataObject_c._setType(type_c); String str = "true"; - Boolean bb = new Boolean(str); + Boolean bb = Boolean.valueOf(str); List b = new ArrayList(); dataObject_c.set(property_c, b);// c dataobject's a property has value boolean 'true' @@ -389,7 +389,7 @@ public void testGetBooleanConversionWithPathFromDefinedStringPropertyBracketInPa dataObject_c._setType(type_c); String str = "true"; - Boolean b = new Boolean(str); + Boolean b = Boolean.valueOf(str); dataObject_a.set(property1, b);// c dataobject's a property has value boolean 'true' @@ -405,7 +405,7 @@ public void testGetBooleanConversionWithPathFromDefinedStringPropertyBracketInPa dataObject_c.setType(type_c); String str = "true"; - Boolean bb = new Boolean(str); + Boolean bb = Boolean.valueOf(str); List b = new ArrayList(); dataObject_c.set(property_c, b);// c dataobject's a property has value boolean 'true' diff --git a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathpositional/SDODataObjectGetByteByPositionalPathTest.java b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathpositional/SDODataObjectGetByteByPositionalPathTest.java index 8d568b8ac16..3974831abad 100644 --- a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathpositional/SDODataObjectGetByteByPositionalPathTest.java +++ b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathpositional/SDODataObjectGetByteByPositionalPathTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -321,7 +321,7 @@ public void testGetByteConversionFromDefinedStringProperty() { dataObject_c._setType(type_c); String str = "12"; - Byte s_d = new Byte(str); + Byte s_d = Byte.valueOf(str); dataObject_a.setString(propertyPath_a_b_c, str);// add it to instance list this.assertEquals(s_d.byteValue(), dataObject_a.getByte(property)); diff --git a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathpositional/SDODataObjectGetCharacterByPositionalPathTest.java b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathpositional/SDODataObjectGetCharacterByPositionalPathTest.java index 9cf8772bf52..3c063566f66 100644 --- a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathpositional/SDODataObjectGetCharacterByPositionalPathTest.java +++ b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathpositional/SDODataObjectGetCharacterByPositionalPathTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -272,7 +272,7 @@ public void testGetCharacterConversionFromDefinedStringProperty() { dataObject_c._setType(type_c); char str = 'c'; - Character B_STR = new Character(str); + Character B_STR = Character.valueOf(str); dataObject_a.setString(propertyPath_a_b_c, B_STR.toString());// add it to instance list this.assertEquals(str, dataObject_a.getChar(property)); diff --git a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathpositional/SDODataObjectGetDataObjectByPositionalPathTest.java b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathpositional/SDODataObjectGetDataObjectByPositionalPathTest.java index 32b59171e27..8dde3d2c4c3 100644 --- a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathpositional/SDODataObjectGetDataObjectByPositionalPathTest.java +++ b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathpositional/SDODataObjectGetDataObjectByPositionalPathTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -135,7 +135,7 @@ public void testGetDataObjectConversionFromUndefinedProperty() { dataObject_c._setType(type_c); boolean c = true; - Boolean C = new Boolean(c); + Boolean C = Boolean.valueOf(c); dataObject_c.set(property_c, C); diff --git a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathpositional/SDODataObjectGetDoubleByPositionalPathTest.java b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathpositional/SDODataObjectGetDoubleByPositionalPathTest.java index 6fa41e77624..fd48ec7a028 100644 --- a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathpositional/SDODataObjectGetDoubleByPositionalPathTest.java +++ b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathpositional/SDODataObjectGetDoubleByPositionalPathTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -340,7 +340,7 @@ public void testGetDoubleConversionFromDefinedStringProperty() { dataObject_c._setType(type_c); String str = "12"; - Double s_d = new Double(str); + Double s_d = Double.valueOf(str); double delta = 0.0; dataObject_a.setString(propertyPath_a_b_c, str);// add it to instance list diff --git a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathpositional/SDODataObjectGetFloatByPositionalPathTest.java b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathpositional/SDODataObjectGetFloatByPositionalPathTest.java index 24549d34079..886eb37223e 100644 --- a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathpositional/SDODataObjectGetFloatByPositionalPathTest.java +++ b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathpositional/SDODataObjectGetFloatByPositionalPathTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -338,7 +338,7 @@ public void testGetFloatConversionFromDefinedStringProperty() { dataObject_c._setType(type_c); String str = "12"; - Float s_d = new Float(str); + Float s_d = Float.valueOf(str); float delta = 0; dataObject_a.setString(propertyPath_a_b_c, str);// add it to instance list diff --git a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathpositional/SDODataObjectGetIntByPositionalPathTest.java b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathpositional/SDODataObjectGetIntByPositionalPathTest.java index 257fcba8ff0..aec0b4d27ec 100644 --- a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathpositional/SDODataObjectGetIntByPositionalPathTest.java +++ b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathpositional/SDODataObjectGetIntByPositionalPathTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -321,7 +321,7 @@ public void testGetIntConversionFromDefinedStringProperty() { dataObject_c._setType(type_c); String str = "12"; - Integer s_d = new Integer(str); + Integer s_d = Integer.valueOf(str); dataObject_a.setString(propertyPath_a_b_c, str);// add it to instance list this.assertEquals(s_d.intValue(), dataObject_a.getInt(propertyPath_a_b_c)); diff --git a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathpositional/SDODataObjectGetListByPositionalPathTest.java b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathpositional/SDODataObjectGetListByPositionalPathTest.java index 0ad3dad4f68..c89a6870625 100644 --- a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathpositional/SDODataObjectGetListByPositionalPathTest.java +++ b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathpositional/SDODataObjectGetListByPositionalPathTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -34,7 +34,7 @@ public void testGetBooleanConversionWithPathFromDefinedBooleanPropertyBracketPos type_c.addDeclaredProperty(property_c); dataObject_c._setType(type_c); - Boolean bb = new Boolean(true); + Boolean bb = Boolean.valueOf(true); List b = new ArrayList(); //b.add(bb); @@ -73,7 +73,7 @@ public void testGetBooleanConversionWithPathFromDefinedBooleanPropertyDotPositio type_c.addDeclaredProperty(property_c); dataObject_c.setType(type_c); - Boolean bb = new Boolean(true); + Boolean bb = Boolean.valueOf(true); List b = new ArrayList(); dataObject_a.setList("PName-a/PName-b[number=1]/PName-c", b);// c dataobject's a property has value boolean 'true' diff --git a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathpositional/SDODataObjectGetLongByPositionalPathTest.java b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathpositional/SDODataObjectGetLongByPositionalPathTest.java index a8bec05c006..c6cc03e3c75 100644 --- a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathpositional/SDODataObjectGetLongByPositionalPathTest.java +++ b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathpositional/SDODataObjectGetLongByPositionalPathTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -330,7 +330,7 @@ public void testGetLongConversionFromDefinedStringProperty() { dataObject_c._setType(type_c); String str = "12"; - Long s_d = new Long(str); + Long s_d = Long.valueOf(str); dataObject_a.setString(propertyPath_a_b_c, str);// add it to instance list this.assertEquals(s_d.longValue(), dataObject_a.getLong(propertyPath_a_b_c)); diff --git a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathpositional/SDODataObjectGetShortByPositionalPathTest.java b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathpositional/SDODataObjectGetShortByPositionalPathTest.java index 7a39754e86e..4c861df49df 100644 --- a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathpositional/SDODataObjectGetShortByPositionalPathTest.java +++ b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathpositional/SDODataObjectGetShortByPositionalPathTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -328,7 +328,7 @@ public void testGetShortConversionFromDefinedStringProperty() { dataObject_c._setType(type_c); String str = "12"; - Short s_d = new Short(str); + Short s_d = Short.valueOf(str); dataObject_a.setString(propertyPath_a_b_c, str);// add it to instance list this.assertEquals(s_d.shortValue(), dataObject_a.getShort(propertyPath_a_b_c)); diff --git a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathpositional/SDODataObjectGetStringByPositionalPathTest.java b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathpositional/SDODataObjectGetStringByPositionalPathTest.java index bd5d14ae6a8..74343481d10 100644 --- a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathpositional/SDODataObjectGetStringByPositionalPathTest.java +++ b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathpositional/SDODataObjectGetStringByPositionalPathTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -47,7 +47,7 @@ public void testGetStringConversionFromDefinedBoolean() { dataObject_c._setType(type_c); boolean str = true; - Boolean B_STR = new Boolean(str); + Boolean B_STR = Boolean.valueOf(str); dataObject_a.setBoolean(propertyPath_a_b_c, str);// add it to instance list this.assertEquals(B_STR.toString(), dataObject_a.getString(propertyPath_a_b_c)); diff --git a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetBooleanConversionByXPathQueryTest.java b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetBooleanConversionByXPathQueryTest.java index f7c6f9b6526..35c2549165d 100644 --- a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetBooleanConversionByXPathQueryTest.java +++ b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetBooleanConversionByXPathQueryTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -49,7 +49,7 @@ public void testGetBooleanConversionWithPathFromDefinedBooleanPropertyEqualSignB type_c0.addDeclaredProperty(p); dataObject_c._setType(type_c); - //Boolean bb = new Boolean(true); + //Boolean bb = Boolean.valueOf(true); //List b = new ArrayList(); //dataObject_c.set(property_c, b);// c dataobject's a property has value boolean 'true' dataObject_a.setBoolean("schema:" + propertyTest + "test", true); @@ -65,7 +65,7 @@ public void testGetBooleanConversionWithPathFromDefinedBooleanPropertyEqualSignB type_c0.addDeclaredProperty(p); dataObject_c._setType(type_c); - //Boolean bb = new Boolean(true); + //Boolean bb = Boolean.valueOf(true); //List b = new ArrayList(); //dataObject_c.set(property_c, b);// c dataobject's a property has value boolean 'true' dataObject_a.setBoolean("PName-a0/@alias2[number='123']/test", true); @@ -83,8 +83,8 @@ public void testGetBooleanConversionFromDefinedPropertyWithPath() { //type_c0.addDeclaredProperty(property_c1_object); List objects = new ArrayList(); - Boolean b = new Boolean(true); - Boolean bb = new Boolean(false); + Boolean b = Boolean.valueOf(true); + Boolean bb = Boolean.valueOf(false); objects.add(b); objects.add(bb); @@ -141,7 +141,7 @@ public void testSetGetDataObjectWithQueryPath() { // type_c0.addDeclaredProperty(property_c1_object); - Boolean b = new Boolean(true); + Boolean b = Boolean.valueOf(true); dataObject_a.setBoolean("PName-a0/PName-b0[number='1']/PName-c1.0", true); @@ -157,7 +157,7 @@ public void testSetGetDataObjectWithQueryPath_ShortPath() { type_c0.addDeclaredProperty(property_c1_object); - Boolean b = new Boolean(true); + Boolean b = Boolean.valueOf(true); dataObject_c0.setBoolean("PName-c1.0", true); diff --git a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetByXPathQueryTestCases.java b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetByXPathQueryTestCases.java index 3884ad9dfae..5a0a2eede58 100644 --- a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetByXPathQueryTestCases.java +++ b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetByXPathQueryTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -225,10 +225,10 @@ public void setUp() {// set up as a/b/c List d_list0 = new ArrayList(); List d_list1 = new ArrayList(); - d_list0.add(new Double("1.11")); - d_list0.add(new Double("2.22")); - d_list1.add(new Double("3.33")); - d_list1.add(new Double("5.55")); + d_list0.add(Double.valueOf("1.11")); + d_list0.add(Double.valueOf("2.22")); + d_list1.add(Double.valueOf("3.33")); + d_list1.add(Double.valueOf("5.55")); dataObject_d0.set(property_d_number1, d_list0);// set a/b.0/c[numbet=123] dataObject_d1.set(property_d_number1, d_list1); diff --git a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetByteConversionByXPathQueryTest.java b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetByteConversionByXPathQueryTest.java index 3f25d26e690..48e2af43a92 100644 --- a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetByteConversionByXPathQueryTest.java +++ b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetByteConversionByXPathQueryTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -48,8 +48,8 @@ public void testGetByteConversionFromDefinedPropertyWithPath() { List objects = new ArrayList(); byte by = 12; byte by1 = 1; - Byte b = new Byte(by); - Byte bb = new Byte(by1); + Byte b = Byte.valueOf(by); + Byte bb = Byte.valueOf(by1); objects.add(b); objects.add(bb); @@ -107,7 +107,7 @@ public void testSetGetDataObjectWithQueryPath() { type_c0.addDeclaredProperty(property_c1_object); byte by = 12; - Byte b = new Byte(by); + Byte b = Byte.valueOf(by); dataObject_a.set("PName-a0/PName-b0[number='1']/PName-c1.0", b); diff --git a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetCharacterConversionByXPathQueryTest.java b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetCharacterConversionByXPathQueryTest.java index 82daa4236a5..8836a58c9d5 100644 --- a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetCharacterConversionByXPathQueryTest.java +++ b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetCharacterConversionByXPathQueryTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -46,8 +46,8 @@ public void testGetBooleanConversionFromDefinedPropertyWithPath() { List objects = new ArrayList(); char c = 'c'; char c1 = 'a'; - Character b = new Character(c); - Character bb = new Character(c1); + Character b = Character.valueOf(c); + Character bb = Character.valueOf(c1); objects.add(b); objects.add(bb); diff --git a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetDataObjectConversionWithXPathQueryTest.java b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetDataObjectConversionWithXPathQueryTest.java index f3542db7093..375181e9c8d 100644 --- a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetDataObjectConversionWithXPathQueryTest.java +++ b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetDataObjectConversionWithXPathQueryTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -75,7 +75,7 @@ public void testGetDataObjectConversionFromUndefinedProperty() { DataObject sampleDataObject = dataFactory.create(theType); Property prop = sampleDataObject.getInstanceProperty("testProp"); - sampleDataObject.set(prop,new Boolean(true)); + sampleDataObject.set(prop,Boolean.valueOf(true)); try { diff --git a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetDateConversionByXPathQueryTest.java b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetDateConversionByXPathQueryTest.java index aa757b7b255..c62b05a58f5 100644 --- a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetDateConversionByXPathQueryTest.java +++ b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetDateConversionByXPathQueryTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -38,7 +38,7 @@ public void testGetBooleanConversionWithPathFromDefinedBooleanPropertyEqualSignB SDOProperty prop = (SDOProperty)dataObject_c0.getType().getProperty("test"); prop.setType(SDOConstants.SDO_DATE); - //Boolean bb = new Boolean(true); + //Boolean bb = Boolean.valueOf(true); //List b = new ArrayList(); long l = 12000; Date d = new Date(l); diff --git a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetDoubleConversionByXPathQueryTest.java b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetDoubleConversionByXPathQueryTest.java index 789606eed59..2327342dfb4 100644 --- a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetDoubleConversionByXPathQueryTest.java +++ b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetDoubleConversionByXPathQueryTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -44,8 +44,8 @@ public void testGetBooleanConversionFromDefinedPropertyWithPath() { SDOProperty property_c1_object = ((SDOProperty)dataObject_c1.getInstanceProperty("PName-c1")); property_c1_object.setType(SDOConstants.SDO_DOUBLE); List objects = new ArrayList(); - Double b = new Double(12); - Double bb = new Double(11); + Double b = Double.valueOf(12); + Double bb = Double.valueOf(11); objects.add(b); objects.add(bb); dataObject_c1.set(property_c1_object, objects); @@ -100,7 +100,7 @@ public void testSetGetDataObjectWithQueryPath() { property_c1_object.setType(SDOConstants.SDO_DOUBLE); type_c0.addDeclaredProperty(property_c1_object);*/ - Double b = new Double(12); + Double b = Double.valueOf(12); dataObject_a.setDouble("PName-a0/PName-b0[number='1']/PName-c1.0", b.doubleValue()); diff --git a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetFloatConversionByXPathQueryTest.java b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetFloatConversionByXPathQueryTest.java index 1ab4bf121ba..b6db720840d 100644 --- a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetFloatConversionByXPathQueryTest.java +++ b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetFloatConversionByXPathQueryTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -30,7 +30,7 @@ public void testGetBooleanConversionWithPathFromDefinedBooleanPropertyEqualSignB SDOProperty prop = (SDOProperty)dataObject_c0.getType().getProperty("test"); prop.setType(SDOConstants.SDO_FLOAT); - Float bb = new Float(1.2); + Float bb = 1.2f; //List b = new ArrayList(); //dataObject_c.set(property_c, b);// c dataobject's a property has value boolean 'true' @@ -44,8 +44,8 @@ public void testGetFloatConversionFromDefinedPropertyWithPath() { SDOProperty property_c1_object = ((SDOProperty)dataObject_c1.getInstanceProperty("PName-c1")); property_c1_object.setType(SDOConstants.SDO_FLOAT); List objects = new ArrayList(); - Float b = new Float(2); - Float bb = new Float(12); + Float b = Float.valueOf(2); + Float bb = Float.valueOf(12); objects.add(b); objects.add(bb); @@ -100,7 +100,7 @@ public void testSetGetDataObjectWithQueryPath() { type_c0.addDeclaredProperty(property_c1_object); - Float b = new Float(12); + Float b = Float.valueOf(12); dataObject_a.setFloat("PName-a0/PName-b0[number='1']/PName-c1.0", b.floatValue()); diff --git a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetIntConversionByXPathQueryTest.java b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetIntConversionByXPathQueryTest.java index 0d2da714856..0fe55e23b6d 100644 --- a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetIntConversionByXPathQueryTest.java +++ b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetIntConversionByXPathQueryTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -29,7 +29,7 @@ public SDODataObjectGetIntConversionByXPathQueryTest(String name) { public void testGetBooleanConversionWithPathFromDefinedBooleanPropertyEqualSignBracketInPathDotSet() { SDOProperty prop = (SDOProperty)dataObject_c0.getType().getProperty("test"); prop.setType(SDOConstants.SDO_INT); - Integer bb = new Integer(12); + Integer bb = Integer.valueOf(12); //List b = new ArrayList(); //dataObject_c.set(property_c, b);// c dataobject's a property has value boolean 'true' @@ -45,8 +45,8 @@ public void testGetIntConversionFromDefinedPropertyWithPath() { //type_c0.addDeclaredProperty(property_c1_object); List objects = new ArrayList(); - Integer b = new Integer(12); - Integer bb = new Integer(2); + Integer b = Integer.valueOf(12); + Integer bb = Integer.valueOf(2); objects.add(b); objects.add(bb); @@ -101,7 +101,7 @@ public void testSetGetDataObjectWithQueryPath() { type_c0.addDeclaredProperty(property_c1_object); - Integer b = new Integer(12); + Integer b = Integer.valueOf(12); dataObject_a.setInt("PName-a0/PName-b0[number='1']/PName-c1.0", b.intValue()); diff --git a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetListConversionByXPathQueryTest.java b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetListConversionByXPathQueryTest.java index 84d88ecacee..b6bf32c7d05 100644 --- a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetListConversionByXPathQueryTest.java +++ b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetListConversionByXPathQueryTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -32,7 +32,7 @@ public void testGetBooleanConversionWithPathFromDefinedBooleanPropertyEqualSignB prop.setType(SDOConstants.SDO_BOOLEAN); prop.setMany(true); - Boolean bb = new Boolean(true); + Boolean bb = Boolean.valueOf(true); List b = new ArrayList(); b.add(bb); @@ -86,7 +86,7 @@ public void testGetDataObjectConversionWithNullArgument() { type_c0.addDeclaredProperty(property_c1_object); - Boolean b = new Boolean(true); + Boolean b = Boolean.valueOf(true); dataObject_a.setBoolean("PName-a0/PName-b0[number='1']/PName-c1.0", true); diff --git a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetLongConversionByXPathQueryTest.java b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetLongConversionByXPathQueryTest.java index 28fae20399b..c1895d123f3 100644 --- a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetLongConversionByXPathQueryTest.java +++ b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetLongConversionByXPathQueryTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -30,7 +30,7 @@ public void testGetBooleanConversionWithPathFromDefinedBooleanPropertyEqualSignB SDOProperty prop = (SDOProperty)dataObject_c0.getType().getProperty("test"); prop.setType(SDOConstants.SDO_LONG); - Long bb = new Long(12); + Long bb = Long.valueOf(12); //List b = new ArrayList(); //dataObject_c.set(property_c, b);// c dataobject's a property has value boolean 'true' @@ -44,8 +44,8 @@ public void testGetLongConversionFromDefinedPropertyWithPath() { SDOProperty property_c1_object = ((SDOProperty)dataObject_c1.getInstanceProperty("PName-c1")); property_c1_object.setType(SDOConstants.SDO_LONG); List objects = new ArrayList(); - Long b = new Long(12); - Long bb = new Long(2); + Long b = Long.valueOf(12); + Long bb = Long.valueOf(2); objects.add(b); objects.add(bb); @@ -100,7 +100,7 @@ public void testSetGetDataObjectWithQueryPath() { type_c0.addDeclaredProperty(property_c1_object); - Long bb = new Long(12); + Long bb = Long.valueOf(12); dataObject_a.setLong("PName-a0/PName-b0[number='1']/PName-c1.0", bb.longValue()); diff --git a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetShortConversionByXPathQueryTest.java b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetShortConversionByXPathQueryTest.java index 10ee7c9e43c..facf02b3906 100644 --- a/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetShortConversionByXPathQueryTest.java +++ b/sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/model/dataobject/xpathquery/SDODataObjectGetShortConversionByXPathQueryTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -31,7 +31,7 @@ public void testGetBooleanConversionWithPathFromDefinedBooleanPropertyEqualSignB prop.setType(SDOConstants.SDO_SHORT); short s = 12; - Short bb = new Short(s); + Short bb = Short.valueOf(s); //List b = new ArrayList(); //dataObject_c.set(property_c, b);// c dataobject's a property has value boolean 'true' @@ -47,9 +47,9 @@ public void testGetShortConversionFromDefinedPropertyWithPath() { List objects = new ArrayList(); short s = 12; - Short b = new Short(s); + Short b = Short.valueOf(s); short s1 = 12; - Short bb = new Short(s1); + Short bb = Short.valueOf(s1); objects.add(b); objects.add(bb); @@ -100,7 +100,7 @@ public void testSetGetDataObjectWithQueryPath() { property_c1_object.setType(SDOConstants.SDO_SHORT); short s = 12; - Short bb = new Short(s); + Short bb = Short.valueOf(s); dataObject_a.setShort("PName-a0/PName-b0[number='1']/PName-c1.0", bb.shortValue()); diff --git a/utils/eclipselink.dbws.builder.test.oracle/src/dbws/testing/tabletype/TableTypeTestSuite.java b/utils/eclipselink.dbws.builder.test.oracle/src/dbws/testing/tabletype/TableTypeTestSuite.java index bacc1edc4d3..96e811de542 100644 --- a/utils/eclipselink.dbws.builder.test.oracle/src/dbws/testing/tabletype/TableTypeTestSuite.java +++ b/utils/eclipselink.dbws.builder.test.oracle/src/dbws/testing/tabletype/TableTypeTestSuite.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -441,7 +441,7 @@ public void testUpdateSQL() { // verify that 'sal' and 'c' fields were updated successfully XRDynamicEntity tableTypeEntity = (XRDynamicEntity) result; - assertTrue("Expected [sal] '112000.99' but was '" + tableTypeEntity.get("sal") + "'", Float.compare(((Float) tableTypeEntity.get("sal")), new Float(112000.99)) == 0); + assertTrue("Expected [sal] '112000.99' but was '" + tableTypeEntity.get("sal") + "'", Float.compare(((Float) tableTypeEntity.get("sal")), Float.valueOf(112000.99)) == 0); Character[] chars = tableTypeEntity.get("c"); StringBuilder sb = new StringBuilder(chars.length); diff --git a/utils/eclipselink.dbws.builder.test.oracle/src/dbws/testing/types/TypesTestSuite.java b/utils/eclipselink.dbws.builder.test.oracle/src/dbws/testing/types/TypesTestSuite.java index 923ae3dbc2b..bba6fd625a1 100644 --- a/utils/eclipselink.dbws.builder.test.oracle/src/dbws/testing/types/TypesTestSuite.java +++ b/utils/eclipselink.dbws.builder.test.oracle/src/dbws/testing/types/TypesTestSuite.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -731,7 +731,7 @@ public void echoChar() { @Test public void echoReal() { Invocation invocation = new Invocation("echoReal"); - invocation.setParameter("PREAL", new Float("3.14159")); + invocation.setParameter("PREAL", Float.valueOf("3.14159")); Operation op = xrService.getOperation(invocation.getName()); Object result = op.invoke(xrService, invocation); assertNotNull("result is null", result); @@ -753,7 +753,7 @@ public void echoReal() { @Test public void echoFloat() { Invocation invocation = new Invocation("echoFloat"); - invocation.setParameter("PINPUTFLOAT", new Float("31415.926")); + invocation.setParameter("PINPUTFLOAT", Float.valueOf("31415.926")); Operation op = xrService.getOperation(invocation.getName()); Object result = op.invoke(xrService, invocation); assertNotNull("result is null", result); @@ -775,7 +775,7 @@ public void echoFloat() { @Test public void echoDouble() { Invocation invocation = new Invocation("echoDouble"); - invocation.setParameter("PDOUBLE", new Double("314.15926")); + invocation.setParameter("PDOUBLE", Double.valueOf("314.15926")); Operation op = xrService.getOperation(invocation.getName()); Object result = op.invoke(xrService, invocation); assertNotNull("result is null", result); diff --git a/utils/eclipselink.utils.workbench.test/framework/source/org/eclipse/persistence/tools/workbench/test/framework/resources/StringRepositoryTests.java b/utils/eclipselink.utils.workbench.test/framework/source/org/eclipse/persistence/tools/workbench/test/framework/resources/StringRepositoryTests.java index b69587d7a7a..74cc7012fd2 100644 --- a/utils/eclipselink.utils.workbench.test/framework/source/org/eclipse/persistence/tools/workbench/test/framework/resources/StringRepositoryTests.java +++ b/utils/eclipselink.utils.workbench.test/framework/source/org/eclipse/persistence/tools/workbench/test/framework/resources/StringRepositoryTests.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -65,23 +65,23 @@ public void testGetString() { } public void testGetStringArgument() { - assertEquals("Single-argument message: {0, number}.", this.simpleRepos.getString("FORMATTED_MSG_1", new Integer(42))); - assertEquals("Single-argument message: 42.", this.defaultRepos.getString("FORMATTED_MSG_1", new Integer(42))); + assertEquals("Single-argument message: {0, number}.", this.simpleRepos.getString("FORMATTED_MSG_1", Integer.valueOf(42))); + assertEquals("Single-argument message: 42.", this.defaultRepos.getString("FORMATTED_MSG_1", Integer.valueOf(42))); } public void testGetStringArgumentArgument() { - assertEquals("Two-argument message: {0, number} + {1, number}.", this.simpleRepos.getString("FORMATTED_MSG_2", new Integer(42), new Integer(17))); - assertEquals("Two-argument message: 42 + 17.", this.defaultRepos.getString("FORMATTED_MSG_2", new Integer(42), new Integer(17))); + assertEquals("Two-argument message: {0, number} + {1, number}.", this.simpleRepos.getString("FORMATTED_MSG_2", Integer.valueOf(42), Integer.valueOf(17))); + assertEquals("Two-argument message: 42 + 17.", this.defaultRepos.getString("FORMATTED_MSG_2", Integer.valueOf(42), Integer.valueOf(17))); } public void testGetStringArgumentArgumentArgument() { - assertEquals("Three-argument message: {0, number} + {1, number} = {2, number}.", this.simpleRepos.getString("FORMATTED_MSG_3", new Integer(42), new Integer(17), new Integer(59))); - assertEquals("Three-argument message: 42 + 17 = 59.", this.defaultRepos.getString("FORMATTED_MSG_3", new Integer(42), new Integer(17), new Integer(59))); + assertEquals("Three-argument message: {0, number} + {1, number} = {2, number}.", this.simpleRepos.getString("FORMATTED_MSG_3", Integer.valueOf(42), Integer.valueOf(17), Integer.valueOf(59))); + assertEquals("Three-argument message: 42 + 17 = 59.", this.defaultRepos.getString("FORMATTED_MSG_3", Integer.valueOf(42), Integer.valueOf(17), Integer.valueOf(59))); } public void testGetStringArguments() { - assertEquals("{3}-argument message: {0, number} + {1, number} = {2, number}.", this.simpleRepos.getString("FORMATTED_MSG_4", new Object[] {new Integer(42), new Integer(17), new Integer(59), "Four"})); - assertEquals("Four-argument message: 42 + 17 = 59.", this.defaultRepos.getString("FORMATTED_MSG_4", new Object[] {new Integer(42), new Integer(17), new Integer(59), "Four"})); + assertEquals("{3}-argument message: {0, number} + {1, number} = {2, number}.", this.simpleRepos.getString("FORMATTED_MSG_4", new Object[] {Integer.valueOf(42), Integer.valueOf(17), Integer.valueOf(59), "Four"})); + assertEquals("Four-argument message: 42 + 17 = 59.", this.defaultRepos.getString("FORMATTED_MSG_4", new Object[] {Integer.valueOf(42), Integer.valueOf(17), Integer.valueOf(59), "Four"})); } public void testMissingString() { diff --git a/utils/eclipselink.utils.workbench.test/mappingsplugin/source/org/eclipse/persistence/tools/workbench/test/ant/EisProjectExporterTests.java b/utils/eclipselink.utils.workbench.test/mappingsplugin/source/org/eclipse/persistence/tools/workbench/test/ant/EisProjectExporterTests.java index baabff651ac..0ca2fc18d90 100644 --- a/utils/eclipselink.utils.workbench.test/mappingsplugin/source/org/eclipse/persistence/tools/workbench/test/ant/EisProjectExporterTests.java +++ b/utils/eclipselink.utils.workbench.test/mappingsplugin/source/org/eclipse/persistence/tools/workbench/test/ant/EisProjectExporterTests.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -52,7 +52,7 @@ public void testProjectExporter() throws Exception { deploymentFile.getAbsolutePath(), // deploymentFileName "", ignoreErrorCodes, - new Boolean( true), // failOnErrorObject + Boolean.valueOf( true), // failOnErrorObject "JMS.URL", MWEisLoginSpec.JMS_ADAPTER_NAME, "tle", ""); diff --git a/utils/eclipselink.utils.workbench.test/mappingsplugin/source/org/eclipse/persistence/tools/workbench/test/ant/OXProjectExporterTests.java b/utils/eclipselink.utils.workbench.test/mappingsplugin/source/org/eclipse/persistence/tools/workbench/test/ant/OXProjectExporterTests.java index 0dfea248ba9..9686de27a75 100644 --- a/utils/eclipselink.utils.workbench.test/mappingsplugin/source/org/eclipse/persistence/tools/workbench/test/ant/OXProjectExporterTests.java +++ b/utils/eclipselink.utils.workbench.test/mappingsplugin/source/org/eclipse/persistence/tools/workbench/test/ant/OXProjectExporterTests.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -51,7 +51,7 @@ public void testProjectExporter() throws Exception { deploymentFile.getAbsolutePath(), // deploymentFileName "", ignoreErrorCodes, - new Boolean( true), // failOnErrorObject + Boolean.valueOf( true), // failOnErrorObject "", "", "", ""); assertEquals( status, 0); } diff --git a/utils/eclipselink.utils.workbench.test/mappingsplugin/source/org/eclipse/persistence/tools/workbench/test/ant/ProjectExporterTests.java b/utils/eclipselink.utils.workbench.test/mappingsplugin/source/org/eclipse/persistence/tools/workbench/test/ant/ProjectExporterTests.java index 2e6247b9b31..74406deaf1c 100644 --- a/utils/eclipselink.utils.workbench.test/mappingsplugin/source/org/eclipse/persistence/tools/workbench/test/ant/ProjectExporterTests.java +++ b/utils/eclipselink.utils.workbench.test/mappingsplugin/source/org/eclipse/persistence/tools/workbench/test/ant/ProjectExporterTests.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -55,7 +55,7 @@ public void testProjectExporter() throws Exception { deploymentFile.getAbsolutePath(), // deploymentFileName "", ignoreErrorCodes, - new Boolean( true), // failOnErrorObject + Boolean.valueOf( true), // failOnErrorObject "jdbc:oracle:thin:@tlsvrdb5.ca.oracle.com:1521:TOPLINK", "oracle.jdbc.driver.OracleDriver", "tle", ""); diff --git a/utils/eclipselink.utils.workbench.test/mappingsplugin/source/org/eclipse/persistence/tools/workbench/test/mappingsplugin/ui/descriptor/xml/SchemaContextAndXpathChooserTest.java b/utils/eclipselink.utils.workbench.test/mappingsplugin/source/org/eclipse/persistence/tools/workbench/test/mappingsplugin/ui/descriptor/xml/SchemaContextAndXpathChooserTest.java index 56c3ad06d3e..7215cb0692f 100644 --- a/utils/eclipselink.utils.workbench.test/mappingsplugin/source/org/eclipse/persistence/tools/workbench/test/mappingsplugin/ui/descriptor/xml/SchemaContextAndXpathChooserTest.java +++ b/utils/eclipselink.utils.workbench.test/mappingsplugin/source/org/eclipse/persistence/tools/workbench/test/mappingsplugin/ui/descriptor/xml/SchemaContextAndXpathChooserTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -123,15 +123,15 @@ private PropertyValueModel buildSchemaContextComponentHolder() { } private PropertyValueModel buildMultiElementSelectableHolder() { - return new SimplePropertyValueModel(new Boolean(false)); + return new SimplePropertyValueModel(Boolean.valueOf(false)); } private PropertyValueModel buildDirectFieldSelectableHolder() { - return new SimplePropertyValueModel(new Boolean(false)); + return new SimplePropertyValueModel(Boolean.valueOf(false)); } private PropertyValueModel buildComplexFieldSelectableHolder() { - return new SimplePropertyValueModel(new Boolean(false)); + return new SimplePropertyValueModel(Boolean.valueOf(false)); } private void openWindow() { diff --git a/utils/eclipselink.utils.workbench.test/mappingsplugin/source/org/eclipse/persistence/tools/workbench/test/models/complexinheritance/Bicycle.java b/utils/eclipselink.utils.workbench.test/mappingsplugin/source/org/eclipse/persistence/tools/workbench/test/models/complexinheritance/Bicycle.java index 2189cbc71e4..85b5035c7d9 100644 --- a/utils/eclipselink.utils.workbench.test/mappingsplugin/source/org/eclipse/persistence/tools/workbench/test/models/complexinheritance/Bicycle.java +++ b/utils/eclipselink.utils.workbench.test/mappingsplugin/source/org/eclipse/persistence/tools/workbench/test/models/complexinheritance/Bicycle.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -21,7 +21,7 @@ public class Bicycle extends NonFueledVehicle { @Override public void change() { - this.setPassengerCapacity(new Integer(100)); + this.setPassengerCapacity(Integer.valueOf(100)); this.addPartNumber("NEWBIKEPART 1"); this.setDescription("This Bike is easy to handle"); @@ -30,7 +30,7 @@ public static Bicycle example1(Company company) { Bicycle example = new Bicycle(); - example.setPassengerCapacity(new Integer(1)); + example.setPassengerCapacity(Integer.valueOf(1)); example.getOwner().setValue(company); example.setDescription("Hercules"); example.addPartNumber("1288H8HH-f"); @@ -41,7 +41,7 @@ public static Bicycle example2(Company company) { Bicycle example = new Bicycle(); - example.setPassengerCapacity(new Integer(2)); + example.setPassengerCapacity(Integer.valueOf(2)); example.getOwner().setValue(company); example.setDescription("Atlas"); example.addPartNumber("176339GT-a"); @@ -53,7 +53,7 @@ public static Bicycle example3(Company company) { Bicycle example = new Bicycle(); - example.setPassengerCapacity(new Integer(3)); + example.setPassengerCapacity(Integer.valueOf(3)); example.getOwner().setValue(company); example.setDescription("Aone"); example.addPartNumber("188181TT-a"); diff --git a/utils/eclipselink.utils.workbench.test/mappingsplugin/source/org/eclipse/persistence/tools/workbench/test/models/complexinheritance/Boat.java b/utils/eclipselink.utils.workbench.test/mappingsplugin/source/org/eclipse/persistence/tools/workbench/test/models/complexinheritance/Boat.java index d58d91ce8a1..2f32957860f 100644 --- a/utils/eclipselink.utils.workbench.test/mappingsplugin/source/org/eclipse/persistence/tools/workbench/test/models/complexinheritance/Boat.java +++ b/utils/eclipselink.utils.workbench.test/mappingsplugin/source/org/eclipse/persistence/tools/workbench/test/models/complexinheritance/Boat.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -23,7 +23,7 @@ public static Boat example1(Company company) { Boat example = new Boat(); - example.setPassengerCapacity(new Integer(10)); + example.setPassengerCapacity(Integer.valueOf(10)); example.getOwner().setValue(company); return example; } @@ -31,7 +31,7 @@ public static Boat example2(Company company) { Boat example = new Boat(); - example.setPassengerCapacity(new Integer(20)); + example.setPassengerCapacity(Integer.valueOf(20)); example.getOwner().setValue(company); return example; } @@ -39,7 +39,7 @@ public static Boat example3(Company company) { Boat example = new Boat(); - example.setPassengerCapacity(new Integer(30)); + example.setPassengerCapacity(Integer.valueOf(30)); example.getOwner().setValue(company); return example; } diff --git a/utils/eclipselink.utils.workbench.test/mappingsplugin/source/org/eclipse/persistence/tools/workbench/test/models/complexinheritance/Bus.java b/utils/eclipselink.utils.workbench.test/mappingsplugin/source/org/eclipse/persistence/tools/workbench/test/models/complexinheritance/Bus.java index ac2062b59b4..adab615923d 100644 --- a/utils/eclipselink.utils.workbench.test/mappingsplugin/source/org/eclipse/persistence/tools/workbench/test/models/complexinheritance/Bus.java +++ b/utils/eclipselink.utils.workbench.test/mappingsplugin/source/org/eclipse/persistence/tools/workbench/test/models/complexinheritance/Bus.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -22,8 +22,8 @@ public static Bus example2(Company company) { Bus example = new Bus(); - example.setPassengerCapacity(new Integer(30)); - example.setFuelCapacity(new Integer(100)); + example.setPassengerCapacity(Integer.valueOf(30)); + example.setFuelCapacity(Integer.valueOf(100)); example.setDescription("SCHOOL BUS"); example.setFuelType("Petrol"); example.getOwner().setValue(company); @@ -37,8 +37,8 @@ public static Bus example3(Company company) { Bus example = new Bus(); - example.setPassengerCapacity(new Integer(30)); - example.setFuelCapacity(new Integer(100)); + example.setPassengerCapacity(Integer.valueOf(30)); + example.setFuelCapacity(Integer.valueOf(100)); example.setDescription("TOUR BUS"); example.setFuelType("Petrol"); example.getOwner().setValue(company); @@ -52,8 +52,8 @@ public static Bus example4(Company company) { Bus example = new Bus(); - example.setPassengerCapacity(new Integer(30)); - example.setFuelCapacity(new Integer(100)); + example.setPassengerCapacity(Integer.valueOf(30)); + example.setFuelCapacity(Integer.valueOf(100)); example.setDescription("TRANSIT BUS"); example.setFuelType("Gas"); example.getOwner().setValue(company); diff --git a/utils/eclipselink.utils.workbench.test/mappingsplugin/source/org/eclipse/persistence/tools/workbench/test/models/complexinheritance/Car.java b/utils/eclipselink.utils.workbench.test/mappingsplugin/source/org/eclipse/persistence/tools/workbench/test/models/complexinheritance/Car.java index da2e47330eb..0a524be9344 100644 --- a/utils/eclipselink.utils.workbench.test/mappingsplugin/source/org/eclipse/persistence/tools/workbench/test/models/complexinheritance/Car.java +++ b/utils/eclipselink.utils.workbench.test/mappingsplugin/source/org/eclipse/persistence/tools/workbench/test/models/complexinheritance/Car.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -27,8 +27,8 @@ public static Car example1() { Car example = new Car(); - example.setPassengerCapacity(new Integer(2)); - example.setFuelCapacity(new Integer(30)); + example.setPassengerCapacity(Integer.valueOf(2)); + example.setFuelCapacity(Integer.valueOf(30)); example.setDescription("PONTIAC"); example.setFuelType("Petrol"); example.addPartNumber("021776RM-b"); @@ -40,8 +40,8 @@ public static Car example2() { Car example = new Car(); - example.setPassengerCapacity(new Integer(4)); - example.setFuelCapacity(new Integer(50)); + example.setPassengerCapacity(Integer.valueOf(4)); + example.setFuelCapacity(Integer.valueOf(50)); example.setDescription("TOYOTA"); example.setFuelType("Petrol"); example.addPartNumber("021776TT-a"); @@ -53,8 +53,8 @@ public static Car example3() { Car example = new Car(); - example.setPassengerCapacity(new Integer(5)); - example.setFuelCapacity(new Integer(60)); + example.setPassengerCapacity(Integer.valueOf(5)); + example.setFuelCapacity(Integer.valueOf(60)); example.setDescription("BMW"); example.setFuelType("Disel"); example.addPartNumber("021776KM-k"); @@ -66,8 +66,8 @@ public static Car example4() { Car example = new Car(); - example.setPassengerCapacity(new Integer(8)); - example.setFuelCapacity(new Integer(100)); + example.setPassengerCapacity(Integer.valueOf(8)); + example.setFuelCapacity(Integer.valueOf(100)); example.setDescription("Mazda"); example.setFuelType("Coca-Cola"); example.addPartNumber("021776KM-k"); diff --git a/utils/eclipselink.utils.workbench.test/mappingsplugin/source/org/eclipse/persistence/tools/workbench/test/models/complexinheritance/FueledVehicle.java b/utils/eclipselink.utils.workbench.test/mappingsplugin/source/org/eclipse/persistence/tools/workbench/test/models/complexinheritance/FueledVehicle.java index 3f0632b3957..5c957f38ecf 100644 --- a/utils/eclipselink.utils.workbench.test/mappingsplugin/source/org/eclipse/persistence/tools/workbench/test/models/complexinheritance/FueledVehicle.java +++ b/utils/eclipselink.utils.workbench.test/mappingsplugin/source/org/eclipse/persistence/tools/workbench/test/models/complexinheritance/FueledVehicle.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -24,7 +24,7 @@ public class FueledVehicle extends Vehicle { @Override public void change() { - this.setPassengerCapacity(new Integer(100)); + this.setPassengerCapacity(Integer.valueOf(100)); this.addPartNumber("NEWPART 1"); this.setFuelType("HOT AIR"); @@ -33,8 +33,8 @@ public static FueledVehicle example1(Company company) { FueledVehicle example = new FueledVehicle(); - example.setPassengerCapacity(new Integer(1)); - example.setFuelCapacity(new Integer(10)); + example.setPassengerCapacity(Integer.valueOf(1)); + example.setFuelCapacity(Integer.valueOf(10)); example.setDescription("Motercycle"); example.getOwner().setValue(company); return example; diff --git a/utils/eclipselink.utils.workbench.test/mappingsplugin/source/org/eclipse/persistence/tools/workbench/test/models/complexinheritance/NonFueledVehicle.java b/utils/eclipselink.utils.workbench.test/mappingsplugin/source/org/eclipse/persistence/tools/workbench/test/models/complexinheritance/NonFueledVehicle.java index 1531133a09a..c082463d217 100644 --- a/utils/eclipselink.utils.workbench.test/mappingsplugin/source/org/eclipse/persistence/tools/workbench/test/models/complexinheritance/NonFueledVehicle.java +++ b/utils/eclipselink.utils.workbench.test/mappingsplugin/source/org/eclipse/persistence/tools/workbench/test/models/complexinheritance/NonFueledVehicle.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -22,7 +22,7 @@ public static NonFueledVehicle example4(Company company) { NonFueledVehicle example = new NonFueledVehicle(); - example.setPassengerCapacity(new Integer(1)); + example.setPassengerCapacity(Integer.valueOf(1)); example.getOwner().setValue(company); return example; } diff --git a/utils/eclipselink.utils.workbench.test/mappingsplugin/source/org/eclipse/persistence/tools/workbench/test/models/complexinheritance/SportsCar.java b/utils/eclipselink.utils.workbench.test/mappingsplugin/source/org/eclipse/persistence/tools/workbench/test/models/complexinheritance/SportsCar.java index 45163051c4a..c46dd73eb64 100644 --- a/utils/eclipselink.utils.workbench.test/mappingsplugin/source/org/eclipse/persistence/tools/workbench/test/models/complexinheritance/SportsCar.java +++ b/utils/eclipselink.utils.workbench.test/mappingsplugin/source/org/eclipse/persistence/tools/workbench/test/models/complexinheritance/SportsCar.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -19,8 +19,8 @@ public static Car example1() { SportsCar example = new SportsCar(); - example.setPassengerCapacity(new Integer(2)); - example.setFuelCapacity(new Integer(60)); + example.setPassengerCapacity(Integer.valueOf(2)); + example.setFuelCapacity(Integer.valueOf(60)); example.setDescription("Corvet"); example.setFuelType("Disel"); return example; diff --git a/utils/eclipselink.utils.workbench.test/mappingsplugin/source/org/eclipse/persistence/tools/workbench/test/models/complexmapping/Computer.java b/utils/eclipselink.utils.workbench.test/mappingsplugin/source/org/eclipse/persistence/tools/workbench/test/models/complexmapping/Computer.java index d9a6ded1c13..bbdc078ea08 100644 --- a/utils/eclipselink.utils.workbench.test/mappingsplugin/source/org/eclipse/persistence/tools/workbench/test/models/complexmapping/Computer.java +++ b/utils/eclipselink.utils.workbench.test/mappingsplugin/source/org/eclipse/persistence/tools/workbench/test/models/complexmapping/Computer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -138,10 +138,10 @@ public int hashCode() { return getSerialNumber().hashCode(); } public void isMacintosh() { - isMacintosh = new Boolean(true); + isMacintosh = Boolean.valueOf(true); } public void notMacintosh() { - isMacintosh = new Boolean(false); + isMacintosh = Boolean.valueOf(false); } public void setDescription(String aDescription) { diff --git a/utils/eclipselink.utils.workbench.test/mappingsplugin/source/org/eclipse/persistence/tools/workbench/test/models/complexmapping/Employee.java b/utils/eclipselink.utils.workbench.test/mappingsplugin/source/org/eclipse/persistence/tools/workbench/test/models/complexmapping/Employee.java index a7277a1ace6..b18bef5b44a 100644 --- a/utils/eclipselink.utils.workbench.test/mappingsplugin/source/org/eclipse/persistence/tools/workbench/test/models/complexmapping/Employee.java +++ b/utils/eclipselink.utils.workbench.test/mappingsplugin/source/org/eclipse/persistence/tools/workbench/test/models/complexmapping/Employee.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -496,14 +496,14 @@ public Integer getRankFromObject() } if (getDesignation().equals("Executive")) - rank = new Integer(1); + rank = Integer.valueOf(1); if (getDesignation().equals("Non-Executive")) - rank = new Integer(2); + rank = Integer.valueOf(2); return rank; } public String getRankFromRow(Record row, Session aSession) { - Integer value = new Integer(((Number)row.get("RANK")).intValue()); + Integer value = Integer.valueOf(((Number)row.get("RANK")).intValue()); String rank = null; Employee employee = new Employee(); diff --git a/utils/eclipselink.utils.workbench.test/mappingsplugin/source/org/eclipse/persistence/tools/workbench/test/models/projects/IdentityPolicyProject.java b/utils/eclipselink.utils.workbench.test/mappingsplugin/source/org/eclipse/persistence/tools/workbench/test/models/projects/IdentityPolicyProject.java index 8ee2d22f697..2df97530d89 100644 --- a/utils/eclipselink.utils.workbench.test/mappingsplugin/source/org/eclipse/persistence/tools/workbench/test/models/projects/IdentityPolicyProject.java +++ b/utils/eclipselink.utils.workbench.test/mappingsplugin/source/org/eclipse/persistence/tools/workbench/test/models/projects/IdentityPolicyProject.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -86,7 +86,7 @@ public void initializeEmployeeDescriptor() { employeeDescriptor.getCachingPolicy().setCacheType(MWCachingPolicy.CACHE_TYPE_FULL); employeeDescriptor.getCachingPolicy().setUseProjectDefaultCacheExpiry(false); employeeDescriptor.getCachingPolicy().getCacheExpiry().setExpiryType(MWCacheExpiry.CACHE_EXPIRY_TIME_TO_LIVE_EXPIRY); - employeeDescriptor.getCachingPolicy().getCacheExpiry().setTimeToLiveExpiry(new Long(10000)); + employeeDescriptor.getCachingPolicy().getCacheExpiry().setTimeToLiveExpiry(Long.valueOf(10000)); } diff --git a/utils/eclipselink.utils.workbench.test/mappingsplugin/source/org/eclipse/persistence/tools/workbench/test/models/projects/InsuranceRuntimeProject.java b/utils/eclipselink.utils.workbench.test/mappingsplugin/source/org/eclipse/persistence/tools/workbench/test/models/projects/InsuranceRuntimeProject.java index 168b6ed42eb..13e11350e3f 100644 --- a/utils/eclipselink.utils.workbench.test/mappingsplugin/source/org/eclipse/persistence/tools/workbench/test/models/projects/InsuranceRuntimeProject.java +++ b/utils/eclipselink.utils.workbench.test/mappingsplugin/source/org/eclipse/persistence/tools/workbench/test/models/projects/InsuranceRuntimeProject.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -470,8 +470,8 @@ public RelationalDescriptor buildPolicyHolderDescriptor() { sexMapping.setGetMethodName("getSex"); sexMapping.setSetMethodName("setSex"); sexMapping.setFieldName("HOLDER.SEX"); - converter.addConversionValue(new Character('F'), "Female"); - converter.addConversionValue(new Character('M'), "Male"); + converter.addConversionValue(Character.valueOf('F'), "Female"); + converter.addConversionValue(Character.valueOf('M'), "Male"); descriptor.addMapping(sexMapping); DirectCollectionMapping childrenNamesMapping = new DirectCollectionMapping(); diff --git a/utils/eclipselink.utils.workbench.test/mappingsplugin/source/org/eclipse/persistence/tools/workbench/test/models/projects/LegacyPhoneCompanyProject.java b/utils/eclipselink.utils.workbench.test/mappingsplugin/source/org/eclipse/persistence/tools/workbench/test/models/projects/LegacyPhoneCompanyProject.java index 480357ad3bb..6e732ab9145 100644 --- a/utils/eclipselink.utils.workbench.test/mappingsplugin/source/org/eclipse/persistence/tools/workbench/test/models/projects/LegacyPhoneCompanyProject.java +++ b/utils/eclipselink.utils.workbench.test/mappingsplugin/source/org/eclipse/persistence/tools/workbench/test/models/projects/LegacyPhoneCompanyProject.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -436,7 +436,7 @@ protected MWAggregateDescriptor initializeServiceDescriptor() { try { for (int i = 0; i < Service.SERVICE_PLANS.length; i++) - ((MWObjectTypeConverter) servicePlanMapping.getConverter()).addValuePair(new Integer(i), Service.SERVICE_PLANS[i]); + ((MWObjectTypeConverter) servicePlanMapping.getConverter()).addValuePair(Integer.valueOf(i), Service.SERVICE_PLANS[i]); } catch (MWObjectTypeConverter.ConversionValueException cve) { /*** shouldn't happen ***/} diff --git a/utils/eclipselink.utils.workbench.test/mappingsplugin/source/org/eclipse/persistence/tools/workbench/test/models/projects/PhoneCompanyRuntimeProject.java b/utils/eclipselink.utils.workbench.test/mappingsplugin/source/org/eclipse/persistence/tools/workbench/test/models/projects/PhoneCompanyRuntimeProject.java index 074a5619977..11bfc256fd7 100644 --- a/utils/eclipselink.utils.workbench.test/mappingsplugin/source/org/eclipse/persistence/tools/workbench/test/models/projects/PhoneCompanyRuntimeProject.java +++ b/utils/eclipselink.utils.workbench.test/mappingsplugin/source/org/eclipse/persistence/tools/workbench/test/models/projects/PhoneCompanyRuntimeProject.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -429,9 +429,9 @@ public RelationalDescriptor buildServiceDescriptor(boolean usesSharedAggregates) servicePlanMapping.setConverter(converter); servicePlanMapping.setAttributeName("servicePlan"); servicePlanMapping.setFieldName("servicePlan->DIRECT"); - converter.addConversionValue(new java.lang.Integer(0), "Platinum"); - converter.addConversionValue(new java.lang.Integer(2), "Standard"); - converter.addConversionValue(new java.lang.Integer(1), "Gold"); + converter.addConversionValue(Integer.valueOf(0), "Platinum"); + converter.addConversionValue(Integer.valueOf(2), "Standard"); + converter.addConversionValue(Integer.valueOf(1), "Gold"); descriptor.addMapping(servicePlanMapping); TransformationMapping rateMapping = new TransformationMapping(); diff --git a/utils/eclipselink.utils.workbench.test/mappingsplugin/source/org/eclipse/persistence/tools/workbench/test/models/projects/QueryProject.java b/utils/eclipselink.utils.workbench.test/mappingsplugin/source/org/eclipse/persistence/tools/workbench/test/models/projects/QueryProject.java index 2ebd9ac3895..fd562cf7e41 100644 --- a/utils/eclipselink.utils.workbench.test/mappingsplugin/source/org/eclipse/persistence/tools/workbench/test/models/projects/QueryProject.java +++ b/utils/eclipselink.utils.workbench.test/mappingsplugin/source/org/eclipse/persistence/tools/workbench/test/models/projects/QueryProject.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -114,7 +114,7 @@ private void createQuery2() query2.setCacheUsage(MWRelationalReadQuery.CHECK_CACHE_ONLY); query2.setLocking(MWAbstractRelationalReadQuery.LOCK); query2.setDistinctState(MWAbstractRelationalReadQuery.USE_DISTINCT); - query2.setQueryTimeout(new Integer(2)); + query2.setQueryTimeout(Integer.valueOf(2)); query2.setMaximumRows(11); } @@ -191,7 +191,7 @@ private void createQuery5() query5.setCacheUsage(MWRelationalReadQuery.CHECK_CACHE_BY_EXACT_PRIMARY_KEY); query5.setDistinctState(MWAbstractRelationalReadQuery.USE_DISTINCT); query5.setInMemoryQueryIndirectionPolicy(MWRelationalReadQuery.IGNORE_EXCEPTION_RETURN_CONFORMED); - query5.setQueryTimeout(new Integer(2)); + query5.setQueryTimeout(Integer.valueOf(2)); query5.setMaximumRows(0); query5.setLocking(getDefaultQueryLockMode()); @@ -337,13 +337,13 @@ private void createQuery10() List joinedQueryables = new ArrayList(); List allowsNullList = new ArrayList(); joinedQueryables.add(queryableObject); - allowsNullList.add(new Boolean(false)); + allowsNullList.add(Boolean.valueOf(false)); joinedQueryables.add(getPhoneNumberDescriptor().mappingNamed("owner")); - allowsNullList.add(new Boolean(true)); + allowsNullList.add(Boolean.valueOf(true)); joinedQueryables.add(getEmployeeDescriptor().mappingNamed("phoneNumbers")); - allowsNullList.add(new Boolean(false)); + allowsNullList.add(Boolean.valueOf(false)); joinedQueryables.add(getEmployeeDescriptor().mappingNamed("manager")); - allowsNullList.add(new Boolean(true)); + allowsNullList.add(Boolean.valueOf(true)); firstArgument2.setQueryableArgument(joinedQueryables.iterator(), allowsNullList.iterator()); diff --git a/utils/eclipselink.utils.workbench.test/mappingsplugin/source/org/eclipse/persistence/tools/workbench/test/models/simpleaggregate/Person.java b/utils/eclipselink.utils.workbench.test/mappingsplugin/source/org/eclipse/persistence/tools/workbench/test/models/simpleaggregate/Person.java index fd7b12cb1a9..ec5dfe58b47 100644 --- a/utils/eclipselink.utils.workbench.test/mappingsplugin/source/org/eclipse/persistence/tools/workbench/test/models/simpleaggregate/Person.java +++ b/utils/eclipselink.utils.workbench.test/mappingsplugin/source/org/eclipse/persistence/tools/workbench/test/models/simpleaggregate/Person.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -162,7 +162,7 @@ public void setId(Integer newValue) public void setId(int newValue) { - setId(new Integer(newValue)); + setId(Integer.valueOf(newValue)); } /** diff --git a/utils/eclipselink.utils.workbench.test/scplugin/source/org/eclipse/persistence/tools/workbench/test/scplugin/model/write/DatabaseSessionWriteTest.java b/utils/eclipselink.utils.workbench.test/scplugin/source/org/eclipse/persistence/tools/workbench/test/scplugin/model/write/DatabaseSessionWriteTest.java index 72282d2e778..a88fd10896b 100644 --- a/utils/eclipselink.utils.workbench.test/scplugin/source/org/eclipse/persistence/tools/workbench/test/scplugin/model/write/DatabaseSessionWriteTest.java +++ b/utils/eclipselink.utils.workbench.test/scplugin/source/org/eclipse/persistence/tools/workbench/test/scplugin/model/write/DatabaseSessionWriteTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -197,7 +197,7 @@ protected void populateDatabaseSession( DatabaseSessionConfig dbSessionConfig, S loginConfig.setExternalTransactionController(false); loginConfig.setForceFieldNamesToUppercase(false); loginConfig.setJdbcBatchWriting(false); - loginConfig.setMaxBatchWritingSize(new Integer(5)); + loginConfig.setMaxBatchWritingSize(Integer.valueOf(5)); loginConfig.setNativeSequencing(false); loginConfig.setNativeSQL(false); loginConfig.setOptimizeDataConversion(true); @@ -205,7 +205,7 @@ protected void populateDatabaseSession( DatabaseSessionConfig dbSessionConfig, S loginConfig.setPlatformClass("platform"); loginConfig.setSequenceCounterField("SEQ_COUNT"); loginConfig.setSequenceNameField("SEQ_NAME"); - loginConfig.setSequencePreallocationSize(new Integer(99)); + loginConfig.setSequencePreallocationSize(Integer.valueOf(99)); loginConfig.setSequenceTable("SEQUENCE"); loginConfig.setStreamsForBinding(false); loginConfig.setStringBinding(false); diff --git a/utils/eclipselink.utils.workbench.test/scplugin/source/org/eclipse/persistence/tools/workbench/test/scplugin/ui/AbstractPanelTest.java b/utils/eclipselink.utils.workbench.test/scplugin/source/org/eclipse/persistence/tools/workbench/test/scplugin/ui/AbstractPanelTest.java index 3ec5f79c025..f63e4055e2f 100644 --- a/utils/eclipselink.utils.workbench.test/scplugin/source/org/eclipse/persistence/tools/workbench/test/scplugin/ui/AbstractPanelTest.java +++ b/utils/eclipselink.utils.workbench.test/scplugin/source/org/eclipse/persistence/tools/workbench/test/scplugin/ui/AbstractPanelTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -760,7 +760,7 @@ private void dumpDuplicateMnemonicResults(Hashtable mnemonics) Integer mnemonic = (Integer) entry.getKey(); dump.append(StringTools.CR); - dump.append(new Character((char) mnemonic.intValue())); + dump.append(Character.valueOf((char) mnemonic.intValue())); dump.append(" is used by multiple labels: "); dump.append(duplicate); } @@ -935,7 +935,7 @@ private void registerMnemonic(Map table, String key) Vector vector = new Vector(); vector.add(repository.getString(key)); - table.put(new Integer(repository.getMnemonic(key)), vector); + table.put(Integer.valueOf(repository.getMnemonic(key)), vector); } /** @@ -1478,7 +1478,7 @@ private void storeMnemonic(Map mnemonics, { if (mnemonic != '\0') { - Integer character = new Integer(mnemonic); + Integer character = Integer.valueOf(mnemonic); if (mnemonics.containsKey(character)) { diff --git a/utils/eclipselink.utils.workbench.test/uitools/source/org/eclipse/persistence/tools/workbench/test/uitools/app/BufferedPropertyValueModelTests.java b/utils/eclipselink.utils.workbench.test/uitools/source/org/eclipse/persistence/tools/workbench/test/uitools/app/BufferedPropertyValueModelTests.java index a3c1fc41b60..69e8a7ae772 100644 --- a/utils/eclipselink.utils.workbench.test/uitools/source/org/eclipse/persistence/tools/workbench/test/uitools/app/BufferedPropertyValueModelTests.java +++ b/utils/eclipselink.utils.workbench.test/uitools/source/org/eclipse/persistence/tools/workbench/test/uitools/app/BufferedPropertyValueModelTests.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -76,7 +76,7 @@ protected void setUp() throws Exception { private PropertyValueModel buildIDAdapter(ValueModel eHolder) { return new PropertyAspectAdapter(eHolder, Employee.ID_PROPERTY) { protected Object getValueFromSubject() { - return new Integer(((Employee) this.subject).getID()); + return Integer.valueOf(((Employee) this.subject).getID()); } protected void setValueOnSubject(Object value) { ((Employee) this.subject).setID(((Integer) value).intValue()); @@ -117,8 +117,8 @@ public void testGetValue() { this.bufferedNameHolder.addPropertyChangeListener(ValueModel.VALUE, bufferedListener); this.bufferedHireDateHolder.addPropertyChangeListener(ValueModel.VALUE, bufferedListener); - assertEquals(new Integer(17), this.idAdapter.getValue()); - assertEquals(new Integer(17), this.bufferedIDHolder.getValue()); + assertEquals(Integer.valueOf(17), this.idAdapter.getValue()); + assertEquals(Integer.valueOf(17), this.bufferedIDHolder.getValue()); assertEquals("Freddy", this.employee.getName()); assertEquals("Freddy", this.nameAdapter.getValue()); @@ -129,10 +129,10 @@ public void testGetValue() { assertEquals(temp, this.hireDateAdapter.getValue()); assertEquals(temp, this.bufferedHireDateHolder.getValue()); - this.bufferedIDHolder.setValue(new Integer(323)); + this.bufferedIDHolder.setValue(Integer.valueOf(323)); assertEquals(17, this.employee.getID()); - assertEquals(new Integer(17), this.idAdapter.getValue()); - assertEquals(new Integer(323), this.bufferedIDHolder.getValue()); + assertEquals(Integer.valueOf(17), this.idAdapter.getValue()); + assertEquals(Integer.valueOf(323), this.bufferedIDHolder.getValue()); this.bufferedNameHolder.setValue("Ripley"); assertEquals("Freddy", this.employee.getName()); @@ -151,10 +151,10 @@ public void testAccept() { this.bufferedNameHolder.addPropertyChangeListener(ValueModel.VALUE, bufferedListener); this.bufferedHireDateHolder.addPropertyChangeListener(ValueModel.VALUE, bufferedListener); - this.bufferedIDHolder.setValue(new Integer(323)); + this.bufferedIDHolder.setValue(Integer.valueOf(323)); assertEquals(17, this.employee.getID()); - assertEquals(new Integer(17), this.idAdapter.getValue()); - assertEquals(new Integer(323), this.bufferedIDHolder.getValue()); + assertEquals(Integer.valueOf(17), this.idAdapter.getValue()); + assertEquals(Integer.valueOf(323), this.bufferedIDHolder.getValue()); this.bufferedNameHolder.setValue("Ripley"); assertEquals("Freddy", this.employee.getName()); @@ -170,8 +170,8 @@ public void testAccept() { this.trigger.accept(); assertEquals(323, this.employee.getID()); - assertEquals(new Integer(323), this.idAdapter.getValue()); - assertEquals(new Integer(323), this.bufferedIDHolder.getValue()); + assertEquals(Integer.valueOf(323), this.idAdapter.getValue()); + assertEquals(Integer.valueOf(323), this.bufferedIDHolder.getValue()); assertEquals("Ripley", this.employee.getName()); assertEquals("Ripley", this.nameAdapter.getValue()); @@ -188,10 +188,10 @@ public void testReset() { this.bufferedNameHolder.addPropertyChangeListener(ValueModel.VALUE, bufferedListener); this.bufferedHireDateHolder.addPropertyChangeListener(ValueModel.VALUE, bufferedListener); - this.bufferedIDHolder.setValue(new Integer(323)); + this.bufferedIDHolder.setValue(Integer.valueOf(323)); assertEquals(17, this.employee.getID()); - assertEquals(new Integer(17), this.idAdapter.getValue()); - assertEquals(new Integer(323), this.bufferedIDHolder.getValue()); + assertEquals(Integer.valueOf(17), this.idAdapter.getValue()); + assertEquals(Integer.valueOf(323), this.bufferedIDHolder.getValue()); this.bufferedNameHolder.setValue("Ripley"); assertEquals("Freddy", this.employee.getName()); @@ -207,8 +207,8 @@ public void testReset() { this.trigger.reset(); assertEquals(17, this.employee.getID()); - assertEquals(new Integer(17), this.idAdapter.getValue()); - assertEquals(new Integer(17), this.bufferedIDHolder.getValue()); + assertEquals(Integer.valueOf(17), this.idAdapter.getValue()); + assertEquals(Integer.valueOf(17), this.bufferedIDHolder.getValue()); assertEquals("Freddy", this.employee.getName()); assertEquals("Freddy", this.nameAdapter.getValue()); diff --git a/utils/eclipselink.utils.workbench.test/uitools/source/org/eclipse/persistence/tools/workbench/test/uitools/app/adapters/PreferencePropertyValueModelTests.java b/utils/eclipselink.utils.workbench.test/uitools/source/org/eclipse/persistence/tools/workbench/test/uitools/app/adapters/PreferencePropertyValueModelTests.java index 17af126cf72..4a63f032654 100644 --- a/utils/eclipselink.utils.workbench.test/uitools/source/org/eclipse/persistence/tools/workbench/test/uitools/app/adapters/PreferencePropertyValueModelTests.java +++ b/utils/eclipselink.utils.workbench.test/uitools/source/org/eclipse/persistence/tools/workbench/test/uitools/app/adapters/PreferencePropertyValueModelTests.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -234,25 +234,25 @@ public void testIntegerPreference() throws Exception { this.testNode.putInt(KEY_NAME, 123); this.preferenceAdapter.setConverter(BidiStringConverter.INTEGER_CONVERTER); this.preferenceAdapter.addPropertyChangeListener(ValueModel.VALUE, this.listener); - assertEquals(new Integer(123), this.preferenceAdapter.getValue()); + assertEquals(Integer.valueOf(123), this.preferenceAdapter.getValue()); assertNull(this.event); this.testNode.putInt(KEY_NAME, 246); this.waitForEventQueueToClear(); - this.verifyEvent(new Integer(123), new Integer(246)); - assertEquals(new Integer(246), this.preferenceAdapter.getValue()); + this.verifyEvent(Integer.valueOf(123), Integer.valueOf(246)); + assertEquals(Integer.valueOf(246), this.preferenceAdapter.getValue()); this.event = null; this.testNode.remove(KEY_NAME); this.waitForEventQueueToClear(); - this.verifyEvent(new Integer(246), null); + this.verifyEvent(Integer.valueOf(246), null); assertNull(this.preferenceAdapter.getValue()); this.event = null; this.testNode.putInt(KEY_NAME, 123); this.waitForEventQueueToClear(); - this.verifyEvent(null, new Integer(123)); - assertEquals(new Integer(123), this.preferenceAdapter.getValue()); + this.verifyEvent(null, Integer.valueOf(123)); + assertEquals(Integer.valueOf(123), this.preferenceAdapter.getValue()); } /** diff --git a/utils/eclipselink.utils.workbench.test/uitools/source/org/eclipse/persistence/tools/workbench/test/uitools/app/swing/NumberSpinnerModelAdapterTests.java b/utils/eclipselink.utils.workbench.test/uitools/source/org/eclipse/persistence/tools/workbench/test/uitools/app/swing/NumberSpinnerModelAdapterTests.java index 38c65187f5e..ed47424697d 100644 --- a/utils/eclipselink.utils.workbench.test/uitools/source/org/eclipse/persistence/tools/workbench/test/uitools/app/swing/NumberSpinnerModelAdapterTests.java +++ b/utils/eclipselink.utils.workbench.test/uitools/source/org/eclipse/persistence/tools/workbench/test/uitools/app/swing/NumberSpinnerModelAdapterTests.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -44,7 +44,7 @@ public NumberSpinnerModelAdapterTests(String name) { protected void setUp() throws Exception { super.setUp(); - this.valueHolder = new SimplePropertyValueModel(new Integer(0)); + this.valueHolder = new SimplePropertyValueModel(Integer.valueOf(0)); this.spinnerModelAdapter = new NumberSpinnerModelAdapter(this.valueHolder, -33, 33, 1); } @@ -60,9 +60,9 @@ public void stateChanged(ChangeEvent e) { NumberSpinnerModelAdapterTests.this.eventFired = true; } }); - this.spinnerModelAdapter.setValue(new Integer(5)); + this.spinnerModelAdapter.setValue(Integer.valueOf(5)); assertTrue(this.eventFired); - assertEquals(new Integer(5), this.valueHolder.getValue()); + assertEquals(Integer.valueOf(5), this.valueHolder.getValue()); } public void testSetValueValueHolder() throws Exception { @@ -72,10 +72,10 @@ public void stateChanged(ChangeEvent e) { NumberSpinnerModelAdapterTests.this.eventFired = true; } }); - assertEquals(new Integer(0), this.spinnerModelAdapter.getValue()); - this.valueHolder.setValue(new Integer(7)); + assertEquals(Integer.valueOf(0), this.spinnerModelAdapter.getValue()); + this.valueHolder.setValue(Integer.valueOf(7)); assertTrue(this.eventFired); - assertEquals(new Integer(7), this.spinnerModelAdapter.getValue()); + assertEquals(Integer.valueOf(7), this.spinnerModelAdapter.getValue()); } public void testDefaultValue() throws Exception { @@ -85,10 +85,10 @@ public void stateChanged(ChangeEvent e) { NumberSpinnerModelAdapterTests.this.eventFired = true; } }); - assertEquals(new Integer(0), this.spinnerModelAdapter.getValue()); + assertEquals(Integer.valueOf(0), this.spinnerModelAdapter.getValue()); this.valueHolder.setValue(null); assertTrue(this.eventFired); - assertEquals(new Integer(-33), this.spinnerModelAdapter.getValue()); + assertEquals(Integer.valueOf(-33), this.spinnerModelAdapter.getValue()); } public void testHasListeners() throws Exception { @@ -116,7 +116,7 @@ private void verifyHasListeners(Object adapter) throws Exception { public void testNullInitialValue() { this.valueHolder = new SimplePropertyValueModel(); - this.spinnerModelAdapter = new NumberSpinnerModelAdapter(this.valueHolder, new Integer(-33), new Integer(33), new Integer(1), new Integer(0)); + this.spinnerModelAdapter = new NumberSpinnerModelAdapter(this.valueHolder, Integer.valueOf(-33), Integer.valueOf(33), Integer.valueOf(1), Integer.valueOf(0)); this.eventFired = false; this.spinnerModelAdapter.addChangeListener(new TestChangeListener() { @@ -124,10 +124,10 @@ public void stateChanged(ChangeEvent e) { NumberSpinnerModelAdapterTests.this.eventFired = true; } }); - assertEquals(new Integer(0), this.spinnerModelAdapter.getValue()); - this.valueHolder.setValue(new Integer(7)); + assertEquals(Integer.valueOf(0), this.spinnerModelAdapter.getValue()); + this.valueHolder.setValue(Integer.valueOf(7)); assertTrue(this.eventFired); - assertEquals(new Integer(7), this.spinnerModelAdapter.getValue()); + assertEquals(Integer.valueOf(7), this.spinnerModelAdapter.getValue()); } diff --git a/utils/eclipselink.utils.workbench.test/uitools/source/org/eclipse/persistence/tools/workbench/test/uitools/app/swing/SpinnerModelAdapterTests.java b/utils/eclipselink.utils.workbench.test/uitools/source/org/eclipse/persistence/tools/workbench/test/uitools/app/swing/SpinnerModelAdapterTests.java index 6bdbe569996..e83c14152e0 100644 --- a/utils/eclipselink.utils.workbench.test/uitools/source/org/eclipse/persistence/tools/workbench/test/uitools/app/swing/SpinnerModelAdapterTests.java +++ b/utils/eclipselink.utils.workbench.test/uitools/source/org/eclipse/persistence/tools/workbench/test/uitools/app/swing/SpinnerModelAdapterTests.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -45,7 +45,7 @@ public SpinnerModelAdapterTests(String name) { protected void setUp() throws Exception { super.setUp(); - this.valueHolder = new SimplePropertyValueModel(new Integer(0)); + this.valueHolder = new SimplePropertyValueModel(Integer.valueOf(0)); this.spinnerModelAdapter = new SpinnerModelAdapter(this.valueHolder); } @@ -62,9 +62,9 @@ public void stateChanged(ChangeEvent e) { assertEquals(SpinnerModelAdapterTests.this.spinnerModelAdapter, e.getSource()); } }); - this.spinnerModelAdapter.setValue(new Integer(5)); + this.spinnerModelAdapter.setValue(Integer.valueOf(5)); assertTrue(this.eventFired); - assertEquals(new Integer(5), this.valueHolder.getValue()); + assertEquals(Integer.valueOf(5), this.valueHolder.getValue()); } public void testSetValueValueHolder() throws Exception { @@ -75,10 +75,10 @@ public void stateChanged(ChangeEvent e) { assertEquals(SpinnerModelAdapterTests.this.spinnerModelAdapter, e.getSource()); } }); - assertEquals(new Integer(0), this.spinnerModelAdapter.getValue()); - this.valueHolder.setValue(new Integer(7)); + assertEquals(Integer.valueOf(0), this.spinnerModelAdapter.getValue()); + this.valueHolder.setValue(Integer.valueOf(7)); assertTrue(this.eventFired); - assertEquals(new Integer(7), this.spinnerModelAdapter.getValue()); + assertEquals(Integer.valueOf(7), this.spinnerModelAdapter.getValue()); } public void testHasListeners() throws Exception { diff --git a/utils/eclipselink.utils.workbench.test/uitools/source/org/eclipse/persistence/tools/workbench/test/uitools/app/swing/SpinnerModelAdapterUITest.java b/utils/eclipselink.utils.workbench.test/uitools/source/org/eclipse/persistence/tools/workbench/test/uitools/app/swing/SpinnerModelAdapterUITest.java index 412deeb1dfd..606c49465c1 100644 --- a/utils/eclipselink.utils.workbench.test/uitools/source/org/eclipse/persistence/tools/workbench/test/uitools/app/swing/SpinnerModelAdapterUITest.java +++ b/utils/eclipselink.utils.workbench.test/uitools/source/org/eclipse/persistence/tools/workbench/test/uitools/app/swing/SpinnerModelAdapterUITest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -103,7 +103,7 @@ private SpinnerModel buildBirthDateSpinnerModel(PropertyValueModel valueHolder) private PropertyValueModel buildAgeHolder(ValueModel vm) { return new PropertyAspectAdapter(vm, TestModel.AGE_PROPERTY) { protected Object getValueFromSubject() { - return new Integer(((TestModel) this.subject).getAge()); + return Integer.valueOf(((TestModel) this.subject).getAge()); } protected void setValueOnSubject(Object value) { ((TestModel) this.subject).setAge(((Number) value).intValue()); diff --git a/utils/eclipselink.utils.workbench.test/uitools/source/org/eclipse/persistence/tools/workbench/test/uitools/app/swing/TableModelAdapterTests.java b/utils/eclipselink.utils.workbench.test/uitools/source/org/eclipse/persistence/tools/workbench/test/uitools/app/swing/TableModelAdapterTests.java index 05512b3b58b..b31aa9e34a6 100644 --- a/utils/eclipselink.utils.workbench.test/uitools/source/org/eclipse/persistence/tools/workbench/test/uitools/app/swing/TableModelAdapterTests.java +++ b/utils/eclipselink.utils.workbench.test/uitools/source/org/eclipse/persistence/tools/workbench/test/uitools/app/swing/TableModelAdapterTests.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -112,7 +112,7 @@ public void tableChanged(TableModelEvent e) { if (tableModelAdapter.getValueAt(i, PersonColumnAdapter.NAME_COLUMN).equals("Gollum")) { tableModelAdapter.setValueAt(Person.EYE_COLOR_HAZEL, i, PersonColumnAdapter.EYE_COLOR_COLUMN); tableModelAdapter.setValueAt(Boolean.TRUE, i, PersonColumnAdapter.EVIL_COLUMN); - tableModelAdapter.setValueAt(new Integer(-1), i, PersonColumnAdapter.RANK_COLUMN); + tableModelAdapter.setValueAt(Integer.valueOf(-1), i, PersonColumnAdapter.RANK_COLUMN); break; } } @@ -367,7 +367,7 @@ protected void setValueOnSubject(Object value) { private PropertyValueModel buildRankAdapter(Person person) { return new PropertyAspectAdapter(Person.RANK_PROPERTY, person) { protected Object getValueFromSubject() { - return new Integer(((Person) this.subject).getRank()); + return Integer.valueOf(((Person) this.subject).getRank()); } protected void setValueOnSubject(Object value) { ((Person) this.subject).setRank(((Integer) value).intValue()); @@ -378,7 +378,7 @@ protected void setValueOnSubject(Object value) { private PropertyValueModel buildAdventureCountAdapter(Person person) { return new PropertyAspectAdapter(Person.ADVENTURE_COUNT_PROPERTY, person) { protected Object getValueFromSubject() { - return new Integer(((Person) this.subject).getAdventureCount()); + return Integer.valueOf(((Person) this.subject).getAdventureCount()); } protected void setValueOnSubject(Object value) { ((Person) this.subject).setAdventureCount(((Integer) value).intValue()); diff --git a/utils/eclipselink.utils.workbench.test/uitools/source/org/eclipse/persistence/tools/workbench/test/uitools/app/swing/TableModelAdapterUITest.java b/utils/eclipselink.utils.workbench.test/uitools/source/org/eclipse/persistence/tools/workbench/test/uitools/app/swing/TableModelAdapterUITest.java index f206fe15be7..6be384e168b 100644 --- a/utils/eclipselink.utils.workbench.test/uitools/source/org/eclipse/persistence/tools/workbench/test/uitools/app/swing/TableModelAdapterUITest.java +++ b/utils/eclipselink.utils.workbench.test/uitools/source/org/eclipse/persistence/tools/workbench/test/uitools/app/swing/TableModelAdapterUITest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -651,7 +651,7 @@ private SpinnerModel buildRankSpinnerModel() { private PropertyValueModel buildRankAdapter() { return new PropertyAspectAdapter(this.selectedPersonHolder, Person.RANK_PROPERTY) { protected Object getValueFromSubject() { - return new Integer(((Person) this.subject).getRank()); + return Integer.valueOf(((Person) this.subject).getRank()); } protected void setValueOnSubject(Object value) { ((Person) this.subject).setRank(((Integer) value).intValue()); @@ -673,7 +673,7 @@ private SpinnerModel buildAdventureCountSpinnerModel() { private PropertyValueModel buildAdventureCountAdapter() { return new PropertyAspectAdapter(this.selectedPersonHolder, Person.ADVENTURE_COUNT_PROPERTY) { protected Object getValueFromSubject() { - return new Integer(((Person) this.subject).getAdventureCount()); + return Integer.valueOf(((Person) this.subject).getAdventureCount()); } protected void setValueOnSubject(Object value) { ((Person) this.subject).setAdventureCount(((Integer) value).intValue()); diff --git a/utils/eclipselink.utils.workbench.test/uitools/source/org/eclipse/persistence/tools/workbench/test/uitools/cell/TreeCellEditorUITest.java b/utils/eclipselink.utils.workbench.test/uitools/source/org/eclipse/persistence/tools/workbench/test/uitools/cell/TreeCellEditorUITest.java index b9fedfa69e3..95b7a0fa100 100644 --- a/utils/eclipselink.utils.workbench.test/uitools/source/org/eclipse/persistence/tools/workbench/test/uitools/cell/TreeCellEditorUITest.java +++ b/utils/eclipselink.utils.workbench.test/uitools/source/org/eclipse/persistence/tools/workbench/test/uitools/cell/TreeCellEditorUITest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -608,7 +608,7 @@ private SpinnerModel buildRankSpinnerModel() { private PropertyValueModel buildRankAdapter() { return new PropertyAspectAdapter(this.selectedPersonHolder, Person.RANK_PROPERTY) { protected Object getValueFromSubject() { - return new Integer(((Person) this.subject).getRank()); + return Integer.valueOf(((Person) this.subject).getRank()); } protected void setValueOnSubject(Object value) { ((Person) this.subject).setRank(((Integer) value).intValue()); @@ -630,7 +630,7 @@ private SpinnerModel buildAdventureCountSpinnerModel() { private PropertyValueModel buildAdventureCountAdapter() { return new PropertyAspectAdapter(this.selectedPersonHolder, Person.ADVENTURE_COUNT_PROPERTY) { protected Object getValueFromSubject() { - return new Integer(((Person) this.subject).getAdventureCount()); + return Integer.valueOf(((Person) this.subject).getAdventureCount()); } protected void setValueOnSubject(Object value) { ((Person) this.subject).setAdventureCount(((Integer) value).intValue()); @@ -1236,7 +1236,7 @@ public RankNode(PersonNode personNode) { protected PropertyValueModel buildAttributeAdapter() { return new PropertyAspectAdapter(Person.RANK_PROPERTY, this.getPerson()) { protected Object getValueFromSubject() { - return new Integer(((Person) this.subject).getRank()); + return Integer.valueOf(((Person) this.subject).getRank()); } protected void setValueOnSubject(Object value) { try { @@ -1279,7 +1279,7 @@ public AdventureCountNode(PersonNode personNode) { protected PropertyValueModel buildAttributeAdapter() { return new PropertyAspectAdapter(Person.ADVENTURE_COUNT_PROPERTY, this.getPerson()) { protected Object getValueFromSubject() { - return new Integer(((Person) this.subject).getAdventureCount()); + return Integer.valueOf(((Person) this.subject).getAdventureCount()); } protected void setValueOnSubject(Object value) { ((Person) this.subject).setAdventureCount(((Integer) value).intValue()); diff --git a/utils/eclipselink.utils.workbench.test/utility/source/org/eclipse/persistence/tools/workbench/test/utility/AbstractModelTests.java b/utils/eclipselink.utils.workbench.test/utility/source/org/eclipse/persistence/tools/workbench/test/utility/AbstractModelTests.java index 56b55dcce1c..099b3857152 100644 --- a/utils/eclipselink.utils.workbench.test/utility/source/org/eclipse/persistence/tools/workbench/test/utility/AbstractModelTests.java +++ b/utils/eclipselink.utils.workbench.test/utility/source/org/eclipse/persistence/tools/workbench/test/utility/AbstractModelTests.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -47,8 +47,8 @@ public class AbstractModelTests private static final String PROPERTY_NAME = "propertyName"; static final Object OLD_OBJECT_VALUE = new Object(); static final Object NEW_OBJECT_VALUE = new Object(); - static final Integer OLD_INT_VALUE = new Integer(27); - static final Integer NEW_INT_VALUE = new Integer(42); + static final Integer OLD_INT_VALUE = Integer.valueOf(27); + static final Integer NEW_INT_VALUE = Integer.valueOf(42); static final Boolean OLD_BOOLEAN_VALUE = Boolean.TRUE; static final Boolean NEW_BOOLEAN_VALUE = Boolean.FALSE; diff --git a/utils/eclipselink.utils.workbench.test/utility/source/org/eclipse/persistence/tools/workbench/test/utility/ClassToolsTests.java b/utils/eclipselink.utils.workbench.test/utility/source/org/eclipse/persistence/tools/workbench/test/utility/ClassToolsTests.java index 5a05712b066..addca2b7182 100644 --- a/utils/eclipselink.utils.workbench.test/utility/source/org/eclipse/persistence/tools/workbench/test/utility/ClassToolsTests.java +++ b/utils/eclipselink.utils.workbench.test/utility/source/org/eclipse/persistence/tools/workbench/test/utility/ClassToolsTests.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -111,7 +111,7 @@ public void testNewInstanceClass() { public void testNewInstanceClassClassObject() { int initialCapacity = 200; - Vector v = (Vector) ClassTools.newInstance(java.util.Vector.class, int.class, new Integer(initialCapacity)); + Vector v = (Vector) ClassTools.newInstance(java.util.Vector.class, int.class, Integer.valueOf(initialCapacity)); assertNotNull(v); assertEquals(0, v.size()); Object[] elementData = (Object[]) ClassTools.getFieldValue(v, "elementData"); @@ -123,14 +123,14 @@ public void testNewInstanceClassClassArrayObjectArray() { Class[] parmTypes = new Class[1]; parmTypes[0] = int.class; Object[] parms = new Object[1]; - parms[0] = new Integer(initialCapacity); + parms[0] = Integer.valueOf(initialCapacity); Vector v = (Vector) ClassTools.newInstance(java.util.Vector.class, parmTypes, parms); assertNotNull(v); assertEquals(0, v.size()); Object[] elementData = (Object[]) ClassTools.getFieldValue(v, "elementData"); assertEquals(initialCapacity, elementData.length); - parms[0] = new Integer(-1); + parms[0] = Integer.valueOf(-1); boolean exCaught = false; try { v = (Vector) ClassTools.newInstance(java.util.Vector.class, parmTypes, parms); @@ -257,9 +257,9 @@ public void testSetFieldValue() { Object[] newElementData = new Object[5]; newElementData[0] = "foo"; ClassTools.setFieldValue(v, "elementData", newElementData); - ClassTools.setFieldValue(v, "elementCount", new Integer(1)); + ClassTools.setFieldValue(v, "elementCount", Integer.valueOf(1)); // test inherited field - ClassTools.setFieldValue(v, "modCount", new Integer(1)); + ClassTools.setFieldValue(v, "modCount", Integer.valueOf(1)); assertTrue(v.contains("foo")); boolean exCaught = false; diff --git a/utils/eclipselink.utils.workbench.test/utility/source/org/eclipse/persistence/tools/workbench/test/utility/SimpleExceptionBroadcasterTests.java b/utils/eclipselink.utils.workbench.test/utility/source/org/eclipse/persistence/tools/workbench/test/utility/SimpleExceptionBroadcasterTests.java index 733f2046d02..783ea732a2d 100644 --- a/utils/eclipselink.utils.workbench.test/utility/source/org/eclipse/persistence/tools/workbench/test/utility/SimpleExceptionBroadcasterTests.java +++ b/utils/eclipselink.utils.workbench.test/utility/source/org/eclipse/persistence/tools/workbench/test/utility/SimpleExceptionBroadcasterTests.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -169,7 +169,7 @@ public void exceptionThrown(Thread thread, Throwable exception) { SimpleExceptionBroadcasterTests.this.localListenerNotified(this.number); } public String toString() { - return StringTools.buildToStringFor(this, new Integer(this.number)); + return StringTools.buildToStringFor(this, Integer.valueOf(this.number)); } } diff --git a/utils/eclipselink.utils.workbench.test/utility/source/org/eclipse/persistence/tools/workbench/test/utility/classfile/ClassFileTests.java b/utils/eclipselink.utils.workbench.test/utility/source/org/eclipse/persistence/tools/workbench/test/utility/classfile/ClassFileTests.java index 5be3472a97e..13cdbd29812 100644 --- a/utils/eclipselink.utils.workbench.test/utility/source/org/eclipse/persistence/tools/workbench/test/utility/classfile/ClassFileTests.java +++ b/utils/eclipselink.utils.workbench.test/utility/source/org/eclipse/persistence/tools/workbench/test/utility/classfile/ClassFileTests.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -251,37 +251,37 @@ private void verifyFieldConstantValue(Class javaClass) throws Exception { Field field; field = fieldPool.fieldNamed("byteStatic_55"); - assertEquals(new Integer(55), field.constantValue()); + assertEquals(Integer.valueOf(55), field.constantValue()); field = fieldPool.fieldNamed("shortStatic_55"); - assertEquals(new Integer(55), field.constantValue()); + assertEquals(Integer.valueOf(55), field.constantValue()); field = fieldPool.fieldNamed("intStatic_55"); - assertEquals(new Integer(55), field.constantValue()); + assertEquals(Integer.valueOf(55), field.constantValue()); field = fieldPool.fieldNamed("longStatic_55L"); - assertEquals(new Long(55L), field.constantValue()); + assertEquals(Long.valueOf(55L), field.constantValue()); field = fieldPool.fieldNamed("floatStatic_5_55F"); - assertEquals(new Float(5.55F), field.constantValue()); + assertEquals(Float.valueOf(5.55F), field.constantValue()); field = fieldPool.fieldNamed("floatStatic_5_0e7F"); - assertEquals(new Float(5e7F), field.constantValue()); + assertEquals(Float.valueOf(5e7F), field.constantValue()); field = fieldPool.fieldNamed("doubleStatic_5_55D"); - assertEquals(new Double(5.55D), field.constantValue()); + assertEquals(Double.valueOf(5.55D), field.constantValue()); field = fieldPool.fieldNamed("doubleStatic_5_0e55D"); - assertEquals(new Double(5e55D), field.constantValue()); + assertEquals(Double.valueOf(5e55D), field.constantValue()); field = fieldPool.fieldNamed("booleanStatic_true"); - assertEquals(new Integer(1), field.constantValue()); + assertEquals(Integer.valueOf(1), field.constantValue()); field = fieldPool.fieldNamed("booleanStatic_false"); - assertEquals(new Integer(0), field.constantValue()); + assertEquals(Integer.valueOf(0), field.constantValue()); field = fieldPool.fieldNamed("charStatic_A"); - assertEquals(new Integer('A'), field.constantValue()); + assertEquals(Integer.valueOf('A'), field.constantValue()); field = fieldPool.fieldNamed("stringStatic_A_String"); assertEquals("A String", field.constantValue()); diff --git a/utils/eclipselink.utils.workbench.test/utility/source/org/eclipse/persistence/tools/workbench/test/utility/diff/AbstractReflectiveDiffTests.java b/utils/eclipselink.utils.workbench.test/utility/source/org/eclipse/persistence/tools/workbench/test/utility/diff/AbstractReflectiveDiffTests.java index 87113030f92..058b9407742 100644 --- a/utils/eclipselink.utils.workbench.test/utility/source/org/eclipse/persistence/tools/workbench/test/utility/diff/AbstractReflectiveDiffTests.java +++ b/utils/eclipselink.utils.workbench.test/utility/source/org/eclipse/persistence/tools/workbench/test/utility/diff/AbstractReflectiveDiffTests.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -92,7 +92,7 @@ public void testOneNull() { } public void testClassMismatch() { - Object object2 = new Integer(42); + Object object2 = Integer.valueOf(42); Diff diff = this.differentiator.diff(this.employee1, object2); this.verifyDiffMismatch(diff, this.employee1, object2); @@ -133,8 +133,8 @@ public void testTwoFieldMismatch() { Diff leafDiff; leafDiff = (Diff) leafMismatches.get(0); // id - assertEquals(new Integer(1), leafDiff.getObject1()); - assertEquals(new Integer(77), leafDiff.getObject2()); + assertEquals(Integer.valueOf(1), leafDiff.getObject1()); + assertEquals(Integer.valueOf(77), leafDiff.getObject2()); leafDiff = (Diff) leafMismatches.get(1); // name assertEquals("Fred Flintstone", leafDiff.getObject1()); @@ -208,8 +208,8 @@ public void testAllFieldMismatch() { assertTrue(((Collection) leafDiff.getObject2()).contains(addedComment)); leafDiff = (Diff) leafMismatches.get(1); // id - assertEquals(new Integer(1), leafDiff.getObject1()); - assertEquals(new Integer(77), leafDiff.getObject2()); + assertEquals(Integer.valueOf(1), leafDiff.getObject1()); + assertEquals(Integer.valueOf(77), leafDiff.getObject2()); leafDiff = (Diff) leafMismatches.get(2); // name assertEquals("Fred Flintstone", leafDiff.getObject1()); @@ -220,16 +220,16 @@ public void testAllFieldMismatch() { assertEquals("troublemaker", leafDiff.getObject2()); leafDiff = (Diff) leafMismatches.get(4); // salary - assertEquals(new Float(20000.20f), leafDiff.getObject1()); - assertEquals(new Float(200000.01f), leafDiff.getObject2()); + assertEquals(Float.valueOf(20000.20f), leafDiff.getObject1()); + assertEquals(Float.valueOf(200000.01f), leafDiff.getObject2()); diff = (CompositeDiff) this.differentiator.keyDiff(this.employee1, this.employee2); this.verifyDiffMismatch(diff, this.employee1, this.employee2); leafMismatches = DiffTestTools.differentLeafDiffList(diff); assertEquals(1, leafMismatches.size()); leafDiff = (Diff) leafMismatches.get(0); // id - assertEquals(new Integer(1), leafDiff.getObject1()); - assertEquals(new Integer(77), leafDiff.getObject2()); + assertEquals(Integer.valueOf(1), leafDiff.getObject1()); + assertEquals(Integer.valueOf(77), leafDiff.getObject2()); } public void testNullFieldMismatch() { diff --git a/utils/eclipselink.utils.workbench.test/utility/source/org/eclipse/persistence/tools/workbench/test/utility/diff/EqualityDiffTests.java b/utils/eclipselink.utils.workbench.test/utility/source/org/eclipse/persistence/tools/workbench/test/utility/diff/EqualityDiffTests.java index 92aef7626cd..4bc5b714fc0 100644 --- a/utils/eclipselink.utils.workbench.test/utility/source/org/eclipse/persistence/tools/workbench/test/utility/diff/EqualityDiffTests.java +++ b/utils/eclipselink.utils.workbench.test/utility/source/org/eclipse/persistence/tools/workbench/test/utility/diff/EqualityDiffTests.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -47,7 +47,7 @@ protected void tearDown() throws Exception { } public void testSameObject() { - Object object1 = new Integer(42); + Object object1 = Integer.valueOf(42); Object object2 = object1; Diff diff = this.differentiator.diff(object1, object2); this.verifyDiff(diff, object1, object2); @@ -56,8 +56,8 @@ public void testSameObject() { } public void testDifferentObjects() { - Object object1 = new Integer(42); - Object object2 = new Integer(42); + Object object1 = Integer.valueOf(42); + Object object2 = Integer.valueOf(42); assertEquals(object1, object2); assertTrue(object1 != object2); Diff diff = this.differentiator.diff(object1, object2); @@ -84,8 +84,8 @@ private void verifyDiff(Diff diff, Object object1, Object object2) { } public void testUnequalObjects() { - Object object1 = new Integer(42); - Object object2 = new Integer(77); + Object object1 = Integer.valueOf(42); + Object object2 = Integer.valueOf(77); Diff diff = this.differentiator.diff(object1, object2); this.verifyDiffNot(diff, object1, object2); diff = this.differentiator.keyDiff(object1, object2); diff --git a/utils/eclipselink.utils.workbench.test/utility/source/org/eclipse/persistence/tools/workbench/test/utility/diff/InheritanceReflectiveDiffTests.java b/utils/eclipselink.utils.workbench.test/utility/source/org/eclipse/persistence/tools/workbench/test/utility/diff/InheritanceReflectiveDiffTests.java index fcc424c3aeb..aff5c7ca21a 100644 --- a/utils/eclipselink.utils.workbench.test/utility/source/org/eclipse/persistence/tools/workbench/test/utility/diff/InheritanceReflectiveDiffTests.java +++ b/utils/eclipselink.utils.workbench.test/utility/source/org/eclipse/persistence/tools/workbench/test/utility/diff/InheritanceReflectiveDiffTests.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -103,8 +103,8 @@ public void testInheritanceMismatch() { Diff leafDiff; leafDiff = (Diff) leafMismatches.get(0); // id - assertEquals(new Integer(1), leafDiff.getObject1()); - assertEquals(new Integer(77), leafDiff.getObject2()); + assertEquals(Integer.valueOf(1), leafDiff.getObject1()); + assertEquals(Integer.valueOf(77), leafDiff.getObject2()); leafDiff = (Diff) leafMismatches.get(1); // name assertEquals("Fred Flintstone", leafDiff.getObject1()); diff --git a/utils/eclipselink.utils.workbench.test/utility/source/org/eclipse/persistence/tools/workbench/test/utility/diff/NullDiffTests.java b/utils/eclipselink.utils.workbench.test/utility/source/org/eclipse/persistence/tools/workbench/test/utility/diff/NullDiffTests.java index 183baa9459b..7fefcc85c00 100644 --- a/utils/eclipselink.utils.workbench.test/utility/source/org/eclipse/persistence/tools/workbench/test/utility/diff/NullDiffTests.java +++ b/utils/eclipselink.utils.workbench.test/utility/source/org/eclipse/persistence/tools/workbench/test/utility/diff/NullDiffTests.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -47,7 +47,7 @@ protected void tearDown() throws Exception { } public void testSameObject() { - Object object1 = new Integer(42); + Object object1 = Integer.valueOf(42); Object object2 = object1; Diff diff = this.differentiator.diff(object1, object2); this.verifyDiff(diff, object1, object2); @@ -56,8 +56,8 @@ public void testSameObject() { } public void testDifferentObjects() { - Object object1 = new Integer(42); - Object object2 = new Integer(42); + Object object1 = Integer.valueOf(42); + Object object2 = Integer.valueOf(42); assertEquals(object1, object2); assertTrue(object1 != object2); Diff diff = this.differentiator.diff(object1, object2); @@ -84,8 +84,8 @@ private void verifyDiff(Diff diff, Object object1, Object object2) { } public void testUnequalObjects() { - Object object1 = new Integer(42); - Object object2 = new Integer(77); + Object object1 = Integer.valueOf(42); + Object object2 = Integer.valueOf(77); Diff diff = this.differentiator.diff(object1, object2); this.verifyDiff(diff, object1, object2); diff = this.differentiator.keyDiff(object1, object2); diff --git a/utils/eclipselink.utils.workbench.test/utility/source/org/eclipse/persistence/tools/workbench/test/utility/events/ReflectivePropertyChangeListenerTests.java b/utils/eclipselink.utils.workbench.test/utility/source/org/eclipse/persistence/tools/workbench/test/utility/events/ReflectivePropertyChangeListenerTests.java index 2a3850be1f0..2e2e247aae6 100644 --- a/utils/eclipselink.utils.workbench.test/utility/source/org/eclipse/persistence/tools/workbench/test/utility/events/ReflectivePropertyChangeListenerTests.java +++ b/utils/eclipselink.utils.workbench.test/utility/source/org/eclipse/persistence/tools/workbench/test/utility/events/ReflectivePropertyChangeListenerTests.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -177,8 +177,8 @@ private class Target { super(); this.testModel = testModel; this.propertyName = propertyName; - this.oldValue = new Integer(oldValue); - this.newValue = new Integer(newValue); + this.oldValue = Integer.valueOf(oldValue); + this.newValue = Integer.valueOf(newValue); } void propertyChangedZeroArgument() { this.zeroArgumentFlag = true; diff --git a/utils/eclipselink.utils.workbench.test/utility/source/org/eclipse/persistence/tools/workbench/test/utility/filters/ANDFilterTests.java b/utils/eclipselink.utils.workbench.test/utility/source/org/eclipse/persistence/tools/workbench/test/utility/filters/ANDFilterTests.java index 596403d94b0..25f7bc08d72 100644 --- a/utils/eclipselink.utils.workbench.test/utility/source/org/eclipse/persistence/tools/workbench/test/utility/filters/ANDFilterTests.java +++ b/utils/eclipselink.utils.workbench.test/utility/source/org/eclipse/persistence/tools/workbench/test/utility/filters/ANDFilterTests.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -41,7 +41,7 @@ protected void setUp() throws Exception { } private static Filter buildMinFilter(double min) { - return new SimpleFilter(new Double(min)) { + return new SimpleFilter(Double.valueOf(min)) { public boolean accept(Object next) { double minValue = ((Number) this.criterion).doubleValue(); double value = ((Number) next).doubleValue(); @@ -51,7 +51,7 @@ public boolean accept(Object next) { } private static Filter buildMaxFilter(double max) { - return new SimpleFilter(new Double(max)) { + return new SimpleFilter(Double.valueOf(max)) { public boolean accept(Object next) { double maxValue = ((Number) this.criterion).doubleValue(); double value = ((Number) next).doubleValue(); @@ -75,35 +75,35 @@ protected void tearDown() throws Exception { } public void testFiltering2() { - assertTrue(this.andFilter.accept(new Integer(7))); - assertTrue(this.andFilter.accept(new Integer(2))); - assertTrue(this.andFilter.accept(new Double(6.666))); - assertFalse(this.andFilter.accept(new Double(-99))); - assertFalse(this.andFilter.accept(new Double(-1))); - assertFalse(this.andFilter.accept(new Double(11))); - assertFalse(this.andFilter.accept(new Double(111))); + assertTrue(this.andFilter.accept(Integer.valueOf(7))); + assertTrue(this.andFilter.accept(Integer.valueOf(2))); + assertTrue(this.andFilter.accept(Double.valueOf(6.666))); + assertFalse(this.andFilter.accept(Double.valueOf(-99))); + assertFalse(this.andFilter.accept(Double.valueOf(-1))); + assertFalse(this.andFilter.accept(Double.valueOf(11))); + assertFalse(this.andFilter.accept(Double.valueOf(111))); } public void testFiltering3() { ANDFilter andFilter2 = new ANDFilter(this.andFilter, buildEvenFilter()); - assertFalse(andFilter2.accept(new Integer(7))); - assertTrue(andFilter2.accept(new Integer(2))); - assertTrue(andFilter2.accept(new Double(6.1))); - assertFalse(andFilter2.accept(new Double(-99))); - assertFalse(andFilter2.accept(new Double(-1))); - assertFalse(andFilter2.accept(new Double(11))); - assertFalse(andFilter2.accept(new Double(111))); + assertFalse(andFilter2.accept(Integer.valueOf(7))); + assertTrue(andFilter2.accept(Integer.valueOf(2))); + assertTrue(andFilter2.accept(Double.valueOf(6.1))); + assertFalse(andFilter2.accept(Double.valueOf(-99))); + assertFalse(andFilter2.accept(Double.valueOf(-1))); + assertFalse(andFilter2.accept(Double.valueOf(11))); + assertFalse(andFilter2.accept(Double.valueOf(111))); } public void testFilteringComposite() { Filter andFilter2 = ANDFilter.and(new Filter[] {buildMinFilter(1), buildMaxFilter(10), buildEvenFilter()}); - assertFalse(andFilter2.accept(new Integer(7))); - assertTrue(andFilter2.accept(new Integer(2))); - assertTrue(andFilter2.accept(new Double(6.1))); - assertFalse(andFilter2.accept(new Double(-99))); - assertFalse(andFilter2.accept(new Double(-1))); - assertFalse(andFilter2.accept(new Double(11))); - assertFalse(andFilter2.accept(new Double(111))); + assertFalse(andFilter2.accept(Integer.valueOf(7))); + assertTrue(andFilter2.accept(Integer.valueOf(2))); + assertTrue(andFilter2.accept(Double.valueOf(6.1))); + assertFalse(andFilter2.accept(Double.valueOf(-99))); + assertFalse(andFilter2.accept(Double.valueOf(-1))); + assertFalse(andFilter2.accept(Double.valueOf(11))); + assertFalse(andFilter2.accept(Double.valueOf(111))); } public void testClone() { diff --git a/utils/eclipselink.utils.workbench.test/utility/source/org/eclipse/persistence/tools/workbench/test/utility/filters/NOTFilterTests.java b/utils/eclipselink.utils.workbench.test/utility/source/org/eclipse/persistence/tools/workbench/test/utility/filters/NOTFilterTests.java index 9588ca6f926..ef2199ce18c 100644 --- a/utils/eclipselink.utils.workbench.test/utility/source/org/eclipse/persistence/tools/workbench/test/utility/filters/NOTFilterTests.java +++ b/utils/eclipselink.utils.workbench.test/utility/source/org/eclipse/persistence/tools/workbench/test/utility/filters/NOTFilterTests.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -63,12 +63,12 @@ protected void tearDown() throws Exception { } public void testFiltering() { - assertTrue(this.notFilter.accept(new Integer(0))); - assertTrue(this.notFilter.accept(new Integer(-1))); - assertTrue(this.notFilter.accept(new Double(-0.001))); - assertFalse(this.notFilter.accept(new Double(1))); - assertFalse(this.notFilter.accept(new Double(11))); - assertFalse(this.notFilter.accept(new Double(111))); + assertTrue(this.notFilter.accept(Integer.valueOf(0))); + assertTrue(this.notFilter.accept(Integer.valueOf(-1))); + assertTrue(this.notFilter.accept(Double.valueOf(-0.001))); + assertFalse(this.notFilter.accept(Double.valueOf(1))); + assertFalse(this.notFilter.accept(Double.valueOf(11))); + assertFalse(this.notFilter.accept(Double.valueOf(111))); } public void testClone() { diff --git a/utils/eclipselink.utils.workbench.test/utility/source/org/eclipse/persistence/tools/workbench/test/utility/filters/ORFilterTests.java b/utils/eclipselink.utils.workbench.test/utility/source/org/eclipse/persistence/tools/workbench/test/utility/filters/ORFilterTests.java index 97b14e827b5..43af5533f72 100644 --- a/utils/eclipselink.utils.workbench.test/utility/source/org/eclipse/persistence/tools/workbench/test/utility/filters/ORFilterTests.java +++ b/utils/eclipselink.utils.workbench.test/utility/source/org/eclipse/persistence/tools/workbench/test/utility/filters/ORFilterTests.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -41,7 +41,7 @@ protected void setUp() throws Exception { } private static Filter buildMinFilter(double min) { - return new SimpleFilter(new Double(min)) { + return new SimpleFilter(Double.valueOf(min)) { public boolean accept(Object next) { double minValue = ((Number) this.criterion).doubleValue(); double value = ((Number) next).doubleValue(); @@ -51,7 +51,7 @@ public boolean accept(Object next) { } private static Filter buildMaxFilter(double max) { - return new SimpleFilter(new Double(max)) { + return new SimpleFilter(Double.valueOf(max)) { public boolean accept(Object next) { double maxValue = ((Number) this.criterion).doubleValue(); double value = ((Number) next).doubleValue(); @@ -75,49 +75,49 @@ protected void tearDown() throws Exception { } public void testFiltering2() { - assertFalse(this.orFilter.accept(new Integer(7))); - assertFalse(this.orFilter.accept(new Integer(2))); - assertFalse(this.orFilter.accept(new Double(6.666))); - assertTrue(this.orFilter.accept(new Double(-99))); - assertTrue(this.orFilter.accept(new Double(-1))); - assertTrue(this.orFilter.accept(new Double(11))); - assertTrue(this.orFilter.accept(new Double(111))); + assertFalse(this.orFilter.accept(Integer.valueOf(7))); + assertFalse(this.orFilter.accept(Integer.valueOf(2))); + assertFalse(this.orFilter.accept(Double.valueOf(6.666))); + assertTrue(this.orFilter.accept(Double.valueOf(-99))); + assertTrue(this.orFilter.accept(Double.valueOf(-1))); + assertTrue(this.orFilter.accept(Double.valueOf(11))); + assertTrue(this.orFilter.accept(Double.valueOf(111))); } public void testFiltering3() { ORFilter orFilter2 = new ORFilter(this.orFilter, buildEvenFilter()); - assertFalse(orFilter2.accept(new Integer(7))); - assertFalse(orFilter2.accept(new Integer(3))); - assertFalse(orFilter2.accept(new Integer(9))); - assertTrue(orFilter2.accept(new Integer(2))); - assertTrue(orFilter2.accept(new Double(6.1))); - assertTrue(orFilter2.accept(new Double(-99))); - assertTrue(orFilter2.accept(new Double(-1))); - assertTrue(orFilter2.accept(new Double(11))); - assertTrue(orFilter2.accept(new Double(111))); - assertTrue(orFilter2.accept(new Double(-98))); - assertTrue(orFilter2.accept(new Double(0))); - assertTrue(orFilter2.accept(new Double(-2))); - assertTrue(orFilter2.accept(new Double(12))); - assertTrue(orFilter2.accept(new Double(222))); + assertFalse(orFilter2.accept(Integer.valueOf(7))); + assertFalse(orFilter2.accept(Integer.valueOf(3))); + assertFalse(orFilter2.accept(Integer.valueOf(9))); + assertTrue(orFilter2.accept(Integer.valueOf(2))); + assertTrue(orFilter2.accept(Double.valueOf(6.1))); + assertTrue(orFilter2.accept(Double.valueOf(-99))); + assertTrue(orFilter2.accept(Double.valueOf(-1))); + assertTrue(orFilter2.accept(Double.valueOf(11))); + assertTrue(orFilter2.accept(Double.valueOf(111))); + assertTrue(orFilter2.accept(Double.valueOf(-98))); + assertTrue(orFilter2.accept(Double.valueOf(0))); + assertTrue(orFilter2.accept(Double.valueOf(-2))); + assertTrue(orFilter2.accept(Double.valueOf(12))); + assertTrue(orFilter2.accept(Double.valueOf(222))); } public void testFilteringComposite() { Filter orFilter2 = ORFilter.or(new Filter[] {buildMinFilter(1), buildMaxFilter(10), buildEvenFilter()}); - assertFalse(orFilter2.accept(new Integer(7))); - assertFalse(orFilter2.accept(new Integer(3))); - assertFalse(orFilter2.accept(new Integer(9))); - assertTrue(orFilter2.accept(new Integer(2))); - assertTrue(orFilter2.accept(new Double(6.1))); - assertTrue(orFilter2.accept(new Double(-99))); - assertTrue(orFilter2.accept(new Double(-1))); - assertTrue(orFilter2.accept(new Double(11))); - assertTrue(orFilter2.accept(new Double(111))); - assertTrue(orFilter2.accept(new Double(-98))); - assertTrue(orFilter2.accept(new Double(0))); - assertTrue(orFilter2.accept(new Double(-2))); - assertTrue(orFilter2.accept(new Double(12))); - assertTrue(orFilter2.accept(new Double(222))); + assertFalse(orFilter2.accept(Integer.valueOf(7))); + assertFalse(orFilter2.accept(Integer.valueOf(3))); + assertFalse(orFilter2.accept(Integer.valueOf(9))); + assertTrue(orFilter2.accept(Integer.valueOf(2))); + assertTrue(orFilter2.accept(Double.valueOf(6.1))); + assertTrue(orFilter2.accept(Double.valueOf(-99))); + assertTrue(orFilter2.accept(Double.valueOf(-1))); + assertTrue(orFilter2.accept(Double.valueOf(11))); + assertTrue(orFilter2.accept(Double.valueOf(111))); + assertTrue(orFilter2.accept(Double.valueOf(-98))); + assertTrue(orFilter2.accept(Double.valueOf(0))); + assertTrue(orFilter2.accept(Double.valueOf(-2))); + assertTrue(orFilter2.accept(Double.valueOf(12))); + assertTrue(orFilter2.accept(Double.valueOf(222))); } public void testClone() { diff --git a/utils/eclipselink.utils.workbench.test/utility/source/org/eclipse/persistence/tools/workbench/test/utility/filters/XORFilterTests.java b/utils/eclipselink.utils.workbench.test/utility/source/org/eclipse/persistence/tools/workbench/test/utility/filters/XORFilterTests.java index 0c1b0993c27..ac8abee208c 100644 --- a/utils/eclipselink.utils.workbench.test/utility/source/org/eclipse/persistence/tools/workbench/test/utility/filters/XORFilterTests.java +++ b/utils/eclipselink.utils.workbench.test/utility/source/org/eclipse/persistence/tools/workbench/test/utility/filters/XORFilterTests.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -41,7 +41,7 @@ protected void setUp() throws Exception { } private static Filter buildMinFilter(double min) { - return new SimpleFilter(new Double(min)) { + return new SimpleFilter(Double.valueOf(min)) { public boolean accept(Object next) { double minValue = ((Number) this.criterion).doubleValue(); double value = ((Number) next).doubleValue(); @@ -51,7 +51,7 @@ public boolean accept(Object next) { } private static Filter buildMaxFilter(double max) { - return new SimpleFilter(new Double(max)) { + return new SimpleFilter(Double.valueOf(max)) { public boolean accept(Object next) { double maxValue = ((Number) this.criterion).doubleValue(); double value = ((Number) next).doubleValue(); @@ -75,31 +75,31 @@ protected void tearDown() throws Exception { } public void testFiltering2() { - assertFalse(this.xorFilter.accept(new Integer(7))); - assertFalse(this.xorFilter.accept(new Integer(2))); - assertFalse(this.xorFilter.accept(new Double(6.666))); - assertTrue(this.xorFilter.accept(new Double(-99))); - assertTrue(this.xorFilter.accept(new Double(-1))); - assertTrue(this.xorFilter.accept(new Double(11))); - assertTrue(this.xorFilter.accept(new Double(111))); + assertFalse(this.xorFilter.accept(Integer.valueOf(7))); + assertFalse(this.xorFilter.accept(Integer.valueOf(2))); + assertFalse(this.xorFilter.accept(Double.valueOf(6.666))); + assertTrue(this.xorFilter.accept(Double.valueOf(-99))); + assertTrue(this.xorFilter.accept(Double.valueOf(-1))); + assertTrue(this.xorFilter.accept(Double.valueOf(11))); + assertTrue(this.xorFilter.accept(Double.valueOf(111))); } public void testFiltering3() { XORFilter xorFilter2 = new XORFilter(this.xorFilter, buildEvenFilter()); - assertFalse(xorFilter2.accept(new Integer(7))); - assertFalse(xorFilter2.accept(new Integer(3))); - assertFalse(xorFilter2.accept(new Integer(9))); - assertTrue(xorFilter2.accept(new Integer(2))); - assertTrue(xorFilter2.accept(new Double(6.1))); - assertTrue(xorFilter2.accept(new Double(-99))); - assertTrue(xorFilter2.accept(new Double(-1))); - assertTrue(xorFilter2.accept(new Double(11))); - assertTrue(xorFilter2.accept(new Double(111))); - assertFalse(xorFilter2.accept(new Double(-98))); - assertFalse(xorFilter2.accept(new Double(0))); - assertFalse(xorFilter2.accept(new Double(-2))); - assertFalse(xorFilter2.accept(new Double(12))); - assertFalse(xorFilter2.accept(new Double(222))); + assertFalse(xorFilter2.accept(Integer.valueOf(7))); + assertFalse(xorFilter2.accept(Integer.valueOf(3))); + assertFalse(xorFilter2.accept(Integer.valueOf(9))); + assertTrue(xorFilter2.accept(Integer.valueOf(2))); + assertTrue(xorFilter2.accept(Double.valueOf(6.1))); + assertTrue(xorFilter2.accept(Double.valueOf(-99))); + assertTrue(xorFilter2.accept(Double.valueOf(-1))); + assertTrue(xorFilter2.accept(Double.valueOf(11))); + assertTrue(xorFilter2.accept(Double.valueOf(111))); + assertFalse(xorFilter2.accept(Double.valueOf(-98))); + assertFalse(xorFilter2.accept(Double.valueOf(0))); + assertFalse(xorFilter2.accept(Double.valueOf(-2))); + assertFalse(xorFilter2.accept(Double.valueOf(12))); + assertFalse(xorFilter2.accept(Double.valueOf(222))); } public void testClone() { diff --git a/utils/eclipselink.utils.workbench.test/utility/source/org/eclipse/persistence/tools/workbench/test/utility/io/FileToolsTests.java b/utils/eclipselink.utils.workbench.test/utility/source/org/eclipse/persistence/tools/workbench/test/utility/io/FileToolsTests.java index bf721ed98e1..40e15635b18 100644 --- a/utils/eclipselink.utils.workbench.test/utility/source/org/eclipse/persistence/tools/workbench/test/utility/io/FileToolsTests.java +++ b/utils/eclipselink.utils.workbench.test/utility/source/org/eclipse/persistence/tools/workbench/test/utility/io/FileToolsTests.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -278,7 +278,7 @@ public void testRelativeParentFile() { } private File relativeParentFile(int len) { - return (File) ClassTools.invokeStaticMethod(FileTools.class, "relativeParentFile", int.class, new Integer(len)); + return (File) ClassTools.invokeStaticMethod(FileTools.class, "relativeParentFile", int.class, Integer.valueOf(len)); } public void testConvertToRelativeFile() { diff --git a/utils/eclipselink.utils.workbench.test/utility/source/org/eclipse/persistence/tools/workbench/test/utility/iterators/TransformationIteratorTests.java b/utils/eclipselink.utils.workbench.test/utility/source/org/eclipse/persistence/tools/workbench/test/utility/iterators/TransformationIteratorTests.java index b950d2fb79e..692da3e75f4 100644 --- a/utils/eclipselink.utils.workbench.test/utility/source/org/eclipse/persistence/tools/workbench/test/utility/iterators/TransformationIteratorTests.java +++ b/utils/eclipselink.utils.workbench.test/utility/source/org/eclipse/persistence/tools/workbench/test/utility/iterators/TransformationIteratorTests.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -153,7 +153,7 @@ private Transformer buildTransformer() { // transform each string into an integer with a value of the string's length return new Transformer() { public Object transform(Object next) { - return new Integer(((String) next).length()); + return Integer.valueOf(((String) next).length()); } }; } @@ -162,7 +162,7 @@ private Iterator buildInnerTransformationIterator(Iterator nestedIterator) { // transform each string into an integer with a value of the string's length return new TransformationIterator(nestedIterator) { protected Object transform(Object next) { - return new Integer(((String) next).length()); + return Integer.valueOf(((String) next).length()); } }; } diff --git a/utils/eclipselink.utils.workbench.test/utility/source/org/eclipse/persistence/tools/workbench/test/utility/iterators/TransformationListIteratorTests.java b/utils/eclipselink.utils.workbench.test/utility/source/org/eclipse/persistence/tools/workbench/test/utility/iterators/TransformationListIteratorTests.java index 40b80e71b6a..b4cf6665d6d 100644 --- a/utils/eclipselink.utils.workbench.test/utility/source/org/eclipse/persistence/tools/workbench/test/utility/iterators/TransformationListIteratorTests.java +++ b/utils/eclipselink.utils.workbench.test/utility/source/org/eclipse/persistence/tools/workbench/test/utility/iterators/TransformationListIteratorTests.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -246,7 +246,7 @@ private Transformer buildTransformer() { // transform each string into an integer with a value of the string's length return new Transformer() { public Object transform(Object next) { - return new Integer(((String) next).length()); + return Integer.valueOf(((String) next).length()); } }; } @@ -255,7 +255,7 @@ private ListIterator buildInnerTransformationListIterator(ListIterator nestedIte // transform each string into an integer with a value of the string's length return new TransformationListIterator(nestedIterator) { protected Object transform(Object next) { - return new Integer(((String) next).length()); + return Integer.valueOf(((String) next).length()); } }; } diff --git a/utils/eclipselink.utils.workbench/framework/source/org/eclipse/persistence/tools/workbench/framework/action/AbstractFrameworkAction.java b/utils/eclipselink.utils.workbench/framework/source/org/eclipse/persistence/tools/workbench/framework/action/AbstractFrameworkAction.java index b5e997c6695..292e65e6aab 100644 --- a/utils/eclipselink.utils.workbench/framework/source/org/eclipse/persistence/tools/workbench/framework/action/AbstractFrameworkAction.java +++ b/utils/eclipselink.utils.workbench/framework/source/org/eclipse/persistence/tools/workbench/framework/action/AbstractFrameworkAction.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -217,7 +217,7 @@ public void setAccelerator(KeyStroke accelerator) { } public void setMnemonic(int mnemonic) { - this.putValue(MNEMONIC_KEY, new Integer(mnemonic)); + this.putValue(MNEMONIC_KEY, Integer.valueOf(mnemonic)); } diff --git a/utils/eclipselink.utils.workbench/framework/source/org/eclipse/persistence/tools/workbench/framework/internal/GeneralPreferencesPage.java b/utils/eclipselink.utils.workbench/framework/source/org/eclipse/persistence/tools/workbench/framework/internal/GeneralPreferencesPage.java index 4ba55d39b7d..8c5844c33bb 100644 --- a/utils/eclipselink.utils.workbench/framework/source/org/eclipse/persistence/tools/workbench/framework/internal/GeneralPreferencesPage.java +++ b/utils/eclipselink.utils.workbench/framework/source/org/eclipse/persistence/tools/workbench/framework/internal/GeneralPreferencesPage.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -317,11 +317,11 @@ public String convertToString(Object o) { public Object convertToObject(String s) { if (s == null) { - return new Integer(RecentFilesManager.DEFAULT_MAX_SIZE); + return Integer.valueOf(RecentFilesManager.DEFAULT_MAX_SIZE); } - Integer i = new Integer(s); + Integer i = Integer.valueOf(s); if (i.intValue() < 0 || i.intValue() > RecentFilesManager.MAX_MAX_SIZE) { - return new Integer(RecentFilesManager.DEFAULT_MAX_SIZE); + return Integer.valueOf(RecentFilesManager.DEFAULT_MAX_SIZE); } return i; } diff --git a/utils/eclipselink.utils.workbench/framework/source/org/eclipse/persistence/tools/workbench/framework/internal/OpenRecentFileAction.java b/utils/eclipselink.utils.workbench/framework/source/org/eclipse/persistence/tools/workbench/framework/internal/OpenRecentFileAction.java index 16736c9b7b7..dba41b5445a 100644 --- a/utils/eclipselink.utils.workbench/framework/source/org/eclipse/persistence/tools/workbench/framework/internal/OpenRecentFileAction.java +++ b/utils/eclipselink.utils.workbench/framework/source/org/eclipse/persistence/tools/workbench/framework/internal/OpenRecentFileAction.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -51,7 +51,7 @@ void initialize(WorkbenchWindow workbenchWindow, int count, File recentFile) { this.putValue(SHORT_DESCRIPTION, recentFile.getAbsolutePath()); this.putValue(SMALL_ICON, ICON); if (count < 10) { - this.putValue(MNEMONIC_KEY, new Integer(countString.charAt(0))); + this.putValue(MNEMONIC_KEY, Integer.valueOf(countString.charAt(0))); } } diff --git a/utils/eclipselink.utils.workbench/framework/source/org/eclipse/persistence/tools/workbench/framework/uitools/ComponentAligner.java b/utils/eclipselink.utils.workbench/framework/source/org/eclipse/persistence/tools/workbench/framework/uitools/ComponentAligner.java index 2b67855d052..a569d4181ef 100644 --- a/utils/eclipselink.utils.workbench/framework/source/org/eclipse/persistence/tools/workbench/framework/uitools/ComponentAligner.java +++ b/utils/eclipselink.utils.workbench/framework/source/org/eclipse/persistence/tools/workbench/framework/uitools/ComponentAligner.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -251,7 +251,7 @@ private void firePropertyChange(int oldValue, int newValue) { if ((changeSupport != null) && (oldValue != newValue)) { - changeSupport.firePropertyChange(TEXT_PROPERTY, new Integer(oldValue), new Integer(newValue)); + changeSupport.firePropertyChange(TEXT_PROPERTY, Integer.valueOf(oldValue), Integer.valueOf(newValue)); } } diff --git a/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/db/MWColumn.java b/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/db/MWColumn.java index 219c3673874..5b232d2d77d 100644 --- a/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/db/MWColumn.java +++ b/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/db/MWColumn.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -537,8 +537,8 @@ public static XMLDescriptor buildDescriptor() { descriptor.addDirectMapping("name", "name/text()"); descriptor.addDirectMapping("databaseTypeName", "getDatabaseTypeNameForTopLink", "setDatabaseTypeNameForTopLink", "type/text()"); - ((XMLDirectMapping) descriptor.addDirectMapping("size", "size/text()")).setNullValue(new Integer(0)); - ((XMLDirectMapping) descriptor.addDirectMapping("subSize", "sub-size/text()")).setNullValue(new Integer(0)); + ((XMLDirectMapping) descriptor.addDirectMapping("size", "size/text()")).setNullValue(Integer.valueOf(0)); + ((XMLDirectMapping) descriptor.addDirectMapping("subSize", "sub-size/text()")).setNullValue(Integer.valueOf(0)); ((XMLDirectMapping) descriptor.addDirectMapping("allowsNull", "allows-null/text()")).setNullValue(Boolean.FALSE); ((XMLDirectMapping) descriptor.addDirectMapping("unique", "unique/text()")).setNullValue(Boolean.FALSE); diff --git a/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/descriptor/MWCacheExpiry.java b/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/descriptor/MWCacheExpiry.java index 9639aa56185..93d79047c78 100644 --- a/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/descriptor/MWCacheExpiry.java +++ b/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/descriptor/MWCacheExpiry.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -42,7 +42,7 @@ public interface MWCacheExpiry extends MWNode { String DAILY_EXPIRY_TIME_PROPERTY = "dailyExpiryTime"; // Time to Live Expiry - Long DEFAULT_TIME_TO_LIVE_EXPIRY = new Long(0); + Long DEFAULT_TIME_TO_LIVE_EXPIRY = Long.valueOf(0); Long getTimeToLiveExpiry(); void setTimeToLiveExpiry(Long timeToLiveExpiry); diff --git a/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/descriptor/MWCachingPolicy.java b/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/descriptor/MWCachingPolicy.java index d8f6c6f4d0c..b95836cad24 100644 --- a/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/descriptor/MWCachingPolicy.java +++ b/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/descriptor/MWCachingPolicy.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -134,7 +134,7 @@ public void setMWOptionOnTopLinkObject(Object descriptor) { public static class CacheCoordinationOption extends TopLinkOption { public CacheCoordinationOption(String mwModelString, String externalString, int toplinkCacheSynchronizationType) { - super(mwModelString, externalString, new Integer(toplinkCacheSynchronizationType)); + super(mwModelString, externalString, Integer.valueOf(toplinkCacheSynchronizationType)); } public void setMWOptionOnTopLinkObject(Object descriptor) { @@ -149,7 +149,7 @@ public void setMWOptionOnTopLinkObject(Object descriptor) { public static class ExistenceCheckingOption extends TopLinkOption { public ExistenceCheckingOption(String mwModelString, String externalString, int toplinkExistenceCheckingOption) { - super(mwModelString, externalString, new Integer(toplinkExistenceCheckingOption)); + super(mwModelString, externalString, Integer.valueOf(toplinkExistenceCheckingOption)); } public void setMWOptionOnTopLinkObject(Object descriptor) { diff --git a/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/descriptor/MWDescriptorCachingPolicy.java b/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/descriptor/MWDescriptorCachingPolicy.java index ef67a0c9b12..3e014c8612e 100644 --- a/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/descriptor/MWDescriptorCachingPolicy.java +++ b/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/descriptor/MWDescriptorCachingPolicy.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -135,7 +135,7 @@ public static XMLDescriptor buildDescriptor() cacheSizeMapping.setGetMethodName("getCacheSizeForTopLink"); cacheSizeMapping.setSetMethodName("setCacheSizeForTopLink"); cacheSizeMapping.setXPath("cache-size/text()"); - cacheSizeMapping.setNullValue(new Integer(-1)); + cacheSizeMapping.setNullValue(Integer.valueOf(-1)); descriptor.addMapping(cacheSizeMapping); // Cache Type diff --git a/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/descriptor/relational/MWJoinFetchableMapping.java b/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/descriptor/relational/MWJoinFetchableMapping.java index 52cdcb35def..93a37550c79 100644 --- a/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/descriptor/relational/MWJoinFetchableMapping.java +++ b/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/descriptor/relational/MWJoinFetchableMapping.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -45,7 +45,7 @@ public synchronized static TopLinkOptionSet joinFetchOptions() { public static class JoinFetchOption extends TopLinkOption { public JoinFetchOption(String mwModelString, String externalString, int toplinkJoinFetchOption) { - super(mwModelString, externalString, new Integer(toplinkJoinFetchOption)); + super(mwModelString, externalString, Integer.valueOf(toplinkJoinFetchOption)); } public void setMWOptionOnTopLinkObject(Object mapping) { diff --git a/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/mapping/xml/MWAbstractCompositeMapping.java b/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/mapping/xml/MWAbstractCompositeMapping.java index 87e68d19746..d1fee016b9e 100644 --- a/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/mapping/xml/MWAbstractCompositeMapping.java +++ b/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/mapping/xml/MWAbstractCompositeMapping.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -89,7 +89,7 @@ protected void initialize(Node parent) { this.xmlField = new MWXmlField(this); this.elementTypeHandle = new MWNamedSchemaComponentHandle(this, this.buildElementTypeScrubber()); this.containerAccessor = new MWNullContainerAccessor(this); - this.usesContainerAccessor = new Boolean(false); + this.usesContainerAccessor = Boolean.valueOf(false); } private NodeReferenceScrubber buildElementTypeScrubber() { diff --git a/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/meta/MWClass.java b/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/meta/MWClass.java index 58700cb8aa3..2ea1cd6b332 100644 --- a/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/meta/MWClass.java +++ b/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/meta/MWClass.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -2893,7 +2893,7 @@ public static XMLDescriptor buildDescriptor() { isInterfaceMapping.setNullValue(Boolean.FALSE); XMLDirectMapping modifierMapping = (XMLDirectMapping) descriptor.addDirectMapping("modifier", "getModifierForTopLink", "setModifierForTopLink", "modifier/text()"); - modifierMapping.setNullValue(new Integer(0)); + modifierMapping.setNullValue(Integer.valueOf(0)); XMLCompositeObjectMapping declaringTypeHandleMapping = new XMLCompositeObjectMapping(); declaringTypeHandleMapping.setAttributeName("declaringTypeHandle"); @@ -3090,7 +3090,7 @@ public static XMLDescriptor legacy60BuildDescriptor() { isInterfaceMapping.setNullValue(Boolean.FALSE); XMLDirectMapping modifierMapping = (XMLDirectMapping) descriptor.addDirectMapping("modifier", "getModifierForTopLink", "setModifierForTopLink", "modifier/text()"); - modifierMapping.setNullValue(new Integer(0)); + modifierMapping.setNullValue(Integer.valueOf(0)); XMLCompositeObjectMapping declaringTypeHandleMapping = new XMLCompositeObjectMapping(); declaringTypeHandleMapping.setAttributeName("declaringTypeHandle"); diff --git a/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/meta/MWClassAttribute.java b/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/meta/MWClassAttribute.java index b7844e34d7b..e4ab9faf7ac 100644 --- a/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/meta/MWClassAttribute.java +++ b/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/meta/MWClassAttribute.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -1844,7 +1844,7 @@ public static XMLDescriptor buildDescriptor() { descriptor.addDirectMapping("name", "name/text()"); XMLDirectMapping modifierMapping = (XMLDirectMapping) descriptor.addDirectMapping("modifier", "getModifierForTopLink", "setModifierForTopLink", "modifier/text()"); - modifierMapping.setNullValue(new Integer(0)); + modifierMapping.setNullValue(Integer.valueOf(0)); XMLCompositeObjectMapping typeDeclarationMapping = new XMLCompositeObjectMapping(); typeDeclarationMapping.setAttributeName("typeDeclaration"); diff --git a/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/meta/MWMethod.java b/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/meta/MWMethod.java index ed728c68b7a..89e654d088d 100644 --- a/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/meta/MWMethod.java +++ b/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/meta/MWMethod.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -1347,7 +1347,7 @@ public static XMLDescriptor buildDescriptor() { constructorMapping.setNullValue(Boolean.FALSE); XMLDirectMapping modifierMapping = (XMLDirectMapping) descriptor.addDirectMapping("modifier", "getModifierForTopLink", "setModifierForTopLink", "modifier/text()"); - modifierMapping.setNullValue(new Integer(0)); + modifierMapping.setNullValue(Integer.valueOf(0)); XMLCompositeObjectMapping returnTypeDeclarationMapping = new XMLCompositeObjectMapping(); returnTypeDeclarationMapping.setAttributeName("returnTypeDeclaration"); diff --git a/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/meta/MWTypeDeclaration.java b/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/meta/MWTypeDeclaration.java index c5c4e614a38..ce8225fae1b 100644 --- a/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/meta/MWTypeDeclaration.java +++ b/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/meta/MWTypeDeclaration.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -103,7 +103,7 @@ public int getDimensionality() { // JSpinner catches the IllegalArgumentException and beeps at you ... doh public void setDimensionality(int dimensionality) { if ((dimensionality != 0) && ( ! this.allowsDimension())) { - throw new IllegalArgumentException("The type declaration 'void' cannot have a dimension: " + new Integer(dimensionality)); + throw new IllegalArgumentException("The type declaration 'void' cannot have a dimension: " + Integer.valueOf(dimensionality)); } this.dimensionality = dimensionality; } @@ -488,7 +488,7 @@ public static XMLDescriptor buildDescriptor() { descriptor.addMapping(typeHandleMapping); XMLDirectMapping dimMapping = (XMLDirectMapping) descriptor.addDirectMapping("dimensionality", "dimensionality/text()"); - dimMapping.setNullValue(new Integer(0)); + dimMapping.setNullValue(Integer.valueOf(0)); return descriptor; } @@ -521,7 +521,7 @@ public static XMLDescriptor legacy60BuildDescriptor() { descriptor.addMapping(typeHandleMapping); XMLDirectMapping dimMapping = (XMLDirectMapping) descriptor.addDirectMapping("dimensionality", "dimensionality/text()"); - dimMapping.setNullValue(new Integer(0)); + dimMapping.setNullValue(Integer.valueOf(0)); return descriptor; } diff --git a/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/project/MWTransactionalProjectCachingPolicy.java b/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/project/MWTransactionalProjectCachingPolicy.java index e6951845739..698ad937447 100644 --- a/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/project/MWTransactionalProjectCachingPolicy.java +++ b/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/project/MWTransactionalProjectCachingPolicy.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -71,7 +71,7 @@ public static XMLDescriptor buildDescriptor() // Cache Size XMLDirectMapping cacheSizeMapping = (XMLDirectMapping) descriptor.addDirectMapping("cacheSize", "caching-size/text()"); - cacheSizeMapping.setNullValue(new Integer(DEFAULT_CACHE_SIZE)); + cacheSizeMapping.setNullValue(Integer.valueOf(DEFAULT_CACHE_SIZE)); // Cache Type XMLDirectMapping cacheTypeMapping = (XMLDirectMapping) descriptor.addDirectMapping("cacheType", "cache-type/text()"); diff --git a/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/query/MWAbstractProcedureArgument.java b/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/query/MWAbstractProcedureArgument.java index 55e5f7965ce..dd5ad1a29de 100644 --- a/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/query/MWAbstractProcedureArgument.java +++ b/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/query/MWAbstractProcedureArgument.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -389,42 +389,42 @@ public static int jdbcTypeCodeFor(String name) { } public static String jdbcTypeNameFor(int value) { - return jdbcTypeCodes().get(new Integer(value)); + return jdbcTypeCodes().get(Integer.valueOf(value)); } public static HashMap jdbcTypeCodes() { if (jdbcTypesCodes == null) { jdbcTypesCodes = new HashMap(); - jdbcTypesCodes.put(new Integer(2003), "ARRAY"); - jdbcTypesCodes.put(new Integer(-5), "BIGINT"); - jdbcTypesCodes.put(new Integer(-2), "BINARY"); - jdbcTypesCodes.put(new Integer(-7), "BIT"); - jdbcTypesCodes.put(new Integer(2004), "BLOB"); - jdbcTypesCodes.put(new Integer(16), "BOOLEAN"); - jdbcTypesCodes.put(new Integer(1), "CHAR"); - jdbcTypesCodes.put(new Integer(2005), "CLOB"); - jdbcTypesCodes.put(new Integer(70), "DATALINK"); - jdbcTypesCodes.put(new Integer(91), "DATE"); - jdbcTypesCodes.put(new Integer(3), "DECIMAL"); - jdbcTypesCodes.put(new Integer(2001), "DISTINCT"); - jdbcTypesCodes.put(new Integer(8), "DOUBLE"); - jdbcTypesCodes.put(new Integer(6), "FLOAT"); - jdbcTypesCodes.put(new Integer(4), "INTEGER"); - jdbcTypesCodes.put(new Integer(2000), "JAVA OBJECT"); - jdbcTypesCodes.put(new Integer(-4), "LONGVARBINARY"); - jdbcTypesCodes.put(new Integer(-1), "LONGVARCHAR"); - jdbcTypesCodes.put(new Integer(0), "NULL"); - jdbcTypesCodes.put(new Integer(2), "NUMERIC"); - jdbcTypesCodes.put(new Integer(1111), "OTHER"); - jdbcTypesCodes.put(new Integer(7), "REAL"); - jdbcTypesCodes.put(new Integer(2006), "REF"); - jdbcTypesCodes.put(new Integer(5), "SMALLINT"); - jdbcTypesCodes.put(new Integer(2002), "STRUCT"); - jdbcTypesCodes.put(new Integer(92), "TIME"); - jdbcTypesCodes.put(new Integer(93), "TIMESTAMP"); - jdbcTypesCodes.put(new Integer(-6), "TINYINT"); - jdbcTypesCodes.put(new Integer(-3), "VARBINARY"); - jdbcTypesCodes.put(new Integer(12), "VARCHAR"); + jdbcTypesCodes.put(Integer.valueOf(2003), "ARRAY"); + jdbcTypesCodes.put(Integer.valueOf(-5), "BIGINT"); + jdbcTypesCodes.put(Integer.valueOf(-2), "BINARY"); + jdbcTypesCodes.put(Integer.valueOf(-7), "BIT"); + jdbcTypesCodes.put(Integer.valueOf(2004), "BLOB"); + jdbcTypesCodes.put(Integer.valueOf(16), "BOOLEAN"); + jdbcTypesCodes.put(Integer.valueOf(1), "CHAR"); + jdbcTypesCodes.put(Integer.valueOf(2005), "CLOB"); + jdbcTypesCodes.put(Integer.valueOf(70), "DATALINK"); + jdbcTypesCodes.put(Integer.valueOf(91), "DATE"); + jdbcTypesCodes.put(Integer.valueOf(3), "DECIMAL"); + jdbcTypesCodes.put(Integer.valueOf(2001), "DISTINCT"); + jdbcTypesCodes.put(Integer.valueOf(8), "DOUBLE"); + jdbcTypesCodes.put(Integer.valueOf(6), "FLOAT"); + jdbcTypesCodes.put(Integer.valueOf(4), "INTEGER"); + jdbcTypesCodes.put(Integer.valueOf(2000), "JAVA OBJECT"); + jdbcTypesCodes.put(Integer.valueOf(-4), "LONGVARBINARY"); + jdbcTypesCodes.put(Integer.valueOf(-1), "LONGVARCHAR"); + jdbcTypesCodes.put(Integer.valueOf(0), "NULL"); + jdbcTypesCodes.put(Integer.valueOf(2), "NUMERIC"); + jdbcTypesCodes.put(Integer.valueOf(1111), "OTHER"); + jdbcTypesCodes.put(Integer.valueOf(7), "REAL"); + jdbcTypesCodes.put(Integer.valueOf(2006), "REF"); + jdbcTypesCodes.put(Integer.valueOf(5), "SMALLINT"); + jdbcTypesCodes.put(Integer.valueOf(2002), "STRUCT"); + jdbcTypesCodes.put(Integer.valueOf(92), "TIME"); + jdbcTypesCodes.put(Integer.valueOf(93), "TIMESTAMP"); + jdbcTypesCodes.put(Integer.valueOf(-6), "TINYINT"); + jdbcTypesCodes.put(Integer.valueOf(-3), "VARBINARY"); + jdbcTypesCodes.put(Integer.valueOf(12), "VARCHAR"); } return jdbcTypesCodes; } @@ -432,36 +432,36 @@ public static HashMap jdbcTypeCodes() { private static HashMap jdbcTypes() { if (jdbcTypes == null) { jdbcTypes = new HashMap(); - jdbcTypes.put("ARRAY", new Integer(2003)); - jdbcTypes.put("BIGINT", new Integer(-5)); - jdbcTypes.put("BINARY", new Integer(-2)); - jdbcTypes.put("BIT", new Integer(-7)); - jdbcTypes.put("BLOB", new Integer(2004)); - jdbcTypes.put("BOOLEAN", new Integer(16)); - jdbcTypes.put("CHAR", new Integer(1)); - jdbcTypes.put("CLOB", new Integer(2005)); - jdbcTypes.put("DATALINK", new Integer(70)); - jdbcTypes.put("DATE", new Integer(91)); - jdbcTypes.put("DECIMAL", new Integer(3)); - jdbcTypes.put("DISTINCT", new Integer(2001)); - jdbcTypes.put("DOUBLE", new Integer(8)); - jdbcTypes.put("FLOAT", new Integer(6)); - jdbcTypes.put("INTEGER", new Integer(4)); - jdbcTypes.put("JAVA OBJECT", new Integer(2000)); - jdbcTypes.put("LONGVARBINARY", new Integer(-4)); - jdbcTypes.put("LONGVARCHAR", new Integer(-1)); - jdbcTypes.put("NULL", new Integer(0)); - jdbcTypes.put("NUMERIC", new Integer(2)); - jdbcTypes.put("OTHER", new Integer(1111)); - jdbcTypes.put("REAL", new Integer(7)); - jdbcTypes.put("REF", new Integer(2006)); - jdbcTypes.put("SMALLINT", new Integer(5)); - jdbcTypes.put("STRUCT", new Integer(2002)); - jdbcTypes.put("TIME", new Integer(92)); - jdbcTypes.put("TIMESTAMP", new Integer(93)); - jdbcTypes.put("TINYINT", new Integer(-6)); - jdbcTypes.put("VARBINARY", new Integer(-3)); - jdbcTypes.put("VARCHAR", new Integer(12)); + jdbcTypes.put("ARRAY", Integer.valueOf(2003)); + jdbcTypes.put("BIGINT", Integer.valueOf(-5)); + jdbcTypes.put("BINARY", Integer.valueOf(-2)); + jdbcTypes.put("BIT", Integer.valueOf(-7)); + jdbcTypes.put("BLOB", Integer.valueOf(2004)); + jdbcTypes.put("BOOLEAN", Integer.valueOf(16)); + jdbcTypes.put("CHAR", Integer.valueOf(1)); + jdbcTypes.put("CLOB", Integer.valueOf(2005)); + jdbcTypes.put("DATALINK", Integer.valueOf(70)); + jdbcTypes.put("DATE", Integer.valueOf(91)); + jdbcTypes.put("DECIMAL", Integer.valueOf(3)); + jdbcTypes.put("DISTINCT", Integer.valueOf(2001)); + jdbcTypes.put("DOUBLE", Integer.valueOf(8)); + jdbcTypes.put("FLOAT", Integer.valueOf(6)); + jdbcTypes.put("INTEGER", Integer.valueOf(4)); + jdbcTypes.put("JAVA OBJECT", Integer.valueOf(2000)); + jdbcTypes.put("LONGVARBINARY", Integer.valueOf(-4)); + jdbcTypes.put("LONGVARCHAR", Integer.valueOf(-1)); + jdbcTypes.put("NULL", Integer.valueOf(0)); + jdbcTypes.put("NUMERIC", Integer.valueOf(2)); + jdbcTypes.put("OTHER", Integer.valueOf(1111)); + jdbcTypes.put("REAL", Integer.valueOf(7)); + jdbcTypes.put("REF", Integer.valueOf(2006)); + jdbcTypes.put("SMALLINT", Integer.valueOf(5)); + jdbcTypes.put("STRUCT", Integer.valueOf(2002)); + jdbcTypes.put("TIME", Integer.valueOf(92)); + jdbcTypes.put("TIMESTAMP", Integer.valueOf(93)); + jdbcTypes.put("TINYINT", Integer.valueOf(-6)); + jdbcTypes.put("VARBINARY", Integer.valueOf(-3)); + jdbcTypes.put("VARCHAR", Integer.valueOf(12)); } return jdbcTypes; } diff --git a/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/query/MWAbstractQuery.java b/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/query/MWAbstractQuery.java index 7ee462ee58e..21c3573efae 100644 --- a/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/query/MWAbstractQuery.java +++ b/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/query/MWAbstractQuery.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -110,7 +110,7 @@ public abstract class MWAbstractQuery public static class LockingModel extends TopLinkOption { public LockingModel(String mwModelString, String externalString, short topLinkModelOption) { - super(mwModelString, externalString, new Short(topLinkModelOption)); + super(mwModelString, externalString, Short.valueOf(topLinkModelOption)); } public void setMWOptionOnTopLinkObject(Object query) { @@ -134,7 +134,7 @@ public synchronized static TopLinkOptionSet lockingOptions() { public static class DistinctStateModel extends TopLinkOption { public DistinctStateModel(String mwModelString, String externalString, short topLinkModelOption) { - super(mwModelString, externalString, new Short(topLinkModelOption)); + super(mwModelString, externalString, Short.valueOf(topLinkModelOption)); } public void setMWOptionOnTopLinkObject(Object query) { @@ -205,13 +205,13 @@ public static XMLDescriptor buildDescriptor() { XMLDirectMapping maximumRowsMapping = new XMLDirectMapping(); maximumRowsMapping.setAttributeName("maximumRows"); maximumRowsMapping.setXPath("maximum-rows/text()"); - maximumRowsMapping.setNullValue(new Integer(0)); + maximumRowsMapping.setNullValue(Integer.valueOf(0)); descriptor.addMapping(maximumRowsMapping); XMLDirectMapping firstResultMapping = new XMLDirectMapping(); firstResultMapping.setAttributeName("firstResult"); firstResultMapping.setXPath("first-result/text()"); - firstResultMapping.setNullValue(new Integer(0)); + firstResultMapping.setNullValue(Integer.valueOf(0)); descriptor.addMapping(firstResultMapping); //object type mapping - lockMode @@ -282,7 +282,7 @@ public static XMLDescriptor legacy60BuildDescriptor() { XMLDirectMapping maximumRowsMapping = new XMLDirectMapping(); maximumRowsMapping.setAttributeName("maximumRows"); maximumRowsMapping.setXPath("maximum-rows/text()"); - maximumRowsMapping.setNullValue(new Integer(0)); + maximumRowsMapping.setNullValue(Integer.valueOf(0)); descriptor.addMapping(maximumRowsMapping); //object type mapping - lockMode @@ -751,7 +751,7 @@ else if (runtimeQuery.getQueryTimeout() == DescriptorQueryManager.NoTimeout) { setQueryTimeout(QUERY_TIMEOUT_NO_TIMEOUT); } else { - setQueryTimeout(new Integer(runtimeQuery.getQueryTimeout())); + setQueryTimeout(Integer.valueOf(runtimeQuery.getQueryTimeout())); } setLockingFrom(runtimeQuery); diff --git a/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/query/MWQuery.java b/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/query/MWQuery.java index 0d258b79e89..8a7ebb6f1db 100644 --- a/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/query/MWQuery.java +++ b/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/query/MWQuery.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -75,9 +75,9 @@ public interface MWQuery extends MWNode { Integer getQueryTimeout(); void setQueryTimeout(Integer queryTimeout); String QUERY_TIMEOUT_PROPERTY = "queryTimeout"; - Integer QUERY_TIMEOUT_UNDEFINED = new Integer(-1); - Integer QUERY_TIMEOUT_NO_TIMEOUT = new Integer(0); - Integer QUERY_TIMEOUT_TIMEOUT = new Integer(1); + Integer QUERY_TIMEOUT_UNDEFINED = Integer.valueOf(-1); + Integer QUERY_TIMEOUT_NO_TIMEOUT = Integer.valueOf(0); + Integer QUERY_TIMEOUT_TIMEOUT = Integer.valueOf(1); boolean isExclusiveConnection(); void setExclusiveConnection(boolean exclusiveConnection); diff --git a/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/query/MWQueryManager.java b/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/query/MWQueryManager.java index 25396316efd..036edd66b83 100644 --- a/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/query/MWQueryManager.java +++ b/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/query/MWQueryManager.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -65,9 +65,9 @@ public abstract class MWQueryManager extends MWModel { //of an Integer. See MWQuery, it as the same problem private volatile Integer queryTimeout; public final static String QUERY_TIMEOUT_PROPERTY = "queryTimeout"; - public final static Integer DEFAULT_QUERY_TIMEOUT = new Integer(-1); - public final static Integer QUERY_TIMEOUT_NO_TIMEOUT = new Integer(0); - public final static Integer QUERY_TIMEOUT_TIMEOUT = new Integer(1); + public final static Integer DEFAULT_QUERY_TIMEOUT = Integer.valueOf(-1); + public final static Integer QUERY_TIMEOUT_NO_TIMEOUT = Integer.valueOf(0); + public final static Integer QUERY_TIMEOUT_TIMEOUT = Integer.valueOf(1); /** diff --git a/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/query/relational/MWAbstractRelationalReadQuery.java b/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/query/relational/MWAbstractRelationalReadQuery.java index de660de4746..7bc730f5908 100644 --- a/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/query/relational/MWAbstractRelationalReadQuery.java +++ b/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/query/relational/MWAbstractRelationalReadQuery.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -71,7 +71,7 @@ public abstract class MWAbstractRelationalReadQuery public static class CacheUsageModel extends TopLinkOption { public CacheUsageModel(String mwModelString, String externalString, int topLinkModelOption) { - super(mwModelString, externalString, new Integer(topLinkModelOption)); + super(mwModelString, externalString, Integer.valueOf(topLinkModelOption)); } public void setMWOptionOnTopLinkObject(Object query) { @@ -82,7 +82,7 @@ public void setMWOptionOnTopLinkObject(Object query) { public static class InMemoryQueryIndirectionPolicyModel extends TopLinkOption { public InMemoryQueryIndirectionPolicyModel(String mwModelString, String externalString, int topLinkModelOption) { - super(mwModelString, externalString, new Integer(topLinkModelOption)); + super(mwModelString, externalString, Integer.valueOf(topLinkModelOption)); } public void setMWOptionOnTopLinkObject(Object query) { diff --git a/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/query/relational/MWBasicExpression.java b/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/query/relational/MWBasicExpression.java index 1af26d1f205..d844ff0d123 100644 --- a/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/query/relational/MWBasicExpression.java +++ b/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/query/relational/MWBasicExpression.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -405,34 +405,34 @@ else if (getOperatorType() == NOT_NULL) { static MWBasicExpression convertFromRuntime(MWCompoundExpression parent, Expression expression) { ExpressionOperator runtimeOperator = expression.getOperator(); String bldrOperator = EQUAL; - if (runtimeOperator == ExpressionOperator.getOperator(new Integer(ExpressionOperator.Equal))) { + if (runtimeOperator == ExpressionOperator.getOperator(Integer.valueOf(ExpressionOperator.Equal))) { bldrOperator = EQUAL; } - else if (runtimeOperator == ExpressionOperator.getOperator(new Integer(ExpressionOperator.NotEqual))) { + else if (runtimeOperator == ExpressionOperator.getOperator(Integer.valueOf(ExpressionOperator.NotEqual))) { bldrOperator = NOT_EQUAL; } - else if (runtimeOperator == ExpressionOperator.getOperator(new Integer(ExpressionOperator.LessThan))) { + else if (runtimeOperator == ExpressionOperator.getOperator(Integer.valueOf(ExpressionOperator.LessThan))) { bldrOperator = LESS_THAN; } - else if (runtimeOperator == ExpressionOperator.getOperator(new Integer(ExpressionOperator.LessThanEqual))) { + else if (runtimeOperator == ExpressionOperator.getOperator(Integer.valueOf(ExpressionOperator.LessThanEqual))) { bldrOperator = LESS_THAN_EQUAL; } - else if (runtimeOperator == ExpressionOperator.getOperator(new Integer(ExpressionOperator.GreaterThan))) { + else if (runtimeOperator == ExpressionOperator.getOperator(Integer.valueOf(ExpressionOperator.GreaterThan))) { bldrOperator = GREATER_THAN; } - else if (runtimeOperator == ExpressionOperator.getOperator(new Integer(ExpressionOperator.GreaterThanEqual))) { + else if (runtimeOperator == ExpressionOperator.getOperator(Integer.valueOf(ExpressionOperator.GreaterThanEqual))) { bldrOperator = GREATER_THAN_EQUAL; } - else if (runtimeOperator == ExpressionOperator.getOperator(new Integer(ExpressionOperator.Like))) { + else if (runtimeOperator == ExpressionOperator.getOperator(Integer.valueOf(ExpressionOperator.Like))) { bldrOperator = LIKE; } - else if (runtimeOperator == ExpressionOperator.getOperator(new Integer(ExpressionOperator.NotLike))) { + else if (runtimeOperator == ExpressionOperator.getOperator(Integer.valueOf(ExpressionOperator.NotLike))) { bldrOperator = NOT_LIKE; } - else if (runtimeOperator == ExpressionOperator.getOperator(new Integer(ExpressionOperator.IsNull))) { + else if (runtimeOperator == ExpressionOperator.getOperator(Integer.valueOf(ExpressionOperator.IsNull))) { bldrOperator = IS_NULL; } - else if (runtimeOperator == ExpressionOperator.getOperator(new Integer(ExpressionOperator.NotNull))) { + else if (runtimeOperator == ExpressionOperator.getOperator(Integer.valueOf(ExpressionOperator.NotNull))) { bldrOperator = NOT_NULL; } diff --git a/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/query/relational/MWBatchReadItem.java b/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/query/relational/MWBatchReadItem.java index 87a18d14bc0..9eb35a01167 100644 --- a/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/query/relational/MWBatchReadItem.java +++ b/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/query/relational/MWBatchReadItem.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -71,7 +71,7 @@ public Problem queryableNullProblem() { return buildProblem( ProblemConstants.QUERYABLE_NULL_FOR_BATCH_READ_ITEM, getParentQuery().signature(), - new Integer(((MWRelationalReadAllQuery) getParentQuery()).indexOfBatchReadItem(this) + 1)); + Integer.valueOf(((MWRelationalReadAllQuery) getParentQuery()).indexOfBatchReadItem(this) + 1)); } public Problem queryableInvalidProblem(MWQueryable queryable) { diff --git a/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/query/relational/MWCompoundExpression.java b/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/query/relational/MWCompoundExpression.java index fcb7bd75123..4769d291d03 100644 --- a/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/query/relational/MWCompoundExpression.java +++ b/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/query/relational/MWCompoundExpression.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -388,20 +388,20 @@ static MWCompoundExpression convertFromRuntime(MWModel parent, Expression select // if the user has chosen NAND or NOR .not() is called on the expression // when converting to runtime, so it became a function expression - if (runtimeOperator == ExpressionOperator.getOperator(new Integer(ExpressionOperator.Not))) { + if (runtimeOperator == ExpressionOperator.getOperator(Integer.valueOf(ExpressionOperator.Not))) { //if the operator is NOT, we know it is a function expression selectionCriteria = ((FunctionExpression)selectionCriteria).getBaseExpression(); usesNot = true; runtimeOperator = selectionCriteria.getOperator(); } - if (runtimeOperator == ExpressionOperator.getOperator(new Integer(ExpressionOperator.And))) { + if (runtimeOperator == ExpressionOperator.getOperator(Integer.valueOf(ExpressionOperator.And))) { if (!usesNot) bldrExpression.setOperatorType(AND); else bldrExpression.setOperatorType(NAND); } - else if (runtimeOperator == ExpressionOperator.getOperator(new Integer(ExpressionOperator.Or))) { + else if (runtimeOperator == ExpressionOperator.getOperator(Integer.valueOf(ExpressionOperator.Or))) { if (!usesNot) bldrExpression.setOperatorType(OR); else//is FunctionExpression @@ -426,13 +426,13 @@ else if (selectionCriteria.isRelationExpression()) { } Expression firstChild = ((LogicalExpression)selectionCriteria).getFirstChild(); - if (firstChild.isRelationExpression() || (firstChild.isFunctionExpression() && !(firstChild.getOperator() == ExpressionOperator.getOperator(new Integer(ExpressionOperator.Not))))) + if (firstChild.isRelationExpression() || (firstChild.isFunctionExpression() && !(firstChild.getOperator() == ExpressionOperator.getOperator(Integer.valueOf(ExpressionOperator.Not))))) bldrExpression.addExpression(MWBasicExpression.convertFromRuntime(bldrExpression, firstChild)); else bldrExpression.addExpression(MWCompoundExpression.convertFromRuntime(bldrExpression, firstChild)); Expression secondChild = ((LogicalExpression)selectionCriteria).getSecondChild(); - if (secondChild.isRelationExpression() || (secondChild.isFunctionExpression() && !(secondChild.getOperator() == ExpressionOperator.getOperator(new Integer(ExpressionOperator.Not))))) + if (secondChild.isRelationExpression() || (secondChild.isFunctionExpression() && !(secondChild.getOperator() == ExpressionOperator.getOperator(Integer.valueOf(ExpressionOperator.Not))))) bldrExpression.addExpression(MWBasicExpression.convertFromRuntime(bldrExpression,secondChild)); else bldrExpression.addExpression(MWCompoundExpression.convertFromRuntime(bldrExpression, secondChild)); diff --git a/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/query/relational/MWGroupingItem.java b/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/query/relational/MWGroupingItem.java index 2c33e890600..734f2d4bf75 100644 --- a/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/query/relational/MWGroupingItem.java +++ b/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/query/relational/MWGroupingItem.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -76,7 +76,7 @@ public Problem queryableNullProblem() { return buildProblem( ProblemConstants.QUERYABLE_NULL_FOR_GROUPING_ITEM, getParentQuery().signature(), - new Integer(((MWReportQuery) getParentQuery()).indexOfGroupingItem(this) + 1)); + Integer.valueOf(((MWReportQuery) getParentQuery()).indexOfGroupingItem(this) + 1)); } public Problem queryableInvalidProblem(MWQueryable queryable) { diff --git a/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/query/relational/MWJoinedItem.java b/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/query/relational/MWJoinedItem.java index 2c46af702ce..34ca64fa77f 100644 --- a/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/query/relational/MWJoinedItem.java +++ b/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/query/relational/MWJoinedItem.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -71,7 +71,7 @@ public Problem queryableNullProblem() { return buildProblem( ProblemConstants.QUERYABLE_NULL_FOR_JOINED_ITEM, getParentQuery().signature(), - new Integer(((MWAbstractRelationalReadQuery) getParentQuery()).indexOfJoinedItem(this) + 1)); + Integer.valueOf(((MWAbstractRelationalReadQuery) getParentQuery()).indexOfJoinedItem(this) + 1)); } public Problem queryableInvalidProblem(MWQueryable queryable) { diff --git a/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/query/relational/MWOrderingItem.java b/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/query/relational/MWOrderingItem.java index c288604ee8d..94f7f35fda4 100644 --- a/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/query/relational/MWOrderingItem.java +++ b/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/query/relational/MWOrderingItem.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -105,7 +105,7 @@ public Problem queryableNullProblem() { return buildProblem( ProblemConstants.QUERYABLE_NULL_FOR_ORDERING_ITEM, getParentQuery().signature(), - new Integer(((MWRelationalReadAllQuery) getParentQuery()).indexOfOrderingItem(this) + 1)); + Integer.valueOf(((MWRelationalReadAllQuery) getParentQuery()).indexOfOrderingItem(this) + 1)); } public Problem queryableInvalidProblem(MWQueryable queryable) { diff --git a/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/query/relational/MWReportOrderingItem.java b/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/query/relational/MWReportOrderingItem.java index fffbf7d4411..1ce0fa2d2d0 100644 --- a/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/query/relational/MWReportOrderingItem.java +++ b/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/query/relational/MWReportOrderingItem.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -113,7 +113,7 @@ public Problem queryableNullProblem() { return buildProblem( ProblemConstants.QUERYABLE_NULL_FOR_ORDERING_ITEM, getParentQuery().signature(), - new Integer(((MWReportQuery) getParentQuery()).indexOfOrderingItem(this) + 1)); + Integer.valueOf(((MWReportQuery) getParentQuery()).indexOfOrderingItem(this) + 1)); } public Problem queryableInvalidProblem(MWQueryable queryable) { diff --git a/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/schema/AbstractParticle.java b/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/schema/AbstractParticle.java index a324f523955..e63ccdd3a54 100644 --- a/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/schema/AbstractParticle.java +++ b/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/schema/AbstractParticle.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -40,8 +40,8 @@ public static XMLDescriptor buildDescriptor() { descriptor.setJavaClass(AbstractParticle.class); descriptor.getInheritancePolicy().setParentClass(AbstractSchemaComponent.class); - ((XMLDirectMapping) descriptor.addDirectMapping("minOccurs", "min-occurs/text()")).setNullValue(new Integer(1)); - ((XMLDirectMapping) descriptor.addDirectMapping("maxOccurs", "max-occurs/text()")).setNullValue(new Integer(1)); + ((XMLDirectMapping) descriptor.addDirectMapping("minOccurs", "min-occurs/text()")).setNullValue(Integer.valueOf(1)); + ((XMLDirectMapping) descriptor.addDirectMapping("maxOccurs", "max-occurs/text()")).setNullValue(Integer.valueOf(1)); return descriptor; } diff --git a/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/schema/ExplicitElementDeclaration.java b/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/schema/ExplicitElementDeclaration.java index 2e09602ef8a..cc68699b66f 100644 --- a/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/schema/ExplicitElementDeclaration.java +++ b/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/schema/ExplicitElementDeclaration.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -433,8 +433,8 @@ public static XMLDescriptor buildDescriptor() { (XMLDirectMapping) descriptor.addDirectMapping("abstractFlag", "abstract/text()"); abstractMapping.setNullValue(Boolean.FALSE); - ((XMLDirectMapping) descriptor.addDirectMapping("minOccurs", "min-occurs/text()")).setNullValue(new Integer(1)); - ((XMLDirectMapping) descriptor.addDirectMapping("maxOccurs", "max-occurs/text()")).setNullValue(new Integer(1)); + ((XMLDirectMapping) descriptor.addDirectMapping("minOccurs", "min-occurs/text()")).setNullValue(Integer.valueOf(1)); + ((XMLDirectMapping) descriptor.addDirectMapping("maxOccurs", "max-occurs/text()")).setNullValue(Integer.valueOf(1)); XMLCompositeObjectMapping substitutionGroupMapping = new XMLCompositeObjectMapping(); substitutionGroupMapping.setAttributeName("substitutionGroup"); diff --git a/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/schema/MWNamespace.java b/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/schema/MWNamespace.java index a0b3d65df92..3066f97d9e2 100644 --- a/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/schema/MWNamespace.java +++ b/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/schema/MWNamespace.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -753,7 +753,7 @@ public int compareTo(Object o) { //******************* Toplink persistence methods *************************** private Boolean getDeclaredForTopLink() { - return new Boolean(this.declared); + return Boolean.valueOf(this.declared); } private void setDeclaredForTopLink(Boolean newValue) { diff --git a/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/schema/ReferencedElementDeclaration.java b/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/schema/ReferencedElementDeclaration.java index 7168add694a..a158892513f 100644 --- a/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/schema/ReferencedElementDeclaration.java +++ b/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/schema/ReferencedElementDeclaration.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -165,8 +165,8 @@ public static XMLDescriptor buildDescriptor() { descriptor.setJavaClass(ReferencedElementDeclaration.class); descriptor.getInheritancePolicy().setParentClass(SchemaComponentReference.class); - ((XMLDirectMapping) descriptor.addDirectMapping("minOccurs", "min-occurs/text()")).setNullValue(new Integer(1)); - ((XMLDirectMapping) descriptor.addDirectMapping("maxOccurs", "max-occurs/text()")).setNullValue(new Integer(1)); + ((XMLDirectMapping) descriptor.addDirectMapping("minOccurs", "min-occurs/text()")).setNullValue(Integer.valueOf(1)); + ((XMLDirectMapping) descriptor.addDirectMapping("maxOccurs", "max-occurs/text()")).setNullValue(Integer.valueOf(1)); return descriptor; } diff --git a/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/xml/MWXpathStep.java b/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/xml/MWXpathStep.java index a84d21f8d15..6bb3312c5db 100644 --- a/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/xml/MWXpathStep.java +++ b/utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/xml/MWXpathStep.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -306,7 +306,7 @@ else if (step2.isText()) { int comparison = contextComponent.compareSchemaOrder(element1, element2); if (comparison == 0) { - return new Integer(step1.position).compareTo(new Integer(step2.position)); + return Integer.valueOf(step1.position).compareTo(Integer.valueOf(step2.position)); } else { return comparison; diff --git a/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/ant/taskdefs/ExportDeploymentXMLTask.java b/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/ant/taskdefs/ExportDeploymentXMLTask.java index 23afb93935e..78490a69aa7 100644 --- a/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/ant/taskdefs/ExportDeploymentXMLTask.java +++ b/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/ant/taskdefs/ExportDeploymentXMLTask.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -87,7 +87,7 @@ public void execute() throws BuildException { String user = this.getUser(); String password = this.getPassword(); - int status = this.execute( this.getProjectFile(), this.getDeploymentFile(), this.getEjbJarXMLDir(), getIgnoreErrorCodes(), new Boolean( failonerror), url, driverclass, user, password); + int status = this.execute( this.getProjectFile(), this.getDeploymentFile(), this.getEjbJarXMLDir(), getIgnoreErrorCodes(), Boolean.valueOf( failonerror), url, driverclass, user, password); if( status == 0) { if( getProperty() != null) diff --git a/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/AddOrRefreshClassesAction.java b/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/AddOrRefreshClassesAction.java index 337261ab8ee..46f1d835db6 100644 --- a/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/AddOrRefreshClassesAction.java +++ b/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/AddOrRefreshClassesAction.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -270,14 +270,14 @@ private LocalStatusDialog(Collection projectStatus) { protected Action buildOKAction() { Action action = super.buildOKAction(); action.putValue(Action.NAME, this.resourceRepository().getString("EJB_JAR_XML_VALIDATOR_STATUS_DIALOG_YES_BUTTON")); - action.putValue(Action.MNEMONIC_KEY, new Integer(this.resourceRepository().getMnemonic("EJB_JAR_XML_VALIDATOR_STATUS_DIALOG_YES_BUTTON"))); + action.putValue(Action.MNEMONIC_KEY, Integer.valueOf(this.resourceRepository().getMnemonic("EJB_JAR_XML_VALIDATOR_STATUS_DIALOG_YES_BUTTON"))); return action; } protected Action buildCancelAction() { Action action = super.buildCancelAction(); action.putValue(Action.NAME, this.resourceRepository().getString("EJB_JAR_XML_VALIDATOR_STATUS_DIALOG_NO_BUTTON")); - action.putValue(Action.MNEMONIC_KEY, new Integer(this.resourceRepository().getMnemonic("EJB_JAR_XML_VALIDATOR_STATUS_DIALOG_NO_BUTTON"))); + action.putValue(Action.MNEMONIC_KEY, Integer.valueOf(this.resourceRepository().getMnemonic("EJB_JAR_XML_VALIDATOR_STATUS_DIALOG_NO_BUTTON"))); return action; } diff --git a/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/RefreshClassesAction.java b/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/RefreshClassesAction.java index d4a856c624b..9c6e0a86478 100644 --- a/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/RefreshClassesAction.java +++ b/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/RefreshClassesAction.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -173,7 +173,7 @@ protected Action buildCancelAction() { AbstractAction action = (AbstractAction) super.buildCancelAction(); action.putValue(Action.NAME, resourceRepository().getString("EJB_JAR_XML_VALIDATOR_STATUS_DIALOG_NO_BUTTON")); - action.putValue(Action.MNEMONIC_KEY, new Integer(resourceRepository().getMnemonic("EJB_JAR_XML_VALIDATOR_STATUS_DIALOG_NO_BUTTON"))); + action.putValue(Action.MNEMONIC_KEY, Integer.valueOf(resourceRepository().getMnemonic("EJB_JAR_XML_VALIDATOR_STATUS_DIALOG_NO_BUTTON"))); return action; } @@ -189,7 +189,7 @@ protected Action buildOKAction() { AbstractAction action = (AbstractAction) super.buildOKAction(); action.putValue(Action.NAME, resourceRepository().getString("EJB_JAR_XML_VALIDATOR_STATUS_DIALOG_YES_BUTTON")); - action.putValue(Action.MNEMONIC_KEY, new Integer(resourceRepository().getMnemonic("EJB_JAR_XML_VALIDATOR_STATUS_DIALOG_YES_BUTTON"))); + action.putValue(Action.MNEMONIC_KEY, Integer.valueOf(resourceRepository().getMnemonic("EJB_JAR_XML_VALIDATOR_STATUS_DIALOG_YES_BUTTON"))); return action; } diff --git a/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/db/ColumnsPropertiesPage.java b/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/db/ColumnsPropertiesPage.java index 2c9ac18437f..d5555b818b0 100644 --- a/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/db/ColumnsPropertiesPage.java +++ b/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/db/ColumnsPropertiesPage.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -303,11 +303,11 @@ private void updateTableColumns(JTable t) { } private SpinnerTableCellRenderer buildNumberSpinnerRenderer() { - return new SpinnerTableCellRenderer(new NumberSpinnerModelAdapter(new SimplePropertyValueModel(), new Integer(0), null, new Integer(1), new Integer(0))); + return new SpinnerTableCellRenderer(new NumberSpinnerModelAdapter(new SimplePropertyValueModel(), Integer.valueOf(0), null, Integer.valueOf(1), Integer.valueOf(0))); } private SpinnerTableCellRenderer buildSizeRenderer() { - return new SpinnerTableCellRenderer(new NumberSpinnerModelAdapter(new SimplePropertyValueModel(), new Integer(0), null, new Integer(1), new Integer(0))) { + return new SpinnerTableCellRenderer(new NumberSpinnerModelAdapter(new SimplePropertyValueModel(), Integer.valueOf(0), null, Integer.valueOf(1), Integer.valueOf(0))) { public Component getTableCellRendererComponent(JTable t, Object value, boolean selected, boolean hasFocus, int row, int column) { if (ColumnsPropertiesPage.this.column(row).getDatabaseType().allowsSize()) { return super.getTableCellRendererComponent(t, value, selected, hasFocus, row, column); @@ -329,7 +329,7 @@ public Component getTableCellEditorComponent(JTable t, Object value, boolean sel } private SpinnerTableCellRenderer buildSubSizeRenderer() { - return new SpinnerTableCellRenderer(new NumberSpinnerModelAdapter(new SimplePropertyValueModel(), new Integer(0), null, new Integer(1), new Integer(0))) { + return new SpinnerTableCellRenderer(new NumberSpinnerModelAdapter(new SimplePropertyValueModel(), Integer.valueOf(0), null, Integer.valueOf(1), Integer.valueOf(0))) { public Component getTableCellRendererComponent(JTable t, Object value, boolean selected, boolean hasFocus, int row, int column) { if (ColumnsPropertiesPage.this.column(row).getDatabaseType().allowsSubSize()) { return super.getTableCellRendererComponent(t, value, selected, hasFocus, row, column); @@ -678,7 +678,7 @@ protected void setValueOnSubject(Object value) { private PropertyValueModel buildSizeAdapter(MWColumn field) { return new PropertyAspectAdapter(MWColumn.SIZE_PROPERTY, field) { protected Object getValueFromSubject() { - return new Integer(((MWColumn) this.subject).getSize()); + return Integer.valueOf(((MWColumn) this.subject).getSize()); } protected void setValueOnSubject(Object value) { ((MWColumn) this.subject).setSize(((Integer) value).intValue()); @@ -689,7 +689,7 @@ protected void setValueOnSubject(Object value) { private PropertyValueModel buildSubSizeAdapter(MWColumn field) { return new PropertyAspectAdapter(MWColumn.SUB_SIZE_PROPERTY, field) { protected Object getValueFromSubject() { - return new Integer(((MWColumn) this.subject).getSubSize()); + return Integer.valueOf(((MWColumn) this.subject).getSubSize()); } protected void setValueOnSubject(Object value) { ((MWColumn) this.subject).setSubSize(((Integer) value).intValue()); diff --git a/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/descriptor/CacheExpiryPanel.java b/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/descriptor/CacheExpiryPanel.java index dc514659253..2bf2f99b147 100644 --- a/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/descriptor/CacheExpiryPanel.java +++ b/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/descriptor/CacheExpiryPanel.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -326,10 +326,10 @@ private ButtonModel buildTimeToLiveExpiryRadioButtonAdapter() { private SpinnerNumberModel buildTimeToLiveExpirySpinnerAdapter() { return new NumberSpinnerModelAdapter( buildTimeToLiveAdapter(), - new Long(0), // Minimum value - new Long(Long.MAX_VALUE), // Maximum value - new Long(1), // Step size - new Long(0) // Default value + Long.valueOf(0), // Minimum value + Long.valueOf(Long.MAX_VALUE), // Maximum value + Long.valueOf(1), // Step size + Long.valueOf(0) // Default value ); } diff --git a/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/descriptor/CachingPolicyPropertiesPage.java b/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/descriptor/CachingPolicyPropertiesPage.java index e9b3b7b1cda..05a3c2eddaf 100644 --- a/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/descriptor/CachingPolicyPropertiesPage.java +++ b/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/descriptor/CachingPolicyPropertiesPage.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -447,7 +447,7 @@ private PropertyValueModel buildCacheSizeHolder() { MWDescriptorCachingPolicy.DESCRIPTOR_INHERITANCE_PROPERTY) { protected Object getValueFromSubject() { - return new Integer(((MWCachingPolicy) this.subject).getCacheSize()); + return Integer.valueOf(((MWCachingPolicy) this.subject).getCacheSize()); } protected void setValueOnSubject(Object value) { @@ -459,7 +459,7 @@ protected void setValueOnSubject(Object value) { private PropertyValueModel buildProjectCacheSizeHolder() { return new PropertyAspectAdapter(this.projectDefaultCachingPolicyHolder, MWCachingPolicy.CACHE_SIZE_PROPERTY) { protected Object getValueFromSubject() { - return new Integer(((MWCachingPolicy) this.subject).getCacheSize()); + return Integer.valueOf(((MWCachingPolicy) this.subject).getCacheSize()); } protected void setValueOnSubject(Object value) { if (((Integer) value).intValue() != ((MWDescriptorCachingPolicy) cachingPolicyHolder.getValue()).getProject().getDefaultsPolicy().getCachingPolicy().getCacheSize()) { diff --git a/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/descriptor/ClassAttributeAccessorsPanel.java b/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/descriptor/ClassAttributeAccessorsPanel.java index a4299ec6974..f034a9c4806 100644 --- a/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/descriptor/ClassAttributeAccessorsPanel.java +++ b/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/descriptor/ClassAttributeAccessorsPanel.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -120,7 +120,7 @@ protected Object getValueFromSubject() { private PropertyValueModel buildAttributeDimensionalityAdapter() { return new PropertyAspectAdapter(this.attributeHolder, MWClassAttribute.DIMENSIONALITY_PROPERTY) { protected Object getValueFromSubject() { - return new Integer(((MWClassAttribute) this.subject).getDimensionality()); + return Integer.valueOf(((MWClassAttribute) this.subject).getDimensionality()); } }; } diff --git a/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/descriptor/ClassAttributeTypesPanel.java b/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/descriptor/ClassAttributeTypesPanel.java index fd40d556f8c..000034bcce5 100644 --- a/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/descriptor/ClassAttributeTypesPanel.java +++ b/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/descriptor/ClassAttributeTypesPanel.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -106,7 +106,7 @@ private PropertyValueModel buildAttributeTypeDimensionalityAdapter() { PropertyValueModel adapter = new PropertyAspectAdapter(this.attributeHolder, MWClassAttribute.DIMENSIONALITY_PROPERTY) { protected Object getValueFromSubject() { - return new Integer(((MWClassAttribute) this.subject).getDimensionality()); + return Integer.valueOf(((MWClassAttribute) this.subject).getDimensionality()); } protected void setValueOnSubject(Object value) { @@ -413,7 +413,7 @@ private JSpinner buildDimensionalitySpinner() { } private SpinnerModel buildDimensionalitySpinnerModel() { - return new NumberSpinnerModelAdapter(this.attributeTypeDimensionalityHolder, new Integer(0), null, new Integer(1), new Integer(0)); + return new NumberSpinnerModelAdapter(this.attributeTypeDimensionalityHolder, Integer.valueOf(0), null, Integer.valueOf(1), Integer.valueOf(0)); } diff --git a/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/descriptor/MethodParametersPanel.java b/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/descriptor/MethodParametersPanel.java index 439cf97c478..3cd437cdeed 100644 --- a/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/descriptor/MethodParametersPanel.java +++ b/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/descriptor/MethodParametersPanel.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -245,7 +245,7 @@ private JTable buildParametersTable() { } private SpinnerTableCellRenderer buildNumberSpinnerRenderer() { - return new SpinnerTableCellRenderer(new NumberSpinnerModelAdapter(new SimplePropertyValueModel(), new Integer(0), null, new Integer(1), new Integer(0))); + return new SpinnerTableCellRenderer(new NumberSpinnerModelAdapter(new SimplePropertyValueModel(), Integer.valueOf(0), null, Integer.valueOf(1), Integer.valueOf(0))); } private TableCellRenderer buildTypeRenderer() { @@ -350,7 +350,7 @@ protected void setValueOnSubject(Object value) { private PropertyValueModel buildDimensionalityAdapter(MWMethodParameter methodParameter) { return new PropertyAspectAdapter(MWMethodParameter.DIMENSIONALITY_PROPERTY, methodParameter) { protected Object getValueFromSubject() { - return new Integer(((MWMethodParameter) subject).getDimensionality()); + return Integer.valueOf(((MWMethodParameter) subject).getDimensionality()); } protected void setValueOnSubject(Object value) { ((MWMethodParameter) subject).setDimensionality(((Integer) value).intValue()); diff --git a/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/descriptor/MethodPropertiesPanel.java b/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/descriptor/MethodPropertiesPanel.java index ba9a50e612e..669b74b3ed0 100644 --- a/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/descriptor/MethodPropertiesPanel.java +++ b/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/descriptor/MethodPropertiesPanel.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -219,16 +219,16 @@ private JSpinner buildDimensionalitySpinner() { } private SpinnerModel buildDimensionalitySpinnerModel() { - return new NumberSpinnerModelAdapter(buildDimensionalityHolder(), new Integer(0), null, new Integer(1), new Integer(0)); + return new NumberSpinnerModelAdapter(buildDimensionalityHolder(), Integer.valueOf(0), null, Integer.valueOf(1), Integer.valueOf(0)); } private PropertyValueModel buildDimensionalityHolder() { return new PropertyAspectAdapter(this.methodHolder, MWMethod.RETURN_TYPE_DIMENSIONALITY_PROPERTY) { protected Object getValueFromSubject() { if (((MWMethod) subject).isConstructor()) { - return new Integer(0); + return Integer.valueOf(0); } - return new Integer(((MWMethod) subject).getReturnTypeDimensionality()); + return Integer.valueOf(((MWMethod) subject).getReturnTypeDimensionality()); } protected void setValueOnSubject(Object value) { ((MWMethod) subject).setReturnTypeDimensionality(((Integer) value).intValue()); diff --git a/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/mapping/ConverterPanel.java b/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/mapping/ConverterPanel.java index 61a880b5c7f..c5ca57cd91a 100644 --- a/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/mapping/ConverterPanel.java +++ b/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/mapping/ConverterPanel.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -223,7 +223,7 @@ private ComponentEnabler buildTypeConversionConverterPanelEnabler(final Abstract private ValueModel buildIsTypeConversionConverterHolder() { return new PropertyAspectAdapter(this.converterHolder) { protected Object getValueFromSubject() { - return new Boolean(this.subject instanceof MWTypeConversionConverter); + return Boolean.valueOf(this.subject instanceof MWTypeConversionConverter); } }; } @@ -263,7 +263,7 @@ private ComponentEnabler buildObjectTypeConverterPanelEnabler(final AbstractPane private ValueModel buildIsObjectTypeConverterHolder() { return new PropertyAspectAdapter(this.converterHolder) { protected Object getValueFromSubject() { - return new Boolean(this.subject instanceof MWObjectTypeConverter); + return Boolean.valueOf(this.subject instanceof MWObjectTypeConverter); } }; } diff --git a/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/mapping/ObjectTypeConverterPanel.java b/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/mapping/ObjectTypeConverterPanel.java index 9451dab0597..303abaccf84 100644 --- a/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/mapping/ObjectTypeConverterPanel.java +++ b/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/mapping/ObjectTypeConverterPanel.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -810,38 +810,38 @@ else if (javaClass == Character.class) { else if (javaClass == Short.class) { return resourceRepository().getString("CONVERSION_VALUE_DIALOG.ILLEGAL_NUMBER_FORMAT", new Object[] {javaClassName, - new Short(Short.MIN_VALUE), - new Short(Short.MAX_VALUE)}); + Short.valueOf(Short.MIN_VALUE), + Short.valueOf(Short.MAX_VALUE)}); } else if (javaClass == Byte.class) { return resourceRepository().getString("CONVERSION_VALUE_DIALOG.ILLEGAL_NUMBER_FORMAT", new Object[] {javaClassName, - new Byte(Byte.MIN_VALUE), - new Byte(Byte.MAX_VALUE)}); + Byte.valueOf(Byte.MIN_VALUE), + Byte.valueOf(Byte.MAX_VALUE)}); } else if (javaClass == Float.class) { return resourceRepository().getString("CONVERSION_VALUE_DIALOG.ILLEGAL_FLOAT_NUMBER_FORMAT", new Object[] {javaClassName, - new Float(Float.MIN_VALUE), - new Float(Float.MAX_VALUE)}); + Float.valueOf(Float.MIN_VALUE), + Float.valueOf(Float.MAX_VALUE)}); } else if (javaClass == Double.class) { return resourceRepository().getString("CONVERSION_VALUE_DIALOG.ILLEGAL_FLOAT_NUMBER_FORMAT", new Object[] {javaClassName, - new Double(Double.MIN_VALUE), - new Double(Double.MAX_VALUE)}); + Double.valueOf(Double.MIN_VALUE), + Double.valueOf(Double.MAX_VALUE)}); } else if (javaClass == Integer.class) { return resourceRepository().getString("CONVERSION_VALUE_DIALOG.ILLEGAL_NUMBER_FORMAT", new Object[] {javaClassName, - new Integer(Integer.MIN_VALUE), - new Integer(Integer.MAX_VALUE)}); + Integer.valueOf(Integer.MIN_VALUE), + Integer.valueOf(Integer.MAX_VALUE)}); } else if (javaClass == Long.class) { return resourceRepository().getString("CONVERSION_VALUE_DIALOG.ILLEGAL_NUMBER_FORMAT", new Object[] {javaClassName, - new Long(Long.MIN_VALUE), - new Long(Long.MAX_VALUE)}); + Long.valueOf(Long.MIN_VALUE), + Long.valueOf(Long.MAX_VALUE)}); } else if (javaClass == String.class) { return resourceRepository().getString("CONVERSION_VALUE_DIALOG.ILLEGAL_STRING_FORMAT", new Object[] {javaClassName}); diff --git a/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/project/ProjectCacheExpiryPanel.java b/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/project/ProjectCacheExpiryPanel.java index fff9a0613db..9d6fa5770c7 100644 --- a/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/project/ProjectCacheExpiryPanel.java +++ b/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/project/ProjectCacheExpiryPanel.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -185,10 +185,10 @@ private SpinnerNumberModel buildTimeToLiveExpirySpinnerAdapter() return new NumberSpinnerModelAdapter ( buildTimeToLiveExpiryHolder(), - new Long(0), // Minimum value - new Long(Long.MAX_VALUE), // Maximum value - new Long(1), // Step size - new Long(0) // Default value + Long.valueOf(0), // Minimum value + Long.valueOf(Long.MAX_VALUE), // Maximum value + Long.valueOf(1), // Step size + Long.valueOf(0) // Default value ); } diff --git a/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/project/ProjectCachingPolicyPanel.java b/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/project/ProjectCachingPolicyPanel.java index be543632aa9..6f5a0f1e06b 100644 --- a/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/project/ProjectCachingPolicyPanel.java +++ b/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/project/ProjectCachingPolicyPanel.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -142,7 +142,7 @@ private PropertyValueModel buildCacheSizeHolder() { protected Object getValueFromSubject() { - return new Integer(((MWCachingPolicy) subject).getCacheSize()); + return Integer.valueOf(((MWCachingPolicy) subject).getCacheSize()); } protected void setValueOnSubject(Object value) @@ -157,10 +157,10 @@ private NumberSpinnerModelAdapter buildCacheSizeSpinnerModel() return new NumberSpinnerModelAdapter ( buildCacheSizeHolder(), - new Integer(0), - new Integer(99999), - new Integer(1), - new Integer(MWCachingPolicy.DEFAULT_CACHE_SIZE) + Integer.valueOf(0), + Integer.valueOf(99999), + Integer.valueOf(1), + Integer.valueOf(MWCachingPolicy.DEFAULT_CACHE_SIZE) ); } diff --git a/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/project/ZeroArgConstructorPreference.java b/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/project/ZeroArgConstructorPreference.java index a58bab1f927..ebc1232149b 100644 --- a/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/project/ZeroArgConstructorPreference.java +++ b/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/project/ZeroArgConstructorPreference.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -62,7 +62,7 @@ private static boolean promptForResponse(MWClass mwClass, WorkbenchContext conte "PREFERENCES.MAPPINGS.CLASS.MAINTAIN_ZERO_ARGUMENT_CONSTRUCTOR_DIALOG.message", new Object[] {mwClass.getName(), StringTools.CR} ); - PropertyValueModel dontAskAgainHolder = new SimplePropertyValueModel(new Boolean(false)); + PropertyValueModel dontAskAgainHolder = new SimplePropertyValueModel(Boolean.valueOf(false)); JComponent dontAskAgainPanel = SwingComponentFactory.buildDoNotAskAgainPanel(message, dontAskAgainHolder, resourceRepository); diff --git a/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/project/relational/RelationalProjectSequencingPropertiesPage.java b/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/project/relational/RelationalProjectSequencingPropertiesPage.java index 192951b956a..94c706fe3ff 100644 --- a/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/project/relational/RelationalProjectSequencingPropertiesPage.java +++ b/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/project/relational/RelationalProjectSequencingPropertiesPage.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -364,13 +364,13 @@ private ComponentEnabler buildPreallocationSizeEnabler(JComponent widgets) { } private SpinnerNumberModel buildSequencingPrealocationSizeSpinnerModel() { - return new NumberSpinnerModelAdapter(buildSequencingPrealocationSizeHolder(), new Integer(0), null, new Integer(1), new Integer(0)); + return new NumberSpinnerModelAdapter(buildSequencingPrealocationSizeHolder(), Integer.valueOf(0), null, Integer.valueOf(1), Integer.valueOf(0)); } private PropertyValueModel buildSequencingPrealocationSizeHolder() { return new PropertyAspectAdapter(this.sequencingPolicyHolder, MWSequencingPolicy.PREALLOCATION_SIZE_PROPERTY) { protected Object getValueFromSubject() { - return new Integer(((MWSequencingPolicy) subject).getPreallocationSize()); + return Integer.valueOf(((MWSequencingPolicy) subject).getPreallocationSize()); } protected void setValueOnSubject(Object value) { ((MWSequencingPolicy) subject).setPreallocationSize(((Number) value).intValue()); diff --git a/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/query/QueryAdvancedOptionsDialog.java b/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/query/QueryAdvancedOptionsDialog.java index fdfdb47a105..26606d2d455 100644 --- a/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/query/QueryAdvancedOptionsDialog.java +++ b/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/query/QueryAdvancedOptionsDialog.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -264,8 +264,8 @@ protected JSpinner buildQueryTimeoutSpinner(PropertyValueModel queryTimeoutHolde private SpinnerNumberModel buildQueryTimeoutSpinnerModel(PropertyValueModel queryTimeoutHolder) { SpinnerNumberModel spinnerNumberModel = new NumberSpinnerModelAdapter(queryTimeoutHolder); - spinnerNumberModel.setMinimum(new Integer(1)); - spinnerNumberModel.setMaximum(new Integer(99999)); + spinnerNumberModel.setMinimum(Integer.valueOf(1)); + spinnerNumberModel.setMaximum(Integer.valueOf(99999)); return spinnerNumberModel; } @@ -282,7 +282,7 @@ protected Object transform(Object value) { protected Object reverseTransform(Object value) { if (Boolean.TRUE.equals(value)) { - return ((Integer) this.valueHolder.getValue()).intValue() > 0 ? this.valueHolder.getValue() : new Integer(1); + return ((Integer) this.valueHolder.getValue()).intValue() > 0 ? this.valueHolder.getValue() : Integer.valueOf(1); } else { return MWAbstractReadQuery.QUERY_TIMEOUT_NO_TIMEOUT; @@ -331,13 +331,13 @@ public void actionPerformed(ActionEvent ae) { protected void setMaximumRows(final JCheckBox checkBox) { if (checkBox.isSelected()) { this.maximumRowsSpinner.setEnabled(false); - this.maximumRowsSpinnerNumberModel.setMinimum(new Integer(0)); - this.maximumRowsSpinnerNumberModel.setValue(new Integer(0)); + this.maximumRowsSpinnerNumberModel.setMinimum(Integer.valueOf(0)); + this.maximumRowsSpinnerNumberModel.setValue(Integer.valueOf(0)); } else { this.maximumRowsSpinner.setEnabled(true); this.maximumRowsSpinnerNumberModel.setValue(getMaximumRows() == 0 ? - new Integer(1) : this.maximumRowsSpinnerNumberModel.getValue()); - this.maximumRowsSpinnerNumberModel.setMinimum(new Integer(1)); + Integer.valueOf(1) : this.maximumRowsSpinnerNumberModel.getValue()); + this.maximumRowsSpinnerNumberModel.setMinimum(Integer.valueOf(1)); } } @@ -349,13 +349,13 @@ protected JSpinner buildMaximumRowsSpinner() { this.maximumRowsSpinner .setMinimumSize(new Dimension(65, 23)); this.maximumRowsSpinner .setMaximumSize(new Dimension(65, 23)); this.maximumRowsSpinner .setModel(this.maximumRowsSpinnerNumberModel); - this.maximumRowsSpinner .setValue(new Integer(this.query.getMaximumRows())); + this.maximumRowsSpinner .setValue(Integer.valueOf(this.query.getMaximumRows())); return this.maximumRowsSpinner ; } private SpinnerNumberModel buildMaximumRowsSpinnerModel() { SpinnerNumberModel spinnerNumberModel = new NumberSpinnerModelAdapter(new SimplePropertyValueModel()); - spinnerNumberModel.setMinimum(new Integer(0)); + spinnerNumberModel.setMinimum(Integer.valueOf(0)); spinnerNumberModel.setMaximum(null); return spinnerNumberModel; } @@ -391,13 +391,13 @@ public void actionPerformed(ActionEvent ae) { protected void setFirstResult(final JCheckBox checkBox) { if (!checkBox.isSelected()) { this.firstResultSpinner.setEnabled(false); - this.firstResultSpinnerNumberModel.setMinimum(new Integer(0)); - this.firstResultSpinnerNumberModel.setValue(new Integer(0)); + this.firstResultSpinnerNumberModel.setMinimum(Integer.valueOf(0)); + this.firstResultSpinnerNumberModel.setValue(Integer.valueOf(0)); } else { this.firstResultSpinner.setEnabled(true); this.firstResultSpinnerNumberModel.setValue(getFirstResult() == 0 ? - new Integer(1) : this.firstResultSpinnerNumberModel.getValue()); - this.firstResultSpinnerNumberModel.setMinimum(new Integer(1)); + Integer.valueOf(1) : this.firstResultSpinnerNumberModel.getValue()); + this.firstResultSpinnerNumberModel.setMinimum(Integer.valueOf(1)); } } @@ -409,13 +409,13 @@ protected JSpinner buildFirstResultSpinner() { this.firstResultSpinner.setMinimumSize(new Dimension(65, 23)); this.firstResultSpinner.setMaximumSize(new Dimension(65, 23)); this.firstResultSpinner.setModel(this.firstResultSpinnerNumberModel); - this.firstResultSpinner.setValue(new Integer(this.query.getFirstResult())); + this.firstResultSpinner.setValue(Integer.valueOf(this.query.getFirstResult())); return this.firstResultSpinner; } private SpinnerNumberModel buildFirstResultSpinnerModel() { SpinnerNumberModel spinnerNumberModel = new NumberSpinnerModelAdapter(new SimplePropertyValueModel()); - spinnerNumberModel.setMinimum(new Integer(0)); + spinnerNumberModel.setMinimum(Integer.valueOf(0)); spinnerNumberModel.setMaximum(null); return spinnerNumberModel; } diff --git a/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/query/QueryGeneralPanel.java b/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/query/QueryGeneralPanel.java index fb23782233b..6b52d31fe80 100644 --- a/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/query/QueryGeneralPanel.java +++ b/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/query/QueryGeneralPanel.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -235,7 +235,7 @@ private boolean promptToChangeQueryType() { // build dialog panel String title = this.resourceRepository().getString("QUERY_CHANGE_QUERY_TYPE_TITLE"); String message = this.resourceRepository().getString("QUERY_CHANGE_QUERY_TYPE_MESSAGE"); - PropertyValueModel dontAskAgainHolder = new SimplePropertyValueModel(new Boolean(false)); + PropertyValueModel dontAskAgainHolder = new SimplePropertyValueModel(Boolean.valueOf(false)); JComponent dontAskAgainPanel = SwingComponentFactory.buildDoNotAskAgainPanel(message, dontAskAgainHolder, this.resourceRepository()); diff --git a/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/query/relational/AddArgumentDialog.java b/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/query/relational/AddArgumentDialog.java index c3c4fd36f64..531dee71807 100644 --- a/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/query/relational/AddArgumentDialog.java +++ b/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/query/relational/AddArgumentDialog.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -175,7 +175,7 @@ private PropertyValueModel buildSupportsValueHolder() { @Override protected Object getValueFromSubject() { ArgumentStateObject stateObject = (ArgumentStateObject) subject; - return new Boolean(stateObject.supportsValue()); + return Boolean.valueOf(stateObject.supportsValue()); } @Override @@ -191,7 +191,7 @@ private PropertyValueModel buildIsNamedHolder() { @Override protected Object getValueFromSubject() { ArgumentStateObject stateObject = (ArgumentStateObject) subject; - return new Boolean(stateObject.isNamed()); + return Boolean.valueOf(stateObject.isNamed()); } @Override diff --git a/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/query/relational/AttributeItemDialog.java b/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/query/relational/AttributeItemDialog.java index 5acba1b4aeb..f709d1b7967 100644 --- a/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/query/relational/AttributeItemDialog.java +++ b/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/query/relational/AttributeItemDialog.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -198,7 +198,7 @@ protected boolean preConfirm() { while (selectionPath.getPathCount() > 1) {//first path component is always a descriptor, we want to quit before reaching it selectedNode = (QueryableTreeNode) selectionPath.getLastPathComponent(); - allowsNull.add(new Boolean(selectedNode.isAllowsNull())); + allowsNull.add(Boolean.valueOf(selectedNode.isAllowsNull())); MWQueryable joinedQueryable = selectedNode.getQueryable(); queryablePath.add(joinedQueryable); selectionPath = selectionPath.getParentPath(); diff --git a/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/query/relational/CustomQuerySelectionCriteriaPanel.java b/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/query/relational/CustomQuerySelectionCriteriaPanel.java index 64c790c6a35..7765983831a 100644 --- a/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/query/relational/CustomQuerySelectionCriteriaPanel.java +++ b/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/query/relational/CustomQuerySelectionCriteriaPanel.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -174,7 +174,7 @@ private boolean promptToChangeSelectionCriteriaType() // build dialog panel String title = this.resourceRepository().getString("QUERY_QUERY_FORMAT_TITLE"); String message = this.resourceRepository().getString("QUERY_QUERY_FORMAT_MESSAGE"); - PropertyValueModel dontAskAgainHolder = new SimplePropertyValueModel(new Boolean(false)); + PropertyValueModel dontAskAgainHolder = new SimplePropertyValueModel(Boolean.valueOf(false)); JComponent dontAskAgainPanel = SwingComponentFactory.buildDoNotAskAgainPanel(message, dontAskAgainHolder, this.resourceRepository()); diff --git a/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/query/relational/QuerySelectionCriteriaPanel.java b/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/query/relational/QuerySelectionCriteriaPanel.java index b6e1a49a832..5baf9a13890 100644 --- a/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/query/relational/QuerySelectionCriteriaPanel.java +++ b/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/query/relational/QuerySelectionCriteriaPanel.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -207,7 +207,7 @@ private boolean promptToChangeSelectionCriteriaType() // build dialog panel String title = this.resourceRepository().getString("QUERY_QUERY_FORMAT_TITLE"); String message = this.resourceRepository().getString("QUERY_QUERY_FORMAT_MESSAGE"); - PropertyValueModel dontAskAgainHolder = new SimplePropertyValueModel(new Boolean(false)); + PropertyValueModel dontAskAgainHolder = new SimplePropertyValueModel(Boolean.valueOf(false)); JComponent dontAskAgainPanel = SwingComponentFactory.buildDoNotAskAgainPanel(message, dontAskAgainHolder, this.resourceRepository()); diff --git a/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/query/relational/QueryableEditDialog.java b/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/query/relational/QueryableEditDialog.java index 93d2366a8bb..ae2e68a4d8a 100644 --- a/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/query/relational/QueryableEditDialog.java +++ b/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/query/relational/QueryableEditDialog.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -136,7 +136,7 @@ protected boolean preConfirm() { while (selectionPath.getPathCount() > 1) //first path component is always a descriptor, we want to quit before reaching it { selectedNode = (QueryableTreeNode) selectionPath.getLastPathComponent(); - allowsNull.add(new Boolean(selectedNode.isAllowsNull())); + allowsNull.add(Boolean.valueOf(selectedNode.isAllowsNull())); MWQueryable joinedQueryable = selectedNode.getQueryable(); queryablePath.add(joinedQueryable); selectionPath = selectionPath.getParentPath(); diff --git a/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/query/relational/RelationalDescriptorQueriesSettingsPage.java b/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/query/relational/RelationalDescriptorQueriesSettingsPage.java index 020566a4e7f..c848f497393 100644 --- a/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/query/relational/RelationalDescriptorQueriesSettingsPage.java +++ b/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/query/relational/RelationalDescriptorQueriesSettingsPage.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -221,7 +221,7 @@ protected Object transform(Object value) { protected Object reverseTransform(Object value) { if (Boolean.TRUE.equals(value)) { - return ((Integer) valueHolder.getValue()).intValue() > 0 ? valueHolder.getValue() : new Integer(1); + return ((Integer) valueHolder.getValue()).intValue() > 0 ? valueHolder.getValue() : Integer.valueOf(1); } else { @@ -233,8 +233,8 @@ protected Object reverseTransform(Object value) private SpinnerNumberModel buildQueryTimeoutSpinnerModel() { SpinnerNumberModel spinnerNumberModel = new NumberSpinnerModelAdapter(buildQueryTimeoutHolder()); - spinnerNumberModel.setMinimum(new Integer(1)); - spinnerNumberModel.setMaximum(new Integer(99999)); + spinnerNumberModel.setMinimum(Integer.valueOf(1)); + spinnerNumberModel.setMaximum(Integer.valueOf(99999)); return spinnerNumberModel; } diff --git a/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/query/relational/RelationalQueryComponentFactory.java b/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/query/relational/RelationalQueryComponentFactory.java index 8ee0484809d..ca69e2f458f 100644 --- a/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/query/relational/RelationalQueryComponentFactory.java +++ b/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/query/relational/RelationalQueryComponentFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -92,7 +92,7 @@ public void propertyChange(PropertyChangeEvent evt) { private static PropertyValueModel buildProjectCacheStatementHolder(PropertyValueModel relationalOptionsHolder) { return new PropertyAspectAdapter(relationalOptionsHolder) { protected Object getValueFromSubject() { - return new Boolean(((MWRelationalProjectDefaultsPolicy) ((MWRelationalSpecificQueryOptions) this.subject).getProject().getDefaultsPolicy()).shouldQueriesCacheAllStatements()); + return Boolean.valueOf(((MWRelationalProjectDefaultsPolicy) ((MWRelationalSpecificQueryOptions) this.subject).getProject().getDefaultsPolicy()).shouldQueriesCacheAllStatements()); } }; } @@ -138,7 +138,7 @@ protected void setValueOnSubject(Object value) { private static PropertyValueModel buildProjectBindParametersHolder(PropertyValueModel relationalOptionsHolder) { return new PropertyAspectAdapter(relationalOptionsHolder) { protected Object getValueFromSubject() { - return new Boolean(((MWRelationalProjectDefaultsPolicy) ((MWRelationalSpecificQueryOptions) this.subject).getProject().getDefaultsPolicy()).shouldQueriesBindAllParameters()); + return Boolean.valueOf(((MWRelationalProjectDefaultsPolicy) ((MWRelationalSpecificQueryOptions) this.subject).getProject().getDefaultsPolicy()).shouldQueriesBindAllParameters()); } }; } diff --git a/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/schema/AttributeDeclarationNodeStructure.java b/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/schema/AttributeDeclarationNodeStructure.java index 3bb176ec0c2..e081ad1ffe6 100644 --- a/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/schema/AttributeDeclarationNodeStructure.java +++ b/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/schema/AttributeDeclarationNodeStructure.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -42,7 +42,7 @@ protected ListIterator componentDetails() { // **************** NamedSchemaComponentNodeStructure contract ********************* Integer topLevelOrderIndex() { - return new Integer(2); + return Integer.valueOf(2); } diff --git a/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/schema/ComplexTypeDefinitionNodeStructure.java b/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/schema/ComplexTypeDefinitionNodeStructure.java index 9a3fb440abc..73250209399 100644 --- a/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/schema/ComplexTypeDefinitionNodeStructure.java +++ b/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/schema/ComplexTypeDefinitionNodeStructure.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -42,7 +42,7 @@ protected ListIterator componentDetails() { // **************** NamedSchemaComponentNodeStructure contract ************ Integer topLevelOrderIndex() { - return new Integer(3); + return Integer.valueOf(3); } diff --git a/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/schema/ElementDeclarationNodeStructure.java b/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/schema/ElementDeclarationNodeStructure.java index 889e2a3f348..c345dae8b45 100644 --- a/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/schema/ElementDeclarationNodeStructure.java +++ b/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/schema/ElementDeclarationNodeStructure.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -44,7 +44,7 @@ protected ListIterator componentDetails() { // **************** NamedSchemaComponentNodeStructure contract ************ Integer topLevelOrderIndex() { - return new Integer(0); + return Integer.valueOf(0); } // **************** ParticleTermNodeStructure contract ******************** diff --git a/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/schema/ModelGroupDefinitionNodeStructure.java b/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/schema/ModelGroupDefinitionNodeStructure.java index 212b957e3c5..013fe6c9590 100644 --- a/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/schema/ModelGroupDefinitionNodeStructure.java +++ b/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/schema/ModelGroupDefinitionNodeStructure.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -39,6 +39,6 @@ protected ListIterator componentDetails() { // **************** NamedSchemaComponentNodeStructure contract ************ Integer topLevelOrderIndex() { - return new Integer(1); + return Integer.valueOf(1); } } diff --git a/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/schema/SchemaNamespacesPanel.java b/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/schema/SchemaNamespacesPanel.java index 6222ed735a6..6408593799a 100644 --- a/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/schema/SchemaNamespacesPanel.java +++ b/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/schema/SchemaNamespacesPanel.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -393,7 +393,7 @@ protected void setValueOnSubject(Object value) { private PropertyValueModel buildDeclaredAdapter(MWNamespace namespace) { return new PropertyAspectAdapter(MWNamespace.DECLARED_PROPERTY, namespace) { protected Object getValueFromSubject() { - return new Boolean(((MWNamespace) this.subject).isDeclared()); + return Boolean.valueOf(((MWNamespace) this.subject).isDeclared()); } protected void setValueOnSubject(Object value) { diff --git a/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/schema/SimpleTypeDefinitionNodeStructure.java b/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/schema/SimpleTypeDefinitionNodeStructure.java index b4db8e6f117..a10cbf34936 100644 --- a/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/schema/SimpleTypeDefinitionNodeStructure.java +++ b/utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/schema/SimpleTypeDefinitionNodeStructure.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -43,7 +43,7 @@ protected ListIterator componentDetails() { // **************** NamedSchemaComponentNodeStructure contract ************ Integer topLevelOrderIndex() { - return new Integer(4); + return Integer.valueOf(4); } diff --git a/utils/eclipselink.utils.workbench/platformsplugin/source/org/eclipse/persistence/tools/workbench/platformsplugin/ui/type/DatabaseTypePropertiesPage.java b/utils/eclipselink.utils.workbench/platformsplugin/source/org/eclipse/persistence/tools/workbench/platformsplugin/ui/type/DatabaseTypePropertiesPage.java index fbb52127330..448435836aa 100644 --- a/utils/eclipselink.utils.workbench/platformsplugin/source/org/eclipse/persistence/tools/workbench/platformsplugin/ui/type/DatabaseTypePropertiesPage.java +++ b/utils/eclipselink.utils.workbench/platformsplugin/source/org/eclipse/persistence/tools/workbench/platformsplugin/ui/type/DatabaseTypePropertiesPage.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -53,7 +53,7 @@ final class DatabaseTypePropertiesPage extends TitledPropertiesPage { - static final Object DEFAULT_INITIAL_SIZE_VALUE = new Integer(0); + static final Object DEFAULT_INITIAL_SIZE_VALUE = Integer.valueOf(0); public DatabaseTypePropertiesPage(WorkbenchContext context) { @@ -336,13 +336,13 @@ private JSpinner buildInitialSizeSpinner() { private SpinnerModel buildInitialSizeSpinnerModel() { PropertyValueModel model = this.buildInitialSizeAdapter(); - return new NumberSpinnerModelAdapter(model, new Integer(0), null, new Integer(1), new Integer(0)); + return new NumberSpinnerModelAdapter(model, Integer.valueOf(0), null, Integer.valueOf(1), Integer.valueOf(0)); } private PropertyValueModel buildInitialSizeAdapter() { return new PropertyAspectAdapter(this.getSelectionHolder(), DatabaseType.INITIAL_SIZE_PROPERTY) { protected Object getValueFromSubject() { - return new Integer(((DatabaseType) this.subject).getInitialSize()); + return Integer.valueOf(((DatabaseType) this.subject).getInitialSize()); } protected void setValueOnSubject(Object value) { ((DatabaseType) this.subject).setInitialSize(((Number) value).intValue()); diff --git a/utils/eclipselink.utils.workbench/scplugin/source/org/eclipse/persistence/tools/workbench/scplugin/model/adapter/ConnectionPoolAdapter.java b/utils/eclipselink.utils.workbench/scplugin/source/org/eclipse/persistence/tools/workbench/scplugin/model/adapter/ConnectionPoolAdapter.java index be84701619b..9d6086dc97e 100644 --- a/utils/eclipselink.utils.workbench/scplugin/source/org/eclipse/persistence/tools/workbench/scplugin/model/adapter/ConnectionPoolAdapter.java +++ b/utils/eclipselink.utils.workbench/scplugin/source/org/eclipse/persistence/tools/workbench/scplugin/model/adapter/ConnectionPoolAdapter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -205,7 +205,7 @@ public boolean isWriteConnectionPool() { public void setMaxConnections( int maxConnections) { int oldMaxConnections = getMaxConnections(); - this.pool().setMaxConnections( new Integer(maxConnections)); + this.pool().setMaxConnections( Integer.valueOf(maxConnections)); firePropertyChanged( MAX_CONNECTIONS_PROPERTY, oldMaxConnections, maxConnections); } @@ -218,7 +218,7 @@ public int getMaxConnections() { public void setMinConnections( int minConnections) { int oldMinConnections = getMinConnections(); - this.pool().setMinConnections( new Integer( minConnections)); + this.pool().setMinConnections( Integer.valueOf( minConnections)); firePropertyChanged( MIN_CONNECTIONS_PROPERTY, oldMinConnections, minConnections); } diff --git a/utils/eclipselink.utils.workbench/scplugin/source/org/eclipse/persistence/tools/workbench/scplugin/model/adapter/DatabaseLoginAdapter.java b/utils/eclipselink.utils.workbench/scplugin/source/org/eclipse/persistence/tools/workbench/scplugin/model/adapter/DatabaseLoginAdapter.java index 8c15f868857..c5a7581b800 100644 --- a/utils/eclipselink.utils.workbench/scplugin/source/org/eclipse/persistence/tools/workbench/scplugin/model/adapter/DatabaseLoginAdapter.java +++ b/utils/eclipselink.utils.workbench/scplugin/source/org/eclipse/persistence/tools/workbench/scplugin/model/adapter/DatabaseLoginAdapter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -249,7 +249,7 @@ protected void initializeDefaults() { setTrimStrings( XMLSessionConfigProject.TRIM_STRINGS_DEFAULT); setMaxBatchWritingSize( XMLSessionConfigProject.MAX_BATCH_WRITING_SIZE_DEFAULT); setJdbcBatchWriting( XMLSessionConfigProject.JDBC20_BATCH_WRITING_DEFAULT); - setLookupType( new Integer( XMLSessionConfigProject.DATASOURCE_LOOKUP_TYPE_DEFAULT)); + setLookupType( Integer.valueOf( XMLSessionConfigProject.DATASOURCE_LOOKUP_TYPE_DEFAULT)); setBindAllParameters( XMLSessionConfigProject_11_1_1.BIND_ALL_PARAMETERS_DEFAULT); } @@ -267,7 +267,7 @@ protected void initializeFromModel(Object scConfig) { super.initializeFromModel( scConfig); if( usesBatchWriting() && ( login().getMaxBatchWritingSize() == null)) { - login().setMaxBatchWritingSize( new Integer( 0)); + login().setMaxBatchWritingSize( Integer.valueOf( 0)); } this.useDriverManager = ( StringTools.stringIsEmpty( getDataSourceName())) ? true : false; @@ -275,7 +275,7 @@ protected void initializeFromModel(Object scConfig) { useProperties = (( properties != null) && !properties.isEmpty()); if( login().getLookupType() == null) { - login().setLookupType( new Integer( XMLSessionConfigProject.DATASOURCE_LOOKUP_TYPE_DEFAULT)); + login().setLookupType( Integer.valueOf( XMLSessionConfigProject.DATASOURCE_LOOKUP_TYPE_DEFAULT)); } if (login().getStructConverterConfig() == null) { @@ -541,7 +541,7 @@ public void setMaxBatchWritingSize( int value) { int old = getMaxBatchWritingSize(); - this.login().setMaxBatchWritingSize( new Integer( value)); + this.login().setMaxBatchWritingSize( Integer.valueOf( value)); this.firePropertyChanged( MAX_BATCH_WRITING_SIZE_PROPERTY, old, value); } diff --git a/utils/eclipselink.utils.workbench/scplugin/source/org/eclipse/persistence/tools/workbench/scplugin/model/adapter/DatabaseSessionAdapter.java b/utils/eclipselink.utils.workbench/scplugin/source/org/eclipse/persistence/tools/workbench/scplugin/model/adapter/DatabaseSessionAdapter.java index 7d87cfc5c33..ae31c2c6001 100644 --- a/utils/eclipselink.utils.workbench/scplugin/source/org/eclipse/persistence/tools/workbench/scplugin/model/adapter/DatabaseSessionAdapter.java +++ b/utils/eclipselink.utils.workbench/scplugin/source/org/eclipse/persistence/tools/workbench/scplugin/model/adapter/DatabaseSessionAdapter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -264,7 +264,7 @@ private void setEmptyLoginConfig() { emptyConfig.setByteArrayBinding( XMLSessionConfigProject.BYTE_ARRAY_BINDING_DEFAULT); emptyConfig.setOptimizeDataConversion( XMLSessionConfigProject.OPTIMIZE_DATA_CONVERSION_DEFAULT); emptyConfig.setTrimStrings( XMLSessionConfigProject.TRIM_STRINGS_DEFAULT); - emptyConfig.setMaxBatchWritingSize( new Integer( XMLSessionConfigProject.MAX_BATCH_WRITING_SIZE_DEFAULT)); + emptyConfig.setMaxBatchWritingSize( Integer.valueOf( XMLSessionConfigProject.MAX_BATCH_WRITING_SIZE_DEFAULT)); emptyConfig.setJdbcBatchWriting( XMLSessionConfigProject.JDBC20_BATCH_WRITING_DEFAULT); databaseSession().setLoginConfig( emptyConfig); } diff --git a/utils/eclipselink.utils.workbench/scplugin/source/org/eclipse/persistence/tools/workbench/scplugin/model/adapter/SequenceAdapter.java b/utils/eclipselink.utils.workbench/scplugin/source/org/eclipse/persistence/tools/workbench/scplugin/model/adapter/SequenceAdapter.java index fee19fb5d4b..95741f4d8c2 100644 --- a/utils/eclipselink.utils.workbench/scplugin/source/org/eclipse/persistence/tools/workbench/scplugin/model/adapter/SequenceAdapter.java +++ b/utils/eclipselink.utils.workbench/scplugin/source/org/eclipse/persistence/tools/workbench/scplugin/model/adapter/SequenceAdapter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -47,7 +47,7 @@ protected SequenceAdapter( SCAdapter parent, String name, int preallocationSize) super( parent); this.setName( name); - this.setPreallocationSize( new Integer(preallocationSize)); + this.setPreallocationSize( Integer.valueOf(preallocationSize)); } /** * Returns this Config Model Object. @@ -91,7 +91,7 @@ public int getPreallocationSize() { */ public void setPreallocationSize(Integer size) { Integer old = this.sequence().getPreallocationSize(); - this.sequence().setPreallocationSize( new Integer( size)); + this.sequence().setPreallocationSize( Integer.valueOf( size)); firePropertyChanged(PREALLOCATION_SIZE_PROPERTY, old, size); } diff --git a/utils/eclipselink.utils.workbench/scplugin/source/org/eclipse/persistence/tools/workbench/scplugin/model/meta/SCSessionsPropertiesManager.java b/utils/eclipselink.utils.workbench/scplugin/source/org/eclipse/persistence/tools/workbench/scplugin/model/meta/SCSessionsPropertiesManager.java index 211d91f3539..35115940aae 100644 --- a/utils/eclipselink.utils.workbench/scplugin/source/org/eclipse/persistence/tools/workbench/scplugin/model/meta/SCSessionsPropertiesManager.java +++ b/utils/eclipselink.utils.workbench/scplugin/source/org/eclipse/persistence/tools/workbench/scplugin/model/meta/SCSessionsPropertiesManager.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -193,7 +193,7 @@ public File nextUntitledSessionsFile() } else { - index = Math.max(new Integer(remaining).intValue(), index); + index = Math.max(Integer.valueOf(remaining).intValue(), index); } } catch (Exception e) diff --git a/utils/eclipselink.utils.workbench/scplugin/source/org/eclipse/persistence/tools/workbench/scplugin/ui/login/AbstractRdbmsLoginPane.java b/utils/eclipselink.utils.workbench/scplugin/source/org/eclipse/persistence/tools/workbench/scplugin/ui/login/AbstractRdbmsLoginPane.java index 8df48e23857..90c24955410 100644 --- a/utils/eclipselink.utils.workbench/scplugin/source/org/eclipse/persistence/tools/workbench/scplugin/ui/login/AbstractRdbmsLoginPane.java +++ b/utils/eclipselink.utils.workbench/scplugin/source/org/eclipse/persistence/tools/workbench/scplugin/ui/login/AbstractRdbmsLoginPane.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -516,17 +516,17 @@ private ComboBoxModel buildLookupTypeComboModel() LookupType string = new LookupType ( resourceRepository().getString("CONNECTION_RDBMS_LOOKUP_TYPE_STRING_CHOICE"), - new Integer(JNDIConnector.STRING_LOOKUP) + Integer.valueOf(JNDIConnector.STRING_LOOKUP) ); LookupType compound = new LookupType ( resourceRepository().getString("CONNECTION_RDBMS_LOOKUP_TYPE_COMPOUND_NAME_CHOICE"), - new Integer(JNDIConnector.COMPOUND_NAME_LOOKUP) + Integer.valueOf(JNDIConnector.COMPOUND_NAME_LOOKUP) ); LookupType composite = new LookupType ( resourceRepository().getString("CONNECTION_RDBMS_LOOKUP_TYPE_COMPOSITE_NAME_CHOICE"), - new Integer(JNDIConnector.COMPOSITE_NAME_LOOKUP) + Integer.valueOf(JNDIConnector.COMPOSITE_NAME_LOOKUP) ); List lookupTypes = new Vector(3); diff --git a/utils/eclipselink.utils.workbench/scplugin/source/org/eclipse/persistence/tools/workbench/scplugin/ui/pool/basic/ConnectionCountPane.java b/utils/eclipselink.utils.workbench/scplugin/source/org/eclipse/persistence/tools/workbench/scplugin/ui/pool/basic/ConnectionCountPane.java index 5a0df965a73..b04c5fb7b06 100644 --- a/utils/eclipselink.utils.workbench/scplugin/source/org/eclipse/persistence/tools/workbench/scplugin/ui/pool/basic/ConnectionCountPane.java +++ b/utils/eclipselink.utils.workbench/scplugin/source/org/eclipse/persistence/tools/workbench/scplugin/ui/pool/basic/ConnectionCountPane.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -164,7 +164,7 @@ private PropertyValueModel buildMaximumCountHolder() protected Object getValueFromSubject() { ConnectionPoolAdapter pool = (ConnectionPoolAdapter) subject; - return new Integer(pool.getMaxConnections()); + return Integer.valueOf(pool.getMaxConnections()); } protected void setValueOnSubject(Object value) @@ -200,7 +200,7 @@ private PropertyValueModel buildMinimumCountHolder() protected Object getValueFromSubject() { ConnectionPoolAdapter pool = (ConnectionPoolAdapter) subject; - return new Integer(pool.getMinConnections()); + return Integer.valueOf(pool.getMinConnections()); } protected void setValueOnSubject(Object value) diff --git a/utils/eclipselink.utils.workbench/scplugin/source/org/eclipse/persistence/tools/workbench/scplugin/ui/session/clustering/RCMRMIPane.java b/utils/eclipselink.utils.workbench/scplugin/source/org/eclipse/persistence/tools/workbench/scplugin/ui/session/clustering/RCMRMIPane.java index a0913855e5b..8cf46c71d18 100644 --- a/utils/eclipselink.utils.workbench/scplugin/source/org/eclipse/persistence/tools/workbench/scplugin/ui/session/clustering/RCMRMIPane.java +++ b/utils/eclipselink.utils.workbench/scplugin/source/org/eclipse/persistence/tools/workbench/scplugin/ui/session/clustering/RCMRMIPane.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -110,7 +110,7 @@ private PropertyValueModel buildAnnouncementDelayHolder() protected Object getValueFromSubject() { RMITransportManagerAdapter adapter = (RMITransportManagerAdapter) subject; - return new Integer(adapter.getAnnouncementDelay()); + return Integer.valueOf(adapter.getAnnouncementDelay()); } protected void setValueOnSubject(Object value) @@ -219,7 +219,7 @@ private PropertyValueModel buildMultiCastPortHolder() protected Object getValueFromSubject() { RMITransportManagerAdapter adapter = (RMITransportManagerAdapter) subject; - return new Integer(adapter.getMulticastPort()); + return Integer.valueOf(adapter.getMulticastPort()); } protected void setValueOnSubject(Object value) @@ -254,7 +254,7 @@ private PropertyValueModel buildPacketTimeToLiveHolder() protected Object getValueFromSubject() { RMITransportManagerAdapter adapter = (RMITransportManagerAdapter) subject; - return new Integer(adapter.getPacketTimeToLive()); + return Integer.valueOf(adapter.getPacketTimeToLive()); } protected void setValueOnSubject(Object value) diff --git a/utils/eclipselink.utils.workbench/scplugin/source/org/eclipse/persistence/tools/workbench/scplugin/ui/session/login/RdbmsOptionsPropertiesPage.java b/utils/eclipselink.utils.workbench/scplugin/source/org/eclipse/persistence/tools/workbench/scplugin/ui/session/login/RdbmsOptionsPropertiesPage.java index 668f22a08fb..395af82c29b 100644 --- a/utils/eclipselink.utils.workbench/scplugin/source/org/eclipse/persistence/tools/workbench/scplugin/ui/session/login/RdbmsOptionsPropertiesPage.java +++ b/utils/eclipselink.utils.workbench/scplugin/source/org/eclipse/persistence/tools/workbench/scplugin/ui/session/login/RdbmsOptionsPropertiesPage.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -962,7 +962,7 @@ private PropertyValueModel buildStringSizeHolder() protected Object getValueFromSubject() { DatabaseLoginAdapter adapter = (DatabaseLoginAdapter) subject; - return new Integer(adapter.getMaxBatchWritingSize()); + return Integer.valueOf(adapter.getMaxBatchWritingSize()); } protected void setValueOnSubject(Object value) diff --git a/utils/eclipselink.utils.workbench/scplugin/source/org/eclipse/persistence/tools/workbench/scplugin/ui/session/login/SequencePropertyPane.java b/utils/eclipselink.utils.workbench/scplugin/source/org/eclipse/persistence/tools/workbench/scplugin/ui/session/login/SequencePropertyPane.java index 129f96b13dc..6a7fbb0b32a 100644 --- a/utils/eclipselink.utils.workbench/scplugin/source/org/eclipse/persistence/tools/workbench/scplugin/ui/session/login/SequencePropertyPane.java +++ b/utils/eclipselink.utils.workbench/scplugin/source/org/eclipse/persistence/tools/workbench/scplugin/ui/session/login/SequencePropertyPane.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -72,10 +72,10 @@ final JComponent buildPreallocationSizeWidgets() "SEQUENCE_PANE_PREALLOCATION_SIZE_LABEL", getSubjectHolder(), buildPreallocationSizeHolder(), - new SimplePropertyValueModel(new Integer(50)), - new Integer(0), + new SimplePropertyValueModel(Integer.valueOf(50)), + Integer.valueOf(0), Integer.MAX_VALUE, - new Integer(1), + Integer.valueOf(1), 6, resourceRepository(), getAlignLeftGroup(), diff --git a/utils/eclipselink.utils.workbench/scplugin/source/org/eclipse/persistence/tools/workbench/scplugin/ui/tools/IPAddress.java b/utils/eclipselink.utils.workbench/scplugin/source/org/eclipse/persistence/tools/workbench/scplugin/ui/tools/IPAddress.java index a1027534db7..8f2f3037ce3 100644 --- a/utils/eclipselink.utils.workbench/scplugin/source/org/eclipse/persistence/tools/workbench/scplugin/ui/tools/IPAddress.java +++ b/utils/eclipselink.utils.workbench/scplugin/source/org/eclipse/persistence/tools/workbench/scplugin/ui/tools/IPAddress.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -160,7 +160,7 @@ public static int[] convert(String ipAddress) throws ParseException try { for (int index = 0; index < 4; index++) - ipAddresses[index] = new Integer(tokenizer.nextToken()).intValue(); + ipAddresses[index] = Integer.valueOf(tokenizer.nextToken()).intValue(); } catch (Throwable throwable) { diff --git a/utils/eclipselink.utils.workbench/uitools/source/org/eclipse/persistence/tools/workbench/uitools/SimpleDisplayable.java b/utils/eclipselink.utils.workbench/uitools/source/org/eclipse/persistence/tools/workbench/uitools/SimpleDisplayable.java index 64bc6d23e30..97177284338 100644 --- a/utils/eclipselink.utils.workbench/uitools/source/org/eclipse/persistence/tools/workbench/uitools/SimpleDisplayable.java +++ b/utils/eclipselink.utils.workbench/uitools/source/org/eclipse/persistence/tools/workbench/uitools/SimpleDisplayable.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -49,31 +49,31 @@ public SimpleDisplayable(boolean b) { } public SimpleDisplayable(char c) { - this(new Character(c)); + this(Character.valueOf(c)); } public SimpleDisplayable(byte b) { - this(new Byte(b)); + this(Byte.valueOf(b)); } public SimpleDisplayable(short s) { - this(new Short(s)); + this(Short.valueOf(s)); } public SimpleDisplayable(int i) { - this(new Integer(i)); + this(Integer.valueOf(i)); } public SimpleDisplayable(long l) { - this(new Long(l)); + this(Long.valueOf(l)); } public SimpleDisplayable(float f) { - this(new Float(f)); + this(Float.valueOf(f)); } public SimpleDisplayable(double d) { - this(new Double(d)); + this(Double.valueOf(d)); } @@ -131,7 +131,7 @@ public char getChar() { } public void setChar(char c) { - this.setObject(new Character(c)); + this.setObject(Character.valueOf(c)); } public byte getByte() { @@ -139,7 +139,7 @@ public byte getByte() { } public void setByte(byte b) { - this.setObject(new Byte(b)); + this.setObject(Byte.valueOf(b)); } public short getShort() { @@ -147,7 +147,7 @@ public short getShort() { } public void setShort(short s) { - this.setObject(new Short(s)); + this.setObject(Short.valueOf(s)); } public int getInt() { @@ -155,7 +155,7 @@ public int getInt() { } public void setInt(int i) { - this.setObject(new Integer(i)); + this.setObject(Integer.valueOf(i)); } public long getLong() { @@ -163,7 +163,7 @@ public long getLong() { } public void setLong(long l) { - this.setObject(new Long(l)); + this.setObject(Long.valueOf(l)); } public float getFloat() { @@ -171,7 +171,7 @@ public float getFloat() { } public void setFloat(float f) { - this.setObject(new Float(f)); + this.setObject(Float.valueOf(f)); } public double getDouble() { @@ -179,7 +179,7 @@ public double getDouble() { } public void setDouble(double d) { - this.setObject(new Double(d)); + this.setObject(Double.valueOf(d)); } diff --git a/utils/eclipselink.utils.workbench/uitools/source/org/eclipse/persistence/tools/workbench/uitools/app/adapters/PreferencePropertyValueModel.java b/utils/eclipselink.utils.workbench/uitools/source/org/eclipse/persistence/tools/workbench/uitools/app/adapters/PreferencePropertyValueModel.java index 4e7381c6e72..73a190b03b4 100644 --- a/utils/eclipselink.utils.workbench/uitools/source/org/eclipse/persistence/tools/workbench/uitools/app/adapters/PreferencePropertyValueModel.java +++ b/utils/eclipselink.utils.workbench/uitools/source/org/eclipse/persistence/tools/workbench/uitools/app/adapters/PreferencePropertyValueModel.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -108,7 +108,7 @@ public PreferencePropertyValueModel(Preferences preferences, String key, boolean * the specified default value for the preference. */ public PreferencePropertyValueModel(Preferences preferences, String key, int defaultValue) { - this(preferences, key, new Integer(defaultValue)); + this(preferences, key, Integer.valueOf(defaultValue)); } /** diff --git a/utils/eclipselink.utils.workbench/uitools/source/org/eclipse/persistence/tools/workbench/uitools/app/swing/NumberSpinnerModelAdapter.java b/utils/eclipselink.utils.workbench/uitools/source/org/eclipse/persistence/tools/workbench/uitools/app/swing/NumberSpinnerModelAdapter.java index 53cf1386e14..11412df3e77 100644 --- a/utils/eclipselink.utils.workbench/uitools/source/org/eclipse/persistence/tools/workbench/uitools/app/swing/NumberSpinnerModelAdapter.java +++ b/utils/eclipselink.utils.workbench/uitools/source/org/eclipse/persistence/tools/workbench/uitools/app/swing/NumberSpinnerModelAdapter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -69,7 +69,7 @@ public NumberSpinnerModelAdapter(PropertyValueModel numberHolder) { * The step size is one. */ public NumberSpinnerModelAdapter(PropertyValueModel numberHolder, int defaultValue) { - this(numberHolder, null, null, new Integer(1), new Integer(defaultValue)); + this(numberHolder, null, null, Integer.valueOf(1), Integer.valueOf(defaultValue)); } /** @@ -84,7 +84,7 @@ public NumberSpinnerModelAdapter(PropertyValueModel numberHolder, int minimum, i * Constructor - the number holder is required. */ public NumberSpinnerModelAdapter(PropertyValueModel numberHolder, int minimum, int maximum, int stepSize, int defaultValue) { - this(numberHolder, new Integer(minimum), new Integer(maximum), new Integer(stepSize), new Integer(defaultValue)); + this(numberHolder, Integer.valueOf(minimum), Integer.valueOf(maximum), Integer.valueOf(stepSize), Integer.valueOf(defaultValue)); } /** @@ -99,7 +99,7 @@ public NumberSpinnerModelAdapter(PropertyValueModel numberHolder, double value, * Constructor - the number holder is required. */ public NumberSpinnerModelAdapter(PropertyValueModel numberHolder, double value, double minimum, double maximum, double stepSize, double defaultValue) { - this(numberHolder, new Double(minimum), new Double(maximum), new Double(stepSize), new Double(defaultValue)); + this(numberHolder, Double.valueOf(minimum), Double.valueOf(maximum), Double.valueOf(stepSize), Double.valueOf(defaultValue)); } /** diff --git a/utils/eclipselink.utils.workbench/uitools/source/org/eclipse/persistence/tools/workbench/uitools/cell/SpinnerTableCellRenderer.java b/utils/eclipselink.utils.workbench/uitools/source/org/eclipse/persistence/tools/workbench/uitools/cell/SpinnerTableCellRenderer.java index 740c701b905..4ac5404ff1d 100644 --- a/utils/eclipselink.utils.workbench/uitools/source/org/eclipse/persistence/tools/workbench/uitools/cell/SpinnerTableCellRenderer.java +++ b/utils/eclipselink.utils.workbench/uitools/source/org/eclipse/persistence/tools/workbench/uitools/cell/SpinnerTableCellRenderer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -153,7 +153,7 @@ protected JComponent editor() { protected void setValue(Object value) { // CR#3999318 - This null check needs to be removed once JDK bug is fixed if (value == null) { - value = new Integer(0); + value = Integer.valueOf(0); } this.spinner.setValue(value); } diff --git a/utils/eclipselink.utils.workbench/utility/source/org/eclipse/persistence/tools/workbench/utility/classfile/DoubleConstant.java b/utils/eclipselink.utils.workbench/utility/source/org/eclipse/persistence/tools/workbench/utility/classfile/DoubleConstant.java index ebc4d3b0e87..5a15d2a1947 100644 --- a/utils/eclipselink.utils.workbench/utility/source/org/eclipse/persistence/tools/workbench/utility/classfile/DoubleConstant.java +++ b/utils/eclipselink.utils.workbench/utility/source/org/eclipse/persistence/tools/workbench/utility/classfile/DoubleConstant.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -68,7 +68,7 @@ boolean consumesTwoPoolEntries() { } public Object value() { - return new Double(this.value); + return Double.valueOf(this.value); } public void accept(Visitor visitor) { diff --git a/utils/eclipselink.utils.workbench/utility/source/org/eclipse/persistence/tools/workbench/utility/classfile/FloatConstant.java b/utils/eclipselink.utils.workbench/utility/source/org/eclipse/persistence/tools/workbench/utility/classfile/FloatConstant.java index b1edbfde279..39be77aad29 100644 --- a/utils/eclipselink.utils.workbench/utility/source/org/eclipse/persistence/tools/workbench/utility/classfile/FloatConstant.java +++ b/utils/eclipselink.utils.workbench/utility/source/org/eclipse/persistence/tools/workbench/utility/classfile/FloatConstant.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -63,7 +63,7 @@ public float floatValue() { } public Object value() { - return new Float(this.value); + return Float.valueOf(this.value); } public void accept(Visitor visitor) { diff --git a/utils/eclipselink.utils.workbench/utility/source/org/eclipse/persistence/tools/workbench/utility/classfile/IntegerConstant.java b/utils/eclipselink.utils.workbench/utility/source/org/eclipse/persistence/tools/workbench/utility/classfile/IntegerConstant.java index b536882e11a..fb38018caf8 100644 --- a/utils/eclipselink.utils.workbench/utility/source/org/eclipse/persistence/tools/workbench/utility/classfile/IntegerConstant.java +++ b/utils/eclipselink.utils.workbench/utility/source/org/eclipse/persistence/tools/workbench/utility/classfile/IntegerConstant.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -62,7 +62,7 @@ public int intValue() { } public Object value() { - return new Integer(this.value); + return Integer.valueOf(this.value); } public void accept(Visitor visitor) { diff --git a/utils/eclipselink.utils.workbench/utility/source/org/eclipse/persistence/tools/workbench/utility/classfile/LongConstant.java b/utils/eclipselink.utils.workbench/utility/source/org/eclipse/persistence/tools/workbench/utility/classfile/LongConstant.java index 4a301b9b8b3..7a1c4600a8e 100644 --- a/utils/eclipselink.utils.workbench/utility/source/org/eclipse/persistence/tools/workbench/utility/classfile/LongConstant.java +++ b/utils/eclipselink.utils.workbench/utility/source/org/eclipse/persistence/tools/workbench/utility/classfile/LongConstant.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -68,7 +68,7 @@ public long longValue() { } public Object value() { - return new Long(this.value); + return Long.valueOf(this.value); } public void accept(Visitor visitor) { diff --git a/utils/eclipselink.utils.workbench/utility/source/org/eclipse/persistence/tools/workbench/utility/events/ChangeSupport.java b/utils/eclipselink.utils.workbench/utility/source/org/eclipse/persistence/tools/workbench/utility/events/ChangeSupport.java index 0e789f6145e..24b3651c147 100644 --- a/utils/eclipselink.utils.workbench/utility/source/org/eclipse/persistence/tools/workbench/utility/events/ChangeSupport.java +++ b/utils/eclipselink.utils.workbench/utility/source/org/eclipse/persistence/tools/workbench/utility/events/ChangeSupport.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -500,7 +500,7 @@ protected void firePropertyChangedInternal(String propertyName, Object oldValue, * firePropertyChange method that takes Object values. */ public void firePropertyChanged(String propertyName, int oldValue, int newValue) { -// this.firePropertyChanged(propertyName, new Integer(oldValue), new Integer(newValue)); +// this.firePropertyChanged(propertyName, Integer.valueOf(oldValue), Integer.valueOf(newValue)); if (oldValue == newValue) { return; } @@ -533,7 +533,7 @@ public void firePropertyChanged(String propertyName, int oldValue, int newValue) if (stillListening) { if (event == null) { // here's the reason for the duplicate code... - event = new PropertyChangeEvent(this.source, propertyName, new Integer(oldValue), new Integer(newValue)); + event = new PropertyChangeEvent(this.source, propertyName, Integer.valueOf(oldValue), Integer.valueOf(newValue)); } this.notifier().propertyChange(target, event); } diff --git a/utils/eclipselink.utils.workbench/utility/source/org/eclipse/persistence/tools/workbench/utility/string/AffixStrippingPartialStringComparatorEngine.java b/utils/eclipselink.utils.workbench/utility/source/org/eclipse/persistence/tools/workbench/utility/string/AffixStrippingPartialStringComparatorEngine.java index e581316b53a..86131138e47 100644 --- a/utils/eclipselink.utils.workbench/utility/source/org/eclipse/persistence/tools/workbench/utility/string/AffixStrippingPartialStringComparatorEngine.java +++ b/utils/eclipselink.utils.workbench/utility/source/org/eclipse/persistence/tools/workbench/utility/string/AffixStrippingPartialStringComparatorEngine.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -138,7 +138,7 @@ private void stripAffixes(StringHolderWrapper[] wrappers, int thresholdCount) { // so drop it from the entries to be examined continue; // skip to the next wrapper } - Character bigC = new Character(c); + Character bigC = Character.valueOf(c); ArrayList group = (ArrayList) charGroups.get(bigC); if (group == null) { group = new ArrayList();