[jira] [Commented] (OFBIZ-12722) Fix Java 17 two warning issues

2024-01-09 Thread Jacques Le Roux (Jira)


[ 
https://issues.apache.org/jira/browse/OFBIZ-12722?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17804686#comment-17804686
 ] 

Jacques Le Roux commented on OFBIZ-12722:
-

Hi Eugen,

I did not look at it. On the other hand AccessController should be removed 
hence reverting 
https://github.com/apache/ofbiz-framework/commit/2220cb2419b24b495c62cd4ec405303903492249
 if possible (revert and perf)

> Fix Java 17 two warning issues
> --
>
> Key: OFBIZ-12722
> URL: https://issues.apache.org/jira/browse/OFBIZ-12722
> Project: OFBiz
>  Issue Type: Sub-task
>  Components: base, testtools
>Affects Versions: Upcoming Branch
>Reporter: Jacques Le Roux
>Assignee: Jacques Le Roux
>Priority: Minor
>
> AuthHelper.java:132: warning: [removal] AccessController in java.security has 
> been deprecated and marked for removal
> return AccessController.doPrivileged(
>^
> GroovyScriptTestCase.java:29: warning: [deprecation] GroovyTestCase in 
> groovy.util has been deprecated
> public class GroovyScriptTestCase extends GroovyTestCase {



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


[jira] [Commented] (OFBIZ-12722) Fix Java 17 two warning issues

2024-01-04 Thread Ioan Eugen Stan (Jira)


[ 
https://issues.apache.org/jira/browse/OFBIZ-12722?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17803224#comment-17803224
 ] 

Ioan Eugen Stan commented on OFBIZ-12722:
-

[~jleroux] : Any idea why the code was done the way Daniel mentioned? 
> Resolving the deprecation of GroovyTestCase might be a bit complicated. 

> Groovy test suites test specifications are read in 
> _ModelTestSuite#parseTestElements:_

> Fix Java 17 two warning issues
> --
>
> Key: OFBIZ-12722
> URL: https://issues.apache.org/jira/browse/OFBIZ-12722
> Project: OFBiz
>  Issue Type: Sub-task
>  Components: base, testtools
>Affects Versions: Upcoming Branch
>Reporter: Jacques Le Roux
>Assignee: Jacques Le Roux
>Priority: Minor
>
> AuthHelper.java:132: warning: [removal] AccessController in java.security has 
> been deprecated and marked for removal
> return AccessController.doPrivileged(
>^
> GroovyScriptTestCase.java:29: warning: [deprecation] GroovyTestCase in 
> groovy.util has been deprecated
> public class GroovyScriptTestCase extends GroovyTestCase {



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


[jira] [Commented] (OFBIZ-12722) Fix Java 17 two warning issues

2024-01-04 Thread Ioan Eugen Stan (Jira)


[ 
https://issues.apache.org/jira/browse/OFBIZ-12722?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17803221#comment-17803221
 ] 

Ioan Eugen Stan commented on OFBIZ-12722:
-

I took a look at fixing the groovy warning - no luck yet - the code there is 
pretty complex.

If we have a solution for AuthHelper, we should try it out.

Maybe we can get this done for 24.01 ?!

> Fix Java 17 two warning issues
> --
>
> Key: OFBIZ-12722
> URL: https://issues.apache.org/jira/browse/OFBIZ-12722
> Project: OFBiz
>  Issue Type: Sub-task
>  Components: base, testtools
>Affects Versions: Upcoming Branch
>Reporter: Jacques Le Roux
>Assignee: Jacques Le Roux
>Priority: Minor
>
> AuthHelper.java:132: warning: [removal] AccessController in java.security has 
> been deprecated and marked for removal
> return AccessController.doPrivileged(
>^
> GroovyScriptTestCase.java:29: warning: [deprecation] GroovyTestCase in 
> groovy.util has been deprecated
> public class GroovyScriptTestCase extends GroovyTestCase {



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


[jira] [Commented] (OFBIZ-12722) Fix Java 17 two warning issues

2023-06-23 Thread Jacques Le Roux (Jira)


[ 
https://issues.apache.org/jira/browse/OFBIZ-12722?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17736418#comment-17736418
 ] 

Jacques Le Roux commented on OFBIZ-12722:
-

I have thought of it. We don't need a tool to measure. AuthHelper class is only 
used in 2 cases. In LoginServices::userLogin and LoginServices::updatePassword. 
So at 1st glance the impact must be minimal and easy to measure. I'll have a 
look...

> Fix Java 17 two warning issues
> --
>
> Key: OFBIZ-12722
> URL: https://issues.apache.org/jira/browse/OFBIZ-12722
> Project: OFBiz
>  Issue Type: Sub-task
>  Components: base, testtools
>Affects Versions: Upcoming Branch
>Reporter: Jacques Le Roux
>Assignee: Jacques Le Roux
>Priority: Minor
>
> AuthHelper.java:132: warning: [removal] AccessController in java.security has 
> been deprecated and marked for removal
> return AccessController.doPrivileged(
>^
> GroovyScriptTestCase.java:29: warning: [deprecation] GroovyTestCase in 
> groovy.util has been deprecated
> public class GroovyScriptTestCase extends GroovyTestCase {



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


[jira] [Commented] (OFBIZ-12722) Fix Java 17 two warning issues

2023-06-22 Thread Jacques Le Roux (Jira)


[ 
https://issues.apache.org/jira/browse/OFBIZ-12722?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17736198#comment-17736198
 ] 

Jacques Le Roux commented on OFBIZ-12722:
-

Hi Danny,

Thanks for the investigation and proposition. It's hard to say anything about 
negative performance impact without comparing both solutions using a tools like 
YourKit or VisualVM.
This said, a simple revert is not enough. More changes have been introduced 
since. At 1st glance that sounds like being possible to be done manually.

> Fix Java 17 two warning issues
> --
>
> Key: OFBIZ-12722
> URL: https://issues.apache.org/jira/browse/OFBIZ-12722
> Project: OFBiz
>  Issue Type: Sub-task
>  Components: base, testtools
>Affects Versions: Upcoming Branch
>Reporter: Jacques Le Roux
>Priority: Minor
>
> AuthHelper.java:132: warning: [removal] AccessController in java.security has 
> been deprecated and marked for removal
> return AccessController.doPrivileged(
>^
> GroovyScriptTestCase.java:29: warning: [deprecation] GroovyTestCase in 
> groovy.util has been deprecated
> public class GroovyScriptTestCase extends GroovyTestCase {



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


[jira] [Commented] (OFBIZ-12722) Fix Java 17 two warning issues

2023-06-22 Thread Danny Trunk (Jira)


[ 
https://issues.apache.org/jira/browse/OFBIZ-12722?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17736081#comment-17736081
 ] 

Danny Trunk commented on OFBIZ-12722:
-

The now deprecated AccessController got introduced with 
[https://github.com/apache/ofbiz-framework/commit/2220cb2419b24b495c62cd4ec405303903492249]

 

Is it possible to just revert it or would that have a negative performance 
impact?

> Fix Java 17 two warning issues
> --
>
> Key: OFBIZ-12722
> URL: https://issues.apache.org/jira/browse/OFBIZ-12722
> Project: OFBiz
>  Issue Type: Sub-task
>  Components: base, testtools
>Affects Versions: Upcoming Branch
>Reporter: Jacques Le Roux
>Priority: Minor
>
> AuthHelper.java:132: warning: [removal] AccessController in java.security has 
> been deprecated and marked for removal
> return AccessController.doPrivileged(
>^
> GroovyScriptTestCase.java:29: warning: [deprecation] GroovyTestCase in 
> groovy.util has been deprecated
> public class GroovyScriptTestCase extends GroovyTestCase {



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


[jira] [Commented] (OFBIZ-12722) Fix Java 17 two warning issues

2023-01-11 Thread Daniel Watford (Jira)


[ 
https://issues.apache.org/jira/browse/OFBIZ-12722?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17675597#comment-17675597
 ] 

Daniel Watford commented on OFBIZ-12722:


Resolving the deprecation of GroovyTestCase might be a bit complicated.

Groovy test suites test specifications are read in 
_ModelTestSuite#parseTestElements:_
{code:java}
} else if ("groovy-test-suite".equals(nodeName)) {
try {
Class testClass =

UtilGenerics.cast(GroovyUtil.getScriptClassFromLocation(testElement.getAttribute("location")));
this.testList.add(new TestSuite(testClass, 
testElement.getAttribute("name")));
} catch (GeneralException e) {
Debug.logError(e, MODULE);
}
}  {code}
In the above code snippet, the groovy test class is read as a Class and then 
passed to the TestSuite constructor.

The TestSuite constructor will examine the class to identify test methods and 
add them to a list of tests to be executed as part of that suite. Tests methods 
are identified by checking the groovy class is assignable to 
junit.framework.Test and then finding all methods within the class that are 
public and have the prefix {_}test{_}.

Our groovy test classes extend GroovyScriptTestCase which, through its 
extension of GroovyTestCase, is an extension of junit.framework.Test.

If we change GroovyScriptTestCase to no longer extend GroovyTestCase, we will 
need to come up with a way to create Test or TestSuite objects in 
ModelTestSuite#parseTestElement for the groovy test class.

I don't have a solution for this yet.

 

> Fix Java 17 two warning issues
> --
>
> Key: OFBIZ-12722
> URL: https://issues.apache.org/jira/browse/OFBIZ-12722
> Project: OFBiz
>  Issue Type: Sub-task
>  Components: base, testtools
>Affects Versions: Upcoming Branch
>Reporter: Jacques Le Roux
>Priority: Minor
>
> AuthHelper.java:132: warning: [removal] AccessController in java.security has 
> been deprecated and marked for removal
> return AccessController.doPrivileged(
>^
> GroovyScriptTestCase.java:29: warning: [deprecation] GroovyTestCase in 
> groovy.util has been deprecated
> public class GroovyScriptTestCase extends GroovyTestCase {



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


[jira] [Commented] (OFBIZ-12722) Fix Java 17 two warning issues

2022-12-08 Thread Jacques Le Roux (Jira)


[ 
https://issues.apache.org/jira/browse/OFBIZ-12722?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17644733#comment-17644733
 ] 

Jacques Le Roux commented on OFBIZ-12722:
-

For 
{code}
AuthHelper.java:132: warning: [removal] AccessController in java.security has 
been deprecated and marked for removal
return AccessController.doPrivileged(
^
{code}
Since Java 17 will be supported for 3 years we could (temporary?)  add 
{{@SuppressWarnings({ "removal", "deprecation" })}} to 
{{AuthHelper::getContextClassLoader}}. We could handle that later when the 
removal will be inevitable.


> Fix Java 17 two warning issues
> --
>
> Key: OFBIZ-12722
> URL: https://issues.apache.org/jira/browse/OFBIZ-12722
> Project: OFBiz
>  Issue Type: Task
>  Components: base, testtools
>Affects Versions: Upcoming Branch
>Reporter: Jacques Le Roux
>Priority: Minor
>
> AuthHelper.java:132: warning: [removal] AccessController in java.security has 
> been deprecated and marked for removal
> return AccessController.doPrivileged(
>^
> GroovyScriptTestCase.java:29: warning: [deprecation] GroovyTestCase in 
> groovy.util has been deprecated
> public class GroovyScriptTestCase extends GroovyTestCase {



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