-
Notifications
You must be signed in to change notification settings - Fork 80
/
Copy pathjava-version-7.yml
69 lines (69 loc) · 3.95 KB
/
java-version-7.yml
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
#
# Copyright 2023 the original author or authors.
# <p>
# 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
# <p>
# https://www.apache.org/licenses/LICENSE-2.0
# <p>
# 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.
#
---
type: specs.openrewrite.org/v1beta/recipe
name: org.openrewrite.java.migrate.UpgradeToJava7
displayName: Migrate to Java 7
description: >
This recipe will apply changes commonly needed when upgrading to Java 7. This recipe will also replace deprecated API
with equivalents when there is a clear migration strategy.
tags:
- java7
recipeList:
- org.openrewrite.java.migrate.UpgradeToJava6
- org.openrewrite.java.migrate.JREJdbcInterfaceNewMethods
---
type: specs.openrewrite.org/v1beta/recipe
name: org.openrewrite.java.migrate.JREJdbcInterfaceNewMethods
displayName: Adds missing JDBC interface methods.
description: Add method implementations stubs to classes that implement JDBC interfaces.
recipeList:
- org.openrewrite.java.migrate.AddMissingMethodImplementation:
fullyQualifiedClassName: java.sql.Connection
methodPattern: "*..* abort(java.util.concurrent.Executor)"
methodTemplateString: "public void abort(java.util.concurrent.Executor executor) { \n\t// TODO Auto-generated method stub\n }"
- org.openrewrite.java.migrate.AddMissingMethodImplementation:
fullyQualifiedClassName: java.sql.Connection
methodPattern: "*..* getNetworkTimeout()"
methodTemplateString: "public int getNetworkTimeout() { \n\t// TODO Auto-generated method stub\n return 0; }"
- org.openrewrite.java.migrate.AddMissingMethodImplementation:
fullyQualifiedClassName: java.sql.Connection
methodPattern: "*..* getSchema()"
methodTemplateString: "public java.lang.String getSchema() { \n\t// TODO Auto-generated method stub\n return null; }"
- org.openrewrite.java.migrate.AddMissingMethodImplementation:
fullyQualifiedClassName: java.sql.Connection
methodPattern: "*..* setNetworkTimeout(java.util.concurrent.Executor, int)"
methodTemplateString: "public void setNetworkTimeout(java.util.concurrent.Executor executor, int milliseconds) { \n\t// TODO Auto-generated method stub\n }"
- org.openrewrite.java.migrate.AddMissingMethodImplementation:
fullyQualifiedClassName: java.sql.Connection
methodPattern: "*..* setSchema(java.lang.String)"
methodTemplateString: "public void setSchema(java.lang.String schema) throws java.sql.SQLException { \n\t// TODO Auto-generated method stub\n }"
- org.openrewrite.java.migrate.AddMissingMethodImplementation:
fullyQualifiedClassName: java.sql.Driver
methodPattern: "*..* getParentLogger()"
methodTemplateString: "public java.util.logging.Logger getParentLogger() { \n\t// TODO Auto-generated method stub\n return null; }"
- org.openrewrite.java.migrate.AddMissingMethodImplementation:
fullyQualifiedClassName: java.sql.Statement
methodPattern: "*..* closeOnCompletion()"
methodTemplateString: "public void closeOnCompletion() { \n\t// TODO Auto-generated method stub\n }"
- org.openrewrite.java.migrate.AddMissingMethodImplementation:
fullyQualifiedClassName: java.sql.Statement
methodPattern: "*..* isCloseOnCompletion()"
methodTemplateString: "public boolean isCloseOnCompletion() { \n\t// TODO Auto-generated method stub\n return false; }"
- org.openrewrite.java.migrate.AddMissingMethodImplementation:
fullyQualifiedClassName: javax.sql.CommonDataSource
methodPattern: "*..* getParentLogger()"
methodTemplateString: "public java.util.logging.Logger getParentLogger() { \n\t// TODO Auto-generated method stub\n return null; }"