Skip to content

Commit

Permalink
fixed javax to jakarta & python3
Browse files Browse the repository at this point in the history
  • Loading branch information
ConstantConstantin committed Apr 12, 2024
1 parent c14cc88 commit 8b2ff7c
Show file tree
Hide file tree
Showing 20 changed files with 37 additions and 34 deletions.
7 changes: 5 additions & 2 deletions apache_xmlrpc_common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
dependencies {
compile 'org.apache.commons:com.springsource.org.apache.commons.httpclient:3.1.0'
compile 'org.apache.ws.commons:ws-commons-util:1.0.1'
compile 'javax.xml.bind:jaxb-api:2.3.1'
}

implementation('com.sun.xml.bind:jaxb-ri:3.0.2') {
exclude group: 'com.sun.xml.bind', module: 'jaxb-release-documentation'
exclude group: 'com.sun.xml.bind', module: 'jaxb-samples'
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
* "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.
* under the License.
*/
package org.apache.xmlrpc.jaxb;

import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
import javax.xml.bind.UnmarshallerHandler;
import jakarta.xml.bind.JAXBException;
import jakarta.xml.bind.JAXBContext;
import jakarta.xml.bind.UnmarshallerHandler;

import org.apache.xmlrpc.XmlRpcException;
import org.apache.xmlrpc.parser.ExtParser;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
* "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.
* under the License.
*/
package org.apache.xmlrpc.jaxb;

import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
import jakarta.xml.bind.JAXBException;
import jakarta.xml.bind.JAXBContext;

import org.apache.xmlrpc.serializer.ExtSerializer;
import org.xml.sax.Attributes;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
* "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.
* under the License.
*/
package org.apache.xmlrpc.jaxb;

import javax.xml.bind.Element;
import javax.xml.bind.JAXBContext;
import jakarta.xml.bind.Element;
import jakarta.xml.bind.JAXBContext;

import org.apache.ws.commons.util.NamespaceContextImpl;
import org.apache.xmlrpc.common.TypeFactoryImpl;
Expand All @@ -35,7 +35,7 @@
*/
public class JaxbTypeFactory extends TypeFactoryImpl {
private final JAXBContext context;
private final JaxbSerializer serializer;
private final JaxbSerializer serializer;

/** Creates a new instance with the given controller and
* JAXB context.
Expand Down
5 changes: 4 additions & 1 deletion apache_xmlrpc_server/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,8 @@
dependencies {
compile project(':apache_xmlrpc_common')
compile 'org.apache.commons:com.springsource.org.apache.commons.logging:1.1.1'
implementation('com.sun.xml.bind:jaxb-ri:3.0.2') {
exclude group: 'com.sun.xml.bind', module: 'jaxb-release-documentation'
exclude group: 'com.sun.xml.bind', module: 'jaxb-samples'
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* "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.
* under the License.
*/
package org.apache.xmlrpc.metadata;

Expand Down Expand Up @@ -42,13 +42,13 @@ public class Util {
static {
Class c;
try {
c = Class.forName("javax.xml.bind.Element");
c = Class.forName("jakarta.xml.bind.Element");
} catch (ClassNotFoundException e) {
c = null;
}
jaxbElementClass = c;
}

/** Returns a signature for the given return type or
* parameter class.
* @param pType The class for which a signature is being
Expand Down Expand Up @@ -122,7 +122,7 @@ public static String[][] getSignature(Method[] pMethods) {
* @return Signature string, or null, if no signature
* is available.
*/
public static String[] getSignature(Method pMethod) {
public static String[] getSignature(Method pMethod) {
Class[] paramClasses = pMethod.getParameterTypes();
String[] sig = new String[paramClasses.length + 1];
String s = getSignatureType(pMethod.getReturnType());
Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/sphinx/installing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ ROS Installation

If you would like a full ros environment backending your installation (you might
be generating code for your own custom messages, sequencing builds of multiple rosjava
repositories or using mixed packages, e.g. java + python) then refer to the `RosWiki`_
repositories or using mixed packages, e.g. java + python3) then refer to the `RosWiki`_
for more details.

.. _RosWiki: http://wiki.ros.org/rosjava
Expand Down
1 change: 0 additions & 1 deletion docs/src/main/sphinx/javadoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,3 @@ def make_javadoc_link(name, rawtext, text, lineno, inliner, options={}, content=
def setup(app):
app.add_config_value('javadoc_root', None, 'env')
app.add_role('javadoc', make_javadoc_link)

3 changes: 1 addition & 2 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,9 @@
<build_depend>sensor_msgs</build_depend>
<build_depend>tf2_msgs</build_depend>

<!--
<!--
If genjava becomes official, drop rosjava_messages and depend directly.
Currently only required to ensure deb builds generate the reqd artifacts
-->
<build_depend>rosjava_messages</build_depend>
</package>

2 changes: 1 addition & 1 deletion rosjava/test/composite_publisher.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
from ros import rospy
from ros import rosjava_test_msgs
import rosjava_test_msgs.msg
Expand Down
2 changes: 1 addition & 1 deletion rosjava/test/int64_publisher.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
from ros import rospy
from ros import std_msgs
import std_msgs.msg
Expand Down
2 changes: 1 addition & 1 deletion rosjava/test/string_publisher.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
from ros import rospy
from ros import std_msgs
import std_msgs.msg
Expand Down
2 changes: 1 addition & 1 deletion rosjava/test/test_composite_passthrough.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# Software License Agreement (BSD License)
#
# Copyright (c) 2011, Willow Garage, Inc.
Expand Down
2 changes: 1 addition & 1 deletion rosjava/test/test_int64_passthrough.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# Software License Agreement (BSD License)
#
# Copyright (c) 2011, Willow Garage, Inc.
Expand Down
2 changes: 1 addition & 1 deletion rosjava/test/test_parameter_client.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# Software License Agreement (BSD License)
#
# Copyright (c) 2011, Willow Garage, Inc.
Expand Down
2 changes: 1 addition & 1 deletion rosjava/test/test_string_passthrough.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# Software License Agreement (BSD License)
#
# Copyright (c) 2011, Willow Garage, Inc.
Expand Down
2 changes: 1 addition & 1 deletion rosjava/test/test_testheader_passthrough.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# Software License Agreement (BSD License)
#
# Copyright (c) 2011, Willow Garage, Inc.
Expand Down
2 changes: 1 addition & 1 deletion rosjava/test/testheader_publisher.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
from ros import rospy
from ros import rosjava_test_msgs
import rosjava_test_msgs.msg
Expand Down
2 changes: 1 addition & 1 deletion rosjava_benchmarks/scripts/pubsub_benchmark.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/python3
#
# Copyright (C) 2012 Google Inc.
#
Expand Down
3 changes: 1 addition & 2 deletions rosjava_test/scripts/serialized_message.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/python3
#
# Copyright (C) 2012 Google Inc.
#
Expand Down Expand Up @@ -34,4 +34,3 @@
buf = io.StringIO()
message.serialize(buf)
print(''.join('0x%02x,' % ord(c) for c in buf.getvalue())[:-1])

0 comments on commit 8b2ff7c

Please sign in to comment.