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
1 change: 0 additions & 1 deletion src/java.base/share/classes/java/net/InetAddress.java
Original file line number Diff line number Diff line change
Expand Up @@ -1068,7 +1068,6 @@ public InetAddress[] get() {
inetAddresses = getAddressesFromNameService(host);
// don't update the "expirySet", will do that later
staleTime = refreshTime + InetAddressCachePolicy.getStale() * 1000_000_000L;
} catch (UnknownHostException ignore) {
} finally {
lookupLock.unlock();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -805,7 +805,6 @@ private void interruptIdleWorkers(boolean onlyOne) {
if (!t.isInterrupted() && w.tryLock()) {
try {
t.interrupt();
} catch (SecurityException ignore) {
} finally {
w.unlock();
}
Expand Down
2 changes: 0 additions & 2 deletions src/java.base/share/classes/sun/net/www/http/HttpCapture.java
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,6 @@ public String run() {
}
line = in.readLine();
}
} catch (IOException ioe) {

} finally {
try {
in.close();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,6 @@ private void skipPastImage(int imageIndex) {
try {
gotoImage(imageIndex);
skipImage();
} catch (IOException | IndexOutOfBoundsException e) {
} finally {
cbLock.unlock();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ public synchronized void dispose() {
if (closeable != null) {
try {
closeable.close();
} catch (IOException e) {
} finally {
closeable = null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ public StreamFinalizer(ImageInputStream stream) {
protected void finalize() throws Throwable {
try {
stream.close();
} catch (IOException e) {
} finally {
stream = null;
super.finalize();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,6 @@ public synchronized void dispose() {
if (cache != null) {
try {
cache.close();
} catch (IOException e) {
} finally {
cache = null;
}
Expand Down
1 change: 0 additions & 1 deletion src/java.desktop/share/classes/javax/swing/TimerQueue.java
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,6 @@ public void run() {

// Allow run other threads on systems without kernel threads
timer.getLock().newCondition().awaitNanos(1);
} catch (SecurityException ignore) {
} finally {
timer.getLock().unlock();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1256,7 +1256,6 @@ public void damageRange(JTextComponent t, int p0, int p1,
Rectangle rect = (toDamage instanceof Rectangle) ?
(Rectangle)toDamage : toDamage.getBounds();
editor.repaint(rect.x, rect.y, rect.width, rect.height);
} catch (BadLocationException e) {
} finally {
if (doc instanceof AbstractDocument) {
((AbstractDocument)doc).readUnlock();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2844,7 +2844,6 @@ public Rectangle getCharacterBounds(int i) {
(Rectangle)bounds : bounds.getBounds();

}
} catch (BadLocationException e) {
} finally {
if (model instanceof AbstractDocument) {
((AbstractDocument)model).readUnlock();
Expand Down Expand Up @@ -3042,7 +3041,6 @@ private String getAtIndex(int part, int index, int direction) {
default:
break;
}
} catch (BadLocationException e) {
} finally {
if (model instanceof AbstractDocument) {
((AbstractDocument)model).readUnlock();
Expand Down Expand Up @@ -3365,9 +3363,6 @@ private AccessibleTextSequence getSequenceAtIndex(int part,
model.getText(index + direction, 1));
}

} catch (BadLocationException e) {
// we are intentionally silent; our contract says we return
// null if there is any failure in this method
} finally {
if (model instanceof AbstractDocument) {
((AbstractDocument)model).readUnlock();
Expand Down Expand Up @@ -3725,7 +3720,6 @@ public Rectangle getTextBounds(int startIndex, int endIndex) {
(Rectangle)bounds : bounds.getBounds();

}
} catch (BadLocationException e) {
} finally {
if (model instanceof AbstractDocument) {
((AbstractDocument)model).readUnlock();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1061,7 +1061,6 @@ private String getAtIndex(int part, int index, int direction) {
default:
break;
}
} catch (BadLocationException e) {
} finally {
if (model instanceof AbstractDocument) {
((AbstractDocument)model).readUnlock();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2697,10 +2697,7 @@ private void adjustEndElement() {
this, event));
}
}
}
catch (BadLocationException ble) {
}
finally {
} finally {
releaseLock();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,6 @@ public synchronized void addFlavorListener(FlavorListener listener) {
try {
openClipboard(null);
currentFormats = getClipboardFormats();
} catch (final IllegalStateException ignored) {
} finally {
closeClipboard();
}
Expand Down
1 change: 0 additions & 1 deletion src/java.desktop/share/classes/sun/font/TrueTypeFont.java
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ public synchronized void dispose() {
if (channel != null) {
channel.close();
}
} catch (IOException e) {
} finally {
channel = null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,15 +156,13 @@ private void closeDataStreams() {
if (instream != null) {
try {
instream.close();
} catch (IOException e) {
} finally {
instream = null;
}
}
else if (reader != null) {
try {
reader.close();
} catch (IOException e) {
} finally {
reader = null;
}
Expand Down
2 changes: 0 additions & 2 deletions src/java.desktop/unix/classes/sun/print/UnixPrintJob.java
Original file line number Diff line number Diff line change
Expand Up @@ -197,15 +197,13 @@ private void closeDataStreams() {
if (instream != null) {
try {
instream.close();
} catch (IOException e) {
} finally {
instream = null;
}
}
else if (reader != null) {
try {
reader.close();
} catch (IOException e) {
} finally {
reader = null;
}
Expand Down
2 changes: 0 additions & 2 deletions src/java.desktop/windows/classes/sun/print/Win32PrintJob.java
Original file line number Diff line number Diff line change
Expand Up @@ -177,15 +177,13 @@ private void closeDataStreams() {
if (instream != null) {
try {
instream.close();
} catch (IOException e) {
} finally {
instream = null;
}
}
else if (reader != null) {
try {
reader.close();
} catch (IOException e) {
} finally {
reader = null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1235,7 +1235,6 @@ private void shutdown() {
} finally {
lock.unlock();
}
} catch (IOException ignored) {
} finally {
owner.stop();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,6 @@ public void run() {

try {
name = InetAddress.getByName(hostAddress).getHostName();
} catch (java.net.UnknownHostException e) {
} finally {
synchronized(this) {
reverseLookup = name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -719,11 +719,7 @@ private void processDTD(String xmlVersion, String schemaLocation) {
loader.setErrorHandler(fConfiguration.getErrorHandler());
loader.loadGrammarWithContext((XMLDTDValidator) fValidationHandler, rootName,
publicId, systemId, baseSystemId, internalSubset);
}
// REVISIT: Should probably report this exception to the error handler.
catch (IOException e) {
}
finally {
} finally {
if (loader != null) {
CoreDOMImplementationImpl.singleton.releaseDTDLoader(xmlVersion, loader);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,6 @@ public void close () throws IOException {
is.close();
}
/* some clients close the connection before empty chunk is sent */
} catch (IOException e) {

} finally {
closed = true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,6 @@ boolean readCommandFile(File f) {
}
}
}
} catch (IOException e) {
} finally {
if (inFile != null) {
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,6 @@ public void test1(TestMembarDependencies obj) {
// Method call defines memory state that is then
// used by subsequent instructions/blocks (see below).
test_m1();
} catch (Exception e) {

} finally {
// Oop write to field emits a GC post-barrier with a MembarVolatile
// which has a wide memory effect (kills all memory). This creates an
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ public static int run(String args[], PrintStream out) {
System.out.println("Can't reproduce OOME due to a limit on iterations/execution time. Test was useless.");
throw new SkippedException("Test did not get an OutOfMemory error");

} catch (OutOfMemoryError e) {
} finally {
stress.finish();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,6 @@ protected void allocateStress() {
allocatedList = new ArrayList<Object>();
}
}
} catch (OutOfMemoryError e) {
} finally {
stressAllocatedBytes += actuallyAllocated;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ public static void main(String argv[]) {
}
});
Thread.sleep(5000);
} catch (InterruptedException | InvocationTargetException ex) {
} finally {
for (int i = 0; i < devices.length; i++) {
devices[i].setFullScreenWindow(null);
Expand Down
1 change: 0 additions & 1 deletion test/jdk/java/awt/print/PrinterJob/PrintAWTImage.java
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ public void actionPerformed(ActionEvent e) {
pj.setPrintable(this);
try {
pj.print();
} catch (PrinterException pe) {
} finally {
System.err.println("PRINT RETURNED");
}
Expand Down
1 change: 0 additions & 1 deletion test/jdk/java/awt/print/PrinterJob/PrintBadImage.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ public static void main(String args[]) {
pj.setPrintable(pbi);
try {
pj.print();
} catch (PrinterException pe) {
} finally {
System.err.println("PRINT RETURNED");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ public void actionPerformed(ActionEvent e) {
pj.setPrintable(c);
try {
pj.print();
} catch (PrinterException pe) {
} finally {
System.err.println("PRINT RETURNED");
}
Expand Down
1 change: 0 additions & 1 deletion test/jdk/java/awt/print/PrinterJob/PrintNullString.java
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ public void actionPerformed(ActionEvent e) {
pj.setPrintable(c);
try {
pj.print();
} catch (PrinterException pe) {
} finally {
System.err.println("PRINT RETURNED");
}
Expand Down
1 change: 0 additions & 1 deletion test/jdk/java/awt/print/PrinterJob/PrintParenString.java
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ public void actionPerformed(ActionEvent e) {
pj.setPrintable(c);
try {
pj.print();
} catch (PrinterException pe) {
} finally {
System.err.println("PRINT RETURNED");
}
Expand Down
1 change: 0 additions & 1 deletion test/jdk/java/awt/print/PrinterJob/PrintRotatedText.java
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ public void actionPerformed(ActionEvent e) {
pj.setPageable(c);
try {
pj.print();
} catch (PrinterException pe) {
} finally {
System.err.println("PRINT RETURNED");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ public void actionPerformed(ActionEvent e) {
pj.setPrintable(c);
try {
pj.print();
} catch (PrinterException pe) {
} finally {
System.err.println("PRINT RETURNED");
}
Expand Down
1 change: 0 additions & 1 deletion test/jdk/java/awt/print/PrinterJob/PrintVolatileImage.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ public void actionPerformed(ActionEvent e) {
pj.setPrintable(this);
try {
pj.print();
} catch (PrinterException pe) {
} finally {
System.err.println("PRINT RETURNED");
}
Expand Down
1 change: 0 additions & 1 deletion test/jdk/java/awt/print/PrinterJob/raster/RasterTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ public void actionPerformed(ActionEvent e) {
pj.setPrintable(c);
try {
pj.print();
} catch (PrinterException pe) {
} finally {
System.err.println("PRINT RETURNED");
}
Expand Down
2 changes: 0 additions & 2 deletions test/jdk/java/io/File/createTempFile/TargetDirectory.java
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ public static void main(String[] args) throws Exception {
try {
File.createTempFile("readonly", null, target);
throw new RuntimeException("Exception not thrown for read-only target directory");
} catch (IOException expected) {
} finally {
target.delete();
}
Expand All @@ -97,7 +96,6 @@ public static void main(String[] args) throws Exception {
try {
File.createTempFile("file", null, target);
throw new RuntimeException("Exception not thrown for file target");
} catch (IOException expected) {
} finally {
target.delete();
}
Expand Down
1 change: 0 additions & 1 deletion test/jdk/java/io/RandomAccessFile/Seek.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ public static void main(String argv[]) throws Exception
raf.seek(-10);
throw new Exception
("Should have thrown an IOException when seek offset is < 0");
} catch (IOException e) {
} finally {
raf.close();
}
Expand Down
2 changes: 0 additions & 2 deletions test/jdk/java/io/Serializable/duplicateSerialFields/Test.java
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ public static void main(String[] args) throws Exception {
oin.readObject();
throw new Error(
"read of A should fail with InvalidClassException");
} catch (InvalidClassException e) {
} finally {
in.close();
}
Expand All @@ -99,7 +98,6 @@ public static void main(String[] args) throws Exception {
oin.readObject();
throw new Error(
"read of B should fail with InvalidClassException");
} catch (InvalidClassException e) {
} finally {
in.close();
}
Expand Down
1 change: 0 additions & 1 deletion test/jdk/java/io/Serializable/fieldTypeString/Read.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ public static void main(String[] args) throws Exception {
ObjectInputStream oin = new ObjectInputStream(in);
oin.readObject();
throw new Error();
} catch (InvalidClassException ex) {
} finally {
in.close();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,6 @@ private static void copy(Reader src, Writer dst) throws IOException {
} finally {
try {
src.close();
} catch (IOException ignored1) {
} finally {
try {
dst.close();
Expand Down
Loading