* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-
package org.opendaylight.openflowplugin.applications.lldpspeaker;
import static org.opendaylight.openflowplugin.applications.topology.lldp.utils.LLDPDiscoveryUtils.getValueForLLDPPacketIntegrityEnsuring;
+import com.google.common.base.Strings;
import java.math.BigInteger;
import java.security.NoSuchAlgorithmException;
import javax.annotation.Nonnull;
-import org.apache.commons.lang3.StringUtils;
import org.opendaylight.openflowplugin.libraries.liblldp.EtherTypes;
import org.opendaylight.openflowplugin.libraries.liblldp.Ethernet;
import org.opendaylight.openflowplugin.libraries.liblldp.HexEncode;
}
private static String bigIntegerToPaddedHex(final BigInteger dataPathId) {
- return StringUtils.leftPad(dataPathId.toString(16), 16, "0");
+ return Strings.padStart(dataPathId.toString(16), 16, '0');
}
}
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
- <dependency>
- <groupId>org.apache.commons</groupId>
- <artifactId>commons-lang3</artifactId>
- </dependency>
<dependency>
<groupId>junit</groupId>
-/**
+/*
* Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
*
* This program and the accompanying materials are made available under the
package org.opendaylight.openflowplugin.openflow.md.util;
import com.google.common.base.Splitter;
+import com.google.common.base.Strings;
import java.math.BigInteger;
import java.util.List;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
-import org.apache.commons.lang3.StringUtils;
import org.opendaylight.openflowplugin.api.OFConstants;
import org.opendaylight.openflowplugin.api.openflow.md.util.OpenflowVersion;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeConnectorId;
* @return string of size 16, padded with '0'
*/
public static String bigIntegerToPaddedHex(final BigInteger dataPathId) {
- return StringUtils.leftPad(dataPathId.toString(16), 16, "0");
+ return Strings.padStart(dataPathId.toString(16), 16, '0');
}
public static BigInteger extractDatapathId(final NodeRef ref) {