Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public static void main(String[] args) {
provider.stop();
} catch(Exception excp) {
LOG.info(excp.getLocalizedMessage());
excp.printStackTrace();

}

LOG.info("<== TestEvents.main()");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ public static void main(String[] args) throws Exception {
auditOrcFileUtil.log(write, events);
write.close();
} catch (Exception e){
e.printStackTrace();

}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ public static void main(String[] args) {
nextRollOvertime = rollingTimeUtil.computeNextRollingTime(rollOverPeriod);
System.out.println(nextRollOvertime);
} catch (Exception e1) {
e1.printStackTrace();

}
long rollOverTime = rollingTimeUtil.computeNextRollingTime(duration, null);
nextRollOvertime = new Date(rollOverTime);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public String toJson() {
try {
return JsonUtilsV2.objToJson(this);
} catch (Exception e) {
e.printStackTrace();

}

return "";
Expand Down Expand Up @@ -226,7 +226,7 @@ public String toJson() {
try {
return JsonUtilsV2.objToJson(this);
} catch (Exception e) {
e.printStackTrace();

}

return "";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ public void test_getServiceDef() {
RangerServiceDef serviceDef = mock(RangerServiceDef.class);
when(_store.getServiceDefByName("good-service")).thenReturn(serviceDef);
} catch (Exception e) {
e.printStackTrace();

Assert.fail("Unexpected exception during mocking!");
}

Expand Down Expand Up @@ -224,7 +224,7 @@ public void test_getService() {
RangerService service = mock(RangerService.class);
when(_store.getServiceByName("good-service")).thenReturn(service);
} catch (Exception e) {
e.printStackTrace();

Assert.fail("Unexpected exception during mocking!");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public void setup() throws Exception {
System.out.println("Keystore File is NULL");
}
} catch(Throwable t) {
t.printStackTrace();

}

Configuration conf = new Configuration();
Expand Down Expand Up @@ -170,7 +170,7 @@ private static boolean isCredentialShellInteractiveEnabled() {
}
} catch (Throwable e) {
System.out.println("Unable to find the value of [" + fieldName + "] field in the Class [" + cs.getClass().getName() + "]. Skiping -f option");
e.printStackTrace();

ret = false;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public static void main(String[] args) {
catch(Throwable t) {
System.err.println("*************************************************************************");
System.err.println("******* ERROR: unable to process xml configuration changes due to error:" + t.getMessage());
t.printStackTrace();

System.err.println("*************************************************************************");
System.exit(1);
}
Expand Down Expand Up @@ -436,7 +436,7 @@ private void loadInstallProperties() {
installProperties.load(in);
} catch (IOException ioe) {
System.err.println("******* ERROR: load file failure. The reason: " + ioe.getMessage());
ioe.printStackTrace();

}
}
// To support environment variable, we will add all environment variables to the Properties
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public static String getDecryptedString(String CrendentialProviderPath,String al
}
}
}catch(Exception ex){
ex.printStackTrace();

credential=null;
}
return credential;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public static void main(String[] args) {
System.exit(1);
}
}catch(Exception ex){
ex.printStackTrace();

System.exit(1);
}
}
Expand Down Expand Up @@ -109,7 +109,7 @@ public int createCredential(String args[]){
}
}
}catch(Exception ex){
ex.printStackTrace();

}
return returnCode;
}
Expand Down Expand Up @@ -163,9 +163,9 @@ public int createKeyStore(String args[]){
returnCode= cs.run(finalArgs);
//if response code is zero then success else failure
}catch(IOException ex){
ex.printStackTrace();

} catch(Exception ex){
ex.printStackTrace();

}
return returnCode;
}
Expand Down Expand Up @@ -225,9 +225,9 @@ public int createCredentialFromUserInput(){
//if response code is zero then success else failure
//System.out.println("Response Code:"+returnCode);
}catch(IOException ex){
ex.printStackTrace();

} catch(Exception ex){
ex.printStackTrace();

}
return returnCode;
}
Expand Down Expand Up @@ -265,9 +265,9 @@ public int listCredential(String args[]){
//if response code is zero then success else failure
//System.out.println("Response Code:"+returnCode);
}catch(IOException ex){
ex.printStackTrace();

} catch(Exception ex){
ex.printStackTrace();

}
return returnCode;
}
Expand Down Expand Up @@ -308,9 +308,9 @@ public int deleteCredential(String args[], boolean isSilentMode){
//if response code is zero then success else failure
//System.out.println("Response Code:"+returnCode);
}catch(IOException ex){
ex.printStackTrace();

} catch(Exception ex){
ex.printStackTrace();

}
return returnCode;
}
Expand Down Expand Up @@ -369,7 +369,7 @@ public static boolean isValidCreateCommand(String command,String alias,String va
System.out.println("Invalid input or runtime error! Please try again.");
System.out.println("Input:"+command+" "+alias+" "+valueOption+" "+credential+" "+providerOption+" "+providerPath);
displaySyntax("create", storeType);
ex.printStackTrace();

return false;
}
return isValid;
Expand Down Expand Up @@ -405,7 +405,7 @@ public static boolean isValidListCommand(String command,String providerOption,St
System.out.println("Invalid input or runtime error! Please try again.");
System.out.println("Input:"+command+" "+providerOption+" "+providerPath);
displaySyntax("list", storeTpe);
ex.printStackTrace();

return false;
}
return isValid;
Expand Down Expand Up @@ -480,7 +480,7 @@ public String getCredential(String args[]){
System.out.println("Alias "+ alias +" does not exist!!");
}
}catch(Exception ex){
ex.printStackTrace();

}
return tempCredential;
}
Expand Down Expand Up @@ -521,7 +521,7 @@ public static boolean isValidGetCommand(String command,String alias,String provi
System.out.println("Invalid input or runtime error! Please try again.");
System.out.println("Input:"+command+" "+alias+" "+providerOption+" "+providerPath);
displaySyntax("get", storeType);
ex.printStackTrace();

return false;
}
return isValid;
Expand All @@ -544,7 +544,7 @@ private static boolean isCredentialShellInteractiveEnabled() {
}
} catch (Throwable e) {
System.out.println("Unable to find the value of [" + fieldName + "] field in the Class [" + cs.getClass().getName() + "]. Skiping -f option");
e.printStackTrace();

ret = false;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ private boolean createIndex() {
}
} catch (Exception e) {
LOG.severe("Unable to create Index. Reason:" + e.toString());
e.printStackTrace();

}
} else {
LOG.info("Index " + this.index + " is already created.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ public void start() {
+ "] = path [" + webapp_dir + "].");
} catch (LifecycleException lce) {
LOG.severe("Tomcat Server failed to start webapp:" + lce.toString());
lce.printStackTrace();

}

if (servername.equalsIgnoreCase(ADMIN_SERVER_NAME)) {
Expand Down Expand Up @@ -304,7 +304,7 @@ public Void run() {
});
} catch (Exception e) {
LOG.severe("Tomcat Server failed to start:" + e.toString());
e.printStackTrace();

}
} else {
startServer(server);
Expand Down Expand Up @@ -347,10 +347,10 @@ private void startServer(final Tomcat server) {
shutdownServer();
} catch (LifecycleException e) {
LOG.severe("Tomcat Server failed to start:" + e.toString());
e.printStackTrace();

} catch (Exception e) {
LOG.severe("Tomcat Server failed to start:" + e.toString());
e.printStackTrace();

}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ private void runTests(InputStreamReader reader, String testName) {
}

} catch(Throwable excp) {
excp.printStackTrace();

}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ public static final void main(String[] args) {
try {
fsList = fs.listFiles(baseDir, fileNameToMatch,null);
} catch (Exception e) {
e.printStackTrace();

}
if (fsList != null && fsList.size() > 0) {
for(String s : fsList) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -773,7 +773,7 @@ public static void main(String[] args) {
try {
dbList = hc.getDatabaseList(args[1],null);
} catch (Exception e) {
e.printStackTrace();

}
if (CollectionUtils.isEmpty(dbList)) {
System.out.println("No database found with db filter [" + args[1] + "]");
Expand Down Expand Up @@ -808,7 +808,7 @@ else if (args.length == 4) {
}

} catch(Exception e) {
e.printStackTrace();

}
finally {
if (hc != null) {
Expand Down
12 changes: 6 additions & 6 deletions jisql/src/main/java/org/apache/util/sql/Jisql.java
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ public static void main(String argv[]) {
jisql.parseArgs(argv);
}
catch (Throwable t) {
t.printStackTrace();

jisql.usage();
System.exit(1);
}
Expand All @@ -269,7 +269,7 @@ public static void main(String argv[]) {
jisql.run();
}
catch (Exception e) {
e.printStackTrace();

System.exit(1);
}

Expand Down Expand Up @@ -326,12 +326,12 @@ public void run() throws Exception {
catch (InstantiationException ie) {
isExit=true;
System.err.println("Cannot instantiate the driver class \"" + driverName + "\"");
ie.printStackTrace(System.err);

}
catch (IllegalAccessException iae) {
isExit=true;
System.err.println("Cannot instantiate the driver class \"" + driverName + "\" because of an IllegalAccessException");
iae.printStackTrace(System.err);

}
finally {
if (connection != null) {
Expand Down Expand Up @@ -370,7 +370,7 @@ public void doIsql() throws IOException, SQLException {
}
catch (FileNotFoundException fnfe) {
System.err.println("Unable to open file \"" + inputFileName + "\"");
fnfe.printStackTrace(System.err);

throw fnfe;
}
}
Expand Down Expand Up @@ -514,7 +514,7 @@ public void doIsql() throws IOException, SQLException {
throw sqle;
}
catch (Exception e) {
e.printStackTrace(System.err);

}

if (inputQuery != null)
Expand Down
2 changes: 1 addition & 1 deletion jisql/src/main/java/org/apache/util/sql/MaskingThread.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public void run()
}
catch (InterruptedException iex)
{
iex.printStackTrace();

}
if (!stop)
{
Expand Down
12 changes: 6 additions & 6 deletions jisql/src/main/java/org/apache/util/sql/MySQLPLRunner.java
Original file line number Diff line number Diff line change
Expand Up @@ -209,12 +209,12 @@ private void runScript(Connection conn, Reader reader) throws IOException,
rs.close();
}
} catch (Exception e) {
e.printStackTrace();

}
try {
statement.close();
} catch (Exception e) {
e.printStackTrace();

// Ignore to workaround a bug in Jakarta DBCP
}
Thread.yield();
Expand Down Expand Up @@ -324,20 +324,20 @@ public static void main(String args[]){

}
catch (SQLException sqle) {
sqle.printStackTrace();

}
catch (ClassNotFoundException cnfe) {
System.err.println("Cannot find the driver class \"" + driverName + "\" in the current classpath.");
}
catch (InstantiationException ie) {
System.err.println("Cannot instantiate the driver class \"" + driverName + "\"");
ie.printStackTrace(System.err);

}
catch (IllegalAccessException iae) {
System.err.println("Cannot instantiate the driver class \"" + driverName + "\" because of an IllegalAccessException");
iae.printStackTrace(System.err);

}catch (Exception sqle) {
sqle.printStackTrace();

}
finally {
if (con != null) {
Expand Down
Loading
Loading