yasuflatland-lf / liferay-dummy-factory

🏭 Liferay DXP / 7 Dummy data generation portlet
MIT License
49 stars 35 forks source link

fix backend compile errors for 2024.q1.12 #50

Closed mitchshiotani closed 2 months ago

mitchshiotani commented 2 months ago

Issue:

Compilation for 2024.q1.12 resulted in a couple errors:

❯ blade gw assemble

> Task :modules:liferay-dummy-factory:compileJava
/Users/michihikoshiotani/Desktop/test_env/workspaces/2024.Q1.12/modules/liferay-dummy-factory/src/main/java/com/liferay/support/tools/document/library/DLDefaultDummyGenerator.java:85: error: incompatible types: File cannot be converted to InputStream
                        new File(System.getProperty("java.io.tmpdir"), "dummy"), //file,
                        ^
/Users/michihikoshiotani/Desktop/test_env/workspaces/2024.Q1.12/modules/liferay-dummy-factory/src/main/java/com/liferay/support/tools/document/library/DLDefaultDummyGenerator.java:95: error: no suitable method found for addFileEntry(<null>,long,long,long,String,String,String,String,String,String,InputStream,long,Date,Date,Date,ServiceContext)
                    _dLAppLocalService.addFileEntry(
                                      ^
    method DLAppLocalService.addFileEntry(long,long,long,String,String,String,String,String,File,ServiceContext) is not applicable
      (actual and formal argument lists differ in length)
    method DLAppLocalService.addFileEntry(String,long,long,long,String,String,byte[],Date,Date,ServiceContext) is not applicable
      (actual and formal argument lists differ in length)
    method DLAppLocalService.addFileEntry(String,long,long,long,String,String,String,String,String,String,byte[],Date,Date,ServiceContext) is not applicable
      (actual and formal argument lists differ in length)
    method DLAppLocalService.addFileEntry(String,long,long,long,String,String,String,String,String,String,File,Date,Date,ServiceContext) is not applicable
      (actual and formal argument lists differ in length)
    method DLAppLocalService.addFileEntry(String,long,long,long,String,String,String,String,String,String,InputStream,long,Date,Date,ServiceContext) is not applicable
      (actual and formal argument lists differ in length)
/Users/michihikoshiotani/Desktop/test_env/workspaces/2024.Q1.12/modules/liferay-dummy-factory/src/main/java/com/liferay/support/tools/document/library/EditFileEntryMVCActionCommand.java:331: error: no suitable method found for addFileEntry(<null>,long,long,String,String,String,String,String,String,InputStream,long,Date,Date,Date,ServiceContext)
                fileEntry = _dlAppService.addFileEntry(null,
                                         ^
    method DLAppService.addFileEntry(long,long,String,String,String,String,String,File,ServiceContext) is not applicable
      (actual and formal argument lists differ in length)
    method DLAppService.addFileEntry(String,long,long,String,String,String,String,String,String,byte[],Date,Date,ServiceContext) is not applicable
      (actual and formal argument lists differ in length)
    method DLAppService.addFileEntry(String,long,long,String,String,String,String,String,String,File,Date,Date,ServiceContext) is not applicable
      (actual and formal argument lists differ in length)
    method DLAppService.addFileEntry(String,long,long,String,String,String,String,String,String,InputStream,long,Date,Date,ServiceContext) is not applicable
      (actual and formal argument lists differ in length)
/Users/michihikoshiotani/Desktop/test_env/workspaces/2024.Q1.12/modules/liferay-dummy-factory/src/main/java/com/liferay/support/tools/document/library/EditFileEntryMVCActionCommand.java:350: error: no suitable method found for updateFileEntry(long,String,String,String,String,String,String,DLVersionNumberIncrease,InputStream,long,Date,Date,Date,ServiceContext)
                fileEntry = _dlAppService.updateFileEntry(fileEntryId,
                                         ^
    method DLAppService.updateFileEntry(long,String,String,String,String,String,String,DLVersionNumberIncrease,byte[],Date,Date,ServiceContext) is not applicable
      (actual and formal argument lists differ in length)
    method DLAppService.updateFileEntry(long,String,String,String,String,String,String,DLVersionNumberIncrease,File,Date,Date,ServiceContext) is not applicable
      (actual and formal argument lists differ in length)
    method DLAppService.updateFileEntry(long,String,String,String,String,String,String,DLVersionNumberIncrease,InputStream,long,Date,Date,ServiceContext) is not applicable
      (actual and formal argument lists differ in length)
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
4 errors

> Task :modules:liferay-dummy-factory:compileJava FAILED

Fix:

Upon looking at the DXP source code for the DLAppLocalService interface, the displayDate argument was removed, so I removed the use of them.

Notes:

The displayDate argument was recently added in the commit below, about a week ago, so it seems strange to have to remove it...:

604611a4e4e8781189d62ed53d542684944bea34

Just wanted to check about this.

yasuflatland-lf commented 2 months ago

@mitchshiotani It's because the changes added for the 2024.Q2, so it may well not be implemented in 2024 Q1 version. (should be added in Q1.13?)

yasuflatland-lf commented 2 months ago

@mitchshiotani

I created a 2024.Q1.12 branch and change PR direction towards it.

Please update following as well

  1. Revise bnd.bnd version as follows
    Bundle-Version: 7.4.2024.Q1.12
  2. update jar under latest
    • After revise bnd.bnd, run blade gw assemble.
    • Go to /build/libs/
    • Copy the jar, and remove the current one (should be 2024.Q2.2 version) under /latest And send PR me again!
mitchshiotani commented 2 months ago

@yasuflatland-lf Pushed changes; can you check again?