aboutsummaryrefslogtreecommitdiff
path: root/src/test/java/org/apache/commons/lang3
diff options
context:
space:
mode:
authorXenoAmess <xenoamess@gmail.com>2020-06-13 23:11:17 +0800
committerGitHub <noreply@github.com>2020-06-13 11:11:17 -0400
commit0e17c1e93c5a5e5adf930d945a3235cc09361d7c (patch)
treec4b4e878ecf2e9ca1ea514bbb409f92a48f5e2ce /src/test/java/org/apache/commons/lang3
parent7f3b3562a787c36263c01c1840aeaef96fdc0580 (diff)
downloadapache-commons-lang-0e17c1e93c5a5e5adf930d945a3235cc09361d7c.tar.gz
fix_typos (#539)
Diffstat (limited to 'src/test/java/org/apache/commons/lang3')
-rw-r--r--src/test/java/org/apache/commons/lang3/EnumUtilsTest.java12
-rw-r--r--src/test/java/org/apache/commons/lang3/event/EventUtilsTest.java8
-rw-r--r--src/test/java/org/apache/commons/lang3/text/ExtendedMessageFormatTest.java6
-rw-r--r--src/test/java/org/apache/commons/lang3/time/FastDateParserTest.java2
4 files changed, 14 insertions, 14 deletions
diff --git a/src/test/java/org/apache/commons/lang3/EnumUtilsTest.java b/src/test/java/org/apache/commons/lang3/EnumUtilsTest.java
index 1e79f4571..1f9d3a3d6 100644
--- a/src/test/java/org/apache/commons/lang3/EnumUtilsTest.java
+++ b/src/test/java/org/apache/commons/lang3/EnumUtilsTest.java
@@ -292,7 +292,7 @@ public class EnumUtilsTest {
assertEquals(6L, EnumUtils.generateBitVector(Traffic.class, EnumSet.of(Traffic.AMBER, Traffic.GREEN)));
assertEquals(7L, EnumUtils.generateBitVector(Traffic.class, EnumSet.of(Traffic.RED, Traffic.AMBER, Traffic.GREEN)));
- // 64 values Enum (to test whether no int<->long jdk convertion issue exists)
+ // 64 values Enum (to test whether no int<->long jdk conversion issue exists)
assertEquals((1L << 31), EnumUtils.generateBitVector(Enum64.class, EnumSet.of(Enum64.A31)));
assertEquals((1L << 32), EnumUtils.generateBitVector(Enum64.class, EnumSet.of(Enum64.A32)));
assertEquals((1L << 63), EnumUtils.generateBitVector(Enum64.class, EnumSet.of(Enum64.A63)));
@@ -310,7 +310,7 @@ public class EnumUtilsTest {
assertArrayEquals(EnumUtils.generateBitVectors(Traffic.class, EnumSet.of(Traffic.AMBER, Traffic.GREEN)), 6L);
assertArrayEquals(EnumUtils.generateBitVectors(Traffic.class, EnumSet.of(Traffic.RED, Traffic.AMBER, Traffic.GREEN)), 7L);
- // 64 values Enum (to test whether no int<->long jdk convertion issue exists)
+ // 64 values Enum (to test whether no int<->long jdk conversion issue exists)
assertArrayEquals(EnumUtils.generateBitVectors(Enum64.class, EnumSet.of(Enum64.A31)), (1L << 31));
assertArrayEquals(EnumUtils.generateBitVectors(Enum64.class, EnumSet.of(Enum64.A32)), (1L << 32));
assertArrayEquals(EnumUtils.generateBitVectors(Enum64.class, EnumSet.of(Enum64.A63)), (1L << 63));
@@ -334,7 +334,7 @@ public class EnumUtilsTest {
//gracefully handles duplicates:
assertEquals(7L, EnumUtils.generateBitVector(Traffic.class, Traffic.RED, Traffic.AMBER, Traffic.GREEN, Traffic.GREEN));
- // 64 values Enum (to test whether no int<->long jdk convertion issue exists)
+ // 64 values Enum (to test whether no int<->long jdk conversion issue exists)
assertEquals((1L << 31), EnumUtils.generateBitVector(Enum64.class, Enum64.A31));
assertEquals((1L << 32), EnumUtils.generateBitVector(Enum64.class, Enum64.A32));
assertEquals((1L << 63), EnumUtils.generateBitVector(Enum64.class, Enum64.A63));
@@ -354,7 +354,7 @@ public class EnumUtilsTest {
//gracefully handles duplicates:
assertArrayEquals(EnumUtils.generateBitVectors(Traffic.class, Traffic.RED, Traffic.AMBER, Traffic.GREEN, Traffic.GREEN), 7L);
- // 64 values Enum (to test whether no int<->long jdk convertion issue exists)
+ // 64 values Enum (to test whether no int<->long jdk conversion issue exists)
assertArrayEquals(EnumUtils.generateBitVectors(Enum64.class, Enum64.A31), (1L << 31));
assertArrayEquals(EnumUtils.generateBitVectors(Enum64.class, Enum64.A32), (1L << 32));
assertArrayEquals(EnumUtils.generateBitVectors(Enum64.class, Enum64.A63), (1L << 63));
@@ -393,7 +393,7 @@ public class EnumUtilsTest {
assertEquals(EnumSet.of(Traffic.AMBER, Traffic.GREEN), EnumUtils.processBitVector(Traffic.class, 6L));
assertEquals(EnumSet.of(Traffic.RED, Traffic.AMBER, Traffic.GREEN), EnumUtils.processBitVector(Traffic.class, 7L));
- // 64 values Enum (to test whether no int<->long jdk convertion issue exists)
+ // 64 values Enum (to test whether no int<->long jdk conversion issue exists)
assertEquals(EnumSet.of(Enum64.A31), EnumUtils.processBitVector(Enum64.class, (1L << 31)));
assertEquals(EnumSet.of(Enum64.A32), EnumUtils.processBitVector(Enum64.class, (1L << 32)));
assertEquals(EnumSet.of(Enum64.A63), EnumUtils.processBitVector(Enum64.class, (1L << 63)));
@@ -430,7 +430,7 @@ public class EnumUtilsTest {
assertEquals(EnumSet.of(Traffic.AMBER, Traffic.GREEN), EnumUtils.processBitVectors(Traffic.class, 666L, 6L));
assertEquals(EnumSet.of(Traffic.RED, Traffic.AMBER, Traffic.GREEN), EnumUtils.processBitVectors(Traffic.class, 666L, 7L));
- // 64 values Enum (to test whether no int<->long jdk convertion issue exists)
+ // 64 values Enum (to test whether no int<->long jdk conversion issue exists)
assertEquals(EnumSet.of(Enum64.A31), EnumUtils.processBitVectors(Enum64.class, (1L << 31)));
assertEquals(EnumSet.of(Enum64.A32), EnumUtils.processBitVectors(Enum64.class, (1L << 32)));
assertEquals(EnumSet.of(Enum64.A63), EnumUtils.processBitVectors(Enum64.class, (1L << 63)));
diff --git a/src/test/java/org/apache/commons/lang3/event/EventUtilsTest.java b/src/test/java/org/apache/commons/lang3/event/EventUtilsTest.java
index 1736e1380..6352301ad 100644
--- a/src/test/java/org/apache/commons/lang3/event/EventUtilsTest.java
+++ b/src/test/java/org/apache/commons/lang3/event/EventUtilsTest.java
@@ -55,7 +55,7 @@ public class EventUtilsTest {
@Test
public void testAddEventListener() {
final PropertyChangeSource src = new PropertyChangeSource();
- final EventCountingInvociationHandler handler = new EventCountingInvociationHandler();
+ final EventCountingInvocationHandler handler = new EventCountingInvocationHandler();
final PropertyChangeListener listener = handler.createListener(PropertyChangeListener.class);
assertEquals(0, handler.getEventCount("propertyChange"));
EventUtils.addEventListener(src, PropertyChangeListener.class, listener);
@@ -67,7 +67,7 @@ public class EventUtilsTest {
@Test
public void testAddEventListenerWithNoAddMethod() {
final PropertyChangeSource src = new PropertyChangeSource();
- final EventCountingInvociationHandler handler = new EventCountingInvociationHandler();
+ final EventCountingInvocationHandler handler = new EventCountingInvocationHandler();
final ObjectChangeListener listener = handler.createListener(ObjectChangeListener.class);
final IllegalArgumentException e =
assertThrows(IllegalArgumentException.class, () -> EventUtils.addEventListener(src, ObjectChangeListener.class, listener));
@@ -88,7 +88,7 @@ public class EventUtilsTest {
@Test
public void testAddEventListenerWithPrivateAddMethod() {
final PropertyChangeSource src = new PropertyChangeSource();
- final EventCountingInvociationHandler handler = new EventCountingInvociationHandler();
+ final EventCountingInvocationHandler handler = new EventCountingInvocationHandler();
final VetoableChangeListener listener = handler.createListener(VetoableChangeListener.class);
final IllegalArgumentException e =
assertThrows(IllegalArgumentException.class, () -> EventUtils.addEventListener(src, VetoableChangeListener.class, listener));
@@ -161,7 +161,7 @@ public class EventUtilsTest {
}
- private static class EventCountingInvociationHandler implements InvocationHandler {
+ private static class EventCountingInvocationHandler implements InvocationHandler {
private final Map<String, Integer> eventCounts = new TreeMap<>();
public <L> L createListener(final Class<L> listenerType) {
diff --git a/src/test/java/org/apache/commons/lang3/text/ExtendedMessageFormatTest.java b/src/test/java/org/apache/commons/lang3/text/ExtendedMessageFormatTest.java
index cf8994597..4a3ad3199 100644
--- a/src/test/java/org/apache/commons/lang3/text/ExtendedMessageFormatTest.java
+++ b/src/test/java/org/apache/commons/lang3/text/ExtendedMessageFormatTest.java
@@ -291,7 +291,7 @@ public class ExtendedMessageFormatTest {
@Test
public void testEqualsHashcode() {
final Map<String, ? extends FormatFactory> fmtRegistry = Collections.singletonMap("testfmt", new LowerCaseFormatFactory());
- final Map<String, ? extends FormatFactory> otherRegitry = Collections.singletonMap("testfmt", new UpperCaseFormatFactory());
+ final Map<String, ? extends FormatFactory> otherRegistry = Collections.singletonMap("testfmt", new UpperCaseFormatFactory());
final String pattern = "Pattern: {0,testfmt}";
final ExtendedMessageFormat emf = new ExtendedMessageFormat(pattern, Locale.US, fmtRegistry);
@@ -318,7 +318,7 @@ public class ExtendedMessageFormatTest {
assertNotEquals(emf.hashCode(), other.hashCode(), "pattern, hashcode()");
// Different registry
- other = new ExtendedMessageFormat(pattern, Locale.US, otherRegitry);
+ other = new ExtendedMessageFormat(pattern, Locale.US, otherRegistry);
assertNotEquals(emf, other, "registry, equals()");
assertNotEquals(emf.hashCode(), other.hashCode(), "registry, hashcode()");
@@ -354,7 +354,7 @@ public class ExtendedMessageFormatTest {
/**
* Create an ExtendedMessageFormat for the specified pattern and locale and check the
- * formated output matches the expected result for the parameters.
+ * formatted output matches the expected result for the parameters.
* @param pattern string
* @param registryUnused map (currently unused)
* @param args Object[]
diff --git a/src/test/java/org/apache/commons/lang3/time/FastDateParserTest.java b/src/test/java/org/apache/commons/lang3/time/FastDateParserTest.java
index f7e2bd4cd..529d66233 100644
--- a/src/test/java/org/apache/commons/lang3/time/FastDateParserTest.java
+++ b/src/test/java/org/apache/commons/lang3/time/FastDateParserTest.java
@@ -1,7 +1,7 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
- * this work for additional inparserion regarding copyright ownership.
+ * this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at