-
Notifications
You must be signed in to change notification settings - Fork 1
/
changes.txt
2305 lines (2264 loc) · 120 KB
/
changes.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
release 1.5 (11-2010)
- Fixed issue 590
Added check before adding container notifier for existing ones and add them
to new set and move this from ServletCointaner.initiate to configure
Moved reload functionality to scanning resource config, cache last scanning
results and use them to compute added/removed classes and reflect this change
in newly scanned set.
- Fixed issue 589
https://jersey.dev.java.net/issues/show_bug.cgi?id=589
Related to https://glassfish.dev.java.net/issues/show_bug.cgi?id=13649
Checking "assignability" before actually creating instance of class
found using ServiceFinder to prevent classloading issues.
- Fixed issue 478
https://jersey.dev.java.net/issues/show_bug.cgi?id=478
Applies when marshalling a collection to JSON and MAPPED or NATURAL JSON notations
are used. A JSON array is generated if root unwrapping is set to true.
Otherwise, if root unwrapping is set to false, a JSON object is returned.
release 1.4 (11-09-2010)
- Fixed issue 431
https://jersey.dev.java.net/issues/show_bug.cgi?id=431
The use of @PerSession no longer results in a NotSerializableException when
session state is persisted for internal state, associated with resource
instances, that is stored as a session attribute.
- Fixed issue 554
https://jersey.dev.java.net/issues/show_bug.cgi?id=554
Tracing is enabled for the JSP template processor. The JSP name and reference
to the it variable is output.
- Fixed issue 571
https://jersey.dev.java.net/issues/show_bug.cgi?id=571
User defined providers (MessageBodyReaders and Writers) must have higher
priority than Jersey provided ones (client & server side).
- When ServletContainer.FEATURE_FILTER_FORWARD_ON_404 is enabled
and the status code is 404 call HttpServletResponse.setStatus otherwise
call HttpServletResponse.sendError.
- Fixed issue 578
https://jersey.dev.java.net/issues/show_bug.cgi?id=578
The async client, when no HTTP async implementation is utilized, uses
ExecutorService to execute the request/response task.
The default implementation is Executors.newCachedThreadPool() and the
implementation can be set on the Client.
- Fixed issue 577
https://jersey.dev.java.net/issues/show_bug.cgi?id=577
When a client sends an empty request to a resource method that consumes
JAXB/JSON the natural and mapped conventions produce inconsistent results and
should return a 400 error.
- Fixed issue 546
https://jersey.dev.java.net/issues/show_bug.cgi?id=546
Validating default values with @DefaultValue of an @*Param at initialization
time to produce on errors on deployment can be avoided if the StringReader
is annotated with @StringReader.@ValidateDefaultValue(false). In such cases
if the default value is incorrect it will result in a runtime error.
- Fixed issue 552
https://jersey.dev.java.net/issues/show_bug.cgi?id=552
Support null key values (as documented) for KeyComparatorHashMap.
- Fixed issue 550
https://jersey.dev.java.net/issues/show_bug.cgi?id=550
When a WebApplicationException is thrown because a message body reader/writer
cannot be found a message is included with the exception (in addition to that
message being logged).
- Fixed issue 575
https://jersey.dev.java.net/issues/show_bug.cgi?id=575
Fixed regression in jersey-multipart where @FormDataParam annotated parameters
were not being recognized resulting in deployment errors or incorrect
information being passed as the entity parameter.
- Fixed issue 573
https://jersey.dev.java.net/issues/show_bug.cgi?id=573
Entities that are defined to be parameterized types with type variable as
arguments will be resolved, recursively to concrete types where possible.
For, example List<T> T[], Map<T, T> and Map<T, List<T>> will be resolved,
when T is a String, to List<String> String[], Map<String, String> and
Map<String, List<String>>
- Fixed issue 572
https://jersey.dev.java.net/issues/show_bug.cgi?id=572
Propagate security context when making internal invocations to match URIs.
- Fixed issue 564
https://jersey.dev.java.net/issues/show_bug.cgi?id=564
Modified field injection so that injection will occur independent of the
field value. Previously injection would only occur if the field value
was null.
- Support @InjectParam, which has the same semantics as Jersey's @Inject
but does not conflict with the JSR 330 version. Jersey's @Inject is now
deprecated.
- Support for @ParentRef to injecting a parent into a sub-resource.
- Fixed issue 563
https://jersey.dev.java.net/issues/show_bug.cgi?id=563
When using the low-level Grizzly container injection of GrizzlyRequest
and GrizzlyResponse are now supported as follows:
@Context ThreadLocal<GrizzlyRequest> request
@Context ThreadLocal<GrizzlyResponse> response
The thread local is required because GrizzlyRequest/Response are classes,
not interfaces, and therefore cannot be proxied using the Java proxy API.
- Fixed issue 562
https://jersey.dev.java.net/issues/show_bug.cgi?id=562
When ServletContainer.FEATURE_FILTER_FORWARD_ON_404 feature is set to true
and Jersey forwards to the next filter in the chain then the response
status code will be set to 200 before forwarding.
- JSONConfiguration.FEATURE_POJO_MAPPING ResourceConfig feature introduced
to simplify Jackson POJO entity provider utilization
Users no longer need to register the Jackson provider explicitly
- Jackson dependency upgraded to version 1.5.5
- *Breaking change*: in order to prevent OSGi bundle reload issues
we need to bundle JSR-311 API classes with the jersey-core module
- Fixed issue 486
https://jersey.dev.java.net/issues/show_bug.cgi?id=486
Added JRebel support.
- Fixed issue 542
https://jersey.dev.java.net/issues/show_bug.cgi?id=542
Added client HTTPDigestAuthFilter from external contributor + tests
- Fixed issue 549
https://jersey.dev.java.net/issues/show_bug.cgi?id=549
Implicit HEAD method support was not re-using any resource method-specific
filters on the GET method from which the HEAD method was derived from.
- Fixed issue 547
https://jersey.dev.java.net/issues/show_bug.cgi?id=547
The GZIPContentEncodingFilter works correctly with the Client API and
HttpURLConnection when a request entity is sent for which the size is known
in advance, for example a File or byte[].
- Fixed issue 506
https://jersey.dev.java.net/issues/show_bug.cgi?id=506
Fixed regression. Servlet url patterns of the form
<url-pattern>*.xxx</url-pattern>
now function as was the case for Jersey 1.0.3.1.
release 1.3 (17-06-2010)
- Fixed issue 540
https://jersey.dev.java.net/issues/show_bug.cgi?id=540
Parameterized types of List/Set/SortedSet are supported for parameters,
for example @QueryParam("d") List<List<String>>, if there is a
StringReaderProvider registered that supports the type List<String>.
- Remove the restriction that a GET method cannot receive entities. Warnings
will be presented instead of errors. Although this is highly uncommon The HTTP
spec does not rule this out thus Jersey was being unduly restrictive.
- Fixed issue 543
https://jersey.dev.java.net/issues/show_bug.cgi?id=543
unable to build extended-wadl-webapp sample
- Fixed issue 293
https://jersey.dev.java.net/issues/show_bug.cgi?id=293
The response building will retain the StatusType (if explictly set) or those
defined on javax.ws.rs.core.Response.Status. The container may access the
StatusType via ContainerResponse.getStatusType and from that the reason
phrase can be obtained.
The servlet container will use the reason phrase for the message parameter
of the call to HttpServletResponse.sendError for the case when the
status code >= 400 and the servlet container is deployed as a servlet
(sendError does not work on some web containers when the servlet container is
deployed as a filter).
- Fixed issue 472
https://jersey.dev.java.net/issues/show_bug.cgi?id=472
Ensure that preconditions with GET then a PUT with If-Unmodified-Since works
correctly at the granularity of seconds.
The last modified date is rounded down to the nearest second when comparing
against If-Modified-Since or If-Unmodified-Since values.
(HTTP formatted dates are rounded down to the nearest second.)
This can result in lost updates if two or more PUTs occur within an interval
of a second. The application should use etags in such cases.
- ServiceFinder will defer to the defining class loader of the current class
if a provider class cannot be loaded from the thread context class loader.
- Changed the declaration of components defined by jersey-multipart to use
the META-INF/services service interface name to avoid the components being
output in the logs.
- Fixed issue 488
https://jersey.dev.java.net/issues/show_bug.cgi?id=488
When using Apache HTTP client, chunked encoding and jersey-multipart
it is necessary for the client to explicitly declare the boundary string for
the content type. See com.sun.jersey.multipart.Boundary and
com.sun.jersey.multipart.MultiPartMediaTypes.
This is due to architectural restrictions with the Apache HTTP client as
the headers have to be declared before the entity is written.
- Removed support for resource methods utilizing @FormParam and consuming
"multipart/form-data". This functionality has been replaced by @FormDataParam
in the jersey-multipart module.
- Fixed issue 531
https://jersey.dev.java.net/issues/show_bug.cgi?id=531
WADL generation should not modify the abstract model when @FormParam is
declared in a resource method parameter and the @Consumes is absent.
- Fixed issue 538
https://jersey.dev.java.net/issues/show_bug.cgi?id=538
The reference to the registered application may be injected as follows:
@Context Application app;
- Upgrade the version of Abdera used in the contribs/jersey-atom-abdera to 1.0.
- Guice integration supports the @Inject binding of common
JAX-RS and Jersey dependencies such as UriInfo and ExtendedUriInfo.
Extend from com.sun.jersey.guice.JerseyServletModule, instead of
com.google.inject.servlet.ServletModule, to register these bindings.
- GlassFish v3 integration
Instead of one big uber JAR, jersey-gf-bundle.jar, individual Jersey modules
are integrated to GlassFish to allow better modularization
and alignment with non GlassFish environment
- Fixed issue 436
https://jersey.dev.java.net/issues/show_bug.cgi?id=436
Resources may be looked up using a URI via methods on
com.sun.jersey.api.core.ResourceContext.
- Fixed issue 489
https://jersey.dev.java.net/issues/show_bug.cgi?id=489
Support configurable namespace separators for JAXB/JSON.
See com.sun.jersey.api.json.JSONConfiguration#nsSeparator
- Fixed Jersey versioning issue for GlassFish when a version of
Jersey is deployed in the war that is different to the version of Jersey
version distributed with GlassFish.
META-INF/sevices files will be ignored if the corresponding
META-INF/MANIFEST.MF of the same jar contains a Bundle-SymbolicName
beginning with "com.sun.jersey" and a Bundle-Version that is not equal
to the Bundle-Version declared in the META-INF/MANIFEST.MF for the same jar
that contains the com.sun.jersey.spi.service.ServiceFinder.class.
- Fixed issue 66
https://jersey.dev.java.net/issues/show_bug.cgi?id=66
*Breaking changes*
Errors will result if dependencies cannot be injected rather than a null
value being injected.
Non-static inner classes as root resource and provider classes are no longer
supported.
- Fixed issue for WadlGeneratorConfig and building of properties, which now
correctly works for any property value type.
- Fixed issue 527
https://jersey.dev.java.net/issues/show_bug.cgi?id=527
Package name scanning now works in an OSGi environment
- Jersey Test Framework
Adding support for setting servlet and concurrent filter(s) with possibility
to set up filter name and init params per filter
- Fixed issue 526
https://jersey.dev.java.net/issues/show_bug.cgi?id=526
Provide access to the matching AbstractResourceMethod that was invoked
on a resource class, see ExtendedUriInfo.getMatchedMethod().
- Fixed issue 529
https://jersey.dev.java.net/issues/show_bug.cgi?id=529
Close input stream when reading properties file to obtain the Build ID.
- Fixed issue 509
https://jersey.dev.java.net/issues/show_bug.cgi?id=509
The stack trace is no longer included as the response entity for an
unmapped WebApplicationException with a status code of 500 and no response
entity.
- Fixed issue 521
https://jersey.dev.java.net/issues/show_bug.cgi?id=520
Support matching when quality of source, qs, values are less than 1.
- Fixed issue 520
https://jersey.dev.java.net/issues/show_bug.cgi?id=520
When Guice support is configured enable Guice injection of resource
or provider classes that have fields or methods annotated with @Inject
but have no constructor annotated with @Inject. In this case Jersey
instiaties and manages and lets Guice inject.
- Fixed issue 449
https://jersey.dev.java.net/issues/show_bug.cgi?id=449
When a message body reader or writer cannot be found for a media type
and Java type log all readers/writers that are compatible with that
media type.
release 1.2 (10-05-2010)
- Fixed issue 457
https://jersey.dev.java.net/issues/show_bug.cgi?id=457
Jersey WAR project cannot be deployed on OSGI platform
- Fixed issue 275
https://jersey.dev.java.net/issues/show_bug.cgi?id=275
Jersey-core, jersey-server, jersey-client and jersey-json modules
now (from 1.2 verison on) contain OSGi headers and use ServiceMix based
implementation to work in OSGi environment.
2 examples were added to show how to build a Jersey based OSGi web application
using OSGi Http-Service and OSGi WAR deployment.
Known limitation: the package name resource configuration can not be used in the OSGi runtime
and needs to be replaced by the class name based mechanism.
This will be addressed in future development. Also other Jersey modules
are to be OSGified in the future releases.
- Fixed issue 516
https://jersey.dev.java.net/issues/show_bug.cgi?id=516
Changed resolving algorithm for finding a CDI Bean from a Class such
that inheritence hierarchies are supported.
BeanManager.resolve does not resolve a set of Bean to one Bean if all
members extend from a common concrete case class.
- Fixed issue 507
https://jersey.dev.java.net/issues/show_bug.cgi?id=507
Support DELETE with request entities for the Apache HTTP client.
- Fixed issue 505
https://jersey.dev.java.net/issues/show_bug.cgi?id=505
Fixed error in the multipart message body writer when the
Content-Type header value is explicitly set and the value is a string.
- Fixed issue 504
https://jersey.dev.java.net/issues/show_bug.cgi?id=504
Upgrade Simple HTTP server to 4.1.20.
- Fixed issue 484
https://jersey.dev.java.net/issues/show_bug.cgi?id=484
Change the Guice dependency to depend on Guice from the maven central
repository rather than GuiceyFruit.
- Added com.sun.jersey.api.JResponse, which is a type safe alternative to
javax.ws.rs.core.Response that preserves the type information of response
entity thus it is not necessary to utilize javax.ws.rs.core.GenericEntity.
It provides equivalent functonality to Response.
JResponse may be extended in combination with JResponse.AJResponseBuilder
specialization when building responses.
- Fixed issue 485, 519
https://jersey.dev.java.net/issues/show_bug.cgi?id=485
https://jersey.dev.java.net/issues/show_bug.cgi?id=519
When a ServletContainer is used as a servlet filter and the feature
ServletContainer.FEATURE_FILTER_FORWARD_ON_404 is set to true then enable the
next filter in the chain to be invoked if Jersey or the application returns a
404 with no entity body.
*Breaking changes* in order to support Servlet 2.4 and Servlet 3.0 it was
necessary to change the return type of ServletContainer#service(
URI baseUri, URI requestUri,
final HttpServletRequest request, HttpServletResponse response)
from "void" to "int" such that it returns the state code of the response.
HttpServletResponse.getStatusCode only exists for Servlet 3.0.
- Fixed issue 361
https://jersey.dev.java.net/issues/show_bug.cgi?id=361
Introduced new feature (FeaturesAndProperties.FEATURE_XMLROOTELEMENT_PROCESSING)
which enables getting XmlRootElement annotations and deriving name for list
from its name property. First letter "decapitalization" is not done
when this feature is enabled.
- Fixed issue 480
https://jersey.dev.java.net/issues/show_bug.cgi?id=480
An error in the decoding of "application/x-www-form-urlencoded" information
will result in a 400 (Client error) response.
- Fixed issue 471
https://jersey.dev.java.net/issues/show_bug.cgi?id=471
LoggingFilter should not have side-effects on the response and retain
content length information.
- Allow injection of the Client instance onto client-managed provider
classes.
- Fixed issue 475
https://jersey.dev.java.net/issues/show_bug.cgi?id=475
A registered application can return null for getClasses and getSingletons
which has the same meaning as returning an empty set.
- Fixed issue 479
https://jersey.dev.java.net/issues/show_bug.cgi?id=479
Fixed package scanning for applications deployed to the WebLogic application
server.
- Fixed issue 477
https://jersey.dev.java.net/issues/show_bug.cgi?id=477
Added null check for value returned from ServletContext.getResourcePaths.
- Jersey Test Framework modularization
You can choose which container would be used for testing by depending on that
module. For example if you want to use InMemory container, specify dependency
like:
<dependency>
<groupId>com.sun.jersey.jersey-test-framework</groupId>
<artifactId>jersey-test-framework-inmemory</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
and it will be used. When you define multiple dependencies and grizzly module
(default) is present, tests will run on grizzly; otherwise (grizzly module is
not present) warning will be produced and tests will run on first discovered
module. This can be altered by specifying jersey.test.containerFactory property
and setting its value to TestContainer descendant (fully qualified java class
name).
- Upgrade from Grizzly 1.9.8 to Grizzly 1.9.18-i
- Fixed issue 465
https://jersey.dev.java.net/issues/show_bug.cgi?id=465
Refactored ResourceConfig; now its possible to use delimiters ';', ',' and ' '
(space) to separate class names in various init parameters like filters and
filter factories declaration, classpath, class and package names specification.
Intended consequence is that FilterFactory now uses ResourceConfig to get list
of filters/filter factories so its possible to programatically add filters
to ones defined in web.xml.
- Modified the resolving of "flat-file" templates so the location is
'/' + resourceClass.getName().replace('.', '/').replace('$', '.') + '.' + path
Thus if there is a resource class named com.Foo and there is an index.html
template then the path to the template can be:
com/Foo.index.html
in addition to:
com/Foo/index.html
Thus templates can be co-located with Java class files rather than in
sub-directories.
- Fixed issue 461
https://jersey.dev.java.net/issues/show_bug.cgi?id=461
An exception thrown from a resource method that is mapped to a response
will have the appropriate Content-Type set, if an entity is present and if not
already set from the mapped response, as declared by the @Produces annotation
and what the client accepts.
- Fixed issue 433
https://jersey.dev.java.net/issues/show_bug.cgi?id=433
OAuth signature calculation correctly encodes request parameters according
to the unreserved character set defined in the URI specifications.
RSA_SHA1 support correctly URL encodes the base64 encoding of the signature.
- Fixed issue 468
https://jersey.dev.java.net/issues/show_bug.cgi?id=468
If URI canonicalization, and optionally URI normalization is set to true, but
redirection is set to false (the default) then the request URI is modified to
be the canonicalized, and optionally normalized, URI.
- Fixed issue 464
https://jersey.dev.java.net/issues/show_bug.cgi?id=464
Change the context related methods from private to protected.
- Fixed issue 466
https://jersey.dev.java.net/issues/show_bug.cgi?id=466
Avoid generation of empty params in WADL.
- Fixed issue 459
https://jersey.dev.java.net/issues/show_bug.cgi?id=459
A 307 (Temporary redirect) response for a resource which has a path
ending in '/' has a correct full request URI, including query parameters (if present),
for the Location header.
- Fixed issue 467
https://jersey.dev.java.net/issues/show_bug.cgi?id=467
@Inject can be utilized on provider-based classes.
release 1.1.5 (20-01-2010)
- Fixed issue 437
https://jersey.dev.java.net/issues/show_bug.cgi?id=437
Support the parsing of the Cache-Control header.
- Fixed issue 454
https://jersey.dev.java.net/issues/show_bug.cgi?id=454
Scanning of classes WEB-INF/classes in a war in ear now works for JBoss 5.x
deployments.
- Fixed issue 456
https://jersey.dev.java.net/issues/show_bug.cgi?id=456
UriBuilder can be built from URIs whose authority component is a
registry based naming authority.
- When tracing is enabled exceptions that are mapped to responses will be
logged.
- Added formatted support when JSON with natural notation is used
- Fixed issue 362
https://jersey.dev.java.net/issues/show_bug.cgi?id=362
Deprecated HttpHelper.getAcceptLangauge and added new method
HttpHelper.getAcceptLanguage.
- Fixed issue 448
https://jersey.dev.java.net/issues/show_bug.cgi?id=448
Ensure that spring 2.5.x dependency version does not depend on Spring 3.0.
- Fixed issue 450
https://jersey.dev.java.net/issues/show_bug.cgi?id=450
Equals method of AsyncWebResource was incorrect.
- Fixed issue 202
https://jersey.dev.java.net/issues/show_bug.cgi?id=202
Support the quality source parameter, "qs", on media types declared with
@Produces or @ImplicitProduces.
The media type, M say, with the highest quality source parameter for a request
will be selected as the most acceptable media type if X is an acceptable
media type.
For example, given the following resource class:
public class Foo {
@Produces("application/xml")
String get() { ... }
@Produces("text/html;qs=2")
String get() { ... }
}
and given an Accept header of "*/*" or "application/xml, text/*;q=0.8"
then "text/html" will be produced because the application prefers "text/html"
over "application/xml" even though the client does not.
Given an Accept header of "application/xml" then "application/xml" will be
produced.
- Fixed issue 382
https://jersey.dev.java.net/issues/show_bug.cgi?id=382
Quality source parameters, "qs", on media types declared with @Produces or
@ImplicitProduces on resource classes will work correctly for an
Accept header of "*/*"
- Fixed issue 446
https://jersey.dev.java.net/issues/show_bug.cgi?id=447
Deprecated TemplateProcessor, instead use ViewProcessor, which provides
better support when resolving a template name and writing out a template.
Note that existing implementations of TemplateProcessor are still supported.
When writing out an view with an absolute template name, or a view with a
resolving class then it is not required that an HTTP request be in scope
(unless the ViewProcessor implementation requires it).
*BREAKING CHANGES* for com.sun.jersey.spi.template.TemplateContext and
com.sun.jersey.spi.template.ResolvedViewable.
TemplateContext no longer has a method to obtain the set of TemplateProcessor.
The constructors of ResolvedViewable were modified to be compatible with
ViewProcessor.
- Fixed issues when a Response is returned with a Viewable and a status code
>= 400.
- Fixed issue 447
https://jersey.dev.java.net/issues/show_bug.cgi?id=447
JAX-RS annotated methods on interfaces or abstract methods on abstract classes
that have parameters that are instances of java.lang.reflect.TypeVariable are
correctly detected as the annotated methods to process.
- Fixed issue 439
https://jersey.dev.java.net/issues/show_bug.cgi?id=432
Servlet RequestDispatcher.forward works when forwarding to Jersey managed
URIs. For example a JSP view may utilize <c:import url="/some/jaxrs/path" />
to include another view.
- Added formatted feature, see FeaturesAndProperties.FEATURE_FORMATTED
When enabled, XML returned from resources will be formatted (line breaks and
indentation).
- Fixed issue 439
https://jersey.dev.java.net/issues/show_bug.cgi?id=439
Proxied objects, using java.lang.reflect.Proxy, that invoke the Java method
of the proxy will correctly re-throw any target exception caught from a
InvocationTargetException, rather than the proxying throwing a
java.lang.reflect.UndeclaredThrowableException.
- Upgraded jersey-simple-server to version 4.1.15.
- If an exception is mapped to a Response then that exception is now available
from the HttpResponseContext.getMappedThrowable() method.
- Fixed issue 379
https://jersey.dev.java.net/issues/show_bug.cgi?id=379
Jersey applications can now be deployed on Google App Engine.
- Added tracing feature.
Tracing provides useful information that describes how a request
is processed and dispatched to JAX-RS/Jersey components. This can aid
debugging when the application is not behaving as expected either
because of a bug in the application code or in the Jersey code.
Trace messages will be output as response headers with a header name of the
form "X-Jersey-Trace-XXX", where XXX is a decimal value corresponding to the
trace message number, and a header value that is the trace message.
See ResourceConfig.FEATURE_TRACE and ResourceConfig.FEATURE_TRACE_PER_REQUEST.
Tracing can be abled for a web application by adding the following init-param:
<init-param>
<param-name>com.sun.jersey.config.feature.Trace</param-name>
<param-value>true</param-value>
</init-param>
- Added new feature - now its possible to set language mappings via
ResourceConfig property (ResourceConfig.PROPERTY_LANGUAGE_MAPPINGS);
this can be set as a parameter in web.xml file.
Allowed types are String and String[], format: "segment:language-tag".
Language tag is defined in RFC 2616 (http://www.ietf.org/rfc/rfc2616.txt).
language-tag = primary-tag *( "-" subtag )
primary-tag = 1*8ALPHA
subtag = 1*8ALPHA
- Added new feature - now its possible to set media type mappings via
ResourceConfig property (ResourceConfig.PROPERTY_MEDIA_TYPE_MAPPINGS);
this can be set as a parameter in web.xml file.
Allowed types are String and String[], format: "segment:media/type".
Multiple definitions are comma separated. This was implemented mainly
to match similar RESTEasy feature.
- Fixed issue 430
https://jersey.dev.java.net/issues/show_bug.cgi?id=430
Fixed injection of per-request resources on to per-request (non-299)
managed beans.
- Fixed issue 429
https://jersey.dev.java.net/issues/show_bug.cgi?id=429
Package scanning deployment on JBoss 5.x app servers now works correctly.
- Fixed issue 32
https://jersey.dev.java.net/issues/show_bug.cgi?id=32
The servlet container supports portable scannnig of WEB-INF/lib and
WEB-INF/classes directories when the default servlet configuration is
utilized.
Default configuration deployments will now work on WebLogic-based
application servers.
- Fixed issue 421
https://jersey.dev.java.net/issues/show_bug.cgi?id=421
ContainerResponse.write() now consistently sets the isCommitted state.
- Fixed issue 420
https://jersey.dev.java.net/issues/show_bug.cgi?id=420
Some servlet containers do not support the addition of headers after
a HttpServletResponse.sendError is invoked.
Jersey will invoke sendError for a response status code >=400 when there
is no response entity. The headers are now written before sendError is
invoked.
- Fixed issue 419
https://jersey.dev.java.net/issues/show_bug.cgi?id=419
Upgraded simple server to version 4.1.14.
- Fixed issue 422
https://jersey.dev.java.net/issues/show_bug.cgi?id=422
The container response filter of the server-side LoggingFilter now ensures
that when the ServletContainer is utilized response headers are written when
there is no response entity present.
This was a regression as the ContainerResponseAdapter of the LoggingFilter
was not correctly adapting the finish method.
- Fixed issue 423
https://jersey.dev.java.net/issues/show_bug.cgi?id=423
Injection on to 299 managed beans in the dependent scope (scope is managed
by Jersey) is correctly supported for Jersey-based injection artifacts
such as @Context ResourceContext and @Inject T.
- Fixed issue 125
https://jersey.dev.java.net/issues/show_bug.cgi?id=125
@FormParam injection is supported for the same targets as other @*Param
annotations. Injection will only occur if there is a request entity
of the type "application/x-www-form-urlencoded", otherwise an
IllegalStateException will be thrown.
Form parameter beans are now supported, and the
@com.sun.jersey.spi.inject.Inject annotation may now be utilized to obtain
such beans, for example:
class MyFormBean {
@FormParam("a") String a;
@FormParam("b") String b;
}
@Path("foo")
class MyResource {
@POST
public ... post(@Inject MyFormBean b) { ... }
}
- Fixed issue 424
https://jersey.dev.java.net/issues/show_bug.cgi?id=424
The @com.sun.jersey.spi.inject.Inject annotation may now be utilized to inject
a resource class.
This is the recommend over the approach of using ResourceContext.
If a per-request managed resource is required to be injected into a
singleton managed resource then the resource class can be declared as the
parameterized type of Injectable, for example:
@Inject Injectable<MyPerRequestResource>
- Fixed issue 418
https://jersey.dev.java.net/issues/show_bug.cgi?id=418
Reloading of the servlet container no longer retains previous references to
root reosurce and provider classes declared in an extension of Application
or ResourceConfig.
The root cause: the WebApplication implementation was not cloning the
ResourceConfig instance passed to it on initiation if additional
root resource and provider classes needed to be added.
- Added examples from Bill Burke's book "RESTful Java with JAX-RS"
modified to be runnable with Jersey and with additional tests.
- Apache HTTP Client now supports custom HTTP methods.
release 1.1.4 (2009-11)
- Fixed issue 412
https://jersey.dev.java.net/issues/show_bug.cgi?id=412
Ensure that ResourceConfig and extensions of retain the order of
classes and singletons that are added.
- Fixed issue 411
https://jersey.dev.java.net/issues/show_bug.cgi?id=411
Fixed regression in MethodList class caused by fixing issue 229.
- Fixed issue 229
https://jersey.dev.java.net/issues/show_bug.cgi?id=229
@PostConstruct and @PreDestroy method can have any visibility.
- Fixed issue 406
https://jersey.dev.java.net/issues/show_bug.cgi?id=406
FormDataBodyPart.getValue will honor the charset parameter of the media
type associated with the body part.
- Fixed issue 232
https://jersey.dev.java.net/issues/show_bug.cgi?id=232
The characters '{' and '}' are percent encoded if a URI is built using
UriBuilder.build and no template parameter values are given as input.
- Fixed issue 357
https://jersey.dev.java.net/issues/show_bug.cgi?id=357
The Apache HTTP client handler for the Client API will automatically
release the connection if no response entity is present. Thus it is not
necessary to call ClientResponse.close if the response has no entity.
This avoids the client blocking when all the threads of the connection
manager are utilized.
- Fixed issue 384
https://jersey.dev.java.net/issues/show_bug.cgi?id=384
Work around issue in the LW HTTP server:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6886436
for responses that return a 204 status code. This issue can manifest
itself if, for example, a client invokes a POST method that returns 204
then invokes a GET method. This may cause some clients to hang, specifically
HttpURLConnection (browsers and the Apache HTTP client do not hang).
- Fixed issue 397
https://jersey.dev.java.net/issues/show_bug.cgi?id=397
Fixed issue for JSON/JAXB mapped marshalling that results in a stack
overflow if the client aborts the connection when marshalling is in
operation.
- Fixed issue 393
https://jersey.dev.java.net/issues/show_bug.cgi?id=393
Headers may be added to the multi-valued map returned from
Response.getMetadata().
- Fixed issue 391
https://jersey.dev.java.net/issues/show_bug.cgi?id=390
The Jersey servlet-layer catches a MappableContainerException and will
rethrow the cause wrapped in a ServletException. This ensures that such
mappable exceptions can be mapped by the Web application.
- Fixed issue 390
https://jersey.dev.java.net/issues/show_bug.cgi?id=390
A com.sun.jersey.api.container.MappableContainerException may be thrown
from an ExceptionMapper and as such that expception will be re-thrown to
the underlying HTTP container.
The EJBException mapper was modified to throw a MappableContainerException
with the cause of an EJBException. This ensures that such runtime exceptions
can be mapped by the Web application.
- Fixed issue 389
https://jersey.dev.java.net/issues/show_bug.cgi?id=389
For Web applications HttpServletResponse.sendError will be called instead
of HttpServletResponse.setStatus under the following conditions:
1) no bytes have been written to the response output stream; and
2) the status code is an error code, namely a value >= 400.
Such behaviour ensures that error pages mapped to error codes declared in the
web.xml will work if Jersey or the applicaton returns an error code with no
entity.
- Fixed issue 387
https://jersey.dev.java.net/issues/show_bug.cgi?id=387
Enabling Jersey response logging with views no longer results in an
illegal state exception.
- Fixed issue 388
https://jersey.dev.java.net/issues/show_bug.cgi?id=388
Maven web-based archetypes use version 2.5 of web.xml.
- Fixed issue 392
https://jersey.dev.java.net/issues/show_bug.cgi?id=392
Issue 336 (fixed in 1.1.3-ea) caused a regression such that it was no longer
possible to register provider classes in an Application, a ResourceConfig or
a ResourceConfigurator.
- Fixed issue 95
https://jersey.dev.java.net/issues/show_bug.cgi?id=95
The recursive cycle detection has been modified to be local to root
resource classes such the same sub-resource in two or more root resource
classes can be declared in the WADL.
- Fixed issue 371
https://jersey.dev.java.net/issues/show_bug.cgi?id=371
Logging of stack trace of mapped exceptions is not performed.
- Fixed issue 385
https://jersey.dev.java.net/issues/show_bug.cgi?id=385
Enable non-JAX-RS annotations on interface or abstract methods and
parameters to be merged with the annotations on the concrete method and
parameters (if such annotations are not already declared).
- Fixed issue 383
https://jersey.dev.java.net/issues/show_bug.cgi?id=383
Singleton instances added to the set of singletons of the Application/
ResourceConfig are not longer errornousaly instantiated by the runtime.
The singleton reference is also available from the
ResourceContent.getResource.
- Fixed issue 381
https://jersey.dev.java.net/issues/show_bug.cgi?id=381
Multiple child spring configuration fails may be declared as a value
of the property SpringServlet.CONTEXT_CONFIG_LOCATION.
- Modified the Jersey test framework such that it is possible to override
JerseyTest. The external test container supports the system property
JERSEY_HOST_NAME to declare the host name for the base URI.
release 1.1.3-ea (2009-10-06)
- Support configuration of ResourceConfig using the provider interface
com.sun.jersey.api.core.ResourceConfigurator.
One or more ResourceConfigurator providers may be registered and the
configure method will be called which may update the state of the
ResourceConfig instance passed as a parameter.
- Support programmatic modification of the declaration of filters. See the
following methods on ResourceConfig: getContainerRequestFilters,
getContainerResponseFilters and getResourceFilterFactories.
- Support the resolving of a type variable, T say, to a concrete type for
all parameters (field, method parameters, method setters) and
return types of resource methods.
Log warnings if T cannot be resolved to a concreate type, or if a
parameterized type, Collection<T> say, cannot be resolved because such
a type cannot be created dynamically.
- Added support for Servlet 3.0 deployment with JAX-RS 1.1-ea.
- Fixed issue 363
https://jersey.dev.java.net/issues/show_bug.cgi?id=363
Fixed for parameters when a String-based constructor is utlized with a
@DefaultValue("").
- Fixed issue 359
https://jersey.dev.java.net/issues/show_bug.cgi?id=359
The client API should use the default media type "application/octet-stream"
if a default media type cannot be obtained for a request entity of Java type.
- Fixed issue 336
https://jersey.dev.java.net/issues/show_bug.cgi?id=336
A class that extends of Application or ResourceConfig referenced in the web.xml
is now instantated as a component.
If the class has a constructor that takes a single parameter of the
type Map then the class is instantiated with that constructor and an instance
of Map that contains all the initialization parameters is passed as the
parameter. Otherwise, the class is instantiated as a singleton component
managed by the runtime, and injection may be performed (the artifacts that
may be injected are limited to injectable providers registered when
the servlet or filter is configured).
- OAuth signature library now correctly percent encodes characters when
generating a secret.
- Fixed issue 356
https://jersey.dev.java.net/issues/show_bug.cgi?id=356
Clarified JavaDoc for com.sun.jersey.core.header.MatchingEntityTag to
state that instance of this type or the super type cannot be used to
produce headers of the form "If-Match: *" or "If-None-Match: *".
- Fixed issue 357
https://jersey.dev.java.net/issues/show_bug.cgi?id=357
Clarifed JavaDoc for client API the response must be closed to ensure that
underlying resources are correctly released.
release 1.1.2-ea (2009-08-25)
- Fixed issue 355
https://jersey.dev.java.net/issues/show_bug.cgi?id=355
URI conneg works for the case of when a suffix say "nt" is present
in the path and is not preceded by a '.', for example "/ontology.nl
URI conneg is now a container request filter, see:
com.sun.jersey.api.container.filter.UriConnegFilter
Developers may extend this filters and register it rather than utilizing the
ResourceConfig.getMediaTypeMappings and ResourceConfig.getLanguageMappings.
- Fixed issue 354
https://jersey.dev.java.net/issues/show_bug.cgi?id=354
Runtime exceptions thrown from Singleton or Stateless Session Beans,
such as WebApplicationException, will be mapped appropraitely.
- Fixed issue 353
https://jersey.dev.java.net/issues/show_bug.cgi?id=353
Form reading/writing will use the charset declared in the charset parameter
of the media type if present, otherwise the UTF-8 charset will be utilized,
to decode/encode characters.
- Fixed issue 250
https://jersey.dev.java.net/issues/show_bug.cgi?id=250
Updated the JavaDoc of HttpContext.getProperties and
ContainerResponse.getProperties to state:
* Care should be taken not to clear the properties or remove properties
* that are unkown otherwise unspecified behaviour may result.
- Fixed issue 343
https://jersey.dev.java.net/issues/show_bug.cgi?id=343
The ResourceConfig property
PROPERTY_DEFAULT_RESOURCE_COMPONENT_PROVIDER_FACTORY_CLASS
additional supports a Java type that is a String whose value is a Class name.
- Fixed issue 332
https://jersey.dev.java.net/issues/show_bug.cgi?id=332
If an Content-Type header is recieved with an empty value a 400
response is returned.
- Fixed issue 350
https://jersey.dev.java.net/issues/show_bug.cgi?id=350
Errors when processing a parameter, annotated with an @*Param annotation,
will result in an instance of ParamException (that extends WebApplicaton)
being thrown concrete instance of which reflect the particular parameter
involved.
See com.sun.jersey.api.ParamException and inheriting classes for
more details.
- Fixed issue 338
https://jersey.dev.java.net/issues/show_bug.cgi?id=338
Ensure correct array element separator (',') is used also
in case an array is recognized based on configuration option.
- Fixed issue 242
https://jersey.dev.java.net/issues/show_bug.cgi?id=242
Client and server logging now uses a JDK logger to log requests and
responses.
- Code to copy a from an input stream or reader to an output stream or writer
has been consolidated. In addition functions that require the use of byte
or character arrays will use a default size for the array but this can
be overridden if required (for performance reasons). See:
com.sun.jersey.core.util.ReaderWriter
- Cleaned up the throwing of exceptions by message body readers and writers.
If a known checked, or documented runtime, exception is thrown when
reading then a WebApplcationException is thrown with the cause. If the
exception is related to reading then a 400 (Client error) status code is
set, otherwise a 500 (Internal server error) status code is set.
If a known checked, or documented runtime, exception is thrown when
writing then a WebApplcationException is thrown with the cause and a
500 (Internal server error) status code is set.
- Fixed issue when a Content-Type request header is absent and resource methods
consume (explicitly or by default) "*/*".
When a Content-Type request header is absent resource methods that consume
"*/*" take priority over other reosurce methods that consume other media
types. Thus "*/*" means consuming any media type or no media type.
See also com.sun.jersey.core.provider.EntityHolder to safely consume a
request entity if present, otherwise declare that such an entity is not
present.
- Support for explcitly adding a root resource class or root resource singleton
by programatically declaring the root path, rather than using the @Path
annotation. See ResourceConfig.getExplicitRootResources for more details.
- Support the throwing of WebApplicationException from within a singleton
or stateless session bean method. This will only work with GF v3 build 58
or greater.
- Fixed issue 302
https://jersey.dev.java.net/issues/show_bug.cgi?id=302
Allow a relative template name to be resolved to an absolute template name
that is a flat name if the template cannot be resolved the path-based
rule.
The flat name is fully qualified class name plus a "." plus the template name.
For example, given the resolving class com.foo.MyResource and the template
name index the absolute name will be "com.foo.MyResource.index.jsp".
- Fixed issue 161
https://jersey.dev.java.net/issues/show_bug.cgi?id=161
The Jersey client can now be used completely independently of the Jersey
server side when errors are produces by certain message body readers and
writers.
Response and Response.ResponseBuilder are now implemented such that they
can be used on the client side (without having to include jersey server
dependencies). This is important for some message body readers and writers
that may throw WebApplicationException, which in turn defers to Response
for building a response.
- Fixed issue 337
https://jersey.dev.java.net/issues/show_bug.cgi?id=337
The LW HTTP container logs an IOException (passed from Jersey) and attempts
to set the status code to 500. If the statuss and headers are already
committed it is not possible to set the status code and the response will be
terminated prematurely.
- Fixed issue 276
https://jersey.dev.java.net/issues/show_bug.cgi?id=276
Ensure that localized messages are correctly resolved in Web containers.
- Ensure that ContainerResponseWriter.finish is called consistently, for example
when no response entity is present.
- Cleaned up declaration of checked exceptions from the abstract message body
reader/writer classes for JAXB and removed the declaration of IOException.
- Fixed issue 334
https://jersey.dev.java.net/issues/show_bug.cgi?id=334
UriBuilder.segment and UriBuilder.matrixParam should percent encode ';'
characters.
- Adding logging when Jersey cannot map an exception to a Response using
registered ExceptionMapper and the exception gets re-thrown to the HTTP
container.
- Fixed issue 280
https://jersey.dev.java.net/issues/show_bug.cgi?id=280
For the "natural" JSON convention, the humanReadableFormatting option
now could be set, so that the output JSON contains new-line characters
and indentation, which makes is easy to read for humans
- Upgraded Jackson library to the version 1.1.1, so that people
relying on Jackson JAX-RS entity provider does not need to depend on two versions
of the very same library at their applications
- Fixed issue, working around a JDK bug in the method URL.toURI() when package
scanning classes that are present in a directory path location containing
space characters, for example "Documents and Services".
- Fixed issue 331
https://jersey.dev.java.net/issues/show_bug.cgi?id=331
Add support for de/serializing instances of org.w3c.dom.Document.
- Fixed issue 326
https://jersey.dev.java.net/issues/show_bug.cgi?id=326
Work around bug 5087240 in the JDK:
http://bugs.sun.com/view_bug.do?bug_id=5087240
- Fixed issue 330
https://jersey.dev.java.net/issues/show_bug.cgi?id=330
ContainerRequest and ContainerResponse by may now be adapted from within
filters by extending AdaptingContainerRequest and AdaptingContainerResponse
respectively. The adapter CachedEntityContainerRequest is available for when
a request entity instance consumed by a filter needs to be cached.
- The oauth modules at the java.net maven repository have moved from
jersey/oauth to jersey/contribs/jersey-oauth/.
release 1.1.1-ea (2009-07-13)
- Fixed issue 322
https://jersey.dev.java.net/issues/show_bug.cgi?id=323
A proxied IoC provider should not be invoked if the component to be proxied
cannot be instantiated.
- Fixed issue 323
https://jersey.dev.java.net/issues/show_bug.cgi?id=323
By default entity processing is disabled when XML parsing, on the client and
server side, for JAXB types, SAXSource and DOMSource.
This prevents Xml eXternal Entity (XXE) attacks. Security defaults for XML
processing may be disabled by setting the feature
FeaturesAndProperties.FEATURE_DISABLE_XML_SECURITY to true.
- Fixed issue 310
https://jersey.dev.java.net/issues/show_bug.cgi?id=310
Single element array in mapped JSON notation is incorrect
- Fixed issue 305
https://jersey.dev.java.net/issues/show_bug.cgi?id=305
JSON Natural Notation can not correctly marshall unbounded "any" wildcard
- Fixed issue 294
https://jersey.dev.java.net/issues/show_bug.cgi?id=294
Empty JSON elements break deserialization
- Fixed issue 272
https://jersey.dev.java.net/issues/show_bug.cgi?id=272
JSONUnmarshaller cannot unmarshal nested array element
- Fixed issue 113
https://jersey.dev.java.net/issues/show_bug.cgi?id=113
Namespace support for mapped and natural JSON notations
For the MAPPED convention, you would need to explicitly configure mapping
of any possible namespaces URIs to JSON prefixes, using the xml2JsonNs method
on the JSONConfiguration builder. No such configuration is needed for the
NATURAL convention, as it leverages information provided by JAXB implementation.
JAXB version 2.1.12 and better is needed.
- Fixed issue 299
https://jersey.dev.java.net/issues/show_bug.cgi?id=299
Suppport disabling of WADL. Set the following feature on ResourceConfig to
true:
ResourceConfig.FEATURE_DISABLE_WADL
or add the following initialiation parameter to the Jersey servlet or filter:
<init-param>
<param-name>com.sun.jersey.config.feature.DisableWADL</param-name>
<param-value>true</param-value>
</init-param>
- Fixed issue 319
https://jersey.dev.java.net/issues/show_bug.cgi?id=319
Ensure that no double encoding of query or matrix components when building
from a URI that contains a query or matrix component some parameters of
which are replaced, for example:
String uri = "http://localhost/query?limit=10&sql=select+*+from+users";
URI u = UriBuilder.fromUri(uri).replaceQueryParam("limit", 100).build();
- Fixed issue 288
https://jersey.dev.java.net/issues/show_bug.cgi?id=288
ContextResolver instances injected or obtained from
Providers.getContextResolver now correctly aggregate registered
ContextResolver implementations according to the specivity of the media type.
If you have, say, three ContextResolver implementations:
@Provider @Produces("application/foo")
public class TypeResolver implements ContextResolver<MyContext> { ...}
@Provider @Produces("application/*")
public class SubTypeResolver implements ContextResolver<MyContext> { ...}
@Provider @Produces("*/*")
public class WildCardResolver implements ContextResolver<MyContext> { ...}
The a call Providers.getContextResolver(...), such as follows:
MediaType m = MediaType.valueOf("application/foo");
Object someType = ...
Providers p = ...
ContextResolver<MyContext> cr = p.getContextResolver(
MyContext.class, m);
if (cr != null) {
MyContext c = cr.get(someType);
}
will result in a ContextResolver<MyContext> implementation that is an
aggregate of TypeResolver, SubTypeResolver, WildCardResolver, where each is
checked in order according to the specificity of the produces media types.
- Fixed issue 282
https://jersey.dev.java.net/issues/show_bug.cgi?id=282
The file META-INF/services/jersey-server-components may be present and
contain root resource and provider class names for classes that
should be loaded and deployed. If a class cannot be loaded then a deployment
error will occur.
The file META-INF/services/jersey-client-components may be present and contain
provider clases for classes that should be loaded and work with the client API.
If a class cannot be loaded then an error will occur.
- Fixed issue 279
https://jersey.dev.java.net/issues/show_bug.cgi?id=279
Updated the dependencies document to include the dependencies required
when list List<T> or Collection<T> where T is a JAXB bean. A StaX
implementation is required, such as Woodstox.
- Fixed issue 314
https://jersey.dev.java.net/issues/show_bug.cgi?id=314
Support MessageBodyReader/Writer implementations have declarations as follows:
@Provider
public class MyWriter<T> implements MessageBodyWriter<T> { ... }
namely the type variable T is never resolved and will be resolved to Object
when instantiated.
- Fixed issue 297
https://jersey.dev.java.net/issues/show_bug.cgi?id=297
If a servlet URL mapping is something like "/foo/*" and the request URL
path is "/foo" then Jersey will consume the request as if the path was "/foo/",
unless the redirect feature is enabled (see features of ResourceConfig),
which if the case, then Jersey will return a temporary redirect response to
the URL with the path "/foo/".
- Fixed issue 295
https://jersey.dev.java.net/issues/show_bug.cgi?id=295
Inheritence of Spring annotated classes, using @Component, that are also
resource classes is now supported, for example:
@Path("a") @Component
public static class A {
@GET public String get() {
return "a";
}
}