8000 Merge branch 'master' into stable · jamesHaut/rabbitmq-java-client@afbf457 · GitHub
[go: up one dir, main page]

Skip to content

Commit afbf457

Browse files
committed
Merge branch 'master' into stable
2 parents f9e7433 + 8af06ca commit afbf457

File tree

85 files changed

+414
-508
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+414
-508
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
*.iml
99
*.ipr
1010
*.iws
11+
\#~
1112
/.idea/
1213
/build/
1314
/cover/

CONTRIBUTING.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
## Overview
2+
3+
RabbitMQ projects use pull requests to discuss, collaborate on and accept code contributions.
4+
Pull requests is the primary place of discussing code changes.
5+
6+
## How to Contribute
7+
8+
The process is fairly standard:
9+
10+
* Fork the repository or repositories you plan on contributing to
11+
* Clone [RabbitMQ umbrella repository](https://github.com/rabbitmq/rabbitmq-public-umbrella)
12+
* `cd umbrella`, `make co`
13+
* Create a branch with a descriptive name in the relevant repositories
14+
* Make your changes, run tests, commit with a [descriptive message](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html), push to your fork
15+
* Submit pull requests with an explanation what has been changed and **why**
16+
* Submit a filled out and signed [Contributor Agreement](https://github.com/rabbitmq/ca#how-to-submit) if needed (see below)
17+
* Be patient. We will get to your pull request eventually
18+
19+
If what you are going to work on is a substantial change, please first ask the core team
20+
of their opinion on [RabbitMQ mailing list](https://groups.google.com/forum/#!forum/rabbitmq-users).
21+
22+
23+
## (Brief) Code of Conduct
24+
25+
In one line: don't be a dick.
26+
27+
Be respectful to the maintainers and other contributors. Open source
28+
contributors put long hours into developing projects and doing user
29+
support. Those projects and user support are available for free. We
30+
believe this deserves some respect.
31+
32+
Be respectful to people of all races, genders, religious beliefs and
33+
political views. Regardless of how brilliant a pull request is
34+
technically, we will not tolerate disrespectful or aggressive
35+
behaviour.
36+
37+
Contributors who violate this straightforward Code of Conduct will see
38+
their pull requests closed and locked.
39+
40+
41+
## Contributor Agreement
42+
43+
If you want to contribute a non-trivial change, please submit a signed copy of our
44+
[Contributor Agreement](https://github.com/rabbitmq/ca#how-to-submit) around the time
45+
you submit your pull request. This will make it much easier (in some cases, possible)
46+
for the RabbitMQ team at Pivotal to merge your contribution.
47+
48+
49+
## Where to Ask Questions
50+
51+
If something isn't clear, feel free to ask on our [mailing list](https://groups.google.com/forum/#!forum/rabbitmq-users).

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ dist: distclean srcdist dist_all maven-bundle
2626

2727
dist_all: dist1.5 javadoc-archive
2828

29+
jar:
30+
ant jar
31+
2932
maven-bundle:
3033
ant -Dimpl.version=$(VERSION) maven-bundle
3134

README-EXAMPLES

Lines changed: 0 additions & 85 deletions
This file was deleted.

README.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
## RabbitMQ Java Client
2+
3+
This repository contains source code of the [RabbitMQ Java client](http://www.rabbitmq.com/api-guide.html).
4+
The client is maintained by the [RabbitMQ team at Pivotal](http://github.com/rabbitmq/).
5+
6+
7+
## Dependency (Maven Artifact)
8+
9+
Maven artifacts are [released to Maven Central](http://search.maven.org/#search%7Cga%7C1%7Cg%3Acom.rabbitmq%20a%3Aamqp-client).
10+
11+
### Maven
12+
13+
``` xml
14+
<dependency>
15+
<groupId>com.rabbitmq</groupId>
16+
<artifactId>amqp-client</artifactId>
17+
<version>3.4.4</version>
18+
</dependency>
19+
```
20+
21+ F438
### Gradle
22+
23+
``` groovy
24+
compile 'com.rabbitmq:amqp-client:3.4.4'
25+
```
26+
27+
28+
## Contributing
29+
30+
See [Contributing](./CONTRIBUTING.md) and [How to Run Tests](./RUNNING_TESTS.md).
31+
32+
33+
## License
34+
35+
This package, the RabbitMQ Java client library, is triple-licensed under
36+
the Mozilla Public License 1.1 ("MPL"), the GNU General Public License
37+
version 2 ("GPL") and the Apache License version 2 ("ASL").
Lines changed: 32 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,42 @@
1-
Overview
2-
========
1+
## Overview
32

43
There are multiple test suites in the RabbitMQ Java client library;
5-
the source for all of the suites can be found in the test/src
4+
the source for all of the suites can be found in the [test/src](./test/src)
65
directory.
76

87
The suites are:
98

10-
Client tests
11-
Functional tests
12-
Server tests
13-
SSL tests
9+
* Client tests
10+
* Functional tests
11+
* Server tests
12+
* SSL tests
1413

15-
The Server test suite cannot be launched from the public umbrella
16-
( https://github.com/rabbitmq/rabbitmq-public-umbrella.git ). Attempting
17-
to launch this suite by executing the "test-server" ant target will fail,
18-
because test necessary prerequisites are not present in the public
19-
umbrella.
20-
21-
All other tests require a conforming server listening on localhost:5672
14+
All of them assume a RabbitMQ node listening on localhost:5672
2215
(the default settings). SSL tests require a broker listening on the default
23-
SSL port. For details on running specific tests, see below.
16+
SSL port. Connection recovery tests assume `rabbitmqctl` at `../rabbitmq-server/scripts/rabbitmqctl`
17+
can control the running node: this is the case when all repositories are cloned using
18+
the [umbrella repository](https://github.com/rabbitmq/rabbitmq-public-umbrella).
19+
20+
For details on running specific tests, see below.
2421

2522

26-
Running a Specific Test Suite
27-
=============================
23+
## Running a Specific Test Suite
2824

2925
To run a specific test suite you should execute one of the following in the
3026
top-level directory of the source tree:
3127

32-
ant test-client
33-
ant test-functional
34-
ant test-ssl
35-
28+
# runs unit tests
29+
ant test-client
30+
# runs integration/functional tests
31+
ant test-functional
32+
# runs TLS tests
33+
ant test-ssl
34+
# run all test suites
35+
ant test-suite
3636

3737
For example, to run the client tests:
3838

39+
```
3940
----------------- Example shell session -------------------------------------
4041
rabbitmq-java-client$ ant test-client
4142
Buildfile: build.xml
@@ -58,19 +59,19 @@ test-client:
5859
5960
BUILD SUCCESSFUL
6061
-----------------------------------------------------------------------------
62+
```
6163

62-
If any tests are broken details can be found by viewing this file:
63-
build/TEST-com.rabbitmq.client.test.ClientTests.txt
64+
Test failures and errors are logged to `build/TEST-*`.
6465

6566

66-
SSL Test Setup
67-
--------------
67+
## SSL Test Setup
6868

6969
To run the SSL tests, the RabbitMQ server and Java client should be configured
70-
as per the SSL instructions on the RabbitMQ website. The SSL_CERTS_DIR
70+
as per the SSL instructions on the RabbitMQ website. The `SSL_CERTS_DIR`
7171
environment variable must point to a certificate folder with the following
7272
minimal structure:
7373

74+
```
7475
$SSL_CERTS_DIR
7576
|-- client
7677
| |-- keycert.p12
@@ -81,12 +82,14 @@ minimal structure:
8182
| \-- key.pem
8283
\-- testca
8384
\-- cacert.pem
85+
```
8486

85-
The PASSWORD environment variable must be set to the password of the keycert.p12
87+
The `PASSWORD` environment variable must be set to the password of the keycert.p12
8688
PKCS12 keystore. The broker must be configured to validate client certificates.
87-
This will become minimal broker configuration file if $SSL_CERTS_DIR is replaced
89+
This will become minimal broker configuration file if `$SSL_CERTS_DIR` is replaced
8890
with the certificate folder:
8991

92+
``` erlang
9093
%%%%% begin sample test broker configuration
9194
[{rabbit, [{ssl_listeners, [5671]},
9295
{ssl_options, [{cacertfile,"$SSL_CERTS_DIR/testca/cacert.pem"},
@@ -95,5 +98,4 @@ with the certificate folder:
9598
{verify,verify_peer},
9699
{fail_if_no_peer_cert, false}]}]}].
97100
%%%%% end sample test broker configuration
98-
99-
101+
```

build.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ python.bin=python
1515
sibling.codegen.dir=../rabbitmq-codegen/
1616
spec.version=0.9.1
1717
src.generated=${build.out}/gensrc
18-
standard.javac.source=1.5
19-
standard.javac.target=1.5
18+
standard.javac.source=1.6
19+
standard.javac.target=1.6
2020
test.javac.out=${build.out}/test/classes
2121
test.src.home=test/src

build.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@
9393
debug="${javac.debug}">
9494
<src path="src"/>
9595
<src path="${src.generated}"/>
96+
<compilerarg value="-Xlint:deprecation" />
97+
<compilerarg value="-Xlint:unchecked" />
9698
</javac>
9799
<mkdir dir="build/doc/api"/>
98100
</target>
@@ -209,6 +211,9 @@
209211
source="${javac.source}"
210212
target="${javac.target}">
211213

214+
<compilerarg value="-Xlint:deprecation" />
215+
<compilerarg value="-Xlint:unchecked" />
216+
212217
<classpath>
213218
<path refid="test.javac.classpath"/>
214219
<pathelement path="${javac.out}"/>

codegen.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -325,14 +325,6 @@ def printPropertiesClass(c):
325325
def printGetter(fieldType, fieldName):
326326
capFieldName = fieldName[0].upper() + fieldName[1:]
327327
print " public %s get%s() { return this.%s; }" % (java_boxed_type(fieldType), capFieldName, fieldName)
328-
def printSetter(fieldType, fieldName):
329-
capFieldName = fieldName[0].upper() + fieldName[1:]
330-
print " @Deprecated"
331-
if fieldType == "Map<String,Object>":
332-
print " public void set%s(%s %s)" % (capFieldName, fieldType, fieldName)
333-
print " { this.%s = %s==null ? null : Collections.unmodifiableMap(new HashMap<String,Object>(%s)); }" % (fieldName, fieldName, fieldName)
334-
else:
335-
print " public void set%s(%s %s) { this.%s = %s; }" % (capFieldName, java_boxed_type(fieldType), fieldName, fieldName, fieldName)
336328

337329
jClassName = java_class_name(c.name)
338330

@@ -383,7 +375,6 @@ def printSetter(fieldType, fieldName):
383375
for f in c.fields:
384376
(jType, jName) = (java_field_type(spec, f.domain), java_field_name(f.name))
385377
printGetter(jType, jName)
386-
printSetter(jType, jName)
387378

388379
printWritePropertiesTo(c)
389380
printAppendPropertyDebugStringTo(c)

0 commit comments

Comments
 (0)
0