renmove deprecated newInstance call
This commit is contained in:
		@@ -56,7 +56,7 @@ public class SQLiteDbLoader implements IWaveformDbLoader {
 | 
			
		||||
			if(!event.isEmpty())
 | 
			
		||||
				return event.get(0).getTime()*scvSimProps.getTime_resolution();
 | 
			
		||||
		} catch (SecurityException | IllegalArgumentException | InstantiationException | IllegalAccessException
 | 
			
		||||
				| InvocationTargetException | SQLException | IntrospectionException e) {
 | 
			
		||||
				| InvocationTargetException | SQLException | IntrospectionException | NoSuchMethodException e) {
 | 
			
		||||
			e.printStackTrace();
 | 
			
		||||
		}
 | 
			
		||||
		return 0L;
 | 
			
		||||
@@ -73,7 +73,7 @@ public class SQLiteDbLoader implements IWaveformDbLoader {
 | 
			
		||||
				streams.add(stream);
 | 
			
		||||
			}
 | 
			
		||||
		} catch (SecurityException | IllegalArgumentException | InstantiationException | IllegalAccessException
 | 
			
		||||
				| InvocationTargetException | SQLException | IntrospectionException e) {
 | 
			
		||||
				| InvocationTargetException | SQLException | IntrospectionException | NoSuchMethodException e) {
 | 
			
		||||
		}
 | 
			
		||||
		return streams;
 | 
			
		||||
	}
 | 
			
		||||
@@ -109,7 +109,7 @@ public class SQLiteDbLoader implements IWaveformDbLoader {
 | 
			
		||||
			}
 | 
			
		||||
			pcs.firePropertyChange(IWaveformDbLoader.LOADING_FINISHED, null, null);
 | 
			
		||||
		} catch (SecurityException | IllegalArgumentException | InstantiationException | IllegalAccessException
 | 
			
		||||
				| InvocationTargetException | SQLException | IntrospectionException e) {
 | 
			
		||||
				| InvocationTargetException | SQLException | IntrospectionException | NoSuchMethodException e) {
 | 
			
		||||
			throw new InputFormatException(e.toString());
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
@@ -78,7 +78,7 @@ public class Tx implements ITx {
 | 
			
		||||
				begin= scvEvent.getTime()*(Long)database.getData("TIMERESOLUTION");
 | 
			
		||||
			}
 | 
			
		||||
		} catch (SecurityException | IllegalArgumentException | InstantiationException | IllegalAccessException
 | 
			
		||||
				| InvocationTargetException | SQLException | IntrospectionException e) {
 | 
			
		||||
				| InvocationTargetException | SQLException | IntrospectionException | NoSuchMethodException e) {
 | 
			
		||||
		}
 | 
			
		||||
		}
 | 
			
		||||
		return begin;
 | 
			
		||||
@@ -94,7 +94,7 @@ public class Tx implements ITx {
 | 
			
		||||
				end = scvEvent.getTime()*(Long)database.getData("TIMERESOLUTION");
 | 
			
		||||
			}
 | 
			
		||||
		} catch (SecurityException | IllegalArgumentException | InstantiationException | IllegalAccessException
 | 
			
		||||
				| InvocationTargetException | SQLException | IntrospectionException e) {
 | 
			
		||||
				| InvocationTargetException | SQLException | IntrospectionException | NoSuchMethodException e) {
 | 
			
		||||
		}
 | 
			
		||||
		}
 | 
			
		||||
		return end;
 | 
			
		||||
@@ -112,7 +112,7 @@ public class Tx implements ITx {
 | 
			
		||||
					
 | 
			
		||||
				}
 | 
			
		||||
			} catch (SecurityException | IllegalArgumentException | InstantiationException | IllegalAccessException
 | 
			
		||||
					| InvocationTargetException | SQLException | IntrospectionException e) {
 | 
			
		||||
					| InvocationTargetException | SQLException | IntrospectionException | NoSuchMethodException e) {
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
		return attributes;
 | 
			
		||||
@@ -129,7 +129,7 @@ public class Tx implements ITx {
 | 
			
		||||
					incoming.add(createRelation(scvRelation, false));
 | 
			
		||||
				}
 | 
			
		||||
			} catch (SecurityException | IllegalArgumentException | InstantiationException | IllegalAccessException
 | 
			
		||||
					| InvocationTargetException | SQLException | IntrospectionException e) {
 | 
			
		||||
					| InvocationTargetException | SQLException | IntrospectionException | NoSuchMethodException e) {
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
		return incoming;
 | 
			
		||||
@@ -146,7 +146,7 @@ public class Tx implements ITx {
 | 
			
		||||
					outgoing.add(createRelation(scvRelation, true));
 | 
			
		||||
				}
 | 
			
		||||
			} catch (SecurityException | IllegalArgumentException | InstantiationException | IllegalAccessException
 | 
			
		||||
					| InvocationTargetException | SQLException | IntrospectionException e) {
 | 
			
		||||
					| InvocationTargetException | SQLException | IntrospectionException | NoSuchMethodException e) {
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
		return outgoing;
 | 
			
		||||
@@ -169,7 +169,7 @@ public class Tx implements ITx {
 | 
			
		||||
			else
 | 
			
		||||
				return new TxRelation(trStream.getRelationType(rel.getName()), that, this);
 | 
			
		||||
		} catch (SecurityException | IllegalArgumentException | InstantiationException | IllegalAccessException
 | 
			
		||||
				| InvocationTargetException | SQLException | IntrospectionException e) {
 | 
			
		||||
				| InvocationTargetException | SQLException | IntrospectionException | NoSuchMethodException e) {
 | 
			
		||||
			e.printStackTrace();
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -69,7 +69,7 @@ public class TxGenerator extends AbstractTxStream {
 | 
			
		||||
					transactions.put(scvTx.getId(), new Tx(database, (TxStream) stream, this, scvTx));
 | 
			
		||||
				}
 | 
			
		||||
			} catch (SecurityException | IllegalArgumentException | InstantiationException | IllegalAccessException
 | 
			
		||||
					| InvocationTargetException | SQLException | IntrospectionException e) {
 | 
			
		||||
					| InvocationTargetException | SQLException | IntrospectionException | NoSuchMethodException e) {
 | 
			
		||||
				e.printStackTrace();
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
 
 | 
			
		||||
@@ -63,7 +63,7 @@ public class TxStream extends AbstractTxStream {
 | 
			
		||||
					generators.put(scvGenerator.getId(), new TxGenerator(database, this, scvGenerator));
 | 
			
		||||
				}
 | 
			
		||||
			} catch (SecurityException | IllegalArgumentException | InstantiationException | IllegalAccessException
 | 
			
		||||
					| InvocationTargetException | SQLException | IntrospectionException e) {
 | 
			
		||||
					| InvocationTargetException | SQLException | IntrospectionException | NoSuchMethodException e) {
 | 
			
		||||
				e.printStackTrace();
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
@@ -81,7 +81,7 @@ public class TxStream extends AbstractTxStream {
 | 
			
		||||
					transactions.put(scvTx.getId(), new Tx(database, this, generators.get(scvTx.getGenerator()), scvTx));
 | 
			
		||||
				}
 | 
			
		||||
			} catch (SecurityException | IllegalArgumentException | InstantiationException | IllegalAccessException
 | 
			
		||||
					| InvocationTargetException | SQLException | IntrospectionException e) {
 | 
			
		||||
					| InvocationTargetException | SQLException | IntrospectionException | NoSuchMethodException e) {
 | 
			
		||||
				e.printStackTrace();
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
 
 | 
			
		||||
@@ -75,10 +75,11 @@ public class SQLiteDatabaseSelectHandler<T> extends AbstractDatabaseHandler<T> {
 | 
			
		||||
	 * @throws IllegalAccessException
 | 
			
		||||
	 * @throws IntrospectionException
 | 
			
		||||
	 * @throws InvocationTargetException
 | 
			
		||||
	 * @throws NoSuchMethodException 
 | 
			
		||||
	 */
 | 
			
		||||
	public synchronized List<T> selectObjects() throws SQLException,
 | 
			
		||||
			InstantiationException, IllegalAccessException,
 | 
			
		||||
			IntrospectionException, InvocationTargetException {
 | 
			
		||||
			IntrospectionException, InvocationTargetException, IllegalArgumentException, NoSuchMethodException, SecurityException {
 | 
			
		||||
 | 
			
		||||
		Connection connection = null;
 | 
			
		||||
		Statement statement = null;
 | 
			
		||||
@@ -113,17 +114,18 @@ public class SQLiteDatabaseSelectHandler<T> extends AbstractDatabaseHandler<T> {
 | 
			
		||||
	 * @throws IllegalAccessException
 | 
			
		||||
	 * @throws IntrospectionException
 | 
			
		||||
	 * @throws InvocationTargetException
 | 
			
		||||
	 * @throws NoSuchMethodException 
 | 
			
		||||
	 */
 | 
			
		||||
	private List<T> createObjects(ResultSet resultSet)
 | 
			
		||||
			throws SQLException, InstantiationException,
 | 
			
		||||
			IllegalAccessException, IntrospectionException,
 | 
			
		||||
			InvocationTargetException {
 | 
			
		||||
			InvocationTargetException, IllegalArgumentException, NoSuchMethodException, SecurityException {
 | 
			
		||||
 | 
			
		||||
		List<T> list = new ArrayList<>();
 | 
			
		||||
 | 
			
		||||
		while (resultSet.next()) {
 | 
			
		||||
 | 
			
		||||
			T instance = type.newInstance();
 | 
			
		||||
			T instance = type.getDeclaredConstructor().newInstance();
 | 
			
		||||
 | 
			
		||||
			for (Field field : type.getDeclaredFields()) {
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user