Skip to content

Commit

Permalink
Fix sonar cloud issues
Browse files Browse the repository at this point in the history
  • Loading branch information
fugerit79 committed Sep 15, 2023
1 parent a4ddf09 commit 82b2456
Show file tree
Hide file tree
Showing 15 changed files with 214 additions and 175 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

- MetaDataUtils types constant arrays removed in favor of public builder methods (may raise minor compatibility issues)

### Fixed

- Javadoc generation with java 17
- VirtualPageCache entry store did not work properly

## [8.2.8] - 2023-09-13

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public static int copyFileRecurseForceVerbose( JFile from, JFile to ) throws IOE
}

public static int copyFile(JFile from, JFile to, boolean recurse, boolean force, boolean verbose) throws IOException {
return copyFile( from, to, recurse, force, verbose, ( f ) -> true );
return copyFile( from, to, recurse, force, verbose, f -> true );
}

private static int copyFileRecurse( JFile from, JFile to, boolean recurse, boolean force, boolean verbose, Predicate<JFile> filter, int res ) throws IOException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ public static void close( Closeable ac ) throws ConfigException {

public static void closeRuntimeEx( AutoCloseable ac ) {
if ( ac != null ) {
SafeFunction.apply( () -> ac.close(), e -> { throw ConfigRuntimeException.convertEx( BASIC_CLOSE_MESSAGE+ac , e ); } );
SafeFunction.apply( ac::close, e -> { throw ConfigRuntimeException.convertEx( BASIC_CLOSE_MESSAGE+ac , e ); } );
}
}

public static void closeRuntimeEx( Closeable ac ) {
if ( ac != null ) {
SafeFunction.apply( () -> ac.close(), e -> { throw ConfigRuntimeException.convertEx( BASIC_CLOSE_MESSAGE+ac , e ); } );
SafeFunction.apply( ac::close, e -> { throw ConfigRuntimeException.convertEx( BASIC_CLOSE_MESSAGE+ac , e ); } );
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public class VersionUtils {

private VersionUtils() {}

private static Properties MODULES = new Properties();
private static final Properties MODULES = new Properties();

public static final String CODE_01_NOT_FOUND = "[01] Module does not exist";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public void configure(Element tag) throws ConfigException {

}

private static ParamFinder PARAM_FINDER = ParamFinder.newFinder();
private static final ParamFinder PARAM_FINDER = ParamFinder.newFinder();

private ParamProvider pathParamProvider;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,10 @@ private static void loadWorker( InputStream is, Properties props, boolean xml, S
private static void handleException( String path, Exception e, String unsafe, String usafeMessage ) throws IOException {
if ( UNSAFE_TRUE.equalsIgnoreCase( unsafe ) || UNSAFE_WARN.equalsIgnoreCase( unsafe ) ) {
String unsafeMessafeWork = usafeMessage+" ";
if ( StringUtils.isNotEmpty( unsafeMessafeWork ) ) {
unsafeMessafeWork+=" ";
if ( StringUtils.isNotEmpty( usafeMessage ) ) {
unsafeMessafeWork+= usafeMessage+" ";
}
unsafeMessafeWork = path + ", " + unsafe + ", " + e;
unsafeMessafeWork+= path + ", " + unsafe + ", " + e;
if ( UNSAFE_WARN.equalsIgnoreCase( unsafe ) ) {
log.warn( "Error loading unsafe property holder : {}", unsafeMessafeWork );
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ public static ConnectionFactoryImpl newInstance(String dsName) throws DAOExcepti
*/
public static ConnectionFactoryImpl newInstance(DataSource ds) throws DAOException {
log.info( "ConnectionFactoryImpl.newInstance() data source : {}", ds );
return new SupplierConnectionFactory( "dataSourceSupplier" , () -> ds.getConnection() );
return new SupplierConnectionFactory( "dataSourceSupplier" , ds::getConnection );
}

/*
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package org.fugerit.java.core.db.metadata;

import org.fugerit.java.core.db.dao.DAOException;

public interface JdbcAdaptor {

String getTableComment( TableId tableId ) throws DAOException;

String getColumnComment( TableId tableId, String columnName ) throws DAOException;

String getColumnExtraInfo( TableId tableId, String columnName ) throws DAOException;

}
Loading

0 comments on commit 82b2456

Please sign in to comment.