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

ASF subversion and git services commented on OFBIZ-12386:
---------------------------------------------------------

Commit ff386f151e2a754d5d800d2eb8d0b00a586b811a in ofbiz-framework's branch 
refs/heads/trunk from Jacques Le Roux
[ https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=ff386f151e ]

Fixed: Fix some bugs SpotBugs reports (OFBIZ-12386)

Fixes the error below that returns a HTTP 500 code when "cookies" is null

Sep 28, 2022 1:57:20 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet [ControlServlet] in context with path 
[/catalog] threw exception
java.lang.ArrayStoreException: javax.servlet.http.Cookie
at java.base/java.util.stream.Nodes$FixedNodeBuilder.accept(Nodes.java:1230)
at 
java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
at 
java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
at 
java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
at 
java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:550)
at 
java.base/java.util.stream.AbstractPipeline.evaluateToArrayNode(AbstractPipeline.java:260)
at 
java.base/java.util.stream.ReferencePipeline.toArray(ReferencePipeline.java:517)
at org.apache.ofbiz.webapp.stats.VisitHandler.getVisitor(VisitHandler.java:231)

It breaks OFBiz when Debug.verbose is on and in serverstats.properties these
defaults are used:
# Specify whether to use the visit history feature or not
stats.persist.visit=true
stats.persist.visitor=true

I found this error in stable demo console log after the demo was broken.

I must say I'm not very proud of what I did with
https://github.com/apache/ofbiz-framework/commit/f126bae
It was obviously wrong :)


> Fix some bugs SpotBugs reports
> ------------------------------
>
>                 Key: OFBIZ-12386
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-12386
>             Project: OFBiz
>          Issue Type: Bug
>          Components: ALL COMPONENTS
>    Affects Versions: Trunk
>            Reporter: Jacques Le Roux
>            Assignee: Jacques Le Roux
>            Priority: Major
>




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

Reply via email to