[jira] [Created] (COLLECTIONS-786) PassiveExpiringMap documentation - methods that involve accessing the entire map
Marko Pohajač created COLLECTIONS-786: - Summary: PassiveExpiringMap documentation - methods that involve accessing the entire map Key: COLLECTIONS-786 URL: https://issues.apache.org/jira/browse/COLLECTIONS-786 Project: Commons Collections Issue Type: Improvement Components: Map Affects Versions: 4.4 Reporter: Marko Pohajač Fix For: 4.5 Attachments: show_effect_of_containsKey_containsValue_on_expiration.diff The documentation for PassiveExpiringMap says: {quote}When invoking methods that involve accessing the entire map contents (i.e [{{containsKey(Object)}}|https://commons.apache.org/proper/commons-collections/apidocs/org/apache/commons/collections4/map/PassiveExpiringMap.html#containsKey-java.lang.Object-], [{{entrySet()}}|https://commons.apache.org/proper/commons-collections/apidocs/org/apache/commons/collections4/map/PassiveExpiringMap.html#entrySet--], etc.) this decorator removes all expired entries prior to actually completing the invocation. {quote} Checked the code for containsKey and it doesn't seem to access the entire map, only the element of the key. If not sure about this, please check the attached patch as a proof. Suggestion is to replace the example with containsValue(Object) or size() or something that does remove all expired entries prior to actually completing the invocation: {quote}When invoking methods that involve accessing the entire map contents (i.e [{{containsValue(Object)}}|https://commons.apache.org/proper/commons-collections/apidocs/org/apache/commons/collections4/map/PassiveExpiringMap.html#containsValue-java.lang.Object-], [{{entrySet()}}|https://commons.apache.org/proper/commons-collections/apidocs/org/apache/commons/collections4/map/PassiveExpiringMap.html#entrySet--], etc.) this decorator removes all expired entries prior to actually completing the invocation. {quote} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (COLLECTIONS-786) PassiveExpiringMap documentation - methods that involve accessing the entire map
[ https://issues.apache.org/jira/browse/COLLECTIONS-786?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Marko Pohajač updated COLLECTIONS-786: -- Attachment: fix_doc.diff > PassiveExpiringMap documentation - methods that involve accessing the entire > map > > > Key: COLLECTIONS-786 > URL: https://issues.apache.org/jira/browse/COLLECTIONS-786 > Project: Commons Collections > Issue Type: Improvement > Components: Map >Affects Versions: 4.4 >Reporter: Marko Pohajač >Priority: Minor > Fix For: 4.5 > > Attachments: fix_doc.diff, > show_effect_of_containsKey_containsValue_on_expiration.diff > > > The documentation for PassiveExpiringMap says: > {quote}When invoking methods that involve accessing the entire map contents > (i.e > [{{containsKey(Object)}}|https://commons.apache.org/proper/commons-collections/apidocs/org/apache/commons/collections4/map/PassiveExpiringMap.html#containsKey-java.lang.Object-], > > [{{entrySet()}}|https://commons.apache.org/proper/commons-collections/apidocs/org/apache/commons/collections4/map/PassiveExpiringMap.html#entrySet--], > etc.) this decorator removes all expired entries prior to actually > completing the invocation. > {quote} > > Checked the code for containsKey and it doesn't seem to access the entire > map, only the element of the key. If not sure about this, please check the > attached patch as a proof. > Suggestion is to replace the example with containsValue(Object) or size() or > something that does remove all expired entries prior to actually completing > the invocation: > {quote}When invoking methods that involve accessing the entire map contents > (i.e > [{{containsValue(Object)}}|https://commons.apache.org/proper/commons-collections/apidocs/org/apache/commons/collections4/map/PassiveExpiringMap.html#containsValue-java.lang.Object-], > > [{{entrySet()}}|https://commons.apache.org/proper/commons-collections/apidocs/org/apache/commons/collections4/map/PassiveExpiringMap.html#entrySet--], > etc.) this decorator removes all expired entries prior to actually > completing the invocation. > {quote} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (COLLECTIONS-786) PassiveExpiringMap documentation - methods that involve accessing the entire map
[ https://issues.apache.org/jira/browse/COLLECTIONS-786?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Marko Pohajač updated COLLECTIONS-786: -- Description: The documentation for PassiveExpiringMap says: {quote}When invoking methods that involve accessing the entire map contents (i.e [{{containsKey(Object)}}|https://commons.apache.org/proper/commons-collections/apidocs/org/apache/commons/collections4/map/PassiveExpiringMap.html#containsKey-java.lang.Object-], [{{entrySet()}}|https://commons.apache.org/proper/commons-collections/apidocs/org/apache/commons/collections4/map/PassiveExpiringMap.html#entrySet--], etc.) this decorator removes all expired entries prior to actually completing the invocation. {quote} Checked the code for containsKey and it doesn't seem to access the entire map, only the element of the key. If not sure about this, please check the attached [^show_effect_of_containsKey_containsValue_on_expiration.diff] as a proof. Suggestion is to replace the example with containsValue(Object) or size() or something that does remove all expired entries prior to actually completing the invocation: {quote}When invoking methods that involve accessing the entire map contents (i.e [{{containsValue(Object)}}|https://commons.apache.org/proper/commons-collections/apidocs/org/apache/commons/collections4/map/PassiveExpiringMap.html#containsValue-java.lang.Object-], [{{entrySet()}}|https://commons.apache.org/proper/commons-collections/apidocs/org/apache/commons/collections4/map/PassiveExpiringMap.html#entrySet--], etc.) this decorator removes all expired entries prior to actually completing the invocation. {quote} Potential fix patch: [^fix_doc.diff] was: The documentation for PassiveExpiringMap says: {quote}When invoking methods that involve accessing the entire map contents (i.e [{{containsKey(Object)}}|https://commons.apache.org/proper/commons-collections/apidocs/org/apache/commons/collections4/map/PassiveExpiringMap.html#containsKey-java.lang.Object-], [{{entrySet()}}|https://commons.apache.org/proper/commons-collections/apidocs/org/apache/commons/collections4/map/PassiveExpiringMap.html#entrySet--], etc.) this decorator removes all expired entries prior to actually completing the invocation. {quote} Checked the code for containsKey and it doesn't seem to access the entire map, only the element of the key. If not sure about this, please check the attached patch as a proof. Suggestion is to replace the example with containsValue(Object) or size() or something that does remove all expired entries prior to actually completing the invocation: {quote}When invoking methods that involve accessing the entire map contents (i.e [{{containsValue(Object)}}|https://commons.apache.org/proper/commons-collections/apidocs/org/apache/commons/collections4/map/PassiveExpiringMap.html#containsValue-java.lang.Object-], [{{entrySet()}}|https://commons.apache.org/proper/commons-collections/apidocs/org/apache/commons/collections4/map/PassiveExpiringMap.html#entrySet--], etc.) this decorator removes all expired entries prior to actually completing the invocation. {quote} > PassiveExpiringMap documentation - methods that involve accessing the entire > map > > > Key: COLLECTIONS-786 > URL: https://issues.apache.org/jira/browse/COLLECTIONS-786 > Project: Commons Collections > Issue Type: Improvement > Components: Map >Affects Versions: 4.4 >Reporter: Marko Pohajač >Priority: Minor > Fix For: 4.5 > > Attachments: fix_doc.diff, > show_effect_of_containsKey_containsValue_on_expiration.diff > > > The documentation for PassiveExpiringMap says: > {quote}When invoking methods that involve accessing the entire map contents > (i.e > [{{containsKey(Object)}}|https://commons.apache.org/proper/commons-collections/apidocs/org/apache/commons/collections4/map/PassiveExpiringMap.html#containsKey-java.lang.Object-], > > [{{entrySet()}}|https://commons.apache.org/proper/commons-collections/apidocs/org/apache/commons/collections4/map/PassiveExpiringMap.html#entrySet--], > etc.) this decorator removes all expired entries prior to actually > completing the invocation. > {quote} > > Checked the code for containsKey and it doesn't seem to access the entire > map, only the element of the key. If not sure about this, please check the > attached [^show_effect_of_containsKey_containsValue_on_expiration.diff] as a > proof. > Suggestion is to replace the example with containsValue(Object) or size() or > something that does remove all expired entries prior to actually completing > the invocation: > {quote}When invoking methods that involve accessing the entire map contents > (i.e > [{{containsValue(Object)}}|https://commons.apache.org/proper/comm
[GitHub] [commons-text] bradleyrumball opened a new pull request #214: Fixed JaroWinklerDistance
bradleyrumball opened a new pull request #214: URL: https://github.com/apache/commons-text/pull/214 Fixed JaroWinklerDistance to be in line with Javadoc and expected output. JaroWinklerDistance was returning incorrectly with the same values as the JaroWinklerSimilarity class. JaroWinklerDistance was updated to return the correct 1- value, and tests maintained. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [commons-text] bradleyrumball commented on pull request #214: Fixed JaroWinklerDistance
bradleyrumball commented on pull request #214: URL: https://github.com/apache/commons-text/pull/214#issuecomment-815765968 This fixes TEXT-191 as this has not been merged. [https://issues.apache.org/jira/browse/TEXT-191](https://issues.apache.org/jira/browse/TEXT-191) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [commons-csv] coveralls commented on pull request #141: Bump mockito-core from 3.7.7 to 3.9.0
coveralls commented on pull request #141: URL: https://github.com/apache/commons-csv/pull/141#issuecomment-81558 [![Coverage Status](https://coveralls.io/builds/38630501/badge)](https://coveralls.io/builds/38630501) Coverage remained the same at 98.463% when pulling **3dbc79df213f3b5acbf873eb926645f8068bbb7b on dependabot/maven/org.mockito-mockito-core-3.9.0** into **a7117b8d40c135d67a4240a9dd68a60ea1684387 on master**. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[jira] [Commented] (FILEUPLOAD-287) Multipart/mixed parts not handled correctly
[ https://issues.apache.org/jira/browse/FILEUPLOAD-287?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17317331#comment-17317331 ] Iosif Zeldin commented on FILEUPLOAD-287: - [~joc...@apache.org] I have the same issue, IMHO, you can use \{Content-ID} header instead > Multipart/mixed parts not handled correctly > --- > > Key: FILEUPLOAD-287 > URL: https://issues.apache.org/jira/browse/FILEUPLOAD-287 > Project: Commons FileUpload > Issue Type: Bug >Affects Versions: 1.3.3 >Reporter: Etienne Dethoor >Priority: Critical > > If i submit a request with global header > {{Content-Type="multipart/mixed;boundary="uuid:5985c43c-16a5-483a-88ff-64602f2a2f3f";charset=UTF-8"}} > data to a servlet with : > {code:xml} > --uuid:5985c43c-16a5-483a-88ff-64602f2a2f3f > Content-Type: text/plain > Content-Transfer-Encoding: binary > Content-ID: myFile > My_Content_Here > --uuid:5985c43c-16a5-483a-88ff-64602f2a2f3f > Content-Type: application/xml > Content-Transfer-Encoding: binary > Content-ID: myOtherFileHere > M_Other_Content_Here > {code} > The differents parts are not recognized because of > {{FileUploadBase.getFieldName()}} method who want a {{Content-Disposition}} > header for each part of the request. > The [rfc|https://tools.ietf.org/html/rfc7578#section-4.2] specified that this > header is mandatory for the {{multipart/form-data}} content-type. > For the {{multipart/mixed}}, if i well understand, the rfc doesn't say this > header is mandatory for each parts of the request. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (TEXT-191) JaroWinklerDistance returns the same values as JaroWinklerSimilarity
[ https://issues.apache.org/jira/browse/TEXT-191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17317501#comment-17317501 ] Bradley Rumball commented on TEXT-191: -- It appears that this issue was never fixed? I've created a PR to close this issue: https://github.com/apache/commons-text/pull/214 > JaroWinklerDistance returns the same values as JaroWinklerSimilarity > > > Key: TEXT-191 > URL: https://issues.apache.org/jira/browse/TEXT-191 > Project: Commons Text > Issue Type: Bug >Affects Versions: 1.9 > Environment: Windows 10 > AdoptOpenJDK 11 >Reporter: Alexander Foerster >Assignee: Bruno P. Kinoshita >Priority: Major > Labels: JaroWinkler, easyfix, newbie > > > The following two code snippets give the same output: > {code:java} > // checking similarity > JaroWinklerSimilarity jws = new JaroWinklerSimilarity(); > System.out.println("SIMILARITY: " + jws.apply("foo", "foo") + " " + > jws.apply("foo", "bar")); > // SIMILARITY: 1.0 0.0{code} > {code:java} > // checking distance > JaroWinklerDistance jwd = new JaroWinklerDistance(); > System.out.println("DISTANCE: " + jwd.apply("foo", "foo") + " " + > jwd.apply("foo", "bar")); > // DISTANCE: 1.0 0.0 > {code} > I would expect the distance to be 1 - similarity, but as you can see distance > and similarity return the same values. > > An easy fix would be to use the commented lines in JaroWinklerDistance.java: > {code:java} > // JaroWinklerSimilarity similarity = new JaroWinklerSimilarity(); > // return 1 - similarity.apply(left, right); > {code} > and maybe make _similarity_ be a final property/variable. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (NET-240) FTPClient can't support Chinese or Japanese language in listFiles()
[ https://issues.apache.org/jira/browse/NET-240?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17317536#comment-17317536 ] Daniel Fernández commented on NET-240: -- For mere documentation purposes, please note that if the server is a Windows IIS FTP server, UTF8 will not be used in connections even if it is allowed in server configuration, unless explicitly specified. This is even if FTPClient's {{controlEncoding}} is set to {{UTF-8}}. So Chinese/Japanese characters will be returned as question marks ({{?}}) unless an {{"OPTS UTF8 ON"}} command is issued after connecting. {code} SYST 215 Windows_NT FEAT 211-Extended features supported: LANG EN* UTF8 AUTH TLS;TLS-C;SSL;TLS-P; PBSZ PROT C;P; CCC HOST SIZE MDTM REST STREAM 211 END OPTS UTF8 ON 200 OPTS UTF8 command successful - UTF8 encoding now ON. {code} > FTPClient can't support Chinese or Japanese language in listFiles() > --- > > Key: NET-240 > URL: https://issues.apache.org/jira/browse/NET-240 > Project: Commons Net > Issue Type: Bug >Affects Versions: 2.0 > Environment: Both Win and Linux, jdk1.5 or jdk1.6 >Reporter: Eisen Wang >Priority: Major > > while coding as below: > FTPClient ftp = new FTPClient(); > int reply; > ftp.connect("10.110.13.18",2001); > ftp.login("user","password"); > // ... // transfer files > ftp.type(FTPClient.ASCII_FILE_TYPE); > FTPFile[] temp = ftp.listFiles(); > System.out.println(temp.length); > for (int i = 0; i < temp.length; i++) > { > System.out.println(temp[i].getName()); > }; //filtered all the files > if the remote ftp server has a Chinese or Japanese file, then it would print > a massive text on screen. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[GitHub] [commons-geometry] asfgit merged pull request #143: GEOMETRY-119: adding Vector.normalizeOrNull() method
asfgit merged pull request #143: URL: https://github.com/apache/commons-geometry/pull/143 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[jira] [Commented] (GEOMETRY-119) Vector normalizeOrDefault() method
[ https://issues.apache.org/jira/browse/GEOMETRY-119?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17317567#comment-17317567 ] Matt Juntunen commented on GEOMETRY-119: Added in commit ea68dfb0093aace23d856970b32e2b7f0941e425. > Vector normalizeOrDefault() method > -- > > Key: GEOMETRY-119 > URL: https://issues.apache.org/jira/browse/GEOMETRY-119 > Project: Apache Commons Geometry > Issue Type: Improvement >Reporter: Matt Juntunen >Priority: Major > > A frequent use case when working with vectors, especially vectors coming from > external data, is attempting to normalize the vector, and if this is not > possible, to use an alternative value. For example, the > {{QuaternionRotation}} code > [here|https://github.com/apache/commons-geometry/blob/master/commons-geometry-euclidean/src/main/java/org/apache/commons/geometry/euclidean/threed/rotation/QuaternionRotation.java#L86] > does exactly this; it attempts to normalize a vector and failing that (ie, > if the vector is exactly zero), it returns a substitute value. The > {{QuaternionRotation}} class is able to take advantage of our internal > {{Vectors.tryNormalize()}} but callers outside of the library are not able to > do so and so are left with 2 choices: > 1. wrap the {{normalize()}} call in a try-catch and handle the exception > thrown on illegal norm values, or > 2. compute and test the norm prior to calling {{normalize()}} to ensure that > the call won't fail, resulting in 2 computations of the norm. > Neither of these options are very good. > I propose adding a new method to the Euclidean Vector classes to handle this > situation: {{normalizeOrDefault()}}. The method would accept a default value > (possibly null) to return if the vector cannot be normalized. The normal > would then only need to be computed once and an exception would not need to > be thrown in case of failure. The behavior of the current {{normalize}} > method would be the same. > Examples: > {code:java} > // get some kind of normal, preferably vec but +z will also do > Vector3D.Unit norm = vec.normalizeOrDefault(Vector3D.Unit.PLUS_Z); > {code} > {code:java} > // throw a very use-case specific error message > Vector3D norm = vec.normalizeOrDefault(null); > if (norm == null) { > throw new Exception("Invalid triangle at index " + i + ": cannot compute > normal."); > } > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Resolved] (GEOMETRY-119) Vector normalizeOrDefault() method
[ https://issues.apache.org/jira/browse/GEOMETRY-119?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Matt Juntunen resolved GEOMETRY-119. Resolution: Done > Vector normalizeOrDefault() method > -- > > Key: GEOMETRY-119 > URL: https://issues.apache.org/jira/browse/GEOMETRY-119 > Project: Apache Commons Geometry > Issue Type: Improvement >Reporter: Matt Juntunen >Priority: Major > > A frequent use case when working with vectors, especially vectors coming from > external data, is attempting to normalize the vector, and if this is not > possible, to use an alternative value. For example, the > {{QuaternionRotation}} code > [here|https://github.com/apache/commons-geometry/blob/master/commons-geometry-euclidean/src/main/java/org/apache/commons/geometry/euclidean/threed/rotation/QuaternionRotation.java#L86] > does exactly this; it attempts to normalize a vector and failing that (ie, > if the vector is exactly zero), it returns a substitute value. The > {{QuaternionRotation}} class is able to take advantage of our internal > {{Vectors.tryNormalize()}} but callers outside of the library are not able to > do so and so are left with 2 choices: > 1. wrap the {{normalize()}} call in a try-catch and handle the exception > thrown on illegal norm values, or > 2. compute and test the norm prior to calling {{normalize()}} to ensure that > the call won't fail, resulting in 2 computations of the norm. > Neither of these options are very good. > I propose adding a new method to the Euclidean Vector classes to handle this > situation: {{normalizeOrDefault()}}. The method would accept a default value > (possibly null) to return if the vector cannot be normalized. The normal > would then only need to be computed once and an exception would not need to > be thrown in case of failure. The behavior of the current {{normalize}} > method would be the same. > Examples: > {code:java} > // get some kind of normal, preferably vec but +z will also do > Vector3D.Unit norm = vec.normalizeOrDefault(Vector3D.Unit.PLUS_Z); > {code} > {code:java} > // throw a very use-case specific error message > Vector3D norm = vec.normalizeOrDefault(null); > if (norm == null) { > throw new Exception("Invalid triangle at index " + i + ": cannot compute > normal."); > } > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Closed] (GEOMETRY-119) Vector normalizeOrDefault() method
[ https://issues.apache.org/jira/browse/GEOMETRY-119?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Matt Juntunen closed GEOMETRY-119. -- > Vector normalizeOrDefault() method > -- > > Key: GEOMETRY-119 > URL: https://issues.apache.org/jira/browse/GEOMETRY-119 > Project: Apache Commons Geometry > Issue Type: Improvement >Reporter: Matt Juntunen >Priority: Major > > A frequent use case when working with vectors, especially vectors coming from > external data, is attempting to normalize the vector, and if this is not > possible, to use an alternative value. For example, the > {{QuaternionRotation}} code > [here|https://github.com/apache/commons-geometry/blob/master/commons-geometry-euclidean/src/main/java/org/apache/commons/geometry/euclidean/threed/rotation/QuaternionRotation.java#L86] > does exactly this; it attempts to normalize a vector and failing that (ie, > if the vector is exactly zero), it returns a substitute value. The > {{QuaternionRotation}} class is able to take advantage of our internal > {{Vectors.tryNormalize()}} but callers outside of the library are not able to > do so and so are left with 2 choices: > 1. wrap the {{normalize()}} call in a try-catch and handle the exception > thrown on illegal norm values, or > 2. compute and test the norm prior to calling {{normalize()}} to ensure that > the call won't fail, resulting in 2 computations of the norm. > Neither of these options are very good. > I propose adding a new method to the Euclidean Vector classes to handle this > situation: {{normalizeOrDefault()}}. The method would accept a default value > (possibly null) to return if the vector cannot be normalized. The normal > would then only need to be computed once and an exception would not need to > be thrown in case of failure. The behavior of the current {{normalize}} > method would be the same. > Examples: > {code:java} > // get some kind of normal, preferably vec but +z will also do > Vector3D.Unit norm = vec.normalizeOrDefault(Vector3D.Unit.PLUS_Z); > {code} > {code:java} > // throw a very use-case specific error message > Vector3D norm = vec.normalizeOrDefault(null); > if (norm == null) { > throw new Exception("Invalid triangle at index " + i + ": cannot compute > normal."); > } > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[GitHub] [commons-geometry] darkma773r opened a new pull request #148: GEOMETRY-117: implementing AffineTransformMatrix2D shear methods
darkma773r opened a new pull request #148: URL: https://github.com/apache/commons-geometry/pull/148 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[jira] [Commented] (GEOMETRY-117) AffineTransformMatrix2D should support shear transform
[ https://issues.apache.org/jira/browse/GEOMETRY-117?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17317617#comment-17317617 ] Matt Juntunen commented on GEOMETRY-117: I went ahead and created another PR for this: https://github.com/apache/commons-geometry/pull/148 > AffineTransformMatrix2D should support shear transform > -- > > Key: GEOMETRY-117 > URL: https://issues.apache.org/jira/browse/GEOMETRY-117 > Project: Apache Commons Geometry > Issue Type: Improvement >Reporter: Christoph Läubrich >Priority: Major > > As discussed on the mailinglist, a shear method would be usefull -- This message was sent by Atlassian Jira (v8.3.4#803005)
[GitHub] [commons-text] kinow opened a new pull request #215: Update actions/setup-java to v2
kinow opened a new pull request #215: URL: https://github.com/apache/commons-text/pull/215 Dependabot's PR doesn't have the `distribution` arg, and I couldn't figure out a way to update the dependabot branch :cry: -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [commons-text] kinow merged pull request #215: Update actions/setup-java to v2
kinow merged pull request #215: URL: https://github.com/apache/commons-text/pull/215 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [commons-text] kinow closed pull request #212: Bump actions/setup-java from v1.4.3 to v2
kinow closed pull request #212: URL: https://github.com/apache/commons-text/pull/212 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [commons-text] dependabot[bot] commented on pull request #212: Bump actions/setup-java from v1.4.3 to v2
dependabot[bot] commented on pull request #212: URL: https://github.com/apache/commons-text/pull/212#issuecomment-816384781 OK, I won't notify you again about this release, but will get in touch when a new version is available. If you change your mind, just re-open this PR and I'll resolve any conflicts on it. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [commons-text] kinow commented on pull request #213: Bump mockito-inline from 3.8.0 to 3.9.0
kinow commented on pull request #213: URL: https://github.com/apache/commons-text/pull/213#issuecomment-816384849 @dependabot rebase -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[jira] [Resolved] (TEXT-194) Use StringUtils.INDEX_NOT_FOUND constant
[ https://issues.apache.org/jira/browse/TEXT-194?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Bruno P. Kinoshita resolved TEXT-194. - Fix Version/s: 1.10 Assignee: Bruno P. Kinoshita Resolution: Fixed > Use StringUtils.INDEX_NOT_FOUND constant > > > Key: TEXT-194 > URL: https://issues.apache.org/jira/browse/TEXT-194 > Project: Commons Text > Issue Type: Improvement >Reporter: Arturo Bernal >Assignee: Bruno P. Kinoshita >Priority: Minor > Labels: pull-request-available > Fix For: 1.10 > > Time Spent: 20m > Remaining Estimate: 0h > > Use StringUtils.INDEX_NOT_FOUND = -1 constant -- This message was sent by Atlassian Jira (v8.3.4#803005)
[GitHub] [commons-text] kinow closed pull request #200: [TEXT-194] - Use StringUtils.INDEX_NOT_FOUND constant
kinow closed pull request #200: URL: https://github.com/apache/commons-text/pull/200 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[jira] [Work logged] (TEXT-194) Use StringUtils.INDEX_NOT_FOUND constant
[ https://issues.apache.org/jira/browse/TEXT-194?focusedWorklogId=579744&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-579744 ] ASF GitHub Bot logged work on TEXT-194: --- Author: ASF GitHub Bot Created on: 09/Apr/21 04:23 Start Date: 09/Apr/21 04:23 Worklog Time Spent: 10m Work Description: kinow closed pull request #200: URL: https://github.com/apache/commons-text/pull/200 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 579744) Time Spent: 0.5h (was: 20m) > Use StringUtils.INDEX_NOT_FOUND constant > > > Key: TEXT-194 > URL: https://issues.apache.org/jira/browse/TEXT-194 > Project: Commons Text > Issue Type: Improvement >Reporter: Arturo Bernal >Assignee: Bruno P. Kinoshita >Priority: Minor > Labels: pull-request-available > Fix For: 1.10 > > Time Spent: 0.5h > Remaining Estimate: 0h > > Use StringUtils.INDEX_NOT_FOUND = -1 constant -- This message was sent by Atlassian Jira (v8.3.4#803005)
[GitHub] [commons-text] kinow opened a new pull request #216: Bump mockito-inline from 3.8.0 to 3.9.0
kinow opened a new pull request #216: URL: https://github.com/apache/commons-text/pull/216 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [commons-text] kinow merged pull request #216: Bump mockito-inline from 3.8.0 to 3.9.0
kinow merged pull request #216: URL: https://github.com/apache/commons-text/pull/216 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [commons-text] kinow closed pull request #213: Bump mockito-inline from 3.8.0 to 3.9.0
kinow closed pull request #213: URL: https://github.com/apache/commons-text/pull/213 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [commons-text] dependabot[bot] commented on pull request #213: Bump mockito-inline from 3.8.0 to 3.9.0
dependabot[bot] commented on pull request #213: URL: https://github.com/apache/commons-text/pull/213#issuecomment-816393270 OK, I won't notify you again about this release, but will get in touch when a new version is available. If you change your mind, just re-open this PR and I'll resolve any conflicts on it. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [commons-geometry] laeubi commented on pull request #148: GEOMETRY-117: implementing AffineTransformMatrix2D shear methods
laeubi commented on pull request #148: URL: https://github.com/apache/commons-geometry/pull/148#issuecomment-816393457 @darkma773r thanks a lot I'm currently a bit busy and this got a bit lost on my task :-\ -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [commons-imaging] kinow opened a new pull request #127: Use setup/java v2
kinow opened a new pull request #127: URL: https://github.com/apache/commons-imaging/pull/127 #126 + a change to include a required argument. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [commons-imaging] kinow merged pull request #127: Use setup/java v2
kinow merged pull request #127: URL: https://github.com/apache/commons-imaging/pull/127 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [commons-imaging] dependabot[bot] commented on pull request #126: Bump actions/setup-java from v1.4.3 to v2
dependabot[bot] commented on pull request #126: URL: https://github.com/apache/commons-imaging/pull/126#issuecomment-816418014 OK, I won't notify you again about this release, but will get in touch when a new version is available. If you change your mind, just re-open this PR and I'll resolve any conflicts on it. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [commons-imaging] kinow closed pull request #126: Bump actions/setup-java from v1.4.3 to v2
kinow closed pull request #126: URL: https://github.com/apache/commons-imaging/pull/126 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [commons-release-plugin] kinow opened a new pull request #49: Update actions/setup-java to v2
kinow opened a new pull request #49: URL: https://github.com/apache/commons-release-plugin/pull/49 Supersedes #48 as it's missing a parameter in the YAML file. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [commons-text] kinow commented on a change in pull request #214: Fixed JaroWinklerDistance
kinow commented on a change in pull request #214: URL: https://github.com/apache/commons-text/pull/214#discussion_r610360084 ## File path: src/test/java/org/apache/commons/text/similarity/JaroWinklerDistanceTest.java ## @@ -36,34 +36,22 @@ public static void setUp() { @Test public void testGetJaroWinklerDistance_StringString() { -assertEquals(0.92499d, distance.apply("frog", "fog"), 0.1d); -assertEquals(0.0d, distance.apply("fly", "ant"), 0.0001d); -assertEquals(0.44166d, distance.apply("elephant", "hippo"), 0.1d); -assertEquals(0.90666d, distance.apply("ABC Corporation", "ABC Corp"), 0.1d); -assertEquals(0.95251d, distance.apply("D N H Enterprises Inc", "D & H Enterprises, Inc."), 0.1d); -assertEquals(0.942d, distance.apply("My Gym Children's Fitness Center", "My Gym. Childrens Fitness"), 0.1d); -assertEquals(0.898018d, distance.apply("PENNSYLVANIA", "PENNCISYLVNIA"), 0.1d); -assertEquals(0.971428d, distance.apply("/opt/software1", "/opt/software2"), 0.1d); -assertEquals(0.941666d, distance.apply("aaabcd", "aaacdb"), 0.1d); -assertEquals(0.91d, distance.apply("John Horn", "John Hopkins"), 0.1d); -// TODO: replace tests in 2.0. See TEXT-104 for more. -// assertEquals(0d, distance.apply("", ""), 0.1d); -// assertEquals(0d, distance.apply("foo", "foo"), 0.1d); -// assertEquals(1 - 0.94166d, distance.apply("foo", "foo "), 0.1d); -// assertEquals(1 - 0.90666d, distance.apply("foo", "foo "), 0.1d); -// assertEquals(1 - 0.8d, distance.apply("foo", " foo "), 0.1d); -// assertEquals(1 - 0.5d, distance.apply("foo", " foo"), 0.1d); -// assertEquals(1 - 0.92499d, distance.apply("frog", "fog"), 0.1d); -// assertEquals(1.0d, distance.apply("fly", "ant"), 0.0001d); -// assertEquals(1 - 0.44166d, distance.apply("elephant", "hippo"), 0.1d); -// assertEquals(1 - 0.90666d, distance.apply("ABC Corporation", "ABC Corp"), 0.1d); -// assertEquals(1 - 0.95251d, distance.apply("D N H Enterprises Inc", "D & H Enterprises, Inc."), 0.1d); -// assertEquals(1 - 0.942d, -// distance.apply("My Gym Children's Fitness Center", "My Gym. Childrens Fitness"), 0.1d); -// assertEquals(1 - 0.898018d, distance.apply("PENNSYLVANIA", "PENNCISYLVNIA"), 0.1d); -// assertEquals(1 - 0.971428d, distance.apply("/opt/software1", "/opt/software2"), 0.1d); -// assertEquals(1 - 0.941666d, distance.apply("aaabcd", "aaacdb"), 0.1d); -// assertEquals(1 - 0.91d, distance.apply("John Horn", "John Hopkins"), 0.1d); +assertEquals(0.07501d, distance.apply("frog", "fog"), 0.1d); +assertEquals(1.0d, distance.apply("fly", "ant"), 0.0001d); +assertEquals(0.55834d, distance.apply("elephant", "hippo"), 0.1d); +assertEquals(0.09334d, distance.apply("ABC Corporation", "ABC Corp"), 0.1d); +assertEquals(0.04749d, distance.apply("D N H Enterprises Inc", "D & H Enterprises, Inc."), 0.1d); +assertEquals(0.058d, distance.apply("My Gym Children's Fitness Center", "My Gym. Childrens Fitness"), 0.1d); +assertEquals(0.101982d, distance.apply("PENNSYLVANIA", "PENNCISYLVNIA"), 0.1d); +assertEquals(0.028572d, distance.apply("/opt/software1", "/opt/software2"), 0.1d); +assertEquals(0.058334d, distance.apply("aaabcd", "aaacdb"), 0.1d); +assertEquals(0.09d, distance.apply("John Horn", "John Hopkins"), 0.1d); +assertEquals(0d, distance.apply("", ""), 0.1d); +assertEquals(0d, distance.apply("foo", "foo"), 0.1d); +assertEquals(1 - 0.94166d, distance.apply("foo", "foo "), 0.1d); +assertEquals(1 - 0.90666d, distance.apply("foo", "foo "), 0.1d); +assertEquals(1 - 0.8d, distance.apply("foo", " foo "), 0.1d); +assertEquals(1 - 0.5d, distance.apply("foo", " foo"), 0.1d); Review comment: I deleted the commented lines, but moved these 4 cases that were not in your original PR @bradleyrumball . ## File path: src/main/java/org/apache/commons/text/similarity/JaroWinklerDistance.java ## @@ -71,20 +76,7 @@ public Double apply(final CharSequence left, final CharSequence right) { throw new IllegalArgumentException("CharSequences must not be null"); } -// TODO: replace the rest of the code by this in 2.0, see TEXT-104 -// -// JaroWinklerSimilarity similarity = new JaroWinklerSimilarity(); -// return 1 - similarity.apply(left, right); - -final double defaultScalingFactor = 0.1; -final int[] mtp = matches(left, right); -final double m = mtp[0]; -if (m
[jira] [Updated] (TEXT-191) JaroWinklerDistance returns the same values as JaroWinklerSimilarity
[ https://issues.apache.org/jira/browse/TEXT-191?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Bruno P. Kinoshita updated TEXT-191: Fix Version/s: 1.10 > JaroWinklerDistance returns the same values as JaroWinklerSimilarity > > > Key: TEXT-191 > URL: https://issues.apache.org/jira/browse/TEXT-191 > Project: Commons Text > Issue Type: Bug >Affects Versions: 1.9 > Environment: Windows 10 > AdoptOpenJDK 11 >Reporter: Alexander Foerster >Assignee: Bruno P. Kinoshita >Priority: Major > Labels: JaroWinkler, easyfix, newbie > Fix For: 1.10 > > > > The following two code snippets give the same output: > {code:java} > // checking similarity > JaroWinklerSimilarity jws = new JaroWinklerSimilarity(); > System.out.println("SIMILARITY: " + jws.apply("foo", "foo") + " " + > jws.apply("foo", "bar")); > // SIMILARITY: 1.0 0.0{code} > {code:java} > // checking distance > JaroWinklerDistance jwd = new JaroWinklerDistance(); > System.out.println("DISTANCE: " + jwd.apply("foo", "foo") + " " + > jwd.apply("foo", "bar")); > // DISTANCE: 1.0 0.0 > {code} > I would expect the distance to be 1 - similarity, but as you can see distance > and similarity return the same values. > > An easy fix would be to use the commented lines in JaroWinklerDistance.java: > {code:java} > // JaroWinklerSimilarity similarity = new JaroWinklerSimilarity(); > // return 1 - similarity.apply(left, right); > {code} > and maybe make _similarity_ be a final property/variable. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (TEXT-191) JaroWinklerDistance returns the same values as JaroWinklerSimilarity
[ https://issues.apache.org/jira/browse/TEXT-191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17317675#comment-17317675 ] Bruno P. Kinoshita commented on TEXT-191: - Hi [~bradleyrumball] Thanks for the PR. I've added a changelog entry, and edited the commit messages. I had a look at TEXT-104 too. I reverted a change that was breaking the Clirr report, as I had removed a method. This PR changes the behaviour of the code, but it does so to fix a legit bug, so I don't think it breaks backward compatibility (at least no binary). > JaroWinklerDistance returns the same values as JaroWinklerSimilarity > > > Key: TEXT-191 > URL: https://issues.apache.org/jira/browse/TEXT-191 > Project: Commons Text > Issue Type: Bug >Affects Versions: 1.9 > Environment: Windows 10 > AdoptOpenJDK 11 >Reporter: Alexander Foerster >Assignee: Bruno P. Kinoshita >Priority: Major > Labels: JaroWinkler, easyfix, newbie > > > The following two code snippets give the same output: > {code:java} > // checking similarity > JaroWinklerSimilarity jws = new JaroWinklerSimilarity(); > System.out.println("SIMILARITY: " + jws.apply("foo", "foo") + " " + > jws.apply("foo", "bar")); > // SIMILARITY: 1.0 0.0{code} > {code:java} > // checking distance > JaroWinklerDistance jwd = new JaroWinklerDistance(); > System.out.println("DISTANCE: " + jwd.apply("foo", "foo") + " " + > jwd.apply("foo", "bar")); > // DISTANCE: 1.0 0.0 > {code} > I would expect the distance to be 1 - similarity, but as you can see distance > and similarity return the same values. > > An easy fix would be to use the commented lines in JaroWinklerDistance.java: > {code:java} > // JaroWinklerSimilarity similarity = new JaroWinklerSimilarity(); > // return 1 - similarity.apply(left, right); > {code} > and maybe make _similarity_ be a final property/variable. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[GitHub] [commons-collections] kinow opened a new pull request #224: Update actions/setup-java to v2
kinow opened a new pull request #224: URL: https://github.com/apache/commons-collections/pull/224 To close #223 as it needs the distribution parameter in the YAML file. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [commons-collections] kinow closed pull request #223: Bump actions/setup-java from v1.4.3 to v2
kinow closed pull request #223: URL: https://github.com/apache/commons-collections/pull/223 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [commons-collections] kinow merged pull request #224: Update actions/setup-java to v2
kinow merged pull request #224: URL: https://github.com/apache/commons-collections/pull/224 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [commons-collections] dependabot[bot] commented on pull request #223: Bump actions/setup-java from v1.4.3 to v2
dependabot[bot] commented on pull request #223: URL: https://github.com/apache/commons-collections/pull/223#issuecomment-816429131 OK, I won't notify you again about this release, but will get in touch when a new version is available. If you change your mind, just re-open this PR and I'll resolve any conflicts on it. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [commons-release-plugin] kinow merged pull request #49: Update actions/setup-java to v2
kinow merged pull request #49: URL: https://github.com/apache/commons-release-plugin/pull/49 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [commons-release-plugin] dependabot[bot] commented on pull request #48: Bump actions/setup-java from v1.4.3 to v2
dependabot[bot] commented on pull request #48: URL: https://github.com/apache/commons-release-plugin/pull/48#issuecomment-816429541 OK, I won't notify you again about this release, but will get in touch when a new version is available. If you change your mind, just re-open this PR and I'll resolve any conflicts on it. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [commons-release-plugin] kinow closed pull request #48: Bump actions/setup-java from v1.4.3 to v2
kinow closed pull request #48: URL: https://github.com/apache/commons-release-plugin/pull/48 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org