Skip to content

Commit c4539ea

Browse files
authored
Merge pull request #76 from utPLSQL/save-codestyle
Commit codestyle to the project and reformat all code
2 parents 85b7b14 + d8ab01c commit c4539ea

Some content is hidden

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

53 files changed

+632
-511
lines changed

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# IntelliJ
22
*.iml
3-
.idea/
3+
4+
.idea/*
5+
!/.idea/codeStyles
6+
!/.idea/dictionaries
47

58
# Maven
69
target/
@@ -21,3 +24,4 @@ buildNumber.properties
2124
#Exclude CoverageHTMLReporter resources as they are managed by maven
2225
src/main/resources/CoverageHTMLReporter/
2326
/gradle.properties
27+

.idea/codeStyles/Project.xml

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/codeStyles/codeStyleConfig.xml

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/dictionaries/utPLSQL.xml

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main/java/org/utplsql/api/CustomTypes.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ public final class CustomTypes {
1717
public static final String UT_KEY_VALUE_PAIR = "UT_KEY_VALUE_PAIR";
1818
public static final String UT_KEY_VALUE_PAIRS = "UT_KEY_VALUE_PAIRS";
1919

20-
private CustomTypes() {}
20+
private CustomTypes() {
21+
}
2122

2223
}

src/main/java/org/utplsql/api/DBHelper.java

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,12 @@
1414
*/
1515
public final class DBHelper {
1616

17-
private DBHelper() {}
17+
private DBHelper() {
18+
}
1819

1920
/**
2021
* Return a new sys_guid from database.
22+
*
2123
* @param conn the connection
2224
* @return the new id string
2325
* @throws SQLException any database error
@@ -47,35 +49,38 @@ public static String getCurrentSchema(Connection conn) throws SQLException {
4749
}
4850
}
4951

50-
/** Returns the Frameworks version string of the given connection
52+
/**
53+
* Returns the Frameworks version string of the given connection
5154
* Deprecated. Use DatabaseInformation-Interface instead.
5255
*
5356
* @param conn Active db connection
5457
* @return Version-string of the utPLSQL framework
5558
* @throws SQLException any database error
5659
*/
5760
@Deprecated
58-
public static Version getDatabaseFrameworkVersion( Connection conn ) throws SQLException {
61+
public static Version getDatabaseFrameworkVersion(Connection conn) throws SQLException {
5962
DatabaseInformation databaseInformation = new DefaultDatabaseInformation();
6063
return databaseInformation.getUtPlsqlFrameworkVersion(conn);
6164

6265
}
6366

64-
/** Returns the Oracle database Version from a given connection object
67+
/**
68+
* Returns the Oracle database Version from a given connection object
6569
* Deprecated. Use DatabaseInformation-Interface instead.
6670
*
6771
* @param conn Connection-Object
6872
* @return Returns version-string of the Oracle Database product component
6973
* @throws SQLException any database error
7074
*/
7175
@Deprecated
72-
public static String getOracleDatabaseVersion( Connection conn ) throws SQLException {
76+
public static String getOracleDatabaseVersion(Connection conn) throws SQLException {
7377
DatabaseInformation databaseInformation = new DefaultDatabaseInformation();
7478
return databaseInformation.getOracleVersion(conn);
7579
}
7680

7781
/**
7882
* Enable the dbms_output buffer with unlimited size.
83+
*
7984
* @param conn the connection
8085
*/
8186
public static void enableDBMSOutput(Connection conn) {
@@ -88,6 +93,7 @@ public static void enableDBMSOutput(Connection conn) {
8893

8994
/**
9095
* Disable the dbms_output buffer.
96+
*
9197
* @param conn the connection
9298
*/
9399
public static void disableDBMSOutput(Connection conn) {

src/main/java/org/utplsql/api/EnvironmentVariableUtil.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
*/
2121
public class EnvironmentVariableUtil {
2222

23-
private EnvironmentVariableUtil() {}
23+
private EnvironmentVariableUtil() {
24+
}
2425

2526
/**
2627
* Returns the value for a given key from environment (see class description)

src/main/java/org/utplsql/api/FileMapper.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111

1212
public final class FileMapper {
1313

14-
private FileMapper() {}
14+
private FileMapper() {
15+
}
1516

1617
/**
1718
* Call the database api to build the custom file mappings.
@@ -27,15 +28,15 @@ public static Array buildFileMappingArray(
2728

2829
CallableStatement callableStatement = conn.prepareCall(
2930
"BEGIN " +
30-
"? := ut_file_mapper.build_file_mappings(" +
31+
"? := ut_file_mapper.build_file_mappings(" +
3132
"a_object_owner => ?, " +
3233
"a_file_paths => ?, " +
3334
"a_file_to_object_type_mapping => ?, " +
3435
"a_regex_pattern => ?, " +
3536
"a_object_owner_subexpression => ?, " +
3637
"a_object_name_subexpression => ?, " +
3738
"a_object_type_subexpression => ?); " +
38-
"END;");
39+
"END;");
3940

4041
int paramIdx = 0;
4142
callableStatement.registerOutParameter(++paramIdx, OracleTypes.ARRAY, CustomTypes.UT_FILE_MAPPINGS);

src/main/java/org/utplsql/api/FileMapping.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ public class FileMapping implements SQLData {
1515
private String objectName;
1616
private String objectType;
1717

18-
public FileMapping() {}
18+
public FileMapping() {
19+
}
1920

2021
public FileMapping(String fileName, String objectOwner, String objectName, String objectType) {
2122
this.fileName = fileName;

src/main/java/org/utplsql/api/JavaApiVersionInfo.java

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,33 +5,38 @@
55
import java.io.InputStream;
66
import java.io.InputStreamReader;
77

8-
/** This class is getting updated automatically by the build process.
8+
/**
9+
* This class is getting updated automatically by the build process.
910
* Please do not update its constants manually cause they will be overwritten.
1011
*
1112
* @author pesse
1213
*/
1314
public class JavaApiVersionInfo {
1415

15-
private JavaApiVersionInfo() { }
16-
17-
1816
private static final String MAVEN_PROJECT_NAME = "utPLSQL-java-api";
1917
private static String MAVEN_PROJECT_VERSION = "unknown";
2018

2119
static {
2220
try {
2321

24-
try ( InputStream in = JavaApiVersionInfo.class.getClassLoader().getResourceAsStream("utplsql-api.version");
25-
BufferedReader reader = new BufferedReader(new InputStreamReader(in))) {
22+
try (InputStream in = JavaApiVersionInfo.class.getClassLoader().getResourceAsStream("utplsql-api.version");
23+
BufferedReader reader = new BufferedReader(new InputStreamReader(in))) {
2624
MAVEN_PROJECT_VERSION = reader.readLine();
2725
}
28-
}
29-
catch ( IOException e ) {
26+
} catch (IOException e) {
3027
System.out.println("WARNING: Could not get Version information!");
3128
}
3229
}
3330

34-
public static String getVersion() { return MAVEN_PROJECT_VERSION; }
35-
public static String getInfo() { return MAVEN_PROJECT_NAME + " " + getVersion(); }
31+
private JavaApiVersionInfo() {
32+
}
33+
34+
public static String getVersion() {
35+
return MAVEN_PROJECT_VERSION;
36+
}
37+
38+
public static String getInfo() {
39+
return MAVEN_PROJECT_NAME + " " + getVersion();
40+
}
3641

3742
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy