[ 
https://issues.apache.org/jira/browse/CASSANDRA-18190?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17719991#comment-17719991
 ] 

Ekaterina Dimitrova edited comment on CASSANDRA-18190 at 5/5/23 8:18 PM:
-------------------------------------------------------------------------

I will be off until next Thursday but I wanted to leave an update for anyone 
following here:
 * I tried the other day to look into SpotBugs - I used the patch from 
CASSANDRA-18077 to check for warnings on unsafe use of Autocloseable instances 
with JDK11 and 17. It did not show any problems in that area. Also, I looked 
again at its website/docs and it still states JDK11+ is only experimental so 
far. This makes me think Spot Bugs is not a good option for us at the moment.
 * ErrorProne seems not to be an option due to licenses? Check my previous 
comments
 * ECJ seems to be still maintained and even getting rid of JDK 11 already in 
its next release, as pointed out by [~slachiewicz] earlier on this ticket. I 
figured that running eclipse-warnings with the updated version of ECJ and 
JDK11+ we trigger split packages issue to be caught from ECJ. Javac does not 
catch this problem because of [https://bugs.openjdk.org/browse/JDK-8215739]. 
With the help of Eclipse I found that the two triggers are:
 ** javassist being pulled by reflections and having a package named java.util. 
For this one I suspect we can upstream maybe a patch, the project seems to be 
actively maintained. I tried to look into substituting the pulled library with 
latest version of javassist but the same issue still persists there
 ** high-scale-lib - very old not maintained library -  java.util.concurrent is 
the split package here. For this one I suspect we need to work out to replace 
the library probably. But for that I would like to suggest a separate ticket to 
be raised to cover the work.
 
For the split packages issue I suggest we open separate tickets and I can 
silence for now the related errors from _eclipse-warnings_ by adding 
_org.eclipse.jdt.core.compiler.ignoreUnnamedModuleForSplitPackage=enabled_ to 
_eclipse_compiler.properties_ and we fix the two mentioned issues separately.

 * Other than this issue there are three errors introduced in a recent ticket, 
but exposed only when we update ECJ and run eclipse-warnings with JDK11. 
(CASSANDRA-17056)
 * The rest is more than 100 errors around unsafe usage of Autocloseable 
instances. My plan so far is to focus on those when I am back next week.
 * On another note - when running eclipse-warnings with JDK17, there are more 
warnings around deprecations. I suggest we tackle this problem in time 
separately and we keep ourselves focused for now on running eclipse-warnings 
with JDK11. Though I suggest we open earlier than later a ticket for the 
additional warnings/errors coming from eclipse-warnings being run with JDK17 so 
we do not have to catch up on everything when the time to drop JDK11 comes in 
the future.

CC [~jlewandowski] and [~mmuzaf] 


was (Author: e.dimitrova):
I will be off until next Thursday but I wanted to leave an update for anyone 
following here:
 * I tried the other day to look into SpotBugs - I used the patch from 
CASSANDRA-18077 to check for warnings on unsafe use of Autocloseable instances 
with JDK11 and 17. It did not show any problems in that area. Also, I looked 
again at its website/docs and it still states JDK11+ is only experimental so 
far. This makes me think Spot Bugs is not a good option for us at the moment.
 * ErrorProne seems not to be an option due to licenses? Check my previous 
comments
 * ECJ seems to be still maintained and even getting rid of JDK 11 already in 
its next release, as pointed out by [~slachiewicz] earlier on this ticket. I 
figured that running eclipse-warnings with the updated version of ECJ we 
trigger split packages issue to be caught from ECJ. Javac does not catch this 
problem because of [https://bugs.openjdk.org/browse/JDK-8215739]. With the help 
of Eclipse I found that the two triggers are:
 ** javassist being pulled by reflections and having a package named java.util. 
For this one I suspect we can upstream maybe a patch, the project seems to be 
actively maintained. I tried to look into substituting the pulled library with 
latest version of javassist but the same issue still persists there
 ** 
high-scale-lib - very old not maintained library -  java.util.concurrent is the 
package here. For this one I suspect we need to work out to replace it 
probably. But for that I would like to suggest a separate ticket.
 
For the split packages issue I suggest we open separate tickets and I can 
silence for now the related errors from _eclipse-warnings_ by adding 
_org.eclipse.jdt.core.compiler.ignoreUnnamedModuleForSplitPackage=enabled_ to 
_eclipse_compiler.properties_ and we fix the two mentioned issues separately.

 * Other than this issue there are three errors introduced in a recent ticket, 
but exposed only when we update ECJ and run eclipse-warnings with JDK11. 
(CASSANDRA-17056)
 * The rest is more than 100 errors around unsafe usage of Autocloseable 
instances. My plan so far is to focus on those when I am back next week.
 * On another note - in JDK17 there are more warnings around deprecations. I 
suggest we tackle this in time separately and we keep ourselves focused for now 
on JDK11 and eclipse-warnings. Though I suggest we open earlier than later a 
ticket for the additional warnings/errors coming from eclipse-warnings being 
run with JDK17 so we do not have to catch up on everything when the time to 
drop JDK11 comes in the future.

CC [~jlewandowski] and [~mmuzaf] 

> ECJ upgrade
> -----------
>
>                 Key: CASSANDRA-18190
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-18190
>             Project: Cassandra
>          Issue Type: Task
>          Components: Feature/UDF
>            Reporter: Ekaterina Dimitrova
>            Assignee: Ekaterina Dimitrova
>            Priority: Normal
>             Fix For: 5.x
>
>
> During testing it was identified that we will need to update ECJ for the Java 
> UDF functions in order to bring Java 17 in.
> It seems the compiler artifacts are moved from 
> [here|https://mvnrepository.com/artifact/org.eclipse.jdt.core.compiler/ecj ] 
> to [here|https://mvnrepository.com/artifact/org.eclipse.jdt/ecj] and there is 
> change of license from EPL1.0 to EPL2.0 too. But if I read correctly 
> [here|https://www.apache.org/legal/resolved.html#weak-copyleft-licenses] that 
> should not affect us
> Further testing and review of all changes between artifacts to be done.
> ECJ is used for the eclipse-warnings and Java UDFs



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to