You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by "Dave Brosius (JIRA)" <xa...@xml.apache.org> on 2005/05/03 19:57:04 UTC
[jira] Created: (XALANJ-2114) odd non-shortcircuited boolean logic
odd non-shortcircuited boolean logic
------------------------------------
Key: XALANJ-2114
URL: http://issues.apache.org/jira/browse/XALANJ-2114
Project: XalanJ2
Type: Bug
Versions: CurrentCVS
Environment: win32 xp
Reporter: Dave Brosius
Priority: Minor
In class: org.apache.xpath.objects.XString
In method: public double toDouble()
Using non short-circuited logic operators.... Is this on purpose?
if (c != '-' & c != '.' & ( c < 0X30 | c > 0x39)) {
------------------------------------------------------------
Also in class: org.apache.xml.dtm.ref.DTMDefaultBase
In method: public boolean isNodeAfter(int nodeHandle1, int nodeHandle2)
return index1!=NULL & index2!=NULL & index1 <= index2;
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org
[jira] Updated: (XALANJ-2114) odd non-shortcircuited boolean logic
Posted by "Brian Minchau (JIRA)" <xa...@xml.apache.org>.
[ http://issues.apache.org/jira/browse/XALANJ-2114?page=all ]
Brian Minchau updated XALANJ-2114:
----------------------------------
Fix Version: 2.7.0-future-release
reviewer: minchau@ca.ibm.com
Description:
In class: org.apache.xpath.objects.XString
In method: public double toDouble()
Using non short-circuited logic operators.... Is this on purpose?
if (c != '-' & c != '.' & ( c < 0X30 | c > 0x39)) {
------------------------------------------------------------
Also in class: org.apache.xml.dtm.ref.DTMDefaultBase
In method: public boolean isNodeAfter(int nodeHandle1, int nodeHandle2)
return index1!=NULL & index2!=NULL & index1 <= index2;
was:
In class: org.apache.xpath.objects.XString
In method: public double toDouble()
Using non short-circuited logic operators.... Is this on purpose?
if (c != '-' & c != '.' & ( c < 0X30 | c > 0x39)) {
------------------------------------------------------------
Also in class: org.apache.xml.dtm.ref.DTMDefaultBase
In method: public boolean isNodeAfter(int nodeHandle1, int nodeHandle2)
return index1!=NULL & index2!=NULL & index1 <= index2;
Assign To: John Gentilin
Setting to be fixed for 2.7 release.
> odd non-shortcircuited boolean logic
> ------------------------------------
>
> Key: XALANJ-2114
> URL: http://issues.apache.org/jira/browse/XALANJ-2114
> Project: XalanJ2
> Type: Bug
> Versions: CurrentCVS
> Environment: win32 xp
> Reporter: Dave Brosius
> Assignee: John Gentilin
> Priority: Minor
> Fix For: 2.7.0-future-release
>
> In class: org.apache.xpath.objects.XString
> In method: public double toDouble()
> Using non short-circuited logic operators.... Is this on purpose?
> if (c != '-' & c != '.' & ( c < 0X30 | c > 0x39)) {
> ------------------------------------------------------------
> Also in class: org.apache.xml.dtm.ref.DTMDefaultBase
> In method: public boolean isNodeAfter(int nodeHandle1, int nodeHandle2)
> return index1!=NULL & index2!=NULL & index1 <= index2;
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org
[jira] Commented: (XALANJ-2114) odd non-shortcircuited boolean logic
Posted by "Henry Zongaro (JIRA)" <xa...@xml.apache.org>.
[ http://issues.apache.org/jira/browse/XALANJ-2114?page=comments#action_12316671 ]
Henry Zongaro commented on XALANJ-2114:
---------------------------------------
I have reviewed John's patch and I believe it correctly resolves the potential performance problem represented by using non-short-circuiting operators.
> odd non-shortcircuited boolean logic
> ------------------------------------
>
> Key: XALANJ-2114
> URL: http://issues.apache.org/jira/browse/XALANJ-2114
> Project: XalanJ2
> Type: Bug
> Versions: CurrentCVS
> Environment: win32 xp
> Reporter: Dave Brosius
> Assignee: John Gentilin
> Priority: Minor
> Fix For: 2.7.0-future-release
> Attachments: JIRA2114-patch.zip
>
> In class: org.apache.xpath.objects.XString
> In method: public double toDouble()
> Using non short-circuited logic operators.... Is this on purpose?
> if (c != '-' & c != '.' & ( c < 0X30 | c > 0x39)) {
> ------------------------------------------------------------
> Also in class: org.apache.xml.dtm.ref.DTMDefaultBase
> In method: public boolean isNodeAfter(int nodeHandle1, int nodeHandle2)
> return index1!=NULL & index2!=NULL & index1 <= index2;
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org
[jira] Commented: (XALANJ-2114) odd non-shortcircuited boolean logic
Posted by "Brian Minchau (JIRA)" <xa...@xml.apache.org>.
[ http://issues.apache.org/jira/browse/XALANJ-2114?page=comments#action_12319255 ]
Brian Minchau commented on XALANJ-2114:
---------------------------------------
Dave,
not only has John Gentilin's patch for this isse been reviewed by Henry, it was also applied (I just had a look at thos parts in the 2.7 release). Please verify that this problem is fixed to your satisfaction, and we can then close this issue.
Thanks.
> odd non-shortcircuited boolean logic
> ------------------------------------
>
> Key: XALANJ-2114
> URL: http://issues.apache.org/jira/browse/XALANJ-2114
> Project: XalanJ2
> Type: Bug
> Versions: Latest Development Code
> Environment: win32 xp
> Reporter: Dave Brosius
> Assignee: John Gentilin
> Priority: Minor
> Fix For: 2.7
> Attachments: JIRA2114-patch.zip
>
> In class: org.apache.xpath.objects.XString
> In method: public double toDouble()
> Using non short-circuited logic operators.... Is this on purpose?
> if (c != '-' & c != '.' & ( c < 0X30 | c > 0x39)) {
> ------------------------------------------------------------
> Also in class: org.apache.xml.dtm.ref.DTMDefaultBase
> In method: public boolean isNodeAfter(int nodeHandle1, int nodeHandle2)
> return index1!=NULL & index2!=NULL & index1 <= index2;
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org
[jira] Closed: (XALANJ-2114) odd non-shortcircuited boolean logic
Posted by "Dave Brosius (JIRA)" <xa...@xml.apache.org>.
[ https://issues.apache.org/jira/browse/XALANJ-2114?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dave Brosius closed XALANJ-2114.
--------------------------------
Fix applied correctly
> odd non-shortcircuited boolean logic
> ------------------------------------
>
> Key: XALANJ-2114
> URL: https://issues.apache.org/jira/browse/XALANJ-2114
> Project: XalanJ2
> Issue Type: Bug
> Affects Versions: 2.7
> Environment: win32 xp
> Reporter: Dave Brosius
> Assignee: John Gentilin
> Priority: Minor
> Fix For: 2.7
>
> Attachments: JIRA2114-patch.zip
>
>
> In class: org.apache.xpath.objects.XString
> In method: public double toDouble()
> Using non short-circuited logic operators.... Is this on purpose?
> if (c != '-' & c != '.' & ( c < 0X30 | c > 0x39)) {
> ------------------------------------------------------------
> Also in class: org.apache.xml.dtm.ref.DTMDefaultBase
> In method: public boolean isNodeAfter(int nodeHandle1, int nodeHandle2)
> return index1!=NULL & index2!=NULL & index1 <= index2;
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org
[jira] Resolved: (XALANJ-2114) odd non-shortcircuited boolean logic
Posted by "John Gentilin (JIRA)" <xa...@xml.apache.org>.
[ http://issues.apache.org/jira/browse/XALANJ-2114?page=all ]
John Gentilin resolved XALANJ-2114:
-----------------------------------
Fix Version: CurrentCVS
(was: 2.7.0-future-release)
Resolution: Fixed
> odd non-shortcircuited boolean logic
> ------------------------------------
>
> Key: XALANJ-2114
> URL: http://issues.apache.org/jira/browse/XALANJ-2114
> Project: XalanJ2
> Type: Bug
> Versions: CurrentCVS
> Environment: win32 xp
> Reporter: Dave Brosius
> Assignee: John Gentilin
> Priority: Minor
> Fix For: CurrentCVS
> Attachments: JIRA2114-patch.zip
>
> In class: org.apache.xpath.objects.XString
> In method: public double toDouble()
> Using non short-circuited logic operators.... Is this on purpose?
> if (c != '-' & c != '.' & ( c < 0X30 | c > 0x39)) {
> ------------------------------------------------------------
> Also in class: org.apache.xml.dtm.ref.DTMDefaultBase
> In method: public boolean isNodeAfter(int nodeHandle1, int nodeHandle2)
> return index1!=NULL & index2!=NULL & index1 <= index2;
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org
[jira] Commented: (XALANJ-2114) odd non-shortcircuited boolean logic
Posted by "John Gentilin (JIRA)" <xa...@xml.apache.org>.
[ http://issues.apache.org/jira/browse/XALANJ-2114?page=comments#action_12315782 ]
John Gentilin commented on XALANJ-2114:
---------------------------------------
I reviewed the code and found no reason that the logical operators should not be used, modified the code, created a patch and verified that no adverse effect were made to smoketest.
The patch has been attached.
> odd non-shortcircuited boolean logic
> ------------------------------------
>
> Key: XALANJ-2114
> URL: http://issues.apache.org/jira/browse/XALANJ-2114
> Project: XalanJ2
> Type: Bug
> Versions: CurrentCVS
> Environment: win32 xp
> Reporter: Dave Brosius
> Assignee: John Gentilin
> Priority: Minor
> Fix For: 2.7.0-future-release
> Attachments: JIRA2114-patch.zip
>
> In class: org.apache.xpath.objects.XString
> In method: public double toDouble()
> Using non short-circuited logic operators.... Is this on purpose?
> if (c != '-' & c != '.' & ( c < 0X30 | c > 0x39)) {
> ------------------------------------------------------------
> Also in class: org.apache.xml.dtm.ref.DTMDefaultBase
> In method: public boolean isNodeAfter(int nodeHandle1, int nodeHandle2)
> return index1!=NULL & index2!=NULL & index1 <= index2;
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org
[jira] Updated: (XALANJ-2114) odd non-shortcircuited boolean logic
Posted by "Brian Minchau (JIRA)" <xa...@xml.apache.org>.
[ http://issues.apache.org/jira/browse/XALANJ-2114?page=all ]
Brian Minchau updated XALANJ-2114:
----------------------------------
Fix Version: 2.7
(was: CurrentCVS)
> odd non-shortcircuited boolean logic
> ------------------------------------
>
> Key: XALANJ-2114
> URL: http://issues.apache.org/jira/browse/XALANJ-2114
> Project: XalanJ2
> Type: Bug
> Versions: CurrentCVS
> Environment: win32 xp
> Reporter: Dave Brosius
> Assignee: John Gentilin
> Priority: Minor
> Fix For: 2.7
> Attachments: JIRA2114-patch.zip
>
> In class: org.apache.xpath.objects.XString
> In method: public double toDouble()
> Using non short-circuited logic operators.... Is this on purpose?
> if (c != '-' & c != '.' & ( c < 0X30 | c > 0x39)) {
> ------------------------------------------------------------
> Also in class: org.apache.xml.dtm.ref.DTMDefaultBase
> In method: public boolean isNodeAfter(int nodeHandle1, int nodeHandle2)
> return index1!=NULL & index2!=NULL & index1 <= index2;
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org
[jira] Updated: (XALANJ-2114) odd non-shortcircuited boolean logic
Posted by "John Gentilin (JIRA)" <xa...@xml.apache.org>.
[ http://issues.apache.org/jira/browse/XALANJ-2114?page=all ]
John Gentilin updated XALANJ-2114:
----------------------------------
Attachment: JIRA2114-patch.zip
> odd non-shortcircuited boolean logic
> ------------------------------------
>
> Key: XALANJ-2114
> URL: http://issues.apache.org/jira/browse/XALANJ-2114
> Project: XalanJ2
> Type: Bug
> Versions: CurrentCVS
> Environment: win32 xp
> Reporter: Dave Brosius
> Assignee: John Gentilin
> Priority: Minor
> Fix For: 2.7.0-future-release
> Attachments: JIRA2114-patch.zip
>
> In class: org.apache.xpath.objects.XString
> In method: public double toDouble()
> Using non short-circuited logic operators.... Is this on purpose?
> if (c != '-' & c != '.' & ( c < 0X30 | c > 0x39)) {
> ------------------------------------------------------------
> Also in class: org.apache.xml.dtm.ref.DTMDefaultBase
> In method: public boolean isNodeAfter(int nodeHandle1, int nodeHandle2)
> return index1!=NULL & index2!=NULL & index1 <= index2;
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org
[jira] Commented: (XALANJ-2114) odd non-shortcircuited boolean logic
Posted by "Brian Minchau (JIRA)" <xa...@xml.apache.org>.
[ http://issues.apache.org/jira/browse/XALANJ-2114?page=comments#action_12312993 ]
Brian Minchau commented on XALANJ-2114:
---------------------------------------
The difference between && versus & is that && is short circuited and only evaluates the second operand if necessary.
There are no side effects here, and it would have to perform at least as good with && and with ||.
John G. will provide the simple patch. Brian M. will review - from the JIRA meeting June 7, 2005.
> odd non-shortcircuited boolean logic
> ------------------------------------
>
> Key: XALANJ-2114
> URL: http://issues.apache.org/jira/browse/XALANJ-2114
> Project: XalanJ2
> Type: Bug
> Versions: CurrentCVS
> Environment: win32 xp
> Reporter: Dave Brosius
> Priority: Minor
> Fix For: 2.7.0-future-release
>
> In class: org.apache.xpath.objects.XString
> In method: public double toDouble()
> Using non short-circuited logic operators.... Is this on purpose?
> if (c != '-' & c != '.' & ( c < 0X30 | c > 0x39)) {
> ------------------------------------------------------------
> Also in class: org.apache.xml.dtm.ref.DTMDefaultBase
> In method: public boolean isNodeAfter(int nodeHandle1, int nodeHandle2)
> return index1!=NULL & index2!=NULL & index1 <= index2;
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org