Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#383 - change the implicit converter ordering
Signed-off-by: Emily Jiang <emijiang6@googlemail.com>
- Loading branch information
1 parent
c520c7d
commit ba67ffc
Showing
7 changed files
with
181 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
.../eclipse/microprofile/config/tck/converters/implicit/ConvTestSequenceOfBeforeValueOf.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/* | ||
* Copyright (c) 2020 Contributors to the Eclipse Foundation | ||
* | ||
* See the NOTICE file(s) distributed with this work for additional | ||
* information regarding copyright ownership. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* You may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "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. | ||
*/ | ||
package org.eclipse.microprofile.config.tck.converters.implicit; | ||
|
||
/** | ||
* Part of the implicit Converter test. | ||
* | ||
* Sample class which has a of(String) and valueOf(String) method. | ||
* The method of() should be used instead of valueOf(). | ||
* | ||
* @author <a href="mailto:emijiang@uk.ibm.com">Emily Jiang</a> | ||
*/ | ||
public class ConvTestSequenceOfBeforeValueOf { | ||
private String val; | ||
|
||
public static ConvTestSequenceOfBeforeValueOf of(String val) { | ||
ConvTestSequenceOfBeforeValueOf o = new ConvTestSequenceOfBeforeValueOf(); | ||
o.val = val.toString(); | ||
return o; | ||
} | ||
|
||
public static ConvTestSequenceOfBeforeValueOf valueOf(String val) { | ||
ConvTestSequenceOfBeforeValueOf o = new ConvTestSequenceOfBeforeValueOf(); | ||
o.val = "valueOf"; | ||
return o; | ||
} | ||
|
||
public String getVal() { | ||
return val; | ||
} | ||
} |
48 changes: 48 additions & 0 deletions
48
...e/microprofile/config/tck/converters/implicit/ConvTestSequenceParseBeforeConstructor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/* | ||
* Copyright (c) 2020 Contributors to the Eclipse Foundation | ||
* | ||
* See the NOTICE file(s) distributed with this work for additional | ||
* information regarding copyright ownership. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* You may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "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. | ||
*/ | ||
package org.eclipse.microprofile.config.tck.converters.implicit; | ||
|
||
/** | ||
* Part of the implicit Converter test. | ||
* | ||
* Sample class which has a parse(CharSequence) and Constructor(String) method. | ||
* The method parse(CharSequence) should be used instead of constructor(String). | ||
* | ||
* @author <a href="mailto:emijiang@uk.ibm.com">Emily Jiang</a> | ||
*/ | ||
public class ConvTestSequenceParseBeforeConstructor { | ||
private String val; | ||
|
||
public static ConvTestSequenceParseBeforeConstructor parse(CharSequence val) { | ||
ConvTestSequenceParseBeforeConstructor o = new ConvTestSequenceParseBeforeConstructor(); | ||
o.val = val.toString(); | ||
return o; | ||
} | ||
|
||
ConvTestSequenceParseBeforeConstructor() { | ||
} | ||
|
||
public ConvTestSequenceParseBeforeConstructor(String val) { | ||
this.val = "constructor"; | ||
} | ||
|
||
public String getVal() { | ||
return val; | ||
} | ||
} |
47 changes: 47 additions & 0 deletions
47
...lipse/microprofile/config/tck/converters/implicit/ConvTestSequenceValueOfBeforeParse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/* | ||
* Copyright (c) 2020 Contributors to the Eclipse Foundation | ||
* | ||
* See the NOTICE file(s) distributed with this work for additional | ||
* information regarding copyright ownership. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* You may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "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. | ||
*/ | ||
package org.eclipse.microprofile.config.tck.converters.implicit; | ||
|
||
/** | ||
* Part of the implicit Converter test. | ||
* | ||
* Sample class which has a parse(CharSequence) and valueOf(String) method. | ||
* The method valueOf(String) should be used instead of the parse(Charsequence) method. | ||
* | ||
* @author <a href="mailto:emijiang@uk.ibm.com">Emily Jiang</a> | ||
*/ | ||
public class ConvTestSequenceValueOfBeforeParse { | ||
private String val; | ||
|
||
public static ConvTestSequenceValueOfBeforeParse parse(CharSequence val) { | ||
ConvTestSequenceValueOfBeforeParse o = new ConvTestSequenceValueOfBeforeParse(); | ||
o.val = "parse"; | ||
return o; | ||
} | ||
|
||
public static ConvTestSequenceValueOfBeforeParse valueOf(String val) { | ||
ConvTestSequenceValueOfBeforeParse o = new ConvTestSequenceValueOfBeforeParse(); | ||
o.val = val; | ||
return o; | ||
} | ||
|
||
public String getVal() { | ||
return val; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters