[jira] [Comment Edited] (LANG-1383) Illegal Reflective Access Operation

2019-07-03 Thread Li Ying (JIRA)


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

Li Ying edited comment on LANG-1383 at 7/4/19 6:25 AM:
---

Same warning for us:

 

 
{code:java}
WARNING: Illegal reflective access by 
org.apache.commons.lang3.builder.ReflectionToStringBuilder 
(file:/Users/x/.gradle/caches/modules-2/files-2.1/org.apache.commons/commons-lang3/3.9/122c7cee69b53ed4a7681c03d4ee4c0e2765da5/commons-lang3-3.9.jar)
 to field java.util.Optional.EMPTY

WARNING: Illegal reflective access by 
org.apache.commons.lang3.builder.ReflectionToStringBuilder 
(file:/Users/x/.gradle/caches/modules-2/files-2.1/org.apache.commons/commons-lang3/3.9/122c7cee69b53ed4a7681c03d4ee4c0e2765da5/commons-lang3-3.9.jar)
 to field java.util.Optional.value
{code}
 

 

looks like the same warning still happen in latest version 3.9


was (Author: li ying):
Same warning for us:

 

 
{code:java}
WARNING: Illegal reflective access by 
org.apache.commons.lang3.builder.ReflectionToStringBuilder 
(file:/Users/x/.gradle/caches/modules-2/files-2.1/org.apache.commons/commons-lang3/3.9/122c7cee69b53ed4a7681c03d4ee4c0e2765da5/commons-lang3-3.9.jar)
 to field java.util.Optional.EMPTY

WARNING: Illegal reflective access by 
org.apache.commons.lang3.builder.ReflectionToStringBuilder 
(file:/Users/x/.gradle/caches/modules-2/files-2.1/org.apache.commons/commons-lang3/3.9/122c7cee69b53ed4a7681c03d4ee4c0e2765da5/commons-lang3-3.9.jar)
 to field java.util.Optional.value
{code}
 

> Illegal Reflective Access Operation
> ---
>
> Key: LANG-1383
> URL: https://issues.apache.org/jira/browse/LANG-1383
> Project: Commons Lang
>  Issue Type: Bug
>  Components: lang.builder.*
>Affects Versions: 3.7
>Reporter: Brian Schack
>Priority: Major
> Attachments: Test.java
>
>
> ReflectionToStringBuilder::toString prints an illegal access warning to 
> System.err. The warning suggests to report this issue to the Apache Commons 
> maintainers.
> Boolean.TRUE is such a simple value that I don't really need 
> ReflectionToStringBuilder. But more complex types (such as HashMap) print the 
> same warning. I chose Boolean.TRUE in order to simplify this example.
> When I searched for this warning message, I found a StackOverflow answer 
> which suggested to report it to the package maintainers ([JDK9: An illegal 
> reflective access operation has occurred. 
> org.python.core.PySystemState|https://stackoverflow.com/questions/46230413/jdk9-an-illegal-reflective-access-operation-has-occurred-org-python-core-pysys/46230678]).
> I also asked my own StackOverflow question about how to throw an exception 
> for this warning ([How can I throw an exception for an illegal reflective 
> access 
> warning?|https://stackoverflow.com/questions/49076972/how-can-i-throw-an-exception-for-an-illegal-reflective-access-warning]).
> I will try to change my code to avoid this warning, but it also seems that 
> Apache Commons should not cause the warning. Perhaps it could use different 
> methods to get the values of the fields, or skip the private fields, or throw 
> an exception? The warning message suggests that the Java maintainers want the 
> Apache Commons maintainers to avoid this warning. And when they disable this 
> illegal access in the future, then it could impact Apache Commons.
> Code:
> {{import org.apache.commons.lang3.builder.*;}}
>  {{class Test {}}
> {{public static void main(String[] args) {}}
> {{System.out.println(ReflectionToStringBuilder.toString(Boolean.TRUE));}}
> {{}}}
> {{}}}
> Output:
> {{WARNING: An illegal reflective access operation has occurred}}
>  {{WARNING: Illegal reflective access by 
> org.apache.commons.lang3.builder.ReflectionToStringBuilder 
> ([file:/Users/brianschack/eclipse-workspace/User%20Libraries/com|file:///Users/brianschack/eclipse-workspace/User%20Libraries/com]mons-lang3-3.7/commons-lang3-3.7.jar)
>  to field java.lang.Boolean.value}}
>  {{WARNING: Please consider reporting this to the maintainers of 
> org.apache.commons.lang3.builder.ReflectionToStringBuilder}}
>  {{WARNING: Use --illegal-access=warn to enable warnings of further illegal 
> reflective access operations}}
> {{WARNING: All illegal access operations will be denied in a future release}}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (LANG-1383) Illegal Reflective Access Operation

2019-07-03 Thread Li Ying (JIRA)


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

Li Ying commented on LANG-1383:
---

Same warning for us:

 

 
{code:java}
WARNING: Illegal reflective access by 
org.apache.commons.lang3.builder.ReflectionToStringBuilder 
(file:/Users/x/.gradle/caches/modules-2/files-2.1/org.apache.commons/commons-lang3/3.9/122c7cee69b53ed4a7681c03d4ee4c0e2765da5/commons-lang3-3.9.jar)
 to field java.util.Optional.EMPTY

WARNING: Illegal reflective access by 
org.apache.commons.lang3.builder.ReflectionToStringBuilder 
(file:/Users/x/.gradle/caches/modules-2/files-2.1/org.apache.commons/commons-lang3/3.9/122c7cee69b53ed4a7681c03d4ee4c0e2765da5/commons-lang3-3.9.jar)
 to field java.util.Optional.value
{code}
 

> Illegal Reflective Access Operation
> ---
>
> Key: LANG-1383
> URL: https://issues.apache.org/jira/browse/LANG-1383
> Project: Commons Lang
>  Issue Type: Bug
>  Components: lang.builder.*
>Affects Versions: 3.7
>Reporter: Brian Schack
>Priority: Major
> Attachments: Test.java
>
>
> ReflectionToStringBuilder::toString prints an illegal access warning to 
> System.err. The warning suggests to report this issue to the Apache Commons 
> maintainers.
> Boolean.TRUE is such a simple value that I don't really need 
> ReflectionToStringBuilder. But more complex types (such as HashMap) print the 
> same warning. I chose Boolean.TRUE in order to simplify this example.
> When I searched for this warning message, I found a StackOverflow answer 
> which suggested to report it to the package maintainers ([JDK9: An illegal 
> reflective access operation has occurred. 
> org.python.core.PySystemState|https://stackoverflow.com/questions/46230413/jdk9-an-illegal-reflective-access-operation-has-occurred-org-python-core-pysys/46230678]).
> I also asked my own StackOverflow question about how to throw an exception 
> for this warning ([How can I throw an exception for an illegal reflective 
> access 
> warning?|https://stackoverflow.com/questions/49076972/how-can-i-throw-an-exception-for-an-illegal-reflective-access-warning]).
> I will try to change my code to avoid this warning, but it also seems that 
> Apache Commons should not cause the warning. Perhaps it could use different 
> methods to get the values of the fields, or skip the private fields, or throw 
> an exception? The warning message suggests that the Java maintainers want the 
> Apache Commons maintainers to avoid this warning. And when they disable this 
> illegal access in the future, then it could impact Apache Commons.
> Code:
> {{import org.apache.commons.lang3.builder.*;}}
>  {{class Test {}}
> {{public static void main(String[] args) {}}
> {{System.out.println(ReflectionToStringBuilder.toString(Boolean.TRUE));}}
> {{}}}
> {{}}}
> Output:
> {{WARNING: An illegal reflective access operation has occurred}}
>  {{WARNING: Illegal reflective access by 
> org.apache.commons.lang3.builder.ReflectionToStringBuilder 
> ([file:/Users/brianschack/eclipse-workspace/User%20Libraries/com|file:///Users/brianschack/eclipse-workspace/User%20Libraries/com]mons-lang3-3.7/commons-lang3-3.7.jar)
>  to field java.lang.Boolean.value}}
>  {{WARNING: Please consider reporting this to the maintainers of 
> org.apache.commons.lang3.builder.ReflectionToStringBuilder}}
>  {{WARNING: Use --illegal-access=warn to enable warnings of further illegal 
> reflective access operations}}
> {{WARNING: All illegal access operations will be denied in a future release}}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Work logged] (LANG-1167) Add null filter to ReflectionToStringBuilder

2019-07-03 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/LANG-1167?focusedWorklogId=272001&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-272001
 ]

ASF GitHub Bot logged work on LANG-1167:


Author: ASF GitHub Bot
Created on: 04/Jul/19 05:46
Start Date: 04/Jul/19 05:46
Worklog Time Spent: 10m 
  Work Description: HiAscend commented on issue #259: LANG-1167: Add null 
filter to ReflectionToStringBuilder
URL: https://github.com/apache/commons-lang/pull/259#issuecomment-508346974
 
 
   hello ,
   on V3.8 V3.8.1 V3.9
   when i use
   `ReflectionToStringBuilder.toString(student, ToStringStyle.JSON_STYLE)`
   return some like
   {"id":666,"age":22,"name":"\u4E2D\u56FD","birthday":"Thu Jul 04 13:29:26 CST 
2019","book":{"name":null}}
   the student name is "中国" but now it is in unicode charset
   
   however
   on V3.7 it is ok
   see:https://bbs.csdn.net/topics/392557654?page=1#post-404105720
   
 

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: 272001)
Time Spent: 10m
Remaining Estimate: 0h

> Add null filter to ReflectionToStringBuilder
> 
>
> Key: LANG-1167
> URL: https://issues.apache.org/jira/browse/LANG-1167
> Project: Commons Lang
>  Issue Type: Improvement
>  Components: lang.builder.*
>Reporter: Gregory Bonk
>Assignee: Rob Tompkins
>Priority: Major
> Fix For: 3.6
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> I know I can filter out class level fields with accept but it would be nice 
> if there could be an additional configuration where if a field's value is 
> null then it would be skipped.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[GitHub] [commons-lang] HiAscend commented on issue #259: LANG-1167: Add null filter to ReflectionToStringBuilder

2019-07-03 Thread GitBox
HiAscend commented on issue #259: LANG-1167: Add null filter to 
ReflectionToStringBuilder
URL: https://github.com/apache/commons-lang/pull/259#issuecomment-508346974
 
 
   hello ,
   on V3.8 V3.8.1 V3.9
   when i use
   `ReflectionToStringBuilder.toString(student, ToStringStyle.JSON_STYLE)`
   return some like
   {"id":666,"age":22,"name":"\u4E2D\u56FD","birthday":"Thu Jul 04 13:29:26 CST 
2019","book":{"name":null}}
   the student name is "中国" but now it is in unicode charset
   
   however
   on V3.7 it is ok
   see:https://bbs.csdn.net/topics/392557654?page=1#post-404105720
   


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


With regards,
Apache Git Services


[jira] [Work logged] (DBCP-547) Add a ConnectionFactory Interface in BasicDataSource class

2019-07-03 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/DBCP-547?focusedWorklogId=271995&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-271995
 ]

ASF GitHub Bot logged work on DBCP-547:
---

Author: ASF GitHub Bot
Created on: 04/Jul/19 04:51
Start Date: 04/Jul/19 04:51
Worklog Time Spent: 10m 
  Work Description: leechoongyon commented on issue #33: [DBCP-547] Add a 
ConnectionFactory interface in BasicDataSource.createConnectionFactory()
URL: https://github.com/apache/commons-dbcp/pull/33#issuecomment-508337050
 
 
   Thank you for your comments. Reflect your opinion, upload the source.
 

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: 271995)
Time Spent: 2h  (was: 1h 50m)

> Add a ConnectionFactory Interface in BasicDataSource class
> --
>
> Key: DBCP-547
> URL: https://issues.apache.org/jira/browse/DBCP-547
> Project: Commons DBCP
>  Issue Type: Improvement
>Affects Versions: 2.2.0
>Reporter: Lee Jun Gyun
>Priority: Minor
>  Time Spent: 2h
>  Remaining Estimate: 0h
>
> It think it would be nice better to implement a ConnectionFactory interface 
> in BasicDataSource class or implement a interface in DriverConnectionFactory 
> class.
> In my current project, when getting a connection in my program, I call 
> oracleSetModule.
> so, i think that after creating connection, call oracleSetModule via 
> connectionFactoryImpl seems to be nice.
>   
> [Before]
> protected ConnectionFactory createConnectionFactory() throws SQLException {
> ...
> ...
> ConnectionFactory driverConnectionFactory =
>  new DriverConnectionFactory(driverToUse, url, connectionProperties);
>  return driverConnectionFactory;
>  }
> [After]
> protected ConnectionFactory createConnectionFactory() throws SQLException {
> ...
> ...
> ConnectionFactory driverConnectionFactory =
> getConnectionFactoryImpl().newInstance(...);
> return driverConnectionFactory;
> }
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[GitHub] [commons-dbcp] leechoongyon commented on issue #33: [DBCP-547] Add a ConnectionFactory interface in BasicDataSource.createConnectionFactory()

2019-07-03 Thread GitBox
leechoongyon commented on issue #33: [DBCP-547] Add a ConnectionFactory 
interface in BasicDataSource.createConnectionFactory()
URL: https://github.com/apache/commons-dbcp/pull/33#issuecomment-508337050
 
 
   Thank you for your comments. Reflect your opinion, upload the source.


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


With regards,
Apache Git Services


[jira] [Work logged] (NUMBERS-120) Major loss of precision in BigFraction.doubleValue() and BigFraction.floatValue()

2019-07-03 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/NUMBERS-120?focusedWorklogId=271958&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-271958
 ]

ASF GitHub Bot logged work on NUMBERS-120:
--

Author: ASF GitHub Bot
Created on: 04/Jul/19 00:11
Start Date: 04/Jul/19 00:11
Worklog Time Spent: 10m 
  Work Description: coveralls commented on issue #63: [NUMBERS-120] 
Maximize precision of doubleValue() and floatValue() in BigFraction
URL: https://github.com/apache/commons-numbers/pull/63#issuecomment-507915982
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/24361102/badge)](https://coveralls.io/builds/24361102)
   
   Coverage decreased (-0.03%) to 94.225% when pulling 
**85df703d207643f40d2c0c37e29795facf49b993 on Schamschi:NUMBERS-120** into 
**f8e93c2e8b04b10cb76136746e828a2dfe2f4c36 on apache: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


Issue Time Tracking
---

Worklog Id: (was: 271958)
Time Spent: 0.5h  (was: 20m)

> Major loss of precision in BigFraction.doubleValue() and 
> BigFraction.floatValue()
> -
>
> Key: NUMBERS-120
> URL: https://issues.apache.org/jira/browse/NUMBERS-120
> Project: Commons Numbers
>  Issue Type: Bug
>  Components: fraction
>Affects Versions: 1.0
>Reporter: Heinrich Bohne
>Priority: Minor
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> The method {{BigFraction.doubleValue()}} calculates the double value of 
> fractions with numerators or denominators that, when converted to a 
> {{double}}, round up to {{Double.POSITIVE_INFINITY}}, by right-shifting both 
> the numerator and denominator synchronously until both numbers fit into 1023 
> bits. Apart from the fact that the maximum number of bits an integer 
> representable as a finite {{double}} can have is 1024 (an unbiased exponent 
> of 1023, which is the largest possible unbiased exponent of a {{double}} 
> number, means 1. ⋅ 2^1023^, which amounts to 1024 bits), this way of 
> converting the fraction to a {{double}} is incredibly wasteful with precision 
> if the numerator and denominator have a different bit length, because the 
> smaller of the two numbers will be truncated beyond what is necessary to 
> represent it as a finite {{double}}. Here is an extreme example:
> The smallest integer that rounds up to {{Double.POSITIVE_INFINITY}} when 
> converted to a {{double}} is 2^1024^ - 2^970^. This is because 
> {{Double.MAX_VALUE}} as an integer is a 1024-bit number with the most 
> significant 53 bits set to 1 and all other 971 bits set to 0. If the 970 
> least significant bits are changed in any way, the number will still round 
> down to {{Double.MAX_VALUE}} as long as the 971st bit remains 0, but as soon 
> as the 971st bit is set to 1, the number will round up to 
> {{Double.POSITIVE_INFINITY}}.
> The smallest possible denominator greater than 1 where a single right-shift 
> will cause a loss of precision is 3. 2^1024^ - 2^970^ is divisible by 3, so 
> in order to create an irreducible fraction, let's add 1 to it:
> (2^1024^ - 2^970^ + 1) / 3 ≈ 5.992310449541053 ⋅ 10^307^ (which can be 
> verified with {{BigDecimal}}, or, more easily, with [this online 
> tool|https://www.wolframalpha.com/input/?i=(2%5E1024+-+2%5E970+%2B+1)+%2F+3]. 
> However, the current implementation of BigFraction.doubleValue() returns 
> 8.98846567431158 ⋅ 10^307^, which differs from the correct result by a 
> relative error of 50%! The same problem applies to the method 
> {{BigFraction.floatValue()}}.
> This can be prevented by truncating the numerator and denominator separately, 
> so that for each of the two numbers, the maximum possible precision is 
> retained.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[GitHub] [commons-numbers] coveralls edited a comment on issue #63: [NUMBERS-120] Maximize precision of doubleValue() and floatValue() in BigFraction

2019-07-03 Thread GitBox
coveralls edited a comment on issue #63: [NUMBERS-120] Maximize precision of 
doubleValue() and floatValue() in BigFraction
URL: https://github.com/apache/commons-numbers/pull/63#issuecomment-507915982
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/24361102/badge)](https://coveralls.io/builds/24361102)
   
   Coverage decreased (-0.03%) to 94.225% when pulling 
**85df703d207643f40d2c0c37e29795facf49b993 on Schamschi:NUMBERS-120** into 
**f8e93c2e8b04b10cb76136746e828a2dfe2f4c36 on apache: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


With regards,
Apache Git Services


[GitHub] [commons-cli] coveralls commented on issue #30: Docs: Replace OptionBuilder in usage page

2019-07-03 Thread GitBox
coveralls commented on issue #30: Docs: Replace OptionBuilder in usage page
URL: https://github.com/apache/commons-cli/pull/30#issuecomment-508276253
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/24359772/badge)](https://coveralls.io/builds/24359772)
   
   Coverage remained the same at 96.358% when pulling 
**4ffb8103852910da53ddfe1e4f054016138efc17 on mincong-h:usage** into 
**2640ed05c58d71747a831d966c0a941ed50e8a07 on apache: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


With regards,
Apache Git Services


[GitHub] [commons-cli] mincong-h commented on issue #30: Docs: Replace OptionBuilder in usage page

2019-07-03 Thread GitBox
mincong-h commented on issue #30: Docs: Replace OptionBuilder in usage page
URL: https://github.com/apache/commons-cli/pull/30#issuecomment-508251999
 
 
   Actually there are more than one place to be changed. I can go further by 
sending more PRs in the future.


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


With regards,
Apache Git Services


[GitHub] [commons-cli] mincong-h opened a new pull request #30: Docs: Replace OptionBuilder in usage page

2019-07-03 Thread GitBox
mincong-h opened a new pull request #30: Docs: Replace OptionBuilder in usage 
page
URL: https://github.com/apache/commons-cli/pull/30
 
 
   
[`OptionBuilder`](https://commons.apache.org/proper/commons-cli/apidocs/org/apache/commons/cli/OptionBuilder.html)
 is deprecated. Since 1.3, use 
[`Option.builder(String)`](https://commons.apache.org/proper/commons-cli/apidocs/org/apache/commons/cli/Option.html#builder(java.lang.String))
 instead.
   


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


With regards,
Apache Git Services


[jira] [Created] (NUMBERS-128) Precision of Fraction.floatValue() can be improved

2019-07-03 Thread Heinrich Bohne (JIRA)
Heinrich Bohne created NUMBERS-128:
--

 Summary: Precision of Fraction.floatValue() can be improved
 Key: NUMBERS-128
 URL: https://issues.apache.org/jira/browse/NUMBERS-128
 Project: Commons Numbers
  Issue Type: Improvement
  Components: fraction
Affects Versions: 1.0
Reporter: Heinrich Bohne


The current implementation of {{Fraction.floatValue()}} first calls 
{{doubleValue()}}, which converts the fraction to a {{double}} with maximum 
possible precision, and then rounds the returned {{double}} value to a 
{{float}}. For the fraction 1 + 2^6^ / (2^30^ - 1) = (2^30^ - 1 + 2^6^) / 
(2^30^ - 1), this yields a result of exactly 1. However, the [actual value of 
the 
fraction|https://www.wolframalpha.com/input/?i=(2%5E30+-+1+%2B+2%5E6)%2F(2%5E30+-+1)+to+base+2]
 is closer to 1 + 2^-23^ (which is representable exactly as a {{float}}) than 
it is to 1, as WolframAlpha 
[confirms|https://www.wolframalpha.com/input/?i=abs((2%5E30+-+1+%2B+2%5E6)%2F(2%5E30+-+1)+-+(1+%2B+2%5E-23))+%3C+abs((2%5E30+-+1+%2B+2%5E6)%2F(2%5E30+-+1)+-+1)].



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (VFS-721) Add support for symbolic links for the local file system and add FileObject#isSymbolicLink()

2019-07-03 Thread Gary Gregory (JIRA)
Gary Gregory created VFS-721:


 Summary: Add support for symbolic links for the local file system 
and add FileObject#isSymbolicLink()
 Key: VFS-721
 URL: https://issues.apache.org/jira/browse/VFS-721
 Project: Commons VFS
  Issue Type: Improvement
Reporter: Gary Gregory


Add support for symbolic links for the local file system and add 
{{FileObject#isSymbolicLink()}}.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Work logged] (DBCP-547) Add a ConnectionFactory Interface in BasicDataSource class

2019-07-03 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/DBCP-547?focusedWorklogId=271744&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-271744
 ]

ASF GitHub Bot logged work on DBCP-547:
---

Author: ASF GitHub Bot
Created on: 03/Jul/19 17:11
Start Date: 03/Jul/19 17:11
Worklog Time Spent: 10m 
  Work Description: garydgregory commented on pull request #33: [DBCP-547] 
Add a ConnectionFactory interface in BasicDataSource.createConnectionFactory()
URL: https://github.com/apache/commons-dbcp/pull/33#discussion_r300068772
 
 

 ##
 File path: 
src/test/java/org/apache/commons/dbcp2/TestOracleDriverConnectionFactory.java
 ##
 @@ -0,0 +1,90 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.commons.dbcp2;
+
+import java.sql.Connection;
+import java.sql.Driver;
+import java.sql.SQLException;
+import java.util.Properties;
+
+/**
+ * Simple ConnectionFactory impl class that use 
BasicDataSource.createConnectionFactory()
+ */
+
+public class TestOracleDriverConnectionFactory implements ConnectionFactory {
+   private final String connectionString;
+private final Driver driver;
+private final Properties properties;
+
+/**
+ * Constructs a connection factory for a given Driver.
+ *
+ * @param driver
+ *The Driver.
+ * @param connectString
+ *The connection string.
+ * @param properties
+ *The connection properties.
+ */
+public TestOracleDriverConnectionFactory(final Driver driver, final String 
connectString, final Properties properties) {
 
 Review comment:
   Use a non-Oracle themed class name since there is nothing Oracle specific 
here.
 

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: 271744)

> Add a ConnectionFactory Interface in BasicDataSource class
> --
>
> Key: DBCP-547
> URL: https://issues.apache.org/jira/browse/DBCP-547
> Project: Commons DBCP
>  Issue Type: Improvement
>Affects Versions: 2.2.0
>Reporter: Lee Jun Gyun
>Priority: Minor
>  Time Spent: 1h 50m
>  Remaining Estimate: 0h
>
> It think it would be nice better to implement a ConnectionFactory interface 
> in BasicDataSource class or implement a interface in DriverConnectionFactory 
> class.
> In my current project, when getting a connection in my program, I call 
> oracleSetModule.
> so, i think that after creating connection, call oracleSetModule via 
> connectionFactoryImpl seems to be nice.
>   
> [Before]
> protected ConnectionFactory createConnectionFactory() throws SQLException {
> ...
> ...
> ConnectionFactory driverConnectionFactory =
>  new DriverConnectionFactory(driverToUse, url, connectionProperties);
>  return driverConnectionFactory;
>  }
> [After]
> protected ConnectionFactory createConnectionFactory() throws SQLException {
> ...
> ...
> ConnectionFactory driverConnectionFactory =
> getConnectionFactoryImpl().newInstance(...);
> return driverConnectionFactory;
> }
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Work logged] (DBCP-547) Add a ConnectionFactory Interface in BasicDataSource class

2019-07-03 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/DBCP-547?focusedWorklogId=271736&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-271736
 ]

ASF GitHub Bot logged work on DBCP-547:
---

Author: ASF GitHub Bot
Created on: 03/Jul/19 17:11
Start Date: 03/Jul/19 17:11
Worklog Time Spent: 10m 
  Work Description: garydgregory commented on pull request #33: [DBCP-547] 
Add a ConnectionFactory interface in BasicDataSource.createConnectionFactory()
URL: https://github.com/apache/commons-dbcp/pull/33#discussion_r300067186
 
 

 ##
 File path: src/main/java/org/apache/commons/dbcp2/BasicDataSource.java
 ##
 @@ -1967,6 +1983,21 @@ public synchronized void setDriverClassName(final 
String driverClassName) {
 this.driverClassName = null;
 }
 }
+
+/**
+ * Sets the ConnectionFactory class name.
+ *
+ * @param connectionFactoryClassName
+ *
+ */
+
+public void setConnectionFactoryClassName(final String 
connectionFactoryClassName) {
+   if (connectionFactoryClassName != null && 
connectionFactoryClassName.trim().length() > 0) {
 
 Review comment:
   Maybe even refactor into a private method `isNotBlank(String)` or 
`isBlank(String)` and reuse in other places in this class.
 

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: 271736)
Time Spent: 1h  (was: 50m)

> Add a ConnectionFactory Interface in BasicDataSource class
> --
>
> Key: DBCP-547
> URL: https://issues.apache.org/jira/browse/DBCP-547
> Project: Commons DBCP
>  Issue Type: Improvement
>Affects Versions: 2.2.0
>Reporter: Lee Jun Gyun
>Priority: Minor
>  Time Spent: 1h
>  Remaining Estimate: 0h
>
> It think it would be nice better to implement a ConnectionFactory interface 
> in BasicDataSource class or implement a interface in DriverConnectionFactory 
> class.
> In my current project, when getting a connection in my program, I call 
> oracleSetModule.
> so, i think that after creating connection, call oracleSetModule via 
> connectionFactoryImpl seems to be nice.
>   
> [Before]
> protected ConnectionFactory createConnectionFactory() throws SQLException {
> ...
> ...
> ConnectionFactory driverConnectionFactory =
>  new DriverConnectionFactory(driverToUse, url, connectionProperties);
>  return driverConnectionFactory;
>  }
> [After]
> protected ConnectionFactory createConnectionFactory() throws SQLException {
> ...
> ...
> ConnectionFactory driverConnectionFactory =
> getConnectionFactoryImpl().newInstance(...);
> return driverConnectionFactory;
> }
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Work logged] (DBCP-547) Add a ConnectionFactory Interface in BasicDataSource class

2019-07-03 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/DBCP-547?focusedWorklogId=271742&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-271742
 ]

ASF GitHub Bot logged work on DBCP-547:
---

Author: ASF GitHub Bot
Created on: 03/Jul/19 17:11
Start Date: 03/Jul/19 17:11
Worklog Time Spent: 10m 
  Work Description: garydgregory commented on pull request #33: [DBCP-547] 
Add a ConnectionFactory interface in BasicDataSource.createConnectionFactory()
URL: https://github.com/apache/commons-dbcp/pull/33#discussion_r300068848
 
 

 ##
 File path: 
src/test/java/org/apache/commons/dbcp2/TestOracleDriverConnectionFactory.java
 ##
 @@ -0,0 +1,90 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.commons.dbcp2;
+
+import java.sql.Connection;
+import java.sql.Driver;
+import java.sql.SQLException;
+import java.util.Properties;
+
+/**
+ * Simple ConnectionFactory impl class that use 
BasicDataSource.createConnectionFactory()
+ */
+
+public class TestOracleDriverConnectionFactory implements ConnectionFactory {
+   private final String connectionString;
+private final Driver driver;
+private final Properties properties;
+
+/**
+ * Constructs a connection factory for a given Driver.
+ *
+ * @param driver
+ *The Driver.
+ * @param connectString
+ *The connection string.
+ * @param properties
+ *The connection properties.
+ */
+public TestOracleDriverConnectionFactory(final Driver driver, final String 
connectString, final Properties properties) {
+this.driver = driver;
+this.connectionString = connectString;
+this.properties = properties;
+}
+
+@Override
+public Connection createConnection() throws SQLException {
+Connection conn = driver.connect(connectionString, properties);
+callOracleSetModule(conn);
+return conn;
+}
+
+/**
+ * @return The connection String.
+ * @since 2.6.0
+ */
+public String getConnectionString() {
+return connectionString;
+}
+
+/**
+ * @return The Driver.
+ * @since 2.6.0
+ */
+public Driver getDriver() {
+return driver;
+}
+
+/**
+ * @return The Properties.
+ * @since 2.6.0
+ */
+public Properties getProperties() {
+return properties;
+}
+
+@Override
+public String toString() {
+return this.getClass().getName() + " [" + String.valueOf(driver) + ";" 
+ String.valueOf(connectionString) + ";"
++ String.valueOf(properties) + "]";
+}
+
+private void callOracleSetModule(Connection conn) {
 
 Review comment:
   Use a non-Oracle themed class name since there is nothing Oracle specific 
here.
 

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: 271742)
Time Spent: 1h 40m  (was: 1.5h)

> Add a ConnectionFactory Interface in BasicDataSource class
> --
>
> Key: DBCP-547
> URL: https://issues.apache.org/jira/browse/DBCP-547
> Project: Commons DBCP
>  Issue Type: Improvement
>Affects Versions: 2.2.0
>Reporter: Lee Jun Gyun
>Priority: Minor
>  Time Spent: 1h 40m
>  Remaining Estimate: 0h
>
> It think it would be nice better to implement a ConnectionFactory interface 
> in BasicDataSource class or implement a interface in DriverConnectionFactory 
> class.
> In my current project, when getting a connection in my program, I call 
> oracleSetModule.
> so, i think that after creating connection, call oracleSetModule via 
> connectionFactoryImpl seems to be nice.
>   
> [Before]
> protected ConnectionFactory createConnectionFactory() throws SQLException 

[jira] [Work logged] (DBCP-547) Add a ConnectionFactory Interface in BasicDataSource class

2019-07-03 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/DBCP-547?focusedWorklogId=271743&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-271743
 ]

ASF GitHub Bot logged work on DBCP-547:
---

Author: ASF GitHub Bot
Created on: 03/Jul/19 17:11
Start Date: 03/Jul/19 17:11
Worklog Time Spent: 10m 
  Work Description: garydgregory commented on pull request #33: [DBCP-547] 
Add a ConnectionFactory interface in BasicDataSource.createConnectionFactory()
URL: https://github.com/apache/commons-dbcp/pull/33#discussion_r300068479
 
 

 ##
 File path: 
src/test/java/org/apache/commons/dbcp2/TestOracleDriverConnectionFactory.java
 ##
 @@ -0,0 +1,90 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.commons.dbcp2;
+
+import java.sql.Connection;
+import java.sql.Driver;
+import java.sql.SQLException;
+import java.util.Properties;
+
+/**
+ * Simple ConnectionFactory impl class that use 
BasicDataSource.createConnectionFactory()
+ */
+
+public class TestOracleDriverConnectionFactory implements ConnectionFactory {
+   private final String connectionString;
+private final Driver driver;
+private final Properties properties;
+
+/**
+ * Constructs a connection factory for a given Driver.
+ *
+ * @param driver
+ *The Driver.
+ * @param connectString
+ *The connection string.
+ * @param properties
+ *The connection properties.
+ */
+public TestOracleDriverConnectionFactory(final Driver driver, final String 
connectString, final Properties properties) {
+this.driver = driver;
+this.connectionString = connectString;
+this.properties = properties;
+}
+
+@Override
+public Connection createConnection() throws SQLException {
+Connection conn = driver.connect(connectionString, properties);
+callOracleSetModule(conn);
+return conn;
+}
+
+/**
+ * @return The connection String.
+ * @since 2.6.0
+ */
+public String getConnectionString() {
+return connectionString;
+}
+
+/**
+ * @return The Driver.
+ * @since 2.6.0
+ */
+public Driver getDriver() {
+return driver;
+}
+
+/**
+ * @return The Properties.
+ * @since 2.6.0
 
 Review comment:
   No need for @since and the version is wrong in any case.
 

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: 271743)
Time Spent: 1h 50m  (was: 1h 40m)

> Add a ConnectionFactory Interface in BasicDataSource class
> --
>
> Key: DBCP-547
> URL: https://issues.apache.org/jira/browse/DBCP-547
> Project: Commons DBCP
>  Issue Type: Improvement
>Affects Versions: 2.2.0
>Reporter: Lee Jun Gyun
>Priority: Minor
>  Time Spent: 1h 50m
>  Remaining Estimate: 0h
>
> It think it would be nice better to implement a ConnectionFactory interface 
> in BasicDataSource class or implement a interface in DriverConnectionFactory 
> class.
> In my current project, when getting a connection in my program, I call 
> oracleSetModule.
> so, i think that after creating connection, call oracleSetModule via 
> connectionFactoryImpl seems to be nice.
>   
> [Before]
> protected ConnectionFactory createConnectionFactory() throws SQLException {
> ...
> ...
> ConnectionFactory driverConnectionFactory =
>  new DriverConnectionFactory(driverToUse, url, connectionProperties);
>  return driverConnectionFactory;
>  }
> [After]
> protected ConnectionFactory createConnectionFactory() throws SQLException {
> ...
> ...
> ConnectionFactory driverConnectionFactory =
> getConnectionFactoryImpl().newInstance(...);
> return driverConnectionFactory

[jira] [Work logged] (DBCP-547) Add a ConnectionFactory Interface in BasicDataSource class

2019-07-03 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/DBCP-547?focusedWorklogId=271741&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-271741
 ]

ASF GitHub Bot logged work on DBCP-547:
---

Author: ASF GitHub Bot
Created on: 03/Jul/19 17:11
Start Date: 03/Jul/19 17:11
Worklog Time Spent: 10m 
  Work Description: garydgregory commented on pull request #33: [DBCP-547] 
Add a ConnectionFactory interface in BasicDataSource.createConnectionFactory()
URL: https://github.com/apache/commons-dbcp/pull/33#discussion_r300068304
 
 

 ##
 File path: 
src/test/java/org/apache/commons/dbcp2/TestOracleDriverConnectionFactory.java
 ##
 @@ -0,0 +1,90 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.commons.dbcp2;
+
+import java.sql.Connection;
+import java.sql.Driver;
+import java.sql.SQLException;
+import java.util.Properties;
+
+/**
+ * Simple ConnectionFactory impl class that use 
BasicDataSource.createConnectionFactory()
 
 Review comment:
   Fix weird formatting (too many leading whitespace.)
 

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: 271741)

> Add a ConnectionFactory Interface in BasicDataSource class
> --
>
> Key: DBCP-547
> URL: https://issues.apache.org/jira/browse/DBCP-547
> Project: Commons DBCP
>  Issue Type: Improvement
>Affects Versions: 2.2.0
>Reporter: Lee Jun Gyun
>Priority: Minor
>  Time Spent: 1.5h
>  Remaining Estimate: 0h
>
> It think it would be nice better to implement a ConnectionFactory interface 
> in BasicDataSource class or implement a interface in DriverConnectionFactory 
> class.
> In my current project, when getting a connection in my program, I call 
> oracleSetModule.
> so, i think that after creating connection, call oracleSetModule via 
> connectionFactoryImpl seems to be nice.
>   
> [Before]
> protected ConnectionFactory createConnectionFactory() throws SQLException {
> ...
> ...
> ConnectionFactory driverConnectionFactory =
>  new DriverConnectionFactory(driverToUse, url, connectionProperties);
>  return driverConnectionFactory;
>  }
> [After]
> protected ConnectionFactory createConnectionFactory() throws SQLException {
> ...
> ...
> ConnectionFactory driverConnectionFactory =
> getConnectionFactoryImpl().newInstance(...);
> return driverConnectionFactory;
> }
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Work logged] (DBCP-547) Add a ConnectionFactory Interface in BasicDataSource class

2019-07-03 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/DBCP-547?focusedWorklogId=271740&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-271740
 ]

ASF GitHub Bot logged work on DBCP-547:
---

Author: ASF GitHub Bot
Created on: 03/Jul/19 17:11
Start Date: 03/Jul/19 17:11
Worklog Time Spent: 10m 
  Work Description: garydgregory commented on pull request #33: [DBCP-547] 
Add a ConnectionFactory interface in BasicDataSource.createConnectionFactory()
URL: https://github.com/apache/commons-dbcp/pull/33#discussion_r300068448
 
 

 ##
 File path: 
src/test/java/org/apache/commons/dbcp2/TestOracleDriverConnectionFactory.java
 ##
 @@ -0,0 +1,90 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.commons.dbcp2;
+
+import java.sql.Connection;
+import java.sql.Driver;
+import java.sql.SQLException;
+import java.util.Properties;
+
+/**
+ * Simple ConnectionFactory impl class that use 
BasicDataSource.createConnectionFactory()
+ */
+
+public class TestOracleDriverConnectionFactory implements ConnectionFactory {
+   private final String connectionString;
+private final Driver driver;
+private final Properties properties;
+
+/**
+ * Constructs a connection factory for a given Driver.
+ *
+ * @param driver
+ *The Driver.
+ * @param connectString
+ *The connection string.
+ * @param properties
+ *The connection properties.
+ */
+public TestOracleDriverConnectionFactory(final Driver driver, final String 
connectString, final Properties properties) {
+this.driver = driver;
+this.connectionString = connectString;
+this.properties = properties;
+}
+
+@Override
+public Connection createConnection() throws SQLException {
+Connection conn = driver.connect(connectionString, properties);
+callOracleSetModule(conn);
+return conn;
+}
+
+/**
+ * @return The connection String.
+ * @since 2.6.0
+ */
+public String getConnectionString() {
+return connectionString;
+}
+
+/**
+ * @return The Driver.
+ * @since 2.6.0
 
 Review comment:
   No need for @since and the version is wrong in any case.
 

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: 271740)
Time Spent: 1.5h  (was: 1h 20m)

> Add a ConnectionFactory Interface in BasicDataSource class
> --
>
> Key: DBCP-547
> URL: https://issues.apache.org/jira/browse/DBCP-547
> Project: Commons DBCP
>  Issue Type: Improvement
>Affects Versions: 2.2.0
>Reporter: Lee Jun Gyun
>Priority: Minor
>  Time Spent: 1.5h
>  Remaining Estimate: 0h
>
> It think it would be nice better to implement a ConnectionFactory interface 
> in BasicDataSource class or implement a interface in DriverConnectionFactory 
> class.
> In my current project, when getting a connection in my program, I call 
> oracleSetModule.
> so, i think that after creating connection, call oracleSetModule via 
> connectionFactoryImpl seems to be nice.
>   
> [Before]
> protected ConnectionFactory createConnectionFactory() throws SQLException {
> ...
> ...
> ConnectionFactory driverConnectionFactory =
>  new DriverConnectionFactory(driverToUse, url, connectionProperties);
>  return driverConnectionFactory;
>  }
> [After]
> protected ConnectionFactory createConnectionFactory() throws SQLException {
> ...
> ...
> ConnectionFactory driverConnectionFactory =
> getConnectionFactoryImpl().newInstance(...);
> return driverConnectionFactory;
> }
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Work logged] (DBCP-547) Add a ConnectionFactory Interface in BasicDataSource class

2019-07-03 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/DBCP-547?focusedWorklogId=271738&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-271738
 ]

ASF GitHub Bot logged work on DBCP-547:
---

Author: ASF GitHub Bot
Created on: 03/Jul/19 17:11
Start Date: 03/Jul/19 17:11
Worklog Time Spent: 10m 
  Work Description: garydgregory commented on pull request #33: [DBCP-547] 
Add a ConnectionFactory interface in BasicDataSource.createConnectionFactory()
URL: https://github.com/apache/commons-dbcp/pull/33#discussion_r300067427
 
 

 ##
 File path: src/main/java/org/apache/commons/dbcp2/BasicDataSource.java
 ##
 @@ -2527,4 +2558,21 @@ private void updateJmxName(final 
GenericObjectPoolConfig config) {
 config.setJmxNameBase(base.toString());
 config.setJmxNamePrefix(Constants.JMX_CONNECTION_POOL_PREFIX);
 }
+
+private ConnectionFactory getConnectionFactoryInstance(Driver driver)  
throws SQLException {
+   if (connectionFactoryClassName != null) {
+try {
+   Class connectionFactoryFromCCL = 
Class.forName(connectionFactoryClassName);
+   return (ConnectionFactory) 
connectionFactoryFromCCL.getConstructor(Driver.class, String.class, 
Properties.class)
+   
   .newInstance(driver, url, 
connectionProperties);
 
 Review comment:
   Fix weird formatting.
 

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: 271738)
Time Spent: 1h 10m  (was: 1h)

> Add a ConnectionFactory Interface in BasicDataSource class
> --
>
> Key: DBCP-547
> URL: https://issues.apache.org/jira/browse/DBCP-547
> Project: Commons DBCP
>  Issue Type: Improvement
>Affects Versions: 2.2.0
>Reporter: Lee Jun Gyun
>Priority: Minor
>  Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> It think it would be nice better to implement a ConnectionFactory interface 
> in BasicDataSource class or implement a interface in DriverConnectionFactory 
> class.
> In my current project, when getting a connection in my program, I call 
> oracleSetModule.
> so, i think that after creating connection, call oracleSetModule via 
> connectionFactoryImpl seems to be nice.
>   
> [Before]
> protected ConnectionFactory createConnectionFactory() throws SQLException {
> ...
> ...
> ConnectionFactory driverConnectionFactory =
>  new DriverConnectionFactory(driverToUse, url, connectionProperties);
>  return driverConnectionFactory;
>  }
> [After]
> protected ConnectionFactory createConnectionFactory() throws SQLException {
> ...
> ...
> ConnectionFactory driverConnectionFactory =
> getConnectionFactoryImpl().newInstance(...);
> return driverConnectionFactory;
> }
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[GitHub] [commons-dbcp] garydgregory commented on a change in pull request #33: [DBCP-547] Add a ConnectionFactory interface in BasicDataSource.createConnectionFactory()

2019-07-03 Thread GitBox
garydgregory commented on a change in pull request #33: [DBCP-547] Add a 
ConnectionFactory interface in BasicDataSource.createConnectionFactory()
URL: https://github.com/apache/commons-dbcp/pull/33#discussion_r300068448
 
 

 ##
 File path: 
src/test/java/org/apache/commons/dbcp2/TestOracleDriverConnectionFactory.java
 ##
 @@ -0,0 +1,90 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.commons.dbcp2;
+
+import java.sql.Connection;
+import java.sql.Driver;
+import java.sql.SQLException;
+import java.util.Properties;
+
+/**
+ * Simple ConnectionFactory impl class that use 
BasicDataSource.createConnectionFactory()
+ */
+
+public class TestOracleDriverConnectionFactory implements ConnectionFactory {
+   private final String connectionString;
+private final Driver driver;
+private final Properties properties;
+
+/**
+ * Constructs a connection factory for a given Driver.
+ *
+ * @param driver
+ *The Driver.
+ * @param connectString
+ *The connection string.
+ * @param properties
+ *The connection properties.
+ */
+public TestOracleDriverConnectionFactory(final Driver driver, final String 
connectString, final Properties properties) {
+this.driver = driver;
+this.connectionString = connectString;
+this.properties = properties;
+}
+
+@Override
+public Connection createConnection() throws SQLException {
+Connection conn = driver.connect(connectionString, properties);
+callOracleSetModule(conn);
+return conn;
+}
+
+/**
+ * @return The connection String.
+ * @since 2.6.0
+ */
+public String getConnectionString() {
+return connectionString;
+}
+
+/**
+ * @return The Driver.
+ * @since 2.6.0
 
 Review comment:
   No need for @since and the version is wrong in any case.


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


With regards,
Apache Git Services


[GitHub] [commons-dbcp] garydgregory commented on a change in pull request #33: [DBCP-547] Add a ConnectionFactory interface in BasicDataSource.createConnectionFactory()

2019-07-03 Thread GitBox
garydgregory commented on a change in pull request #33: [DBCP-547] Add a 
ConnectionFactory interface in BasicDataSource.createConnectionFactory()
URL: https://github.com/apache/commons-dbcp/pull/33#discussion_r300067427
 
 

 ##
 File path: src/main/java/org/apache/commons/dbcp2/BasicDataSource.java
 ##
 @@ -2527,4 +2558,21 @@ private void updateJmxName(final 
GenericObjectPoolConfig config) {
 config.setJmxNameBase(base.toString());
 config.setJmxNamePrefix(Constants.JMX_CONNECTION_POOL_PREFIX);
 }
+
+private ConnectionFactory getConnectionFactoryInstance(Driver driver)  
throws SQLException {
+   if (connectionFactoryClassName != null) {
+try {
+   Class connectionFactoryFromCCL = 
Class.forName(connectionFactoryClassName);
+   return (ConnectionFactory) 
connectionFactoryFromCCL.getConstructor(Driver.class, String.class, 
Properties.class)
+   
   .newInstance(driver, url, 
connectionProperties);
 
 Review comment:
   Fix weird formatting.


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


With regards,
Apache Git Services


[GitHub] [commons-dbcp] garydgregory commented on a change in pull request #33: [DBCP-547] Add a ConnectionFactory interface in BasicDataSource.createConnectionFactory()

2019-07-03 Thread GitBox
garydgregory commented on a change in pull request #33: [DBCP-547] Add a 
ConnectionFactory interface in BasicDataSource.createConnectionFactory()
URL: https://github.com/apache/commons-dbcp/pull/33#discussion_r300068848
 
 

 ##
 File path: 
src/test/java/org/apache/commons/dbcp2/TestOracleDriverConnectionFactory.java
 ##
 @@ -0,0 +1,90 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.commons.dbcp2;
+
+import java.sql.Connection;
+import java.sql.Driver;
+import java.sql.SQLException;
+import java.util.Properties;
+
+/**
+ * Simple ConnectionFactory impl class that use 
BasicDataSource.createConnectionFactory()
+ */
+
+public class TestOracleDriverConnectionFactory implements ConnectionFactory {
+   private final String connectionString;
+private final Driver driver;
+private final Properties properties;
+
+/**
+ * Constructs a connection factory for a given Driver.
+ *
+ * @param driver
+ *The Driver.
+ * @param connectString
+ *The connection string.
+ * @param properties
+ *The connection properties.
+ */
+public TestOracleDriverConnectionFactory(final Driver driver, final String 
connectString, final Properties properties) {
+this.driver = driver;
+this.connectionString = connectString;
+this.properties = properties;
+}
+
+@Override
+public Connection createConnection() throws SQLException {
+Connection conn = driver.connect(connectionString, properties);
+callOracleSetModule(conn);
+return conn;
+}
+
+/**
+ * @return The connection String.
+ * @since 2.6.0
+ */
+public String getConnectionString() {
+return connectionString;
+}
+
+/**
+ * @return The Driver.
+ * @since 2.6.0
+ */
+public Driver getDriver() {
+return driver;
+}
+
+/**
+ * @return The Properties.
+ * @since 2.6.0
+ */
+public Properties getProperties() {
+return properties;
+}
+
+@Override
+public String toString() {
+return this.getClass().getName() + " [" + String.valueOf(driver) + ";" 
+ String.valueOf(connectionString) + ";"
++ String.valueOf(properties) + "]";
+}
+
+private void callOracleSetModule(Connection conn) {
 
 Review comment:
   Use a non-Oracle themed class name since there is nothing Oracle specific 
here.


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


With regards,
Apache Git Services


[GitHub] [commons-dbcp] garydgregory commented on a change in pull request #33: [DBCP-547] Add a ConnectionFactory interface in BasicDataSource.createConnectionFactory()

2019-07-03 Thread GitBox
garydgregory commented on a change in pull request #33: [DBCP-547] Add a 
ConnectionFactory interface in BasicDataSource.createConnectionFactory()
URL: https://github.com/apache/commons-dbcp/pull/33#discussion_r300068772
 
 

 ##
 File path: 
src/test/java/org/apache/commons/dbcp2/TestOracleDriverConnectionFactory.java
 ##
 @@ -0,0 +1,90 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.commons.dbcp2;
+
+import java.sql.Connection;
+import java.sql.Driver;
+import java.sql.SQLException;
+import java.util.Properties;
+
+/**
+ * Simple ConnectionFactory impl class that use 
BasicDataSource.createConnectionFactory()
+ */
+
+public class TestOracleDriverConnectionFactory implements ConnectionFactory {
+   private final String connectionString;
+private final Driver driver;
+private final Properties properties;
+
+/**
+ * Constructs a connection factory for a given Driver.
+ *
+ * @param driver
+ *The Driver.
+ * @param connectString
+ *The connection string.
+ * @param properties
+ *The connection properties.
+ */
+public TestOracleDriverConnectionFactory(final Driver driver, final String 
connectString, final Properties properties) {
 
 Review comment:
   Use a non-Oracle themed class name since there is nothing Oracle specific 
here.


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


With regards,
Apache Git Services


[GitHub] [commons-dbcp] garydgregory commented on a change in pull request #33: [DBCP-547] Add a ConnectionFactory interface in BasicDataSource.createConnectionFactory()

2019-07-03 Thread GitBox
garydgregory commented on a change in pull request #33: [DBCP-547] Add a 
ConnectionFactory interface in BasicDataSource.createConnectionFactory()
URL: https://github.com/apache/commons-dbcp/pull/33#discussion_r300068479
 
 

 ##
 File path: 
src/test/java/org/apache/commons/dbcp2/TestOracleDriverConnectionFactory.java
 ##
 @@ -0,0 +1,90 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.commons.dbcp2;
+
+import java.sql.Connection;
+import java.sql.Driver;
+import java.sql.SQLException;
+import java.util.Properties;
+
+/**
+ * Simple ConnectionFactory impl class that use 
BasicDataSource.createConnectionFactory()
+ */
+
+public class TestOracleDriverConnectionFactory implements ConnectionFactory {
+   private final String connectionString;
+private final Driver driver;
+private final Properties properties;
+
+/**
+ * Constructs a connection factory for a given Driver.
+ *
+ * @param driver
+ *The Driver.
+ * @param connectString
+ *The connection string.
+ * @param properties
+ *The connection properties.
+ */
+public TestOracleDriverConnectionFactory(final Driver driver, final String 
connectString, final Properties properties) {
+this.driver = driver;
+this.connectionString = connectString;
+this.properties = properties;
+}
+
+@Override
+public Connection createConnection() throws SQLException {
+Connection conn = driver.connect(connectionString, properties);
+callOracleSetModule(conn);
+return conn;
+}
+
+/**
+ * @return The connection String.
+ * @since 2.6.0
+ */
+public String getConnectionString() {
+return connectionString;
+}
+
+/**
+ * @return The Driver.
+ * @since 2.6.0
+ */
+public Driver getDriver() {
+return driver;
+}
+
+/**
+ * @return The Properties.
+ * @since 2.6.0
 
 Review comment:
   No need for @since and the version is wrong in any case.


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


With regards,
Apache Git Services


[jira] [Work logged] (DBCP-547) Add a ConnectionFactory Interface in BasicDataSource class

2019-07-03 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/DBCP-547?focusedWorklogId=271739&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-271739
 ]

ASF GitHub Bot logged work on DBCP-547:
---

Author: ASF GitHub Bot
Created on: 03/Jul/19 17:11
Start Date: 03/Jul/19 17:11
Worklog Time Spent: 10m 
  Work Description: garydgregory commented on pull request #33: [DBCP-547] 
Add a ConnectionFactory interface in BasicDataSource.createConnectionFactory()
URL: https://github.com/apache/commons-dbcp/pull/33#discussion_r300068420
 
 

 ##
 File path: 
src/test/java/org/apache/commons/dbcp2/TestOracleDriverConnectionFactory.java
 ##
 @@ -0,0 +1,90 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.commons.dbcp2;
+
+import java.sql.Connection;
+import java.sql.Driver;
+import java.sql.SQLException;
+import java.util.Properties;
+
+/**
+ * Simple ConnectionFactory impl class that use 
BasicDataSource.createConnectionFactory()
+ */
+
+public class TestOracleDriverConnectionFactory implements ConnectionFactory {
+   private final String connectionString;
+private final Driver driver;
+private final Properties properties;
+
+/**
+ * Constructs a connection factory for a given Driver.
+ *
+ * @param driver
+ *The Driver.
+ * @param connectString
+ *The connection string.
+ * @param properties
+ *The connection properties.
+ */
+public TestOracleDriverConnectionFactory(final Driver driver, final String 
connectString, final Properties properties) {
+this.driver = driver;
+this.connectionString = connectString;
+this.properties = properties;
+}
+
+@Override
+public Connection createConnection() throws SQLException {
+Connection conn = driver.connect(connectionString, properties);
+callOracleSetModule(conn);
+return conn;
+}
+
+/**
+ * @return The connection String.
+ * @since 2.6.0
 
 Review comment:
   No need for @since and the version is wrong in any case.
 

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: 271739)
Time Spent: 1h 20m  (was: 1h 10m)

> Add a ConnectionFactory Interface in BasicDataSource class
> --
>
> Key: DBCP-547
> URL: https://issues.apache.org/jira/browse/DBCP-547
> Project: Commons DBCP
>  Issue Type: Improvement
>Affects Versions: 2.2.0
>Reporter: Lee Jun Gyun
>Priority: Minor
>  Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> It think it would be nice better to implement a ConnectionFactory interface 
> in BasicDataSource class or implement a interface in DriverConnectionFactory 
> class.
> In my current project, when getting a connection in my program, I call 
> oracleSetModule.
> so, i think that after creating connection, call oracleSetModule via 
> connectionFactoryImpl seems to be nice.
>   
> [Before]
> protected ConnectionFactory createConnectionFactory() throws SQLException {
> ...
> ...
> ConnectionFactory driverConnectionFactory =
>  new DriverConnectionFactory(driverToUse, url, connectionProperties);
>  return driverConnectionFactory;
>  }
> [After]
> protected ConnectionFactory createConnectionFactory() throws SQLException {
> ...
> ...
> ConnectionFactory driverConnectionFactory =
> getConnectionFactoryImpl().newInstance(...);
> return driverConnectionFactory;
> }
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[GitHub] [commons-dbcp] garydgregory commented on a change in pull request #33: [DBCP-547] Add a ConnectionFactory interface in BasicDataSource.createConnectionFactory()

2019-07-03 Thread GitBox
garydgregory commented on a change in pull request #33: [DBCP-547] Add a 
ConnectionFactory interface in BasicDataSource.createConnectionFactory()
URL: https://github.com/apache/commons-dbcp/pull/33#discussion_r300068420
 
 

 ##
 File path: 
src/test/java/org/apache/commons/dbcp2/TestOracleDriverConnectionFactory.java
 ##
 @@ -0,0 +1,90 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.commons.dbcp2;
+
+import java.sql.Connection;
+import java.sql.Driver;
+import java.sql.SQLException;
+import java.util.Properties;
+
+/**
+ * Simple ConnectionFactory impl class that use 
BasicDataSource.createConnectionFactory()
+ */
+
+public class TestOracleDriverConnectionFactory implements ConnectionFactory {
+   private final String connectionString;
+private final Driver driver;
+private final Properties properties;
+
+/**
+ * Constructs a connection factory for a given Driver.
+ *
+ * @param driver
+ *The Driver.
+ * @param connectString
+ *The connection string.
+ * @param properties
+ *The connection properties.
+ */
+public TestOracleDriverConnectionFactory(final Driver driver, final String 
connectString, final Properties properties) {
+this.driver = driver;
+this.connectionString = connectString;
+this.properties = properties;
+}
+
+@Override
+public Connection createConnection() throws SQLException {
+Connection conn = driver.connect(connectionString, properties);
+callOracleSetModule(conn);
+return conn;
+}
+
+/**
+ * @return The connection String.
+ * @since 2.6.0
 
 Review comment:
   No need for @since and the version is wrong in any case.


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


With regards,
Apache Git Services


[jira] [Work logged] (DBCP-547) Add a ConnectionFactory Interface in BasicDataSource class

2019-07-03 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/DBCP-547?focusedWorklogId=271737&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-271737
 ]

ASF GitHub Bot logged work on DBCP-547:
---

Author: ASF GitHub Bot
Created on: 03/Jul/19 17:11
Start Date: 03/Jul/19 17:11
Worklog Time Spent: 10m 
  Work Description: garydgregory commented on pull request #33: [DBCP-547] 
Add a ConnectionFactory interface in BasicDataSource.createConnectionFactory()
URL: https://github.com/apache/commons-dbcp/pull/33#discussion_r300066127
 
 

 ##
 File path: src/main/java/org/apache/commons/dbcp2/BasicDataSource.java
 ##
 @@ -1967,6 +1983,21 @@ public synchronized void setDriverClassName(final 
String driverClassName) {
 this.driverClassName = null;
 }
 }
+
+/**
+ * Sets the ConnectionFactory class name.
+ *
+ * @param connectionFactoryClassName
+ *
+ */
+
+public void setConnectionFactoryClassName(final String 
connectionFactoryClassName) {
+   if (connectionFactoryClassName != null && 
connectionFactoryClassName.trim().length() > 0) {
 
 Review comment:
   `connectionFactoryClassName.trim().length() > 0` -> 
`!connectionFactoryClassName.trim().isEmpty()`
 

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: 271737)
Time Spent: 1h  (was: 50m)

> Add a ConnectionFactory Interface in BasicDataSource class
> --
>
> Key: DBCP-547
> URL: https://issues.apache.org/jira/browse/DBCP-547
> Project: Commons DBCP
>  Issue Type: Improvement
>Affects Versions: 2.2.0
>Reporter: Lee Jun Gyun
>Priority: Minor
>  Time Spent: 1h
>  Remaining Estimate: 0h
>
> It think it would be nice better to implement a ConnectionFactory interface 
> in BasicDataSource class or implement a interface in DriverConnectionFactory 
> class.
> In my current project, when getting a connection in my program, I call 
> oracleSetModule.
> so, i think that after creating connection, call oracleSetModule via 
> connectionFactoryImpl seems to be nice.
>   
> [Before]
> protected ConnectionFactory createConnectionFactory() throws SQLException {
> ...
> ...
> ConnectionFactory driverConnectionFactory =
>  new DriverConnectionFactory(driverToUse, url, connectionProperties);
>  return driverConnectionFactory;
>  }
> [After]
> protected ConnectionFactory createConnectionFactory() throws SQLException {
> ...
> ...
> ConnectionFactory driverConnectionFactory =
> getConnectionFactoryImpl().newInstance(...);
> return driverConnectionFactory;
> }
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[GitHub] [commons-dbcp] garydgregory commented on a change in pull request #33: [DBCP-547] Add a ConnectionFactory interface in BasicDataSource.createConnectionFactory()

2019-07-03 Thread GitBox
garydgregory commented on a change in pull request #33: [DBCP-547] Add a 
ConnectionFactory interface in BasicDataSource.createConnectionFactory()
URL: https://github.com/apache/commons-dbcp/pull/33#discussion_r300066127
 
 

 ##
 File path: src/main/java/org/apache/commons/dbcp2/BasicDataSource.java
 ##
 @@ -1967,6 +1983,21 @@ public synchronized void setDriverClassName(final 
String driverClassName) {
 this.driverClassName = null;
 }
 }
+
+/**
+ * Sets the ConnectionFactory class name.
+ *
+ * @param connectionFactoryClassName
+ *
+ */
+
+public void setConnectionFactoryClassName(final String 
connectionFactoryClassName) {
+   if (connectionFactoryClassName != null && 
connectionFactoryClassName.trim().length() > 0) {
 
 Review comment:
   `connectionFactoryClassName.trim().length() > 0` -> 
`!connectionFactoryClassName.trim().isEmpty()`


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


With regards,
Apache Git Services


[GitHub] [commons-dbcp] garydgregory commented on a change in pull request #33: [DBCP-547] Add a ConnectionFactory interface in BasicDataSource.createConnectionFactory()

2019-07-03 Thread GitBox
garydgregory commented on a change in pull request #33: [DBCP-547] Add a 
ConnectionFactory interface in BasicDataSource.createConnectionFactory()
URL: https://github.com/apache/commons-dbcp/pull/33#discussion_r300067186
 
 

 ##
 File path: src/main/java/org/apache/commons/dbcp2/BasicDataSource.java
 ##
 @@ -1967,6 +1983,21 @@ public synchronized void setDriverClassName(final 
String driverClassName) {
 this.driverClassName = null;
 }
 }
+
+/**
+ * Sets the ConnectionFactory class name.
+ *
+ * @param connectionFactoryClassName
+ *
+ */
+
+public void setConnectionFactoryClassName(final String 
connectionFactoryClassName) {
+   if (connectionFactoryClassName != null && 
connectionFactoryClassName.trim().length() > 0) {
 
 Review comment:
   Maybe even refactor into a private method `isNotBlank(String)` or 
`isBlank(String)` and reuse in other places in this class.


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


With regards,
Apache Git Services


[GitHub] [commons-dbcp] garydgregory commented on a change in pull request #33: [DBCP-547] Add a ConnectionFactory interface in BasicDataSource.createConnectionFactory()

2019-07-03 Thread GitBox
garydgregory commented on a change in pull request #33: [DBCP-547] Add a 
ConnectionFactory interface in BasicDataSource.createConnectionFactory()
URL: https://github.com/apache/commons-dbcp/pull/33#discussion_r300068304
 
 

 ##
 File path: 
src/test/java/org/apache/commons/dbcp2/TestOracleDriverConnectionFactory.java
 ##
 @@ -0,0 +1,90 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.commons.dbcp2;
+
+import java.sql.Connection;
+import java.sql.Driver;
+import java.sql.SQLException;
+import java.util.Properties;
+
+/**
+ * Simple ConnectionFactory impl class that use 
BasicDataSource.createConnectionFactory()
 
 Review comment:
   Fix weird formatting (too many leading whitespace.)


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


With regards,
Apache Git Services


[jira] [Updated] (TEXT-158) Incorrect values for Jaccard similarity with empty strings

2019-07-03 Thread Gary Gregory (JIRA)


 [ 
https://issues.apache.org/jira/browse/TEXT-158?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gary Gregory updated TEXT-158:
--
Fix Version/s: (was: 1.7)
   1.8

> Incorrect values for Jaccard similarity with empty strings
> --
>
> Key: TEXT-158
> URL: https://issues.apache.org/jira/browse/TEXT-158
> Project: Commons Text
>  Issue Type: Bug
>Affects Versions: 1.6
>Reporter: Bruno P. Kinoshita
>Priority: Minor
> Fix For: 1.8
>
>
> In a discussion part of TEXT-126, it was 
> [pointed|https://github.com/apache/commons-text/pull/103#discussion_r263988298]
>  that the Jaccard similarity returns 0.0, and the distance 1.0. While in 
> other libraries it returns the opposite for each.
> {code:java}
> package br.eti.kinoshita.tests.text;
> import java.util.Collections;
> public class EditDistances {
> public static void main(String[] args) {
> System.out.println("Testing jaccard sim/dis with empty strings");
> System.out.println("---");
> org.simmetrics.metrics.Jaccard j1 = new 
> org.simmetrics.metrics.Jaccard<>();
> float s1 = j1.compare(Collections.emptySet(), Collections.emptySet());
> System.out.println("Simmetrics Jaccard similarity: " + s1);
> float d1 = j1.distance(Collections.emptySet(), 
> Collections.emptySet());
> System.out.println("Simmetrics Jaccard distance: " + d1);
> 
> System.out.println("---");
> 
> info.debatty.java.stringsimilarity.Jaccard j2 = new 
> info.debatty.java.stringsimilarity.Jaccard();
> double s2 = j2.similarity("", "");
> System.out.println("javastringsimilarity Jaccard similarity: " + s2);
> double d2 = j2.distance("", "");
> System.out.println("javastringsimilarity Jaccard distance: " + d2);
> 
> System.out.println("---");
> 
> org.apache.commons.text.similarity.JaccardSimilarity j3_1 = new 
> org.apache.commons.text.similarity.JaccardSimilarity();
> double s3 = j3_1.apply("", "");
> System.out.println("commons-text Jaccard similarity: " + s3);
> org.apache.commons.text.similarity.JaccardDistance j3_2 = new 
> org.apache.commons.text.similarity.JaccardDistance();
> double d3 = j3_2.apply("", "");
> System.out.println("commons-text Jaccard distance: " + d3);
> }
> }{code}
> Produces:
> {noformat}
> Testing jaccard sim/dis with empty strings
> ---
> Simmetrics Jaccard similarity: 1.0
> Simmetrics Jaccard distance: 0.0
> ---
> javastringsimilarity Jaccard similarity: 1.0
> javastringsimilarity Jaccard distance: 0.0
> ---
> commons-text Jaccard similarity: 0.0
> commons-text Jaccard distance: 1.0{noformat}
> We need to confirm what's the correct output for similarity and distance with 
> empty strings. And either document why we are returning what we are 
> returning, or fix it as a bug for the next release.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Work logged] (CSV-247) A single empty header is allowed when not allowing empty column headers.

2019-07-03 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/CSV-247?focusedWorklogId=271525&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-271525
 ]

ASF GitHub Bot logged work on CSV-247:
--

Author: ASF GitHub Bot
Created on: 03/Jul/19 10:09
Start Date: 03/Jul/19 10:09
Worklog Time Spent: 10m 
  Work Description: coveralls commented on issue #47: CSV-247: CSVParser to 
check an empty header before checking duplicates.
URL: https://github.com/apache/commons-csv/pull/47#issuecomment-508031331
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/24344490/badge)](https://coveralls.io/builds/24344490)
   
   Coverage decreased (-0.007%) to 92.822% when pulling 
**cb852dd00476c9691c9f1e9ae5b5f2c617ccce89 on aherbert:fix-CSV-247** into 
**7754cd4c84299e72043067501d2965f55e7ff769 on apache: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


Issue Time Tracking
---

Worklog Id: (was: 271525)
Time Spent: 20m  (was: 10m)

> A single empty header is allowed when not allowing empty column headers.
> 
>
> Key: CSV-247
> URL: https://issues.apache.org/jira/browse/CSV-247
> Project: Commons CSV
>  Issue Type: Bug
>Affects Versions: 1.7
>Reporter: Alex D Herbert
>Priority: Minor
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> If the settings are not allowing empty columns headers you can currently use 
> a single empty header. This is because column headers are only checked for 
> empty when they are duplicates. So it is the second empty header (the first 
> duplicate) that raises an error. This test should pass but does not:
> {code:java}
> @Test(expected = IllegalArgumentException.class)
> public void testHeadersMissingOneColumnException() throws Exception {
>     final Reader in = new StringReader("a,,c,d\n1,2,3,4\nx,y,z,zz");    
> CSVFormat.DEFAULT.withHeader().parse(in).iterator(); 
> }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[GitHub] [commons-csv] coveralls commented on issue #47: CSV-247: CSVParser to check an empty header before checking duplicates.

2019-07-03 Thread GitBox
coveralls commented on issue #47: CSV-247: CSVParser to check an empty header 
before checking duplicates.
URL: https://github.com/apache/commons-csv/pull/47#issuecomment-508031331
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/24344490/badge)](https://coveralls.io/builds/24344490)
   
   Coverage decreased (-0.007%) to 92.822% when pulling 
**cb852dd00476c9691c9f1e9ae5b5f2c617ccce89 on aherbert:fix-CSV-247** into 
**7754cd4c84299e72043067501d2965f55e7ff769 on apache: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


With regards,
Apache Git Services


[jira] [Work logged] (CSV-247) A single empty header is allowed when not allowing empty column headers.

2019-07-03 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/CSV-247?focusedWorklogId=271471&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-271471
 ]

ASF GitHub Bot logged work on CSV-247:
--

Author: ASF GitHub Bot
Created on: 03/Jul/19 08:49
Start Date: 03/Jul/19 08:49
Worklog Time Spent: 10m 
  Work Description: aherbert commented on pull request #47: CSV-247: 
CSVParser to check an empty header before checking duplicates.
URL: https://github.com/apache/commons-csv/pull/47
 
 
   This rearranges the logic of checking for empty column headers before 
checking for duplicates.
   
   I've left the rest of the logic alone. The implication is that it will 
always allow a duplicate header if the header is empty irrespective of whether 
duplicates are not allowed. So you can configure the parser to not allow 
duplicates but allow missing headers and then it skips the fact that each 
missing header is a duplicate. If documented this in the code.
   
   I also note that the header is checked for a duplicate without trim but the 
empty header check uses trim. This is contradictory but perhaps a user does 
want to have headers `"A"," A "," A"`. Any proper CSV header would not 
whitespace pad headers so I'll leave this until someone reports it as a 
problem. 
   
   The fix found that the existing test `CSVParserTest.testHeaderMissing()` did 
not set the AllowMissingColumnNames property. If this test is to work with a 
missing header then it needs that setting.
   
   I also updated the tests of missing headers which use 5 columns to have 5 
entries in the record. Previously it was 4 which is not correct.
   
 

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: 271471)
Time Spent: 10m
Remaining Estimate: 0h

> A single empty header is allowed when not allowing empty column headers.
> 
>
> Key: CSV-247
> URL: https://issues.apache.org/jira/browse/CSV-247
> Project: Commons CSV
>  Issue Type: Bug
>Affects Versions: 1.7
>Reporter: Alex D Herbert
>Priority: Minor
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> If the settings are not allowing empty columns headers you can currently use 
> a single empty header. This is because column headers are only checked for 
> empty when they are duplicates. So it is the second empty header (the first 
> duplicate) that raises an error. This test should pass but does not:
> {code:java}
> @Test(expected = IllegalArgumentException.class)
> public void testHeadersMissingOneColumnException() throws Exception {
>     final Reader in = new StringReader("a,,c,d\n1,2,3,4\nx,y,z,zz");    
> CSVFormat.DEFAULT.withHeader().parse(in).iterator(); 
> }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[GitHub] [commons-csv] aherbert opened a new pull request #47: CSV-247: CSVParser to check an empty header before checking duplicates.

2019-07-03 Thread GitBox
aherbert opened a new pull request #47: CSV-247: CSVParser to check an empty 
header before checking duplicates.
URL: https://github.com/apache/commons-csv/pull/47
 
 
   This rearranges the logic of checking for empty column headers before 
checking for duplicates.
   
   I've left the rest of the logic alone. The implication is that it will 
always allow a duplicate header if the header is empty irrespective of whether 
duplicates are not allowed. So you can configure the parser to not allow 
duplicates but allow missing headers and then it skips the fact that each 
missing header is a duplicate. If documented this in the code.
   
   I also note that the header is checked for a duplicate without trim but the 
empty header check uses trim. This is contradictory but perhaps a user does 
want to have headers `"A"," A "," A"`. Any proper CSV header would not 
whitespace pad headers so I'll leave this until someone reports it as a 
problem. 
   
   The fix found that the existing test `CSVParserTest.testHeaderMissing()` did 
not set the AllowMissingColumnNames property. If this test is to work with a 
missing header then it needs that setting.
   
   I also updated the tests of missing headers which use 5 columns to have 5 
entries in the record. Previously it was 4 which is not correct.
   


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


With regards,
Apache Git Services


[jira] [Created] (CSV-248) CSVRecord is not Serializable

2019-07-03 Thread Alex D Herbert (JIRA)
Alex D Herbert created CSV-248:
--

 Summary: CSVRecord is not Serializable
 Key: CSV-248
 URL: https://issues.apache.org/jira/browse/CSV-248
 Project: Commons CSV
  Issue Type: Bug
Affects Versions: 1.7
Reporter: Alex D Herbert


CSVRecord is no longer Serializable as it stores the CSVParser and that is not 
serializable.

The parser contains a list of all the CSVRecords. So to serialize this would 
serialize a lot of extra information. The cascade of serialization eventually 
includes the original BufferedReader used to read the data.

The parser is required for the header map functionality and the getParser() 
method. The easy fix is to not support any functionality related to the parser 
after deserialization. If the header map functionality is to be supported the 
class can store the header map (easy), or overload the serialization methods to 
record and load the header map (more effort), or something else.

 

 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (CSV-247) A single empty header is allowed when not allowing empty column headers.

2019-07-03 Thread Alex D Herbert (JIRA)
Alex D Herbert created CSV-247:
--

 Summary: A single empty header is allowed when not allowing empty 
column headers.
 Key: CSV-247
 URL: https://issues.apache.org/jira/browse/CSV-247
 Project: Commons CSV
  Issue Type: Bug
Affects Versions: 1.7
Reporter: Alex D Herbert


If the settings are not allowing empty columns headers you can currently use a 
single empty header. This is because column headers are only checked for empty 
when they are duplicates. So it is the second empty header (the first 
duplicate) that raises an error. This test should pass but does not:
{code:java}
@Test(expected = IllegalArgumentException.class)
public void testHeadersMissingOneColumnException() throws Exception {
    final Reader in = new StringReader("a,,c,d\n1,2,3,4\nx,y,z,zz");    
CSVFormat.DEFAULT.withHeader().parse(in).iterator(); 
}
{code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Comment Edited] (DBCP-547) Add a ConnectionFactory Interface in BasicDataSource class

2019-07-03 Thread Lee Jun Gyun (JIRA)


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

Lee Jun Gyun edited comment on DBCP-547 at 7/3/19 7:16 AM:
---

I raise the PR https://github.com/apache/commons-dbcp/pull/33


was (Author: simple):
I raise the PR https://github.com/apache/commons-dbcp/pull/32

> Add a ConnectionFactory Interface in BasicDataSource class
> --
>
> Key: DBCP-547
> URL: https://issues.apache.org/jira/browse/DBCP-547
> Project: Commons DBCP
>  Issue Type: Improvement
>Affects Versions: 2.2.0
>Reporter: Lee Jun Gyun
>Priority: Minor
>  Time Spent: 50m
>  Remaining Estimate: 0h
>
> It think it would be nice better to implement a ConnectionFactory interface 
> in BasicDataSource class or implement a interface in DriverConnectionFactory 
> class.
> In my current project, when getting a connection in my program, I call 
> oracleSetModule.
> so, i think that after creating connection, call oracleSetModule via 
> connectionFactoryImpl seems to be nice.
>   
> [Before]
> protected ConnectionFactory createConnectionFactory() throws SQLException {
> ...
> ...
> ConnectionFactory driverConnectionFactory =
>  new DriverConnectionFactory(driverToUse, url, connectionProperties);
>  return driverConnectionFactory;
>  }
> [After]
> protected ConnectionFactory createConnectionFactory() throws SQLException {
> ...
> ...
> ConnectionFactory driverConnectionFactory =
> getConnectionFactoryImpl().newInstance(...);
> return driverConnectionFactory;
> }
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Work logged] (DBCP-547) Add a ConnectionFactory Interface in BasicDataSource class

2019-07-03 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/DBCP-547?focusedWorklogId=271442&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-271442
 ]

ASF GitHub Bot logged work on DBCP-547:
---

Author: ASF GitHub Bot
Created on: 03/Jul/19 07:15
Start Date: 03/Jul/19 07:15
Worklog Time Spent: 10m 
  Work Description: leechoongyon commented on pull request #33: [DBCP-547] 
Add a ConnectionFactory interface in BasicDataSource.createConnectionFactory()
URL: https://github.com/apache/commons-dbcp/pull/33
 
 
   [DBCP-547] Add a ConnectionFactory interface in 
BasicDataSource.createConnectionFactory()
   
   I think it would be nice better to implement a ConnectionFactory interface 
in BasicDataSource class.
   
   In my current project, when getting a connection in my program, I call 
oracleSetModule.
   so, i think that after creating connection, call oracleSetModule via 
connectionFactoryImpl seems to be nice.
   
   This reduces the cost of calling oracleSetModule when calling 
BasicDataSource.getConnection().
 

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: 271442)
Time Spent: 50m  (was: 40m)

> Add a ConnectionFactory Interface in BasicDataSource class
> --
>
> Key: DBCP-547
> URL: https://issues.apache.org/jira/browse/DBCP-547
> Project: Commons DBCP
>  Issue Type: Improvement
>Affects Versions: 2.2.0
>Reporter: Lee Jun Gyun
>Priority: Minor
>  Time Spent: 50m
>  Remaining Estimate: 0h
>
> It think it would be nice better to implement a ConnectionFactory interface 
> in BasicDataSource class or implement a interface in DriverConnectionFactory 
> class.
> In my current project, when getting a connection in my program, I call 
> oracleSetModule.
> so, i think that after creating connection, call oracleSetModule via 
> connectionFactoryImpl seems to be nice.
>   
> [Before]
> protected ConnectionFactory createConnectionFactory() throws SQLException {
> ...
> ...
> ConnectionFactory driverConnectionFactory =
>  new DriverConnectionFactory(driverToUse, url, connectionProperties);
>  return driverConnectionFactory;
>  }
> [After]
> protected ConnectionFactory createConnectionFactory() throws SQLException {
> ...
> ...
> ConnectionFactory driverConnectionFactory =
> getConnectionFactoryImpl().newInstance(...);
> return driverConnectionFactory;
> }
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[GitHub] [commons-dbcp] leechoongyon opened a new pull request #33: [DBCP-547] Add a ConnectionFactory interface in BasicDataSource.createConnectionFactory()

2019-07-03 Thread GitBox
leechoongyon opened a new pull request #33: [DBCP-547] Add a ConnectionFactory 
interface in BasicDataSource.createConnectionFactory()
URL: https://github.com/apache/commons-dbcp/pull/33
 
 
   [DBCP-547] Add a ConnectionFactory interface in 
BasicDataSource.createConnectionFactory()
   
   I think it would be nice better to implement a ConnectionFactory interface 
in BasicDataSource class.
   
   In my current project, when getting a connection in my program, I call 
oracleSetModule.
   so, i think that after creating connection, call oracleSetModule via 
connectionFactoryImpl seems to be nice.
   
   This reduces the cost of calling oracleSetModule when calling 
BasicDataSource.getConnection().


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


With regards,
Apache Git Services


[jira] [Work logged] (DBCP-547) Add a ConnectionFactory Interface in BasicDataSource class

2019-07-03 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/DBCP-547?focusedWorklogId=271438&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-271438
 ]

ASF GitHub Bot logged work on DBCP-547:
---

Author: ASF GitHub Bot
Created on: 03/Jul/19 07:11
Start Date: 03/Jul/19 07:11
Worklog Time Spent: 10m 
  Work Description: leechoongyon commented on pull request #32: [DBCP-547] 
Add a ConnectionFactory interface in BasicDataSource.createConnectionFactory()
URL: https://github.com/apache/commons-dbcp/pull/32
 
 
   
 

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: 271438)
Time Spent: 40m  (was: 0.5h)

> Add a ConnectionFactory Interface in BasicDataSource class
> --
>
> Key: DBCP-547
> URL: https://issues.apache.org/jira/browse/DBCP-547
> Project: Commons DBCP
>  Issue Type: Improvement
>Affects Versions: 2.2.0
>Reporter: Lee Jun Gyun
>Priority: Minor
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> It think it would be nice better to implement a ConnectionFactory interface 
> in BasicDataSource class or implement a interface in DriverConnectionFactory 
> class.
> In my current project, when getting a connection in my program, I call 
> oracleSetModule.
> so, i think that after creating connection, call oracleSetModule via 
> connectionFactoryImpl seems to be nice.
>   
> [Before]
> protected ConnectionFactory createConnectionFactory() throws SQLException {
> ...
> ...
> ConnectionFactory driverConnectionFactory =
>  new DriverConnectionFactory(driverToUse, url, connectionProperties);
>  return driverConnectionFactory;
>  }
> [After]
> protected ConnectionFactory createConnectionFactory() throws SQLException {
> ...
> ...
> ConnectionFactory driverConnectionFactory =
> getConnectionFactoryImpl().newInstance(...);
> return driverConnectionFactory;
> }
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Work logged] (DBCP-547) Add a ConnectionFactory Interface in BasicDataSource class

2019-07-03 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/DBCP-547?focusedWorklogId=271435&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-271435
 ]

ASF GitHub Bot logged work on DBCP-547:
---

Author: ASF GitHub Bot
Created on: 03/Jul/19 07:10
Start Date: 03/Jul/19 07:10
Worklog Time Spent: 10m 
  Work Description: leechoongyon commented on pull request #32: [DBCP-547] 
Add a ConnectionFactory interface in BasicDataSource.createConnectionFactory()
URL: https://github.com/apache/commons-dbcp/pull/32
 
 
   
 

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: 271435)
Time Spent: 20m  (was: 10m)

> Add a ConnectionFactory Interface in BasicDataSource class
> --
>
> Key: DBCP-547
> URL: https://issues.apache.org/jira/browse/DBCP-547
> Project: Commons DBCP
>  Issue Type: Improvement
>Affects Versions: 2.2.0
>Reporter: Lee Jun Gyun
>Priority: Minor
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> It think it would be nice better to implement a ConnectionFactory interface 
> in BasicDataSource class or implement a interface in DriverConnectionFactory 
> class.
> In my current project, when getting a connection in my program, I call 
> oracleSetModule.
> so, i think that after creating connection, call oracleSetModule via 
> connectionFactoryImpl seems to be nice.
>   
> [Before]
> protected ConnectionFactory createConnectionFactory() throws SQLException {
> ...
> ...
> ConnectionFactory driverConnectionFactory =
>  new DriverConnectionFactory(driverToUse, url, connectionProperties);
>  return driverConnectionFactory;
>  }
> [After]
> protected ConnectionFactory createConnectionFactory() throws SQLException {
> ...
> ...
> ConnectionFactory driverConnectionFactory =
> getConnectionFactoryImpl().newInstance(...);
> return driverConnectionFactory;
> }
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Work logged] (DBCP-547) Add a ConnectionFactory Interface in BasicDataSource class

2019-07-03 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/DBCP-547?focusedWorklogId=271436&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-271436
 ]

ASF GitHub Bot logged work on DBCP-547:
---

Author: ASF GitHub Bot
Created on: 03/Jul/19 07:10
Start Date: 03/Jul/19 07:10
Worklog Time Spent: 10m 
  Work Description: leechoongyon commented on pull request #32: [DBCP-547] 
Add a ConnectionFactory interface in BasicDataSource.createConnectionFactory()
URL: https://github.com/apache/commons-dbcp/pull/32
 
 
   [DBCP-547] Add a ConnectionFactory interface in 
BasicDataSource.createConnectionFactory()
   
   I think it would be nice better to implement a ConnectionFactory interface 
in BasicDataSource class. 
   
   In my current project, when getting a connection in my program, I call 
oracleSetModule.
   so, i think that after creating connection, call oracleSetModule via 
connectionFactoryImpl seems to be nice.
   
   This reduces the cost of calling oracleSetModule when calling 
BasicDataSource.getConnection().
 

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: 271436)
Time Spent: 0.5h  (was: 20m)

> Add a ConnectionFactory Interface in BasicDataSource class
> --
>
> Key: DBCP-547
> URL: https://issues.apache.org/jira/browse/DBCP-547
> Project: Commons DBCP
>  Issue Type: Improvement
>Affects Versions: 2.2.0
>Reporter: Lee Jun Gyun
>Priority: Minor
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> It think it would be nice better to implement a ConnectionFactory interface 
> in BasicDataSource class or implement a interface in DriverConnectionFactory 
> class.
> In my current project, when getting a connection in my program, I call 
> oracleSetModule.
> so, i think that after creating connection, call oracleSetModule via 
> connectionFactoryImpl seems to be nice.
>   
> [Before]
> protected ConnectionFactory createConnectionFactory() throws SQLException {
> ...
> ...
> ConnectionFactory driverConnectionFactory =
>  new DriverConnectionFactory(driverToUse, url, connectionProperties);
>  return driverConnectionFactory;
>  }
> [After]
> protected ConnectionFactory createConnectionFactory() throws SQLException {
> ...
> ...
> ConnectionFactory driverConnectionFactory =
> getConnectionFactoryImpl().newInstance(...);
> return driverConnectionFactory;
> }
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[GitHub] [commons-dbcp] leechoongyon closed pull request #32: [DBCP-547] Add a ConnectionFactory interface in BasicDataSource.createConnectionFactory()

2019-07-03 Thread GitBox
leechoongyon closed pull request #32: [DBCP-547] Add a ConnectionFactory 
interface in BasicDataSource.createConnectionFactory()
URL: https://github.com/apache/commons-dbcp/pull/32
 
 
   


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


With regards,
Apache Git Services


[GitHub] [commons-dbcp] leechoongyon opened a new pull request #32: [DBCP-547] Add a ConnectionFactory interface in BasicDataSource.createConnectionFactory()

2019-07-03 Thread GitBox
leechoongyon opened a new pull request #32: [DBCP-547] Add a ConnectionFactory 
interface in BasicDataSource.createConnectionFactory()
URL: https://github.com/apache/commons-dbcp/pull/32
 
 
   [DBCP-547] Add a ConnectionFactory interface in 
BasicDataSource.createConnectionFactory()
   
   I think it would be nice better to implement a ConnectionFactory interface 
in BasicDataSource class. 
   
   In my current project, when getting a connection in my program, I call 
oracleSetModule.
   so, i think that after creating connection, call oracleSetModule via 
connectionFactoryImpl seems to be nice.
   
   This reduces the cost of calling oracleSetModule when calling 
BasicDataSource.getConnection().


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


With regards,
Apache Git Services


[GitHub] [commons-dbcp] leechoongyon closed pull request #32: [DBCP-547] Add a ConnectionFactory interface in BasicDataSource.createConnectionFactory()

2019-07-03 Thread GitBox
leechoongyon closed pull request #32: [DBCP-547] Add a ConnectionFactory 
interface in BasicDataSource.createConnectionFactory()
URL: https://github.com/apache/commons-dbcp/pull/32
 
 
   


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


With regards,
Apache Git Services