Skip to content
Permalink
Browse files
8276042: Remove unused local variables in java.naming
Reviewed-by: aefimov, dfuchs, vtewari
  • Loading branch information
turbanoff authored and AlekseiEfimov committed Oct 28, 2021
1 parent a2f2d8f commit 593401fe8b38bbb8d331a862818fe077af157fcb
Showing 5 changed files with 7 additions and 12 deletions.
@@ -307,7 +307,6 @@ private static void encodeSimpleFilter(BerEncoder ber, byte[] filter,
dbgIndent++;
}

String type, value;
int valueStart, valueEnd, typeStart, typeEnd;

int eq;
@@ -2603,7 +2603,6 @@ private static Vector<Vector<String>> extractURLs(String refString) {

Vector<Vector<String>> referrals = new Vector<>(urlCount);
int iURL;
int i = 0;

separator = refString.indexOf('\n');
iURL = separator + 1;
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2003, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -73,7 +73,7 @@ public void write(int b) throws IOException {
*/
public void write(byte[] buffer, int offset, int total) throws IOException {
int count;
byte[] wrappedToken, saslBuffer;
byte[] wrappedToken;

// "Packetize" buffer to be within rawSendSize
if (debug) {
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -134,7 +134,7 @@ public void setSuccess() {
/**
* Fills in an exception's fields using data from this Continuation.
* The resolved name is set by subtracting remainingName from starter.
* %%% This might not not always produce the correct answer wrt trailing "/".
* %%% This might not always produce the correct answer wrt trailing "/".
* If the exception is a CannotProceedException, its environment,
* altName, and altNameCtx fields are set using this continuation's
* environment, relativeResolvedName, and resolvedContext.
@@ -296,8 +296,6 @@ private void setContinueAux(Object resObj,
* @param currCtx The non-null context from which relResName is to be resolved.
*/
public void setContinueNNS(Object resObj, Name relResName, Context currCtx) {
CompositeName rname = new CompositeName();

setContinue(resObj, relResName, currCtx, PartialCompositeContext._NNS_NAME);
}

@@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -510,12 +510,11 @@ protected static PartialCompositeContext getPCContext(Continuation cont)
throws NamingException {

Object obj = cont.getResolvedObj();
PartialCompositeContext pctx = null;

if (obj instanceof PartialCompositeContext) {
if (obj instanceof PartialCompositeContext partialCtx) {
// Just cast if octx already is PartialCompositeContext
// %%% ignoring environment for now
return (PartialCompositeContext)obj;
return partialCtx;
} else {
throw cont.fillInException(new CannotProceedException());
}

1 comment on commit 593401f

@openjdk-notifier
Copy link

@openjdk-notifier openjdk-notifier bot commented on 593401f Oct 28, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.