[jira] [Updated] (DBCP-533) tomcat register MBean of BasicDataSource with jmxName , appear InstanceAlreadyExistsException

2018-12-20 Thread Chengkun Li (JIRA)


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

Chengkun Li updated DBCP-533:
-
Attachment: (was: 20181221101406115.png)

> tomcat register MBean of BasicDataSource with jmxName , appear 
> InstanceAlreadyExistsException
> -
>
> Key: DBCP-533
> URL: https://issues.apache.org/jira/browse/DBCP-533
> Project: Commons DBCP
>  Issue Type: Bug
>Affects Versions: 2.0
> Environment: tomcat 8.5.32 
>Reporter: Chengkun Li
>Priority: Major
>  Labels: InstanceAlreadyExistsException, jmxName
>
> We use DBCP2 as GlobalNamingResources in tomcat and I need monitoring  
> connection of DBCP2 ,but does not find how to use JMX in  
> [http://commons.apache.org/proper/commons-dbcp/configuration.html]
> through reading the source code ,i find jmxName properties in 
> BasicDataSourceFactory ,when I add the setting like 
> jmxName="org.apache.dbcp:DataSource=mydb" in server.xml , there is 
> javax.management.InstanceAlreadyExistsException: 
> org.apache.dbcp:DataSource=mysqldb when I start up tomcat.
> after I debug the code , i find that DBCP have registered the Mbean in 
> BasicDataSource with jmxName (BasicDataSource line 2390).
> {code:java}
> // code placeholder
> private void jmxRegister() {
> // Return immediately if no JMX name has been specified
> final String requestedName = getJmxName();
> if (requestedName == null) {
> return;
> }
> try {
> ObjectNameWrapper.wrap(requestedName).registerMBean(this);
> } catch (final MalformedObjectNameException e) {
> log.warn("The requested JMX name [" + requestedName + "] was not 
> valid and will be ignored.");
> }
> }
> {code}
>  
> but tomcat will  register the Component in the startup lifecycle , tomcat 
> will use the BasicDataSource's preRegister method to get the same Mbean name, 
> because BasicDataSource  implements MBeanRegistration.
> {code:java}
> // code placeholder
> if (("javax.sql.DataSource".equals(ref.getClassName())  ||
> "javax.sql.XADataSource".equals(ref.getClassName())) &&
> resource.getSingleton()) {
> try {
> ObjectName on = createObjectName(resource);
> Object actualResource = envCtx.lookup(resource.getName());
> Registry.getRegistry(null, null).registerComponent(actualResource, 
> on, null);
> objectNames.put(resource.getName(), on);
> } catch (Exception e) {
> log.warn(sm.getString("naming.jmxRegistrationFailed", e));
> }
> }
> {code}
> DBCP will register the MBean first ,but when tomcat register it will throw 
> the InstanceAlreadyExistsException
> BUT i'm not certain that it's a bug or I use it wrong



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


[jira] [Updated] (DBCP-533) tomcat register MBean of BasicDataSource with jmxName , appear InstanceAlreadyExistsException

2018-12-20 Thread Chengkun Li (JIRA)


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

Chengkun Li updated DBCP-533:
-
Description: 
We use DBCP2 as GlobalNamingResources in tomcat and I need monitoring  
connection of DBCP2 ,but does not find how to use JMX in  
[http://commons.apache.org/proper/commons-dbcp/configuration.html]

through reading the source code ,i find jmxName properties in 

BasicDataSourceFactory ,when I add the setting like 

jmxName="org.apache.dbcp:DataSource=mydb" in server.xml , there is 
javax.management.InstanceAlreadyExistsException: 
org.apache.dbcp:DataSource=mysqldb when I start up tomcat.

after I debug the code , i find that DBCP have registered the Mbean in 
BasicDataSource with jmxName (BasicDataSource line 2390).
{code:java}
// code placeholder
private void jmxRegister() {
// Return immediately if no JMX name has been specified
final String requestedName = getJmxName();
if (requestedName == null) {
return;
}
try {
ObjectNameWrapper.wrap(requestedName).registerMBean(this);
} catch (final MalformedObjectNameException e) {
log.warn("The requested JMX name [" + requestedName + "] was not valid 
and will be ignored.");
}
}
{code}
 

but tomcat will  register the Component in the startup lifecycle , tomcat will 
use the BasicDataSource's preRegister method to get the same Mbean name, 
because BasicDataSource  implements MBeanRegistration.
{code:java}
// code placeholder
if (("javax.sql.DataSource".equals(ref.getClassName())  ||
"javax.sql.XADataSource".equals(ref.getClassName())) &&
resource.getSingleton()) {
try {
ObjectName on = createObjectName(resource);
Object actualResource = envCtx.lookup(resource.getName());
Registry.getRegistry(null, null).registerComponent(actualResource, on, 
null);
objectNames.put(resource.getName(), on);
} catch (Exception e) {
log.warn(sm.getString("naming.jmxRegistrationFailed", e));
}
}
{code}
DBCP will register the MBean first ,but when tomcat register it will throw the 
InstanceAlreadyExistsException

BUT i'm not certain that it's a bug or I use it wrong

  was:
We use DBCP2 as GlobalNamingResources in tomcat and I need monitoring  
connection of DBCP2 ,but does not find how to use JMX in  
[http://commons.apache.org/proper/commons-dbcp/configuration.html]

through reading the source code ,i find jmxName properties in 

BasicDataSourceFactory ,when I add the setting like 

jmxName="org.apache.dbcp:DataSource=mydb" in server.xml , there is 
javax.management.InstanceAlreadyExistsException: 
org.apache.dbcp:DataSource=mysqldb when I start up tomcat.

after I debug the code , i find that DBCP have registered the Mbean in 
BasicDataSource with jmxName (BasicDataSource line 2390).
{code:java}
// code placeholder
private void jmxRegister() {
// Return immediately if no JMX name has been specified
final String requestedName = getJmxName();
if (requestedName == null) {
return;
}
try {
ObjectNameWrapper.wrap(requestedName).registerMBean(this);
} catch (final MalformedObjectNameException e) {
log.warn("The requested JMX name [" + requestedName + "] was not valid 
and will be ignored.");
}
}
{code}
 

but tomcat will  register the Component in the startup lifecycle , tomcat will 
use the BasicDataSource's preRegister method to get the same Mbean name, 
because BasicDataSource  implements MBeanRegistration.
{code:java}
// code placeholder
if (("javax.sql.DataSource".equals(ref.getClassName())  ||
"javax.sql.XADataSource".equals(ref.getClassName())) &&
resource.getSingleton()) {
try {
ObjectName on = createObjectName(resource);
Object actualResource = envCtx.lookup(resource.getName());
Registry.getRegistry(null, null).registerComponent(actualResource, on, 
null);
objectNames.put(resource.getName(), on);
} catch (Exception e) {
log.warn(sm.getString("naming.jmxRegistrationFailed", e));
}
}
{code}
DBCP will register the MBean first ,but when tomcat register it will throw the 
Exp

BUT i'm not certain that it's a bug or I use it wrong


> tomcat register MBean of BasicDataSource with jmxName , appear 
> InstanceAlreadyExistsException
> -
>
> Key: DBCP-533
> URL: https://issues.apache.org/jira/browse/DBCP-533
> Project: Commons DBCP
>  Issue Type: Bug
>Affects Versions: 2.0
> Environment: tomcat 8.5.32 
>Reporter: Chengkun Li
>Priority: Major
>  Labels: InstanceAlreadyExistsException, jmxName
>
> We use DBCP2 as GlobalNamingResources in tomcat and I need monitoring  
> connection of DBCP2 ,but does not find how to use JMX in  
> 

[jira] [Updated] (DBCP-533) tomcat register MBean of BasicDataSource with jmxName , appear InstanceAlreadyExistsException

2018-12-20 Thread Chengkun Li (JIRA)


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

Chengkun Li updated DBCP-533:
-
Attachment: (was: 20181221101456927.png)

> tomcat register MBean of BasicDataSource with jmxName , appear 
> InstanceAlreadyExistsException
> -
>
> Key: DBCP-533
> URL: https://issues.apache.org/jira/browse/DBCP-533
> Project: Commons DBCP
>  Issue Type: Bug
>Affects Versions: 2.0
> Environment: tomcat 8.5.32 
>Reporter: Chengkun Li
>Priority: Major
>  Labels: InstanceAlreadyExistsException, jmxName
>
> We use DBCP2 as GlobalNamingResources in tomcat and I need monitoring  
> connection of DBCP2 ,but does not find how to use JMX in  
> [http://commons.apache.org/proper/commons-dbcp/configuration.html]
> through reading the source code ,i find jmxName properties in 
> BasicDataSourceFactory ,when I add the setting like 
> jmxName="org.apache.dbcp:DataSource=mydb" in server.xml , there is 
> javax.management.InstanceAlreadyExistsException: 
> org.apache.dbcp:DataSource=mysqldb when I start up tomcat.
> after I debug the code , i find that DBCP have registered the Mbean in 
> BasicDataSource with jmxName (BasicDataSource line 2390).
> {code:java}
> // code placeholder
> private void jmxRegister() {
> // Return immediately if no JMX name has been specified
> final String requestedName = getJmxName();
> if (requestedName == null) {
> return;
> }
> try {
> ObjectNameWrapper.wrap(requestedName).registerMBean(this);
> } catch (final MalformedObjectNameException e) {
> log.warn("The requested JMX name [" + requestedName + "] was not 
> valid and will be ignored.");
> }
> }
> {code}
>  
> but tomcat will  register the Component in the startup lifecycle , tomcat 
> will use the BasicDataSource's preRegister method to get the same Mbean name, 
> because BasicDataSource  implements MBeanRegistration.
> {code:java}
> // code placeholder
> if (("javax.sql.DataSource".equals(ref.getClassName())  ||
> "javax.sql.XADataSource".equals(ref.getClassName())) &&
> resource.getSingleton()) {
> try {
> ObjectName on = createObjectName(resource);
> Object actualResource = envCtx.lookup(resource.getName());
> Registry.getRegistry(null, null).registerComponent(actualResource, 
> on, null);
> objectNames.put(resource.getName(), on);
> } catch (Exception e) {
> log.warn(sm.getString("naming.jmxRegistrationFailed", e));
> }
> }
> {code}
> DBCP will register the MBean first ,but when tomcat register it will throw 
> the InstanceAlreadyExistsException
> BUT i'm not certain that it's a bug or I use it wrong



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


[jira] [Updated] (DBCP-533) tomcat register MBean of BasicDataSource with jmxName , appear InstanceAlreadyExistsException

2018-12-20 Thread Chengkun Li (JIRA)


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

Chengkun Li updated DBCP-533:
-
Description: 
We use DBCP2 as GlobalNamingResources in tomcat and I need monitoring  
connection of DBCP2 ,but does not find how to use JMX in  
[http://commons.apache.org/proper/commons-dbcp/configuration.html]

through reading the source code ,i find jmxName properties in 

BasicDataSourceFactory ,when I add the setting like 

jmxName="org.apache.dbcp:DataSource=mydb" in server.xml , there is 
javax.management.InstanceAlreadyExistsException: 
org.apache.dbcp:DataSource=mysqldb when I start up tomcat.

after I debug the code , i find that DBCP have registered the Mbean in 
BasicDataSource with jmxName (BasicDataSource line 2390).
{code:java}
// code placeholder
private void jmxRegister() {
// Return immediately if no JMX name has been specified
final String requestedName = getJmxName();
if (requestedName == null) {
return;
}
try {
ObjectNameWrapper.wrap(requestedName).registerMBean(this);
} catch (final MalformedObjectNameException e) {
log.warn("The requested JMX name [" + requestedName + "] was not valid 
and will be ignored.");
}
}
{code}
 

but tomcat will  register the Component in the startup lifecycle , tomcat will 
use the BasicDataSource's preRegister method to get the same Mbean name, 
because BasicDataSource  implements MBeanRegistration.
{code:java}
// code placeholder
if (("javax.sql.DataSource".equals(ref.getClassName())  ||
"javax.sql.XADataSource".equals(ref.getClassName())) &&
resource.getSingleton()) {
try {
ObjectName on = createObjectName(resource);
Object actualResource = envCtx.lookup(resource.getName());
Registry.getRegistry(null, null).registerComponent(actualResource, on, 
null);
objectNames.put(resource.getName(), on);
} catch (Exception e) {
log.warn(sm.getString("naming.jmxRegistrationFailed", e));
}
}
{code}
DBCP will register the MBean first ,but when tomcat register it will throw the 
Exp

BUT i'm not certain that it's a bug or I use it wrong

  was:
We use DBCP2 as GlobalNamingResources in tomcat and I need monitoring  
connection of DBCP2 ,but does not find how to use JMX in  
[http://commons.apache.org/proper/commons-dbcp/configuration.html]

through reading the source code ,i find jmxName properties in 

BasicDataSourceFactory ,when I add the setting like 

jmxName="org.apache.dbcp:DataSource=mydb" in server.xml , there is 
javax.management.InstanceAlreadyExistsException: 
org.apache.dbcp:DataSource=mysqldb when I start up tomcat.

after I debug the code , i find that DBCP have registered the Mbean in 
BasicDataSource with jmxName (BasicDataSource line 2390).
{code:java}
// code placeholder
private void jmxRegister() {
// Return immediately if no JMX name has been specified
final String requestedName = getJmxName();
if (requestedName == null) {
return;
}
try {
ObjectNameWrapper.wrap(requestedName).registerMBean(this);
} catch (final MalformedObjectNameException e) {
log.warn("The requested JMX name [" + requestedName + "] was not valid 
and will be ignored.");
}
}
{code}
 

but tomcat will  register the Component in the startup lifecycle , tomcat will 
use the BasicDataSource's preRegister method to get the same Mbean name, 
because BasicDataSource  implements MBeanRegistration.
{code:java}
// code placeholder
if (("javax.sql.DataSource".equals(ref.getClassName())  ||
"javax.sql.XADataSource".equals(ref.getClassName())) &&
resource.getSingleton()) {
try {
ObjectName on = createObjectName(resource);
Object actualResource = envCtx.lookup(resource.getName());
Registry.getRegistry(null, null).registerComponent(actualResource, on, 
null);
objectNames.put(resource.getName(), on);
} catch (Exception e) {
log.warn(sm.getString("naming.jmxRegistrationFailed", e));
}
}
{code}
so when 

BUT i'm not certain that it's a bug or I use it wrong


> tomcat register MBean of BasicDataSource with jmxName , appear 
> InstanceAlreadyExistsException
> -
>
> Key: DBCP-533
> URL: https://issues.apache.org/jira/browse/DBCP-533
> Project: Commons DBCP
>  Issue Type: Bug
>Affects Versions: 2.0
> Environment: tomcat 8.5.32 
>Reporter: Chengkun Li
>Priority: Major
>  Labels: InstanceAlreadyExistsException, jmxName
> Attachments: 20181221101406115.png, 20181221101456927.png
>
>
> We use DBCP2 as GlobalNamingResources in tomcat and I need monitoring  
> connection of DBCP2 ,but does not find how to use JMX in  
> [http://commons.apache.org/proper/commons-dbcp/configuration.html]
> through 

[jira] [Updated] (DBCP-533) tomcat register MBean of BasicDataSource with jmxName , appear InstanceAlreadyExistsException

2018-12-20 Thread Chengkun Li (JIRA)


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

Chengkun Li updated DBCP-533:
-
Description: 
We use DBCP2 as GlobalNamingResources in tomcat and I need monitoring  
connection of DBCP2 ,but does not find how to use JMX in  
[http://commons.apache.org/proper/commons-dbcp/configuration.html]

through reading the source code ,i find jmxName properties in 

BasicDataSourceFactory ,when I add the setting like 

jmxName="org.apache.dbcp:DataSource=mydb" in server.xml , there is 
javax.management.InstanceAlreadyExistsException: 
org.apache.dbcp:DataSource=mysqldb when I start up tomcat.

after I debug the code , i find that DBCP have registered the Mbean in 
BasicDataSource with jmxName (BasicDataSource line 2390).
{code:java}
// code placeholder
private void jmxRegister() {
// Return immediately if no JMX name has been specified
final String requestedName = getJmxName();
if (requestedName == null) {
return;
}
try {
ObjectNameWrapper.wrap(requestedName).registerMBean(this);
} catch (final MalformedObjectNameException e) {
log.warn("The requested JMX name [" + requestedName + "] was not valid 
and will be ignored.");
}
}
{code}
 

but tomcat will  register the Component in the startup lifecycle , tomcat will 
use the BasicDataSource's preRegister method to get the same Mbean name, 
because BasicDataSource  implements MBeanRegistration.
{code:java}
// code placeholder
if (("javax.sql.DataSource".equals(ref.getClassName())  ||
"javax.sql.XADataSource".equals(ref.getClassName())) &&
resource.getSingleton()) {
try {
ObjectName on = createObjectName(resource);
Object actualResource = envCtx.lookup(resource.getName());
Registry.getRegistry(null, null).registerComponent(actualResource, on, 
null);
objectNames.put(resource.getName(), on);
} catch (Exception e) {
log.warn(sm.getString("naming.jmxRegistrationFailed", e));
}
}
{code}
so when 

BUT i'm not certain that it's a bug or I use it wrong

  was:
I need monitoring connection of DBCP2 in tomcat ,but does not find how to use 
JMX in  [http://commons.apache.org/proper/commons-dbcp/configuration.html]

through reading the source code ,i find jmxName properties in 

BasicDataSourceFactory ,when I add the setting like 

jmxName="org.apache.dbcp:DataSource=mydb" in server.xml , there is 
javax.management.InstanceAlreadyExistsException: 
org.apache.dbcp:DataSource=mysqldb

when I start up tomcat.

after I debug the code , i find that DBCP have registered the Mbean in 
BasicDataSource with jmxName (BasicDataSource line 2390)  ,but tomcat will  
register the Component in the startup lifecycle , tomcat will use the 
BasicDataSource's preRegister method to get the same Mbean name, because 
BasicDataSource  implements MBeanRegistration.

BUT i'm not certain that it's a bug or I use it wrong


> tomcat register MBean of BasicDataSource with jmxName , appear 
> InstanceAlreadyExistsException
> -
>
> Key: DBCP-533
> URL: https://issues.apache.org/jira/browse/DBCP-533
> Project: Commons DBCP
>  Issue Type: Bug
>Affects Versions: 2.0
> Environment: tomcat 8.5.32 
>Reporter: Chengkun Li
>Priority: Major
>  Labels: InstanceAlreadyExistsException, jmxName
> Attachments: 20181221101406115.png, 20181221101456927.png
>
>
> We use DBCP2 as GlobalNamingResources in tomcat and I need monitoring  
> connection of DBCP2 ,but does not find how to use JMX in  
> [http://commons.apache.org/proper/commons-dbcp/configuration.html]
> through reading the source code ,i find jmxName properties in 
> BasicDataSourceFactory ,when I add the setting like 
> jmxName="org.apache.dbcp:DataSource=mydb" in server.xml , there is 
> javax.management.InstanceAlreadyExistsException: 
> org.apache.dbcp:DataSource=mysqldb when I start up tomcat.
> after I debug the code , i find that DBCP have registered the Mbean in 
> BasicDataSource with jmxName (BasicDataSource line 2390).
> {code:java}
> // code placeholder
> private void jmxRegister() {
> // Return immediately if no JMX name has been specified
> final String requestedName = getJmxName();
> if (requestedName == null) {
> return;
> }
> try {
> ObjectNameWrapper.wrap(requestedName).registerMBean(this);
> } catch (final MalformedObjectNameException e) {
> log.warn("The requested JMX name [" + requestedName + "] was not 
> valid and will be ignored.");
> }
> }
> {code}
>  
> but tomcat will  register the Component in the startup lifecycle , tomcat 
> will use the BasicDataSource's preRegister method to get the same Mbean name, 
> because BasicDataSource  implements MBeanRegistration.
> 

[jira] [Commented] (GEOMETRY-31) Standardize Method Names with commons-numbers

2018-12-20 Thread Matt Juntunen (JIRA)


[ 
https://issues.apache.org/jira/browse/GEOMETRY-31?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16726388#comment-16726388
 ] 

Matt Juntunen commented on GEOMETRY-31:
---

If we're going for brevity, should we use {{dot}} instead of {{dotProduct}} and 
{{cross}} instead of {{crossProduct}}? There's a good chance I'm overthinking 
this but I feel like it's still good to ask.

> Standardize Method Names with commons-numbers
> -
>
> Key: GEOMETRY-31
> URL: https://issues.apache.org/jira/browse/GEOMETRY-31
> Project: Apache Commons Geometry
>  Issue Type: Task
>Reporter: Matt Juntunen
>Priority: Major
>
> There are many general operations that are common between classes in 
> commons-numbers and commons-geometry but that use different method names. The 
> table below captures these discrepancies (at least the ones I've found) and 
> the name that I think we should standardize on.
> ||commons-numbers||commons-geometry||suggested standard||
> |norm()|getNorm()|norm()|
> |normSq()|getNormSq()|normSq()|
> |inverse()|getInverse()|inverse()|
> |multiply(double)|scalarMultiply(double)|multiply(double)|
>  
>  
>  



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


[jira] [Created] (DBCP-533) tomcat register MBean of BasicDataSource with jmxName , appear InstanceAlreadyExistsException

2018-12-20 Thread Chengkun Li (JIRA)
Chengkun Li created DBCP-533:


 Summary: tomcat register MBean of BasicDataSource with jmxName , 
appear InstanceAlreadyExistsException
 Key: DBCP-533
 URL: https://issues.apache.org/jira/browse/DBCP-533
 Project: Commons DBCP
  Issue Type: Bug
Affects Versions: 2.0
 Environment: tomcat 8.5.32 
Reporter: Chengkun Li
 Attachments: 20181221101406115.png, 20181221101456927.png

I need monitoring connection of DBCP2 in tomcat ,but does not find how to use 
JMX in  [http://commons.apache.org/proper/commons-dbcp/configuration.html]

through reading the source code ,i find jmxName properties in 

BasicDataSourceFactory ,when I add the setting like 

jmxName="org.apache.dbcp:DataSource=mydb" in server.xml , there is 
javax.management.InstanceAlreadyExistsException: 
org.apache.dbcp:DataSource=mysqldb

when I start up tomcat.

after I debug the code , i find that DBCP have registered the Mbean in 
BasicDataSource with jmxName (BasicDataSource line 2390)  ,but tomcat will  
register the Component in the startup lifecycle , tomcat will use the 
BasicDataSource's preRegister method to get the same Mbean name, because 
BasicDataSource  implements MBeanRegistration.

BUT i'm not certain that it's a bug or I use it wrong



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


[jira] [Work logged] (NUMBERS-86) Slerp Unit Tests

2018-12-20 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot logged work on NUMBERS-86:
-

Author: ASF GitHub Bot
Created on: 21/Dec/18 02:11
Start Date: 21/Dec/18 02:11
Worklog Time Spent: 10m 
  Work Description: coveralls commented on issue #23: NUMBERS-86: Adding 
Slerp Unit Tests
URL: https://github.com/apache/commons-numbers/pull/23#issuecomment-449216820
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/20752091/badge)](https://coveralls.io/builds/20752091)
   
   Coverage increased (+1.0%) to 92.866% when pulling 
**9c36ca0ed72308710f1c388297e8fee3955908a3 on darkma773r:numbers-86** into 
**acbe5add1095e753dd176c9fd60c3cdc7fea0e43 on apache:master**.
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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: 177855)
Time Spent: 20m  (was: 10m)

> Slerp Unit Tests
> 
>
> Key: NUMBERS-86
> URL: https://issues.apache.org/jira/browse/NUMBERS-86
> Project: Commons Numbers
>  Issue Type: Test
>Reporter: Matt Juntunen
>Priority: Major
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> {{Slerp}} needs unit tests. There are tests in commons-geometry but they rely 
> on {{Vector3D}}. We need to port those tests or write new ones.
>  
> Pull request: https://github.com/apache/commons-numbers/pull/23



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


[jira] [Updated] (NUMBERS-86) Slerp Unit Tests

2018-12-20 Thread Matt Juntunen (JIRA)


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

Matt Juntunen updated NUMBERS-86:
-
Description: 
{{Slerp}} needs unit tests. There are tests in commons-geometry but they rely 
on {{Vector3D}}. We need to port those tests or write new ones.

 

Pull request: https://github.com/apache/commons-numbers/pull/23

  was:{{Slerp}} needs unit tests. There are tests in commons-geometry but they 
rely on {{Vector3D}}. We need to port those tests or write new ones.


> Slerp Unit Tests
> 
>
> Key: NUMBERS-86
> URL: https://issues.apache.org/jira/browse/NUMBERS-86
> Project: Commons Numbers
>  Issue Type: Test
>Reporter: Matt Juntunen
>Priority: Major
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> {{Slerp}} needs unit tests. There are tests in commons-geometry but they rely 
> on {{Vector3D}}. We need to port those tests or write new ones.
>  
> Pull request: https://github.com/apache/commons-numbers/pull/23



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


[jira] [Work logged] (NUMBERS-86) Slerp Unit Tests

2018-12-20 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot logged work on NUMBERS-86:
-

Author: ASF GitHub Bot
Created on: 21/Dec/18 02:04
Start Date: 21/Dec/18 02:04
Worklog Time Spent: 10m 
  Work Description: darkma773r opened a new pull request #23: NUMBERS-86: 
Adding Slerp Unit Tests
URL: https://github.com/apache/commons-numbers/pull/23
 
 
   Adding Slerp unit tests and fixing issue with non-positive-polar-form 
quaternion returned for slerp end point in some cases.


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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: 177854)
Time Spent: 10m
Remaining Estimate: 0h

> Slerp Unit Tests
> 
>
> Key: NUMBERS-86
> URL: https://issues.apache.org/jira/browse/NUMBERS-86
> Project: Commons Numbers
>  Issue Type: Test
>Reporter: Matt Juntunen
>Priority: Major
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> {{Slerp}} needs unit tests. There are tests in commons-geometry but they rely 
> on {{Vector3D}}. We need to port those tests or write new ones.



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


[jira] [Commented] (COMPRESS-476) Is there a plan in commons compress project to support extracting tars contains sparse file?

2018-12-20 Thread Kaile Wu (JIRA)


[ 
https://issues.apache.org/jira/browse/COMPRESS-476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16726359#comment-16726359
 ] 

Kaile Wu commented on COMPRESS-476:
---

Stefan,

OK, thank you for your reply.

> Is there a plan in commons compress project to support extracting tars 
> contains sparse file?
> 
>
> Key: COMPRESS-476
> URL: https://issues.apache.org/jira/browse/COMPRESS-476
> Project: Commons Compress
>  Issue Type: New Feature
>  Components: Compressors
>Affects Versions: 1.18
>Reporter: Kaile Wu
>Priority: Major
> Attachments: image-2018-12-20-20-32-17-572.png
>
>   Original Estimate: 3h
>  Remaining Estimate: 3h
>
> Hi Guys, 
> I'm facing a problem when using commons compress to extract an tar.gz file, 
> which contains sparse file. I spent the whole afternoon on it but no luck.
>  
> The limitations page 
> ([https://commons.apache.org/proper/commons-compress/limitations.html)] says 
> sparse files are not supported.
> !image-2018-12-20-20-32-17-572.png!
> I found the issue created by Stepan 
> (https://issues.apache.org/jira/browse/COMPRESS-124) in 2013, says sparse 
> files could only be skipped. 
>  
> Is there a plan to support extracting sparse file in this project?



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


[jira] [Commented] (VFS-398) FtpFileObject.getChildren() fails when a folder contains a file with a colon in the name

2018-12-20 Thread Gary Gregory (JIRA)


[ 
https://issues.apache.org/jira/browse/VFS-398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16726317#comment-16726317
 ] 

Gary Gregory commented on VFS-398:
--

I am on the road with a dead laptop. It will be a few days before I can do 
anything, maybe even a week...

> FtpFileObject.getChildren() fails when a folder contains a file with a colon 
> in the name
> 
>
> Key: VFS-398
> URL: https://issues.apache.org/jira/browse/VFS-398
> Project: Commons VFS
>  Issue Type: Bug
>Affects Versions: 2.0
> Environment: Connecting via FTP to a host running SunOS 5.10
>Reporter: Mark Leonard
>Assignee: Otto Fowler
>Priority: Blocker
> Attachments: VFS-398-gg-00.patch
>
>
> In line 767 of DefaultFileSystemManager.java the UriParser's extractScheme() 
> method is called:
> String scheme = UriParser.extractScheme(buffer.toString());
> This code was added in revision 780730
> http://svn.apache.org/viewvc?view=revision=780730
> It is not clear to me why this change was made.
> For the FTP provider, buffer contains a plain file name (i.e. without a path 
> and definitely not in URI form)
> A colon is a valid character for a file name.
> However a colon will be interpreted as a URI scheme name.
> This causes an exception when the resolved path is checked using 
> AbstractFileName.checkName()
> Sample code:
> FileObject fo = 
> VFS.getManager().resolveFile("ftp://user:pass@host/some/path/some.file;);
> fo.getParent().getChildren();
> If /some/path/ contains a child such as PREFIX:SUFFIX then an exception is 
> thrown:
> Exception in thread "main" org.apache.commons.vfs2.FileSystemException: 
> Invalid descendent file name "PREFIX:SUFFIX".
>   at 
> org.apache.commons.vfs2.impl.DefaultFileSystemManager.resolveName(DefaultFileSystemManager.java:791)
>   at 
> org.apache.commons.vfs2.provider.AbstractFileObject.getChildren(AbstractFileObject.java:710)
>   at 
> org.apache.commons.vfs2.provider.ftp.FtpFileObject.getChildren(FtpFileObject.java:420)
> Therefore calling code is unable to list the children of the specified folder.



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


[jira] [Commented] (VFS-398) FtpFileObject.getChildren() fails when a folder contains a file with a colon in the name

2018-12-20 Thread Otto Fowler (JIRA)


[ 
https://issues.apache.org/jira/browse/VFS-398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16726201#comment-16726201
 ] 

Otto Fowler commented on VFS-398:
-

ping

> FtpFileObject.getChildren() fails when a folder contains a file with a colon 
> in the name
> 
>
> Key: VFS-398
> URL: https://issues.apache.org/jira/browse/VFS-398
> Project: Commons VFS
>  Issue Type: Bug
>Affects Versions: 2.0
> Environment: Connecting via FTP to a host running SunOS 5.10
>Reporter: Mark Leonard
>Assignee: Otto Fowler
>Priority: Blocker
> Attachments: VFS-398-gg-00.patch
>
>
> In line 767 of DefaultFileSystemManager.java the UriParser's extractScheme() 
> method is called:
> String scheme = UriParser.extractScheme(buffer.toString());
> This code was added in revision 780730
> http://svn.apache.org/viewvc?view=revision=780730
> It is not clear to me why this change was made.
> For the FTP provider, buffer contains a plain file name (i.e. without a path 
> and definitely not in URI form)
> A colon is a valid character for a file name.
> However a colon will be interpreted as a URI scheme name.
> This causes an exception when the resolved path is checked using 
> AbstractFileName.checkName()
> Sample code:
> FileObject fo = 
> VFS.getManager().resolveFile("ftp://user:pass@host/some/path/some.file;);
> fo.getParent().getChildren();
> If /some/path/ contains a child such as PREFIX:SUFFIX then an exception is 
> thrown:
> Exception in thread "main" org.apache.commons.vfs2.FileSystemException: 
> Invalid descendent file name "PREFIX:SUFFIX".
>   at 
> org.apache.commons.vfs2.impl.DefaultFileSystemManager.resolveName(DefaultFileSystemManager.java:791)
>   at 
> org.apache.commons.vfs2.provider.AbstractFileObject.getChildren(AbstractFileObject.java:710)
>   at 
> org.apache.commons.vfs2.provider.ftp.FtpFileObject.getChildren(FtpFileObject.java:420)
> Therefore calling code is unable to list the children of the specified folder.



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


[jira] [Commented] (VFS-685) Test classes should be public so test suits can be extended

2018-12-20 Thread Otto Fowler (JIRA)


[ 
https://issues.apache.org/jira/browse/VFS-685?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16726198#comment-16726198
 ] 

Otto Fowler commented on VFS-685:
-

ping

> Test classes should be public so test suits can be extended
> ---
>
> Key: VFS-685
> URL: https://issues.apache.org/jira/browse/VFS-685
> Project: Commons VFS
>  Issue Type: Bug
>Reporter: Otto Fowler
>Assignee: Otto Fowler
>Priority: Major
>  Labels: patch-available
>
> FileInfo and possibly other classes should be public, that way someone can 
> write tests for their providers that extend and are close to the same as the 
> project tests



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


[GitHub] RahulNagekar commented on issue #391: Adding junits for JsonToStringStyle

2018-12-20 Thread GitBox
RahulNagekar commented on issue #391: Adding junits for JsonToStringStyle
URL: https://github.com/apache/commons-lang/pull/391#issuecomment-449103250
 
 
   Will post 1 more commit improving this. I am all agree with all comnents , 
its best to follow best practices.


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] (LANG-1410) StringsUtil.isBlank check null first

2018-12-20 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot logged work on LANG-1410:


Author: ASF GitHub Bot
Created on: 20/Dec/18 19:00
Start Date: 20/Dec/18 19:00
Worklog Time Spent: 10m 
  Work Description: eceejcr commented on a change in pull request #392: 
LANG-1410: eliminate one unnecessary local int variable and add more tests
URL: https://github.com/apache/commons-lang/pull/392#discussion_r243382598
 
 

 ##
 File path: src/main/java/org/apache/commons/lang3/StringUtils.java
 ##
 @@ -338,15 +338,17 @@ public static boolean isAllEmpty(final CharSequence... 
css) {
  * @since 3.0 Changed signature from isBlank(String) to 
isBlank(CharSequence)
  */
 public static boolean isBlank(final CharSequence cs) {
-int strLen;
 
 Review comment:
   idx is fine for me


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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: 177708)
Time Spent: 2h 20m  (was: 2h 10m)

> StringsUtil.isBlank check null first
> 
>
> Key: LANG-1410
> URL: https://issues.apache.org/jira/browse/LANG-1410
> Project: Commons Lang
>  Issue Type: Improvement
>  Components: lang.*
>Reporter: Yifan Guo
>Priority: Minor
>  Time Spent: 2h 20m
>  Remaining Estimate: 0h
>
> StringsUtil.isBlank should check null for cs first instead of declaring int 
> strLen first.
>  



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


[GitHub] eceejcr commented on a change in pull request #392: LANG-1410: eliminate one unnecessary local int variable and add more tests

2018-12-20 Thread GitBox
eceejcr commented on a change in pull request #392: LANG-1410: eliminate one 
unnecessary local int variable and add more tests
URL: https://github.com/apache/commons-lang/pull/392#discussion_r243382598
 
 

 ##
 File path: src/main/java/org/apache/commons/lang3/StringUtils.java
 ##
 @@ -338,15 +338,17 @@ public static boolean isAllEmpty(final CharSequence... 
css) {
  * @since 3.0 Changed signature from isBlank(String) to 
isBlank(CharSequence)
  */
 public static boolean isBlank(final CharSequence cs) {
-int strLen;
 
 Review comment:
   idx is fine for me


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] (FILEUPLOAD-292) Don't create un-needed resources in FileUploadBase.java

2018-12-20 Thread Rob Tompkins (JIRA)
Rob Tompkins created FILEUPLOAD-292:
---

 Summary: Don't create un-needed resources in FileUploadBase.java
 Key: FILEUPLOAD-292
 URL: https://issues.apache.org/jira/browse/FILEUPLOAD-292
 Project: Commons FileUpload
  Issue Type: Improvement
Affects Versions: 1.3.3
Reporter: Rob Tompkins
Assignee: Rob Tompkins
 Fix For: 1.4


When creating a {{FileItemStreamImpl}} we are creating an object even when 
{{fileSizeMax == -1}} which allocates unneeded objects that will need to be 
garbage collected later.



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


[jira] [Work logged] (LANG-1410) StringsUtil.isBlank check null first

2018-12-20 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot logged work on LANG-1410:


Author: ASF GitHub Bot
Created on: 20/Dec/18 17:09
Start Date: 20/Dec/18 17:09
Worklog Time Spent: 10m 
  Work Description: rosti-il commented on a change in pull request #392: 
LANG-1410: eliminate one unnecessary local int variable and add more tests
URL: https://github.com/apache/commons-lang/pull/392#discussion_r243349505
 
 

 ##
 File path: src/main/java/org/apache/commons/lang3/StringUtils.java
 ##
 @@ -338,15 +338,17 @@ public static boolean isAllEmpty(final CharSequence... 
css) {
  * @since 3.0 Changed signature from isBlank(String) to 
isBlank(CharSequence)
  */
 public static boolean isBlank(final CharSequence cs) {
-int strLen;
 
 Review comment:
   So what name do you think is better in this case? `index`, `idx` or 
something else?


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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: 177609)
Time Spent: 2h 10m  (was: 2h)

> StringsUtil.isBlank check null first
> 
>
> Key: LANG-1410
> URL: https://issues.apache.org/jira/browse/LANG-1410
> Project: Commons Lang
>  Issue Type: Improvement
>  Components: lang.*
>Reporter: Yifan Guo
>Priority: Minor
>  Time Spent: 2h 10m
>  Remaining Estimate: 0h
>
> StringsUtil.isBlank should check null for cs first instead of declaring int 
> strLen first.
>  



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


[GitHub] rosti-il commented on a change in pull request #392: LANG-1410: eliminate one unnecessary local int variable and add more tests

2018-12-20 Thread GitBox
rosti-il commented on a change in pull request #392: LANG-1410: eliminate one 
unnecessary local int variable and add more tests
URL: https://github.com/apache/commons-lang/pull/392#discussion_r243349505
 
 

 ##
 File path: src/main/java/org/apache/commons/lang3/StringUtils.java
 ##
 @@ -338,15 +338,17 @@ public static boolean isAllEmpty(final CharSequence... 
css) {
  * @since 3.0 Changed signature from isBlank(String) to 
isBlank(CharSequence)
  */
 public static boolean isBlank(final CharSequence cs) {
-int strLen;
 
 Review comment:
   So what name do you think is better in this case? `index`, `idx` or 
something else?


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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] [Resolved] (COMPRESS-476) Is there a plan in commons compress project to support extracting tars contains sparse file?

2018-12-20 Thread Stefan Bodewig (JIRA)


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

Stefan Bodewig resolved COMPRESS-476.
-
Resolution: Duplicate

> Is there a plan in commons compress project to support extracting tars 
> contains sparse file?
> 
>
> Key: COMPRESS-476
> URL: https://issues.apache.org/jira/browse/COMPRESS-476
> Project: Commons Compress
>  Issue Type: New Feature
>  Components: Compressors
>Affects Versions: 1.18
>Reporter: Kaile Wu
>Priority: Major
> Attachments: image-2018-12-20-20-32-17-572.png
>
>   Original Estimate: 3h
>  Remaining Estimate: 3h
>
> Hi Guys, 
> I'm facing a problem when using commons compress to extract an tar.gz file, 
> which contains sparse file. I spent the whole afternoon on it but no luck.
>  
> The limitations page 
> ([https://commons.apache.org/proper/commons-compress/limitations.html)] says 
> sparse files are not supported.
> !image-2018-12-20-20-32-17-572.png!
> I found the issue created by Stepan 
> (https://issues.apache.org/jira/browse/COMPRESS-124) in 2013, says sparse 
> files could only be skipped. 
>  
> Is there a plan to support extracting sparse file in this project?



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


[jira] [Commented] (COMPRESS-476) Is there a plan in commons compress project to support extracting tars contains sparse file?

2018-12-20 Thread Stefan Bodewig (JIRA)


[ 
https://issues.apache.org/jira/browse/COMPRESS-476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16725906#comment-16725906
 ] 

Stefan Bodewig commented on COMPRESS-476:
-

I'm not ware of anybody actively working on it - at the same time I'm sure we'd 
welcome anybody's help with implementing it :-)


> Is there a plan in commons compress project to support extracting tars 
> contains sparse file?
> 
>
> Key: COMPRESS-476
> URL: https://issues.apache.org/jira/browse/COMPRESS-476
> Project: Commons Compress
>  Issue Type: New Feature
>  Components: Compressors
>Affects Versions: 1.18
>Reporter: Kaile Wu
>Priority: Major
> Attachments: image-2018-12-20-20-32-17-572.png
>
>   Original Estimate: 3h
>  Remaining Estimate: 3h
>
> Hi Guys, 
> I'm facing a problem when using commons compress to extract an tar.gz file, 
> which contains sparse file. I spent the whole afternoon on it but no luck.
>  
> The limitations page 
> ([https://commons.apache.org/proper/commons-compress/limitations.html)] says 
> sparse files are not supported.
> !image-2018-12-20-20-32-17-572.png!
> I found the issue created by Stepan 
> (https://issues.apache.org/jira/browse/COMPRESS-124) in 2013, says sparse 
> files could only be skipped. 
>  
> Is there a plan to support extracting sparse file in this project?



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


[jira] [Updated] (COMPRESS-476) Is there a plan in commons compress project to support extracting tars contains sparse file?

2018-12-20 Thread Stefan Bodewig (JIRA)


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

Stefan Bodewig updated COMPRESS-476:

Fix Version/s: (was: 1.19)

> Is there a plan in commons compress project to support extracting tars 
> contains sparse file?
> 
>
> Key: COMPRESS-476
> URL: https://issues.apache.org/jira/browse/COMPRESS-476
> Project: Commons Compress
>  Issue Type: New Feature
>  Components: Compressors
>Affects Versions: 1.18
>Reporter: Kaile Wu
>Priority: Major
> Attachments: image-2018-12-20-20-32-17-572.png
>
>   Original Estimate: 3h
>  Remaining Estimate: 3h
>
> Hi Guys, 
> I'm facing a problem when using commons compress to extract an tar.gz file, 
> which contains sparse file. I spent the whole afternoon on it but no luck.
>  
> The limitations page 
> ([https://commons.apache.org/proper/commons-compress/limitations.html)] says 
> sparse files are not supported.
> !image-2018-12-20-20-32-17-572.png!
> I found the issue created by Stepan 
> (https://issues.apache.org/jira/browse/COMPRESS-124) in 2013, says sparse 
> files could only be skipped. 
>  
> Is there a plan to support extracting sparse file in this project?



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


[jira] [Created] (COMPRESS-476) Is there a plan in commons compress project to support extracting tars contains sparse file?

2018-12-20 Thread Kaile Wu (JIRA)
Kaile Wu created COMPRESS-476:
-

 Summary: Is there a plan in commons compress project to support 
extracting tars contains sparse file?
 Key: COMPRESS-476
 URL: https://issues.apache.org/jira/browse/COMPRESS-476
 Project: Commons Compress
  Issue Type: New Feature
  Components: Compressors
Affects Versions: 1.18
Reporter: Kaile Wu
 Fix For: 1.19
 Attachments: image-2018-12-20-20-32-17-572.png

Hi Guys, 

I'm facing a problem when using commons compress to extract an tar.gz file, 
which contains sparse file. I spent the whole afternoon on it but no luck.

 

The limitations page 
([https://commons.apache.org/proper/commons-compress/limitations.html)] says 
sparse files are not supported.

!image-2018-12-20-20-32-17-572.png!

I found the issue created by Stepan 
(https://issues.apache.org/jira/browse/COMPRESS-124) in 2013, says sparse files 
could only be skipped. 

 

Is there a plan to support extracting sparse file in this project?



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


[jira] [Commented] (VFS-524) The uri include ipv6 address can't be parsed out correctly

2018-12-20 Thread Jean Pierre Urkens (JIRA)


[ 
https://issues.apache.org/jira/browse/VFS-524?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16725698#comment-16725698
 ] 

Jean Pierre Urkens  commented on VFS-524:
-

Ok, checked the v2.2 code and the fix isn't yet present.

> The uri include ipv6 address can't be parsed out correctly
> --
>
> Key: VFS-524
> URL: https://issues.apache.org/jira/browse/VFS-524
> Project: Commons VFS
>  Issue Type: Bug
>Affects Versions: 2.0
>Reporter: Alex
>Priority: Major
> Attachments: VFS-524-v2.patch, VFS-524-v3.patch
>
>
> I am using apache commons vfs2 to read and download file in ipv6 enviroment, 
> but it seems can't parse out ipv6 address correctly
> The URI is just like:
> ftp://[2002:9ba:b4e:6:a052:5792:c0c9:2330]/test
> The error message:
> Invalid absolute URI "ftp://[2002:9ba:b4e:6:a052:5792:c0c9:2330]/test;.
> Caused by : Expecting / to follow the hostname in URI 
> "ftp://[2002:9ba:b4e:6:a052:5792:c0c9:2330]/test;.
> Deep into the code, I found the root cause is that HostFileNameParser's 
> extractHostName can't parse out the host name correctly
> {noformat}
> /**
>  * Extracts the hostname from a URI.  The scheme://userinfo@ part has
>  * been removed.
>  */
> protected String extractHostName(final StringBuilder name)
> {
> final int maxlen = name.length();
> int pos = 0;
> for (; pos < maxlen; pos++)
> {
> final char ch = name.charAt(pos);
> if (ch == '/' || ch == ';' || ch == '?' || ch == ':'
> || ch == '@' || ch == '&' || ch == '=' || ch == '+'
> || ch == '$' || ch == ',')
> {
> break;
> }
> }
> if (pos == 0)
> {
> return null;
> }
> final String hostname = name.substring(0, pos);
> name.delete(0, pos);
> return hostname;
> }
> {noformat}
> From the code, we are able to know it will  parse out the host name by colon, 
> but for ipv6, it will get a wrong host name
> There is the same problem with the other protocol like sftp and cifs



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


[jira] [Commented] (VFS-524) The uri include ipv6 address can't be parsed out correctly

2018-12-20 Thread Jean Pierre Urkens (JIRA)


[ 
https://issues.apache.org/jira/browse/VFS-524?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16725672#comment-16725672
 ] 

Jean Pierre Urkens  commented on VFS-524:
-

I am trying to setup an FTP connection to the IPv6 loopback address using 
commons-vfs2 version 2.2 and commons-net v3.6.

I tried following URI'S: [ftp://[::1]|ftp://[:1]] and 
[ftp://[0:0:0:0:0:0:0:1]|ftp://[::1]/] but I am allways getting the error:

 org.apache.commons.vfs2.FileSystemException: Invalid absolute URI 
"[ftp://[0:0:0:0:0:0:0:1]|ftp://[::1]/]

 

Isn't the fix present in v2.2 or am I missing something here?

> The uri include ipv6 address can't be parsed out correctly
> --
>
> Key: VFS-524
> URL: https://issues.apache.org/jira/browse/VFS-524
> Project: Commons VFS
>  Issue Type: Bug
>Affects Versions: 2.0
>Reporter: Alex
>Priority: Major
> Attachments: VFS-524-v2.patch, VFS-524-v3.patch
>
>
> I am using apache commons vfs2 to read and download file in ipv6 enviroment, 
> but it seems can't parse out ipv6 address correctly
> The URI is just like:
> ftp://[2002:9ba:b4e:6:a052:5792:c0c9:2330]/test
> The error message:
> Invalid absolute URI "ftp://[2002:9ba:b4e:6:a052:5792:c0c9:2330]/test;.
> Caused by : Expecting / to follow the hostname in URI 
> "ftp://[2002:9ba:b4e:6:a052:5792:c0c9:2330]/test;.
> Deep into the code, I found the root cause is that HostFileNameParser's 
> extractHostName can't parse out the host name correctly
> {noformat}
> /**
>  * Extracts the hostname from a URI.  The scheme://userinfo@ part has
>  * been removed.
>  */
> protected String extractHostName(final StringBuilder name)
> {
> final int maxlen = name.length();
> int pos = 0;
> for (; pos < maxlen; pos++)
> {
> final char ch = name.charAt(pos);
> if (ch == '/' || ch == ';' || ch == '?' || ch == ':'
> || ch == '@' || ch == '&' || ch == '=' || ch == '+'
> || ch == '$' || ch == ',')
> {
> break;
> }
> }
> if (pos == 0)
> {
> return null;
> }
> final String hostname = name.substring(0, pos);
> name.delete(0, pos);
> return hostname;
> }
> {noformat}
> From the code, we are able to know it will  parse out the host name by colon, 
> but for ipv6, it will get a wrong host name
> There is the same problem with the other protocol like sftp and cifs



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