-
Type:
Bug
-
Status: Closed
-
Resolution: Fixed
-
Affects Version/s: Master
-
Fix Version/s: 7.0.0 DXP FP69, 7.0.X, 7.1.10 DXP FP6, 7.1.10.2 SP2, 7.1.3 CE GA4, 7.1.X, 7.2.X, Master
-
Component/s: Core Infrastructure > Service Builder, Dev Tools
-
Branch Version/s:7.2.x, 7.1.x, 7.0.x
-
Backported to Branch:Committed
-
Story Points:1
-
Fix Priority:3
-
Git Pull Request:
Running Service Builder with a service.xml that contains the name 'value' for field and finder-column, will result in an error for the generated PersistanceImpl class.
Reproduce:
1. Make sure you have blade and create service builder template
blade create -t service-builder -v 7.0 -p com.liferay.test tests
2. Go to the file tests > tests-service > service.xml
3. Add the following in their section 'other fields' and 'finder methods' and save:
<column name="value" type="String" /> <finder name="test" return-type="Collection"> <finder-column name="value" /> </finder>
4. Go to test folder and run 'blade gw buildService'
5. Then run 'blade gw build'
Expected Behavior:
Builds succesfully
Actual Behavior:
Build fails with following error:
:tests-service:compileJavaC:\Users\liferay\Desktop\liferay\tests\tests-service\src\main\java\com\liferay\tests\service\persistence\impl\FooPersistenceImpl.java:2393: error: variable value is already defined in method getBytest_PrevAndNext(Session,Foo,String,OrderByComparator<Foo>,boolean) for (Object value : values) { ^ Note: C:\Users\liferay\Desktop\liferay\tests\tests-service\src\main\java\com\liferay\tests\service\persistence\impl\FooPersistenceImpl.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 1 error FAILED FAILURE: Build failed with an exception.