File tree Expand file tree Collapse file tree 2 files changed +10
-20
lines changed
Expand file tree Collapse file tree 2 files changed +10
-20
lines changed Original file line number Diff line number Diff line change 1414package feign .error ;
1515
1616import feign .Response ;
17-
1817import java .lang .annotation .ElementType ;
1918import java .lang .annotation .Inherited ;
2019import java .lang .annotation .Retention ;
3029 Class <? extends Exception > defaultException () default NO_DEFAULT .class ;
3130
3231 final class NO_DEFAULT extends Exception {
33-
34- /**
35- * For backward compatibility.
36- */
37- @ Deprecated
38- public NO_DEFAULT () {
39- }
40-
41- @ FeignExceptionConstructor
42- public NO_DEFAULT (@ ResponseBody Response response ) {
43- super ("Endpoint responded with " + response .status () + ", reason: " + response .reason ());
44- }
45-
32+ @ FeignExceptionConstructor
33+ public NO_DEFAULT (@ ResponseBody Response response ) {
34+ super ("Endpoint responded with " + response .status () + ", reason: " + response .reason ());
35+ }
4636 }
4737}
Original file line number Diff line number Diff line change @@ -142,16 +142,16 @@ public void test() throws Exception {
142142 @ Test
143143 public void testIfExceptionIsNotInTheList () throws Exception {
144144 AnnotationErrorDecoder decoder = AnnotationErrorDecoder
145- .builderFor (TestClientInterfaceWithDifferentExceptionConstructors .class )
146- .withResponseBodyDecoder (new OptionalDecoder (new Decoder .Default ()))
147- .build ();
145+ .builderFor (TestClientInterfaceWithDifferentExceptionConstructors .class )
146+ .withResponseBodyDecoder (new OptionalDecoder (new Decoder .Default ()))
147+ .build ();
148148
149149 Exception genericException = decoder .decode (feignConfigKey ("method1Test" ),
150- testResponse (-1 , NON_NULL_BODY , NON_NULL_HEADERS ));
150+ testResponse (-1 , NON_NULL_BODY , NON_NULL_HEADERS ));
151151
152152 assertThat (genericException )
153- .isInstanceOf (ErrorHandling .NO_DEFAULT .class )
154- .hasMessage ("Endpoint responded with -1, reason: null" );
153+ .isInstanceOf (ErrorHandling .NO_DEFAULT .class )
154+ .hasMessage ("Endpoint responded with -1, reason: null" );
155155 }
156156
157157 interface TestClientInterfaceWithDifferentExceptionConstructors {
You can’t perform that action at this time.
0 commit comments