This is an automated email from the ASF dual-hosted git repository.

rec pushed a commit to branch refactoring/379-Clean-up-code
in repository https://gitbox.apache.org/repos/asf/uima-uimaj.git

commit 90d2deedb465c5a7ea7a96832acbe7a37fbbc62b
Author: Richard Eckart de Castilho <[email protected]>
AuthorDate: Wed Sep 4 11:39:29 2024 +0200

    Issue #379: Clean up code
    
    - Clean up
---
 .../vinci/transport/util/Base64Converter.java      |  2 +-
 .../uima/cas/impl/LLUnambiguousIteratorImpl.java   |  4 +-
 .../apache/uima/cas/impl/IndexComparitorTest.java  | 12 +--
 .../apache/uima/cas/impl/XmiCasSerializerTest.java | 19 ++---
 .../apache/uima/cas/test/GetAllIndexedTest.java    |  6 +-
 .../cas/test/GrowingTheCasNoJcasCacheTest.java     |  4 +-
 .../metadata/impl/FsIndexCollection_implTest.java  | 50 +++++--------
 .../uima/util/CasIOUtilsAlwaysHoldOnTest.java      |  2 +-
 .../util/impl/Log4JLogger_implCapturingTest.java   | 11 +--
 .../impl/cpm/engine/ArtifactProducer.java          |  3 +-
 .../impl/cpm/engine/NonThreadedProcessingUnit.java |  3 +-
 .../collection/impl/cpm/engine/ProcessingUnit.java |  3 +-
 .../uima/caseditor/ide/wizards/package-info.java   |  4 +-
 .../uima/caseditor/editor/AnnotationEditor.java    |  3 +-
 .../apache/uima/caseditor/editor/ArrayValue.java   |  3 +-
 .../apache/uima/caseditor/editor/FeatureValue.java |  3 +-
 .../caseditor/editor/ModelFeatureStructure.java    |  3 +-
 .../apache/uima/caseditor/editor/SubPageSite.java  |  9 +--
 .../uima/caseditor/editor/fsview/package-info.java |  4 +-
 .../editor/outline/AnnotationTreeNode.java         |  3 +-
 .../editor/outline/AnnotationTypeTreeNode.java     |  3 +-
 .../caseditor/editor/outline/package-info.java     |  4 +-
 .../apache/uima/caseditor/editor/package-info.java |  4 +-
 .../editor/styleview/AnnotationTypeNode.java       |  3 +-
 .../org/apache/uima/caseditor/ui/package-info.java |  4 +-
 .../uima/caseditor/ui/property/package-info.java   |  4 +-
 .../taeconfigurator/editors/MultiPageEditor.java   | 15 ++--
 .../taeconfigurator/editors/ui/TypeSection.java    |  2 +-
 .../Scenario1TestAnnotator.java                    |  2 +-
 .../Scenario3TestAnnotator.java                    |  6 +-
 .../spi/JCasClassProviderForTesting.java           | 14 ++--
 .../apache/uima/tools/jcasgen/package-info.java    | 10 ++-
 .../apache/uima/migratev3/jcas/MigrateJCas.java    | 86 +++++++++++-----------
 33 files changed, 150 insertions(+), 158 deletions(-)

diff --git 
a/jVinci/src/main/java/org/apache/vinci/transport/util/Base64Converter.java 
b/jVinci/src/main/java/org/apache/vinci/transport/util/Base64Converter.java
index cbc18dcb0..19d24ebf9 100644
--- a/jVinci/src/main/java/org/apache/vinci/transport/util/Base64Converter.java
+++ b/jVinci/src/main/java/org/apache/vinci/transport/util/Base64Converter.java
@@ -314,7 +314,7 @@ public class Base64Converter {
   }
 
   private static void b64encodeOctet(byte[] to, int to_offset, byte[] from, 
int from_offset,
-                                     int count) {
+          int count) {
     int A = 0;
     int B = 0;
     int C = 0;
diff --git 
a/uimaj-core/src/main/java/org/apache/uima/cas/impl/LLUnambiguousIteratorImpl.java
 
b/uimaj-core/src/main/java/org/apache/uima/cas/impl/LLUnambiguousIteratorImpl.java
index 059fcb943..149839389 100644
--- 
a/uimaj-core/src/main/java/org/apache/uima/cas/impl/LLUnambiguousIteratorImpl.java
+++ 
b/uimaj-core/src/main/java/org/apache/uima/cas/impl/LLUnambiguousIteratorImpl.java
@@ -37,8 +37,8 @@ public class LLUnambiguousIteratorImpl<T extends 
FeatureStructure>
         extends FsIterator_subtypes_snapshot<T> {
 
   public LLUnambiguousIteratorImpl(LowLevelIterator<T> it) {
-    super((T[]) createItemsArray((LowLevelIterator<FeatureStructure>) it), 
it.ll_getIndex(),
-            IS_ORDERED, it.getComparator());
+    super((T[]) createItemsArray((LowLevelIterator<FeatureStructure>) it),
+            (LowLevelIndex<T>) it.ll_getIndex(), IS_ORDERED, 
it.getComparator());
   }
 
   // this is static because can't have instance method call before super call 
in constructor
diff --git 
a/uimaj-core/src/test/java/org/apache/uima/cas/impl/IndexComparitorTest.java 
b/uimaj-core/src/test/java/org/apache/uima/cas/impl/IndexComparitorTest.java
index 06c6f9a26..a26835adf 100644
--- a/uimaj-core/src/test/java/org/apache/uima/cas/impl/IndexComparitorTest.java
+++ b/uimaj-core/src/test/java/org/apache/uima/cas/impl/IndexComparitorTest.java
@@ -545,8 +545,8 @@ class IndexComparitorTest {
                                                             // values
     FeatureStructure testprobe2 = createFs(type1, 1, 1);
 
-    assertThat(sortedType1.size()).isEqualTo(2);
-    assertThat(setType1.size()).isEqualTo(2);
+    assertThat(sortedType1).hasSize(2);
+    assertThat(setType1).hasSize(2);
 
     FSIterator<FeatureStructure> it = setType1.iterator();
     it.moveTo(testprobe);
@@ -562,10 +562,9 @@ class IndexComparitorTest {
   // note: this test is here because the setup is done
   @Test
   void testProtectIndex() throws Exception {
-    var fs = sortedType1.iterator().get();
-
-    var oldIsReportFsUpdatesCorrputs = 
CASImpl.IS_REPORT_FS_UPDATE_CORRUPTS_INDEX;
-    var oldIsThrowExceptionCorruptIndes = 
CASImpl.IS_THROW_EXCEPTION_CORRUPT_INDEX;
+    FSIterator<FeatureStructure> it = sortedType1.iterator();
+    FeatureStructure fs = it.get();
+    boolean ok = false;
     try {
       CASImpl.IS_THROW_EXCEPTION_CORRUPT_INDEX = true;
       CASImpl.IS_REPORT_FS_UPDATE_CORRUPTS_INDEX = true;
@@ -575,5 +574,6 @@ class IndexComparitorTest {
       CASImpl.IS_THROW_EXCEPTION_CORRUPT_INDEX = 
oldIsThrowExceptionCorruptIndes;
       CASImpl.IS_REPORT_FS_UPDATE_CORRUPTS_INDEX = 
oldIsReportFsUpdatesCorrputs;
     }
+    assertThat(CASImpl.IS_THROW_EXCEPTION_CORRUPT_INDEX ? ok : !ok).isTrue();
   }
 }
diff --git 
a/uimaj-core/src/test/java/org/apache/uima/cas/impl/XmiCasSerializerTest.java 
b/uimaj-core/src/test/java/org/apache/uima/cas/impl/XmiCasSerializerTest.java
index ecc6ff6d1..cca774305 100644
--- 
a/uimaj-core/src/test/java/org/apache/uima/cas/impl/XmiCasSerializerTest.java
+++ 
b/uimaj-core/src/test/java/org/apache/uima/cas/impl/XmiCasSerializerTest.java
@@ -71,6 +71,13 @@ class XmiCasSerializerTest {
             .parseTypeSystemDescription(new XMLInputSource(typeSystemFile));
   }
 
+  @AfterEach
+  void tearDown() throws Exception {
+    if ((outputFile != null) && outputFile.exists()) {
+      outputFile.delete();
+    }
+  }
+
   @Test
   void testInvalidCharsInDocumentText() throws Exception {
     CAS cas = CasCreationUtils.createCas(typeSystemDesc, null, null);
@@ -138,16 +145,4 @@ class XmiCasSerializerTest {
       }
     }
   }
-
-  /*
-   * (non-Javadoc)
-   * 
-   * @see junit.framework.TestCase#tearDown()
-   */
-  @AfterEach
-  public void tearDown() throws Exception {
-    if ((outputFile != null) && outputFile.exists()) {
-      outputFile.delete();
-    }
-  }
 }
diff --git 
a/uimaj-core/src/test/java/org/apache/uima/cas/test/GetAllIndexedTest.java 
b/uimaj-core/src/test/java/org/apache/uima/cas/test/GetAllIndexedTest.java
index c34dd54a4..5d3e07d78 100644
--- a/uimaj-core/src/test/java/org/apache/uima/cas/test/GetAllIndexedTest.java
+++ b/uimaj-core/src/test/java/org/apache/uima/cas/test/GetAllIndexedTest.java
@@ -87,8 +87,8 @@ public class GetAllIndexedTest {
   public void setUp() throws Exception {
     File descriptorFile = JUnitExtension
             .getFile("CASTests/desc/typePriorityTestCaseDescriptor.xml");
-    assertThat(descriptorFile.exists())
-            .as("Descriptor must exist: " + 
descriptorFile.getAbsolutePath()).isTrue();
+    assertThat(descriptorFile).as("Descriptor must exist: " + 
descriptorFile.getAbsolutePath())
+            .exists();
 
     XMLParser parser = UIMAFramework.getXMLParser();
     ResourceSpecifier spec = (ResourceSpecifier) parser.parse(new 
XMLInputSource(descriptorFile));
@@ -109,7 +109,7 @@ public class GetAllIndexedTest {
   }
 
   @AfterEach
-  public void tearDown() {
+  void tearDown() {
     cas = null;
     // this.tokenType = null;
     // this.sentenceType = null;
diff --git 
a/uimaj-core/src/test/java/org/apache/uima/cas/test/GrowingTheCasNoJcasCacheTest.java
 
b/uimaj-core/src/test/java/org/apache/uima/cas/test/GrowingTheCasNoJcasCacheTest.java
index 982184f46..3b593b948 100644
--- 
a/uimaj-core/src/test/java/org/apache/uima/cas/test/GrowingTheCasNoJcasCacheTest.java
+++ 
b/uimaj-core/src/test/java/org/apache/uima/cas/test/GrowingTheCasNoJcasCacheTest.java
@@ -56,8 +56,8 @@ class GrowingTheCasNoJcasCacheTest {
   @BeforeEach
   void setUp() throws Exception {
     File descriptorFile = 
JUnitExtension.getFile("CASTests/desc/TokensAndSentences.xml");
-    assertThat(descriptorFile.exists())
-            .as("Descriptor must exist: " + 
descriptorFile.getAbsolutePath()).isTrue();
+    assertThat(descriptorFile).as("Descriptor must exist: " + 
descriptorFile.getAbsolutePath())
+            .exists();
 
     XMLParser parser = UIMAFramework.getXMLParser();
     ResourceSpecifier spec = parser.parseResourceSpecifier(new 
XMLInputSource(descriptorFile));
diff --git 
a/uimaj-core/src/test/java/org/apache/uima/resource/metadata/impl/FsIndexCollection_implTest.java
 
b/uimaj-core/src/test/java/org/apache/uima/resource/metadata/impl/FsIndexCollection_implTest.java
index 537b26f16..07e0e3bc9 100644
--- 
a/uimaj-core/src/test/java/org/apache/uima/resource/metadata/impl/FsIndexCollection_implTest.java
+++ 
b/uimaj-core/src/test/java/org/apache/uima/resource/metadata/impl/FsIndexCollection_implTest.java
@@ -21,13 +21,7 @@ package org.apache.uima.resource.metadata.impl;
 
 import static org.assertj.core.api.Assertions.assertThat;
 
-import java.io.File;
-
 import org.apache.uima.UIMAFramework;
-import org.apache.uima.resource.ResourceManager;
-import org.apache.uima.resource.metadata.FsIndexCollection;
-import org.apache.uima.resource.metadata.FsIndexDescription;
-import org.apache.uima.resource.metadata.Import;
 import org.apache.uima.test.junit_extension.JUnitExtension;
 import org.apache.uima.util.InvalidXMLException;
 import org.apache.uima.util.XMLInputSource;
@@ -48,37 +42,31 @@ class FsIndexCollection_implTest {
 
   @Test
   void testBuildFromXmlElement() throws Exception {
-    try {
-      File descriptor = JUnitExtension
-              .getFile("FsIndexCollectionImplTest/TestFsIndexCollection.xml");
-      FsIndexCollection indexColl = UIMAFramework.getXMLParser()
-              .parseFsIndexCollection(new XMLInputSource(descriptor));
+    var descriptor = 
JUnitExtension.getFile("FsIndexCollectionImplTest/TestFsIndexCollection.xml");
+    var indexColl = UIMAFramework.getXMLParser()
+            .parseFsIndexCollection(new XMLInputSource(descriptor));
 
-      assertThat(indexColl.getName()).isEqualTo("TestFsIndexCollection");
-      assertThat(indexColl.getDescription()).isEqualTo("This is a test.");
-      assertThat(indexColl.getVendor()).isEqualTo("The Apache Software 
Foundation");
-      assertThat(indexColl.getVersion()).isEqualTo("0.1");
-      Import[] imports = indexColl.getImports();
-      assertThat(imports).hasSize(2);
-      
assertThat(imports[0].getName()).isEqualTo("FsIndexCollectionImportedFromDataPath");
-      assertThat(imports[0].getLocation()).isNull();
-      assertThat(imports[1].getName()).isNull();
-      
assertThat(imports[1].getLocation()).isEqualTo("FsIndexCollectionImportedByLocation.xml");
+    assertThat(indexColl.getName()).isEqualTo("TestFsIndexCollection");
+    assertThat(indexColl.getDescription()).isEqualTo("This is a test.");
+    assertThat(indexColl.getVendor()).isEqualTo("The Apache Software 
Foundation");
+    assertThat(indexColl.getVersion()).isEqualTo("0.1");
+    var imports = indexColl.getImports();
+    assertThat(imports).hasSize(2);
+    
assertThat(imports[0].getName()).isEqualTo("FsIndexCollectionImportedFromDataPath");
+    assertThat(imports[0].getLocation()).isNull();
+    assertThat(imports[1].getName()).isNull();
+    
assertThat(imports[1].getLocation()).isEqualTo("FsIndexCollectionImportedByLocation.xml");
 
-      FsIndexDescription[] indexes = indexColl.getFsIndexes();
-      assertThat(indexes).hasSize(2);
-    } catch (Exception e) {
-      JUnitExtension.handleException(e);
-    }
+    var indexes = indexColl.getFsIndexes();
+    assertThat(indexes).hasSize(2);
   }
 
   @Test
   void testResolveImports() throws Exception {
-    File descriptor = 
JUnitExtension.getFile("FsIndexCollectionImplTest/TestFsIndexCollection.xml");
-    FsIndexCollection ic = UIMAFramework.getXMLParser()
-            .parseFsIndexCollection(new XMLInputSource(descriptor));
+    var descriptor = 
JUnitExtension.getFile("FsIndexCollectionImplTest/TestFsIndexCollection.xml");
+    var ic = UIMAFramework.getXMLParser().parseFsIndexCollection(new 
XMLInputSource(descriptor));
 
-    FsIndexDescription[] indexes = ic.getFsIndexes();
+    var indexes = ic.getFsIndexes();
     assertThat(indexes).hasSize(2);
 
     // resolving imports without setting data path should fail
@@ -93,7 +81,7 @@ class FsIndexCollection_implTest {
     // thrown
 
     // set data path correctly and it should work
-    ResourceManager resMgr = UIMAFramework.newDefaultResourceManager();
+    var resMgr = UIMAFramework.newDefaultResourceManager();
     resMgr.setDataPathElements(
             
JUnitExtension.getFile("FsIndexCollectionImplTest/dataPathDir").getAbsoluteFile());
     ic.resolveImports(resMgr);
diff --git 
a/uimaj-core/src/test/java/org/apache/uima/util/CasIOUtilsAlwaysHoldOnTest.java 
b/uimaj-core/src/test/java/org/apache/uima/util/CasIOUtilsAlwaysHoldOnTest.java
index 7cbbc887f..285f41a09 100644
--- 
a/uimaj-core/src/test/java/org/apache/uima/util/CasIOUtilsAlwaysHoldOnTest.java
+++ 
b/uimaj-core/src/test/java/org/apache/uima/util/CasIOUtilsAlwaysHoldOnTest.java
@@ -49,7 +49,7 @@ class CasIOUtilsAlwaysHoldOnTest {
     if (oldHoldOntoFss != null) {
       System.setProperty(CASImpl.ALWAYS_HOLD_ONTO_FSS, oldHoldOntoFss);
     } else {
-      System.getProperties().remove(CASImpl.ALWAYS_HOLD_ONTO_FSS);
+      System.clearProperty(CASImpl.ALWAYS_HOLD_ONTO_FSS);
     }
   }
 
diff --git 
a/uimaj-core/src/test/java/org/apache/uima/util/impl/Log4JLogger_implCapturingTest.java
 
b/uimaj-core/src/test/java/org/apache/uima/util/impl/Log4JLogger_implCapturingTest.java
index d736711a4..f2c2c819d 100644
--- 
a/uimaj-core/src/test/java/org/apache/uima/util/impl/Log4JLogger_implCapturingTest.java
+++ 
b/uimaj-core/src/test/java/org/apache/uima/util/impl/Log4JLogger_implCapturingTest.java
@@ -26,6 +26,7 @@ import java.util.ArrayList;
 import java.util.List;
 
 import org.apache.logging.log4j.Level;
+import org.apache.logging.log4j.core.LogEvent;
 import org.apache.uima.util.Logger;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
@@ -123,9 +124,9 @@ class Log4JLogger_implCapturingTest {
 
       assertThat(capture.getAndClearLatestEvents()) //
               .extracting( //
-                      logEvent1 -> logEvent1.getLevel(), //
+                      LogEvent::getLevel, //
                       e -> e.getMessage().getFormattedMessage(), //
-                      logEvent -> logEvent.getThrown()) //
+                      LogEvent::getThrown) //
               .containsExactly( //
                       tuple(Level.TRACE, "1 2", ex), //
                       tuple(Level.DEBUG, "1 2", ex), //
@@ -146,9 +147,9 @@ class Log4JLogger_implCapturingTest {
 
       assertThat(capture.getAndClearLatestEvents()) //
               .extracting( //
-                      logEvent1 -> logEvent1.getLevel(), //
+                      LogEvent::getLevel, //
                       e -> e.getMessage().getFormattedMessage(), //
-                      logEvent -> logEvent.getThrown()) //
+                      LogEvent::getThrown) //
               .containsExactly( //
                       tuple(Level.TRACE, "1 2 3", ex), //
                       tuple(Level.DEBUG, "1 2 3", ex), //
@@ -177,7 +178,7 @@ class Log4JLogger_implCapturingTest {
         assertThat(capture.getAndClearLatestEvents()) //
                 .extracting( //
                         e -> e.getMessage().getFormattedMessage(), //
-                        logEvent -> logEvent.getThrown()) //
+                        LogEvent::getThrown) //
                 .containsExactly( //
                         tuple(String.join(" ", values), ex));
       }
diff --git 
a/uimaj-cpe/src/main/java/org/apache/uima/collection/impl/cpm/engine/ArtifactProducer.java
 
b/uimaj-cpe/src/main/java/org/apache/uima/collection/impl/cpm/engine/ArtifactProducer.java
index c85016acb..eb946a206 100644
--- 
a/uimaj-cpe/src/main/java/org/apache/uima/collection/impl/cpm/engine/ArtifactProducer.java
+++ 
b/uimaj-cpe/src/main/java/org/apache/uima/collection/impl/cpm/engine/ArtifactProducer.java
@@ -771,8 +771,7 @@ public class ArtifactProducer implements Runnable {
             // while the CPM is in normal shutdown state.
             // (Moved this code inside if (casObjectList != null)
             // block to avoid NullPointerException. -Adam
-            if (cpm.isRunning()
-                    || (!cpm.isRunning() && !cpm.isHardKilled())) {
+            if (cpm.isRunning() || (!cpm.isRunning() && !cpm.isHardKilled())) {
               threadState = 1005; // Entering enqueue
               workQueue.enqueue(casObjectList);
               // synchronized (workQueue) { // redundant, enqueue does this
diff --git 
a/uimaj-cpe/src/main/java/org/apache/uima/collection/impl/cpm/engine/NonThreadedProcessingUnit.java
 
b/uimaj-cpe/src/main/java/org/apache/uima/collection/impl/cpm/engine/NonThreadedProcessingUnit.java
index 2c9542eef..74ebd0a64 100644
--- 
a/uimaj-cpe/src/main/java/org/apache/uima/collection/impl/cpm/engine/NonThreadedProcessingUnit.java
+++ 
b/uimaj-cpe/src/main/java/org/apache/uima/collection/impl/cpm/engine/NonThreadedProcessingUnit.java
@@ -655,8 +655,7 @@ public class NonThreadedProcessingUnit {
         }
       }
       // enqueue CASes. If the CPM is in shutdown mode due to hard kill dont 
allow enqueue of CASes
-      if (outputQueue != null && (cpm.isRunning()
-              || (!cpm.isRunning() && !cpm.isHardKilled()))) {
+      if (outputQueue != null && (cpm.isRunning() || (!cpm.isRunning() && 
!cpm.isHardKilled()))) {
         if (UIMAFramework.getLogger().isLoggable(Level.FINEST)) {
           UIMAFramework.getLogger(this.getClass()).logrb(Level.FINEST, 
this.getClass().getName(),
                   "process", CPMUtils.CPM_LOG_RESOURCE_BUNDLE, 
"UIMA_CPM_add_cas_to_queue__FINEST",
diff --git 
a/uimaj-cpe/src/main/java/org/apache/uima/collection/impl/cpm/engine/ProcessingUnit.java
 
b/uimaj-cpe/src/main/java/org/apache/uima/collection/impl/cpm/engine/ProcessingUnit.java
index 696bfdb60..6ebaa4038 100644
--- 
a/uimaj-cpe/src/main/java/org/apache/uima/collection/impl/cpm/engine/ProcessingUnit.java
+++ 
b/uimaj-cpe/src/main/java/org/apache/uima/collection/impl/cpm/engine/ProcessingUnit.java
@@ -1306,8 +1306,7 @@ public class ProcessingUnit implements Runnable {
         maybeLogFinest("UIMA_CPM_done_notify_listeners__FINEST");
       }
       // enqueue CASes. If the CPM is in shutdown mode due to hard kill dont 
allow enqueue of CASes
-      if (outputQueue != null && (cpm.isRunning()
-              || (!cpm.isRunning() && !cpm.isHardKilled()))) {
+      if (outputQueue != null && (cpm.isRunning() || (!cpm.isRunning() && 
!cpm.isHardKilled()))) {
         maybeLogFinestWorkQueue("UIMA_CPM_add_cas_to_queue__FINEST", 
outputQueue);
         WorkUnit workUnit = new WorkUnit(aCasObjectList);
         if (casCache != null && casCache[0] != null) {
diff --git 
a/uimaj-ep-cas-editor-ide/src/main/java/org/apache/uima/caseditor/ide/wizards/package-info.java
 
b/uimaj-ep-cas-editor-ide/src/main/java/org/apache/uima/caseditor/ide/wizards/package-info.java
index 6e7b2b121..43e2a1b4d 100644
--- 
a/uimaj-ep-cas-editor-ide/src/main/java/org/apache/uima/caseditor/ide/wizards/package-info.java
+++ 
b/uimaj-ep-cas-editor-ide/src/main/java/org/apache/uima/caseditor/ide/wizards/package-info.java
@@ -17,6 +17,8 @@
  * under the License.
  */
 /**
- * <p>This package contains the wizards classes.</p>
+ * <p>
+ * This package contains the wizards classes.
+ * </p>
  */
 package org.apache.uima.caseditor.ide.wizards;
\ No newline at end of file
diff --git 
a/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/AnnotationEditor.java
 
b/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/AnnotationEditor.java
index 6f8e20a1c..0d7da4c29 100644
--- 
a/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/AnnotationEditor.java
+++ 
b/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/AnnotationEditor.java
@@ -708,8 +708,7 @@ public final class AnnotationEditor extends StatusTextEditor
    * @return an adapter or null
    */
   @Override
-  public Object getAdapter(@SuppressWarnings("rawtypes")
-  Class adapter) {
+  public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter) {
 
     if (IContentOutlinePage.class.equals(adapter) && getDocument() != null) {
       return mOutlinePage;
diff --git 
a/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/ArrayValue.java
 
b/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/ArrayValue.java
index f612a3fac..4a4faa961 100644
--- 
a/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/ArrayValue.java
+++ 
b/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/ArrayValue.java
@@ -163,8 +163,7 @@ public class ArrayValue implements IAdaptable {
   }
 
   @Override
-  public Object getAdapter(@SuppressWarnings("rawtypes")
-  Class adapter) {
+  public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter) {
 
     if (FeatureStructure.class.equals(adapter)) {
       if (arrayFS instanceof ArrayFS) {
diff --git 
a/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/FeatureValue.java
 
b/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/FeatureValue.java
index 16ab07c68..39af8542c 100644
--- 
a/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/FeatureValue.java
+++ 
b/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/FeatureValue.java
@@ -81,8 +81,7 @@ public final class FeatureValue implements IAdaptable {
   }
 
   @Override
-  public Object getAdapter(@SuppressWarnings("rawtypes")
-  Class adapter) {
+  public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter) {
     if (AnnotationFS.class.equals(adapter)) {
       if (getValue() instanceof AnnotationFS) {
         return getValue();
diff --git 
a/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/ModelFeatureStructure.java
 
b/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/ModelFeatureStructure.java
index dd5c0a032..e1b43d157 100644
--- 
a/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/ModelFeatureStructure.java
+++ 
b/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/ModelFeatureStructure.java
@@ -133,8 +133,7 @@ public class ModelFeatureStructure implements IAdaptable {
   }
 
   @Override
-  public Object getAdapter(@SuppressWarnings("rawtypes")
-  Class adapter) {
+  public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter) {
     if (FeatureStructure.class.equals(adapter)) {
       return getStructre();
     } else if (AnnotationFS.class.equals(adapter) && getStructre() instanceof 
AnnotationFS) {
diff --git 
a/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/SubPageSite.java
 
b/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/SubPageSite.java
index ee6f108bb..b7b47d3c1 100644
--- 
a/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/SubPageSite.java
+++ 
b/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/SubPageSite.java
@@ -53,20 +53,17 @@ public class SubPageSite implements IPageSite {
   }
 
   @Override
-  public boolean hasService(@SuppressWarnings("rawtypes")
-  Class api) {
+  public boolean hasService(@SuppressWarnings("rawtypes") Class api) {
     return site.hasService(api);
   }
 
   @Override
-  public Object getService(@SuppressWarnings("rawtypes")
-  Class api) {
+  public Object getService(@SuppressWarnings("rawtypes") Class api) {
     return site.getService(api);
   }
 
   @Override
-  public Object getAdapter(@SuppressWarnings("rawtypes")
-  Class adapter) {
+  public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter) {
     return site.getAdapter(adapter);
   }
 
diff --git 
a/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/fsview/package-info.java
 
b/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/fsview/package-info.java
index 41cfa59ed..793c2d9d8 100644
--- 
a/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/fsview/package-info.java
+++ 
b/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/fsview/package-info.java
@@ -17,6 +17,8 @@
  * under the License.
  */
 /**
- * <p>This package contains the feature structure view classes.</p>
+ * <p>
+ * This package contains the feature structure view classes.
+ * </p>
  */
 package org.apache.uima.caseditor.editor.fsview;
\ No newline at end of file
diff --git 
a/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/outline/AnnotationTreeNode.java
 
b/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/outline/AnnotationTreeNode.java
index 75634ae83..9796150f3 100644
--- 
a/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/outline/AnnotationTreeNode.java
+++ 
b/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/outline/AnnotationTreeNode.java
@@ -112,8 +112,7 @@ public class AnnotationTreeNode implements IAdaptable {
   }
 
   @Override
-  public Object getAdapter(@SuppressWarnings("rawtypes")
-  Class adapter) {
+  public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter) {
     // TODO:
     // use ModelFeatureStructure
     // create a AdapterFactory which just calls the
diff --git 
a/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/outline/AnnotationTypeTreeNode.java
 
b/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/outline/AnnotationTypeTreeNode.java
index 85c04bebe..b0722870d 100644
--- 
a/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/outline/AnnotationTypeTreeNode.java
+++ 
b/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/outline/AnnotationTypeTreeNode.java
@@ -77,8 +77,7 @@ class AnnotationTypeTreeNode implements IAdaptable {
   }
 
   @Override
-  public Object getAdapter(@SuppressWarnings("rawtypes")
-  Class adapter) {
+  public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter) {
 
     if (Type.class.equals(adapter)) {
       return type;
diff --git 
a/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/outline/package-info.java
 
b/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/outline/package-info.java
index 5bb515319..686ab22f8 100644
--- 
a/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/outline/package-info.java
+++ 
b/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/outline/package-info.java
@@ -17,6 +17,8 @@
  * under the License.
  */
 /**
- * <p>This package contains the outline classes.</p>
+ * <p>
+ * This package contains the outline classes.
+ * </p>
  */
 package org.apache.uima.caseditor.editor.outline;
\ No newline at end of file
diff --git 
a/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/package-info.java
 
b/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/package-info.java
index 215e83ee2..e31291bb9 100644
--- 
a/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/package-info.java
+++ 
b/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/package-info.java
@@ -18,6 +18,8 @@
  */
 
 /**
- * <p>This package contains the editor classes.</p>
+ * <p>
+ * This package contains the editor classes.
+ * </p>
  */
 package org.apache.uima.caseditor.editor;
\ No newline at end of file
diff --git 
a/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/styleview/AnnotationTypeNode.java
 
b/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/styleview/AnnotationTypeNode.java
index e9951420c..4903c3fbe 100644
--- 
a/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/styleview/AnnotationTypeNode.java
+++ 
b/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/styleview/AnnotationTypeNode.java
@@ -84,8 +84,7 @@ public class AnnotationTypeNode implements IAdaptable {
   }
 
   @Override
-  public Object getAdapter(@SuppressWarnings("rawtypes")
-  Class adapter) {
+  public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter) {
 
     if (AnnotationTypeNode.class.equals(adapter)) {
       return this;
diff --git 
a/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/ui/package-info.java
 
b/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/ui/package-info.java
index 1ba83e9c7..6e2902448 100644
--- 
a/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/ui/package-info.java
+++ 
b/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/ui/package-info.java
@@ -18,6 +18,8 @@
  */
 
 /**
- * <p>This package contains the ui classes and packages.</p>
+ * <p>
+ * This package contains the ui classes and packages.
+ * </p>
  */
 package org.apache.uima.caseditor.ui;
\ No newline at end of file
diff --git 
a/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/ui/property/package-info.java
 
b/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/ui/property/package-info.java
index 730a7887c..9103519c3 100644
--- 
a/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/ui/property/package-info.java
+++ 
b/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/ui/property/package-info.java
@@ -18,6 +18,8 @@
  */
 
 /**
- * <p>This package contains the property page classes.</p>
+ * <p>
+ * This package contains the property page classes.
+ * </p>
  */
 package org.apache.uima.caseditor.ui.property;
\ No newline at end of file
diff --git 
a/uimaj-ep-configurator/src/main/java/org/apache/uima/taeconfigurator/editors/MultiPageEditor.java
 
b/uimaj-ep-configurator/src/main/java/org/apache/uima/taeconfigurator/editors/MultiPageEditor.java
index 0f4306ba3..8aebbcf8a 100644
--- 
a/uimaj-ep-configurator/src/main/java/org/apache/uima/taeconfigurator/editors/MultiPageEditor.java
+++ 
b/uimaj-ep-configurator/src/main/java/org/apache/uima/taeconfigurator/editors/MultiPageEditor.java
@@ -1132,7 +1132,8 @@ public class MultiPageEditor extends FormEditor 
implements IUimaMultiPageEditor
         // class is compiled for Java 5.0, but the CDE is running Java 1.4.2
         
Utility.popMessage(Messages.getString("MultiPageEditor.failedCollRdrValidation"),
 //$NON-NLS-1$
                 
Messages.getString("MultiPageEditor.failedCollRdrValidationMsg") + "\n" 
//$NON-NLS-1$ //$NON-NLS-2$
-                        + getMessagesToRootCause(e), MessageDialog.ERROR);
+                        + getMessagesToRootCause(e),
+                MessageDialog.ERROR);
         return false;
       }
     } else if (isCasInitializerDescriptor()) {
@@ -1143,7 +1144,8 @@ public class MultiPageEditor extends FormEditor 
implements IUimaMultiPageEditor
       } catch (Throwable e) {
         
Utility.popMessage(Messages.getString("MultiPageEditor.failedCasInitValidation"),
 //$NON-NLS-1$
                 
Messages.getString("MultiPageEditor.failedCasInitValidationMsg") + "\n" 
//$NON-NLS-1$ //$NON-NLS-2$
-                        + getMessagesToRootCause(e), MessageDialog.ERROR);
+                        + getMessagesToRootCause(e),
+                MessageDialog.ERROR);
         return false;
       }
     } else if (isCasConsumerDescriptor()) {
@@ -1153,7 +1155,8 @@ public class MultiPageEditor extends FormEditor 
implements IUimaMultiPageEditor
       } catch (Throwable e) {
         
Utility.popMessage(Messages.getString("MultiPageEditor.failedCasConsValidation"),
 //$NON-NLS-1$
                 
Messages.getString("MultiPageEditor.failedCasConsValidationMsg") + "\n" 
//$NON-NLS-1$ //$NON-NLS-2$
-                        + getMessagesToRootCause(e), MessageDialog.ERROR);
+                        + getMessagesToRootCause(e),
+                MessageDialog.ERROR);
         return false;
       }
 
@@ -1186,7 +1189,8 @@ public class MultiPageEditor extends FormEditor 
implements IUimaMultiPageEditor
       } catch (Throwable e) {
         
Utility.popMessage(Messages.getString("MultiPageEditor.failedAeValidation"), 
//$NON-NLS-1$
                 Messages.getString("MultiPageEditor.failedAeValidationMsg") + 
"\n" //$NON-NLS-1$ //$NON-NLS-2$
-                        + getMessagesToRootCause(e), MessageDialog.ERROR);
+                        + getMessagesToRootCause(e),
+                MessageDialog.ERROR);
         return false;
       }
     }
@@ -1477,7 +1481,8 @@ public class MultiPageEditor extends FormEditor 
implements IUimaMultiPageEditor
       e.printStackTrace();
       
Utility.popMessage(Messages.getString("MultiPageEditor.XMLerrorInDescriptorTitle"),
 //$NON-NLS-1$
               Messages.getString("MultiPageEditor.XMLerrorInDescriptor") + 
"\n" //$NON-NLS-1$ //$NON-NLS-2$
-                      + getMessagesToRootCause(e), MessageDialog.ERROR);
+                      + getMessagesToRootCause(e),
+              MessageDialog.ERROR);
 
     } catch (ResourceInitializationException e) {
       // occurs if bad xml
diff --git 
a/uimaj-ep-configurator/src/main/java/org/apache/uima/taeconfigurator/editors/ui/TypeSection.java
 
b/uimaj-ep-configurator/src/main/java/org/apache/uima/taeconfigurator/editors/ui/TypeSection.java
index de62d0ab1..70e0a9ba6 100644
--- 
a/uimaj-ep-configurator/src/main/java/org/apache/uima/taeconfigurator/editors/ui/TypeSection.java
+++ 
b/uimaj-ep-configurator/src/main/java/org/apache/uima/taeconfigurator/editors/ui/TypeSection.java
@@ -1570,7 +1570,7 @@ public class TypeSection extends 
AbstractImportablePartSection {
       TypeOrFeature tf = (TypeOrFeature) o2;
       return ((tf.isType() == true && tf.getName().equals(o1)) ||
       // remove features belong to type if type is removed
-      tf.getName().startsWith(((String) o1) + ':')) ? 0 : 1;
+              tf.getName().startsWith(((String) o1) + ':')) ? 0 : 1;
     }
   };
 
diff --git 
a/uimaj-it-pear-with-typesystem/src/main/java/org/apache/uima/it/pear_with_typesystem/Scenario1TestAnnotator.java
 
b/uimaj-it-pear-with-typesystem/src/main/java/org/apache/uima/it/pear_with_typesystem/Scenario1TestAnnotator.java
index 8dd996e38..a4461599a 100644
--- 
a/uimaj-it-pear-with-typesystem/src/main/java/org/apache/uima/it/pear_with_typesystem/Scenario1TestAnnotator.java
+++ 
b/uimaj-it-pear-with-typesystem/src/main/java/org/apache/uima/it/pear_with_typesystem/Scenario1TestAnnotator.java
@@ -39,7 +39,7 @@ public class Scenario1TestAnnotator
 
         var simpleAnnotation = new SimpleAnnotation(aJCas);
         simpleAnnotation.addToIndexes();
-        
+
         var complexAnnotation = new ComplexAnnotation(aJCas);
         complexAnnotation.setDelegate(simpleAnnotation);
         complexAnnotation.addToIndexes();
diff --git 
a/uimaj-it-pear-with-typesystem/src/main/java/org/apache/uima/it/pear_with_typesystem/Scenario3TestAnnotator.java
 
b/uimaj-it-pear-with-typesystem/src/main/java/org/apache/uima/it/pear_with_typesystem/Scenario3TestAnnotator.java
index 9c4bc0fe0..14b71a846 100644
--- 
a/uimaj-it-pear-with-typesystem/src/main/java/org/apache/uima/it/pear_with_typesystem/Scenario3TestAnnotator.java
+++ 
b/uimaj-it-pear-with-typesystem/src/main/java/org/apache/uima/it/pear_with_typesystem/Scenario3TestAnnotator.java
@@ -31,8 +31,8 @@ import org.apache.uima.jcas.JCas;
 public class Scenario3TestAnnotator
     extends TestAnnotator_ImplBase
 {
-  private static final String TYPE_NAME_COMPLEX_ANNOTATION_SUBTYPE = 
"org.apache.uima.it.pear_with_typesystem.type.ComplexAnnotationSubtype";
-  
+    private static final String TYPE_NAME_COMPLEX_ANNOTATION_SUBTYPE = 
"org.apache.uima.it.pear_with_typesystem.type.ComplexAnnotationSubtype";
+
     @SuppressWarnings("unused")
     @Override
     public void process(JCas aJCas) throws AnalysisEngineProcessException
@@ -42,7 +42,7 @@ public class Scenario3TestAnnotator
 
         // The unit test should have prepared the CAS with one of these
         
assertFalse(aJCas.select(TYPE_NAME_COMPLEX_ANNOTATION_SUBTYPE).isEmpty());
-        
+
         // Iterating over the ComplexAnnotation instances should also return a 
ComplexAnnotationSubtype
         // and that will trigger a ClassCastException - we have the assertion 
for this in the unit test
         var complexAnnotation = aJCas.select(ComplexAnnotation.class).get();
diff --git 
a/uimaj-it-pear-with-typesystem/src/main/java/org/apache/uima/it/pear_with_typesystem/spi/JCasClassProviderForTesting.java
 
b/uimaj-it-pear-with-typesystem/src/main/java/org/apache/uima/it/pear_with_typesystem/spi/JCasClassProviderForTesting.java
index 17af1777e..ca3ef84f7 100644
--- 
a/uimaj-it-pear-with-typesystem/src/main/java/org/apache/uima/it/pear_with_typesystem/spi/JCasClassProviderForTesting.java
+++ 
b/uimaj-it-pear-with-typesystem/src/main/java/org/apache/uima/it/pear_with_typesystem/spi/JCasClassProviderForTesting.java
@@ -28,10 +28,14 @@ import 
org.apache.uima.it.pear_with_typesystem.type.SimpleAnnotation;
 import org.apache.uima.jcas.cas.TOP;
 import org.apache.uima.spi.JCasClassProvider;
 
-public class JCasClassProviderForTesting implements JCasClassProvider {
+public class JCasClassProviderForTesting
+    implements JCasClassProvider
+{
 
-  @Override
-  public List<Class<? extends TOP>> listJCasClasses() {
-    return asList(ComplexAnnotation.class, SimpleAnnotation.class, 
ComplexAnnotationSubtype.class);
-  }
+    @Override
+    public List<Class<? extends TOP>> listJCasClasses()
+    {
+        return asList(ComplexAnnotation.class, SimpleAnnotation.class,
+                ComplexAnnotationSubtype.class);
+    }
 }
diff --git 
a/uimaj-tools/src/main/java/org/apache/uima/tools/jcasgen/package-info.java 
b/uimaj-tools/src/main/java/org/apache/uima/tools/jcasgen/package-info.java
index f1d555c33..028e591de 100644
--- a/uimaj-tools/src/main/java/org/apache/uima/tools/jcasgen/package-info.java
+++ b/uimaj-tools/src/main/java/org/apache/uima/tools/jcasgen/package-info.java
@@ -18,12 +18,14 @@
  */
 /**
  * Describes the format of the generated JCas cover classes for UIMA Version 3.
- * <p>In UIMA version 3</p>
+ * <p>
+ * In UIMA version 3
+ * </p>
  * <ul>
  * <li>There are no xxx_Type classes.</li>
- * <li>As in v2, multiple type systems may be sequentially loaded into a 
(reset) CAS, under one class loader.</li>
- * <li>Change: one consistent JCas gen'd set of classes is loaded per class 
loader.
- * </li>
+ * <li>As in v2, multiple type systems may be sequentially loaded into a 
(reset) CAS, under one
+ * class loader.</li>
+ * <li>Change: one consistent JCas gen'd set of classes is loaded per class 
loader.</li>
  * </ul>
  */
 package org.apache.uima.tools.jcasgen;
\ No newline at end of file
diff --git 
a/uimaj-v3migration-jcas/src/main/java/org/apache/uima/migratev3/jcas/MigrateJCas.java
 
b/uimaj-v3migration-jcas/src/main/java/org/apache/uima/migratev3/jcas/MigrateJCas.java
index 0cdb75fad..9245f47ea 100644
--- 
a/uimaj-v3migration-jcas/src/main/java/org/apache/uima/migratev3/jcas/MigrateJCas.java
+++ 
b/uimaj-v3migration-jcas/src/main/java/org/apache/uima/migratev3/jcas/MigrateJCas.java
@@ -391,8 +391,7 @@ public class MigrateJCas extends VoidVisitorAdapter<Object> 
{
                   false);
           String newClasspath = ip.buildComponentClassPath();
           String parentClasspath = parent.pearClasspath;
-          pearClasspath = (null == parentClasspath || 0 == 
parentClasspath.length())
-                  ? newClasspath
+          pearClasspath = (null == parentClasspath || 0 == 
parentClasspath.length()) ? newClasspath
                   : newClasspath + File.pathSeparator + parentClasspath;
         }
 
@@ -458,18 +457,18 @@ public class MigrateJCas extends 
VoidVisitorAdapter<Object> {
     @Override
     public boolean equals(Object obj) {
       if (this == obj) {
-               return true;
-       }
+        return true;
+      }
       if (obj == null) {
-               return false;
-       }
+        return false;
+      }
       if (getClass() != obj.getClass()) {
-               return false;
-       }
+        return false;
+      }
       Container other = (Container) obj;
       if (id != other.id) {
-               return false;
-       }
+        return false;
+      }
       return true;
     }
 
@@ -918,8 +917,8 @@ public class MigrateJCas extends VoidVisitorAdapter<Object> 
{
       // copy the pear or jar so we don't change the original
       Path lastPartOfPath = container.rootOrig.getFileName();
       if (null == lastPartOfPath) {
-               throw new RuntimeException("Internal Error");
-       }
+        throw new RuntimeException("Internal Error");
+      }
       Path pearOrJarCopy = Paths.get(outputDirectory, container.isJar ? "jars" 
: "pears",
               Integer.toString(container.id), lastPartOfPath.toString());
 
@@ -1031,10 +1030,9 @@ public class MigrateJCas extends 
VoidVisitorAdapter<Object> {
     indent[0] += 2;
     boolean isEmpty = true;
     for (CommonConverted cc : container.convertedItems) {
-      if (cc.v3SourcePath == null)
-        {
-               continue; // skip items that failed migration
-       }
+      if (cc.v3SourcePath == null) {
+        continue; // skip items that failed migration
+      }
       isEmpty = false;
       // relativePathInContainer = the whole path with the first part (up to 
the end of the
       // container root) stripped off
@@ -1730,16 +1728,16 @@ public class MigrateJCas extends 
VoidVisitorAdapter<Object> {
         List<Parameter> ps = n.getParameters();
         if (isGetter) {
           if (ps.size() > 1) {
-                       break;
-               }
+            break;
+          }
         } else { // is setter
           if (ps.size() > 2 || ps.size() == 0) {
-                       break;
-               }
+            break;
+          }
           if (ps.size() == 2) {
             if (!getParmTypeName(ps, 0).equals("int")) {
-                               break;
-                       }
+              break;
+            }
             isArraySetter = true;
           }
         }
@@ -1748,8 +1746,8 @@ public class MigrateJCas extends 
VoidVisitorAdapter<Object> {
         String bodyString = n.getBody().get().toString(printWithoutComments);
         int i = bodyString.indexOf("jcasType.ll_cas.ll_");
         if (i < 0) {
-                       break;
-               }
+          break;
+        }
         String s = bodyString.substring(i + 
"jcasType.ll_cas.ll_get".length()); // also for
                                                                                
 // ...ll_set - same
                                                                                
 // length!
@@ -1918,8 +1916,8 @@ public class MigrateJCas extends 
VoidVisitorAdapter<Object> {
 
     do {
       if (get_set_method == null) {
-               break;
-       }
+        break;
+      }
 
       /** remove checkArraybounds statement **/
       if (n.getNameAsString().equals("checkArrayBounds")
@@ -1937,8 +1935,8 @@ public class MigrateJCas extends 
VoidVisitorAdapter<Object> {
               .startsWith("ll_" + (useGetter ? "get" : "set") + 
rangeNameV2Part + "Value")) {
         args = n.getArguments();
         if (args.size() != (useGetter ? 2 : 3)) {
-                       break;
-               }
+          break;
+        }
         String suffix = useGetter ? "Nc" : rangeNamePart.equals("Feature") ? 
"NcWj" : "Nfc";
         String methodName = "_" + (useGetter ? "get" : "set") + rangeNamePart 
+ "Value" + suffix;
         args.remove(0); // remove the old addr arg
@@ -1955,11 +1953,11 @@ public class MigrateJCas extends 
VoidVisitorAdapter<Object> {
         String s = nname.substring(z.length());
         s = s.substring(0, s.length() - "Value".length()); // s = 
"ShortArray", etc.
         if (s.equals("RefArray")) {
-                       s = "FSArray";
-               }
+          s = "FSArray";
+        }
         if (s.equals("IntArray")) {
-                       s = "IntegerArray";
-               }
+          s = "IntegerArray";
+        }
         EnclosedExpr ee = new EnclosedExpr(
                 new CastExpr(new ClassOrInterfaceType(s), 
n.getArguments().get(0)));
 
@@ -2215,8 +2213,8 @@ public class MigrateJCas extends 
VoidVisitorAdapter<Object> {
       reportPathWorkaround(parent.toString(), p2.toString());
       Path lastPartOfPath = p.getFileName();
       if (null == lastPartOfPath) {
-               throw new RuntimeException();
-       }
+        throw new RuntimeException();
+      }
       return Paths.get(p2.toString(), lastPartOfPath.toString());
     }
     return p;
@@ -2256,8 +2254,8 @@ public class MigrateJCas extends 
VoidVisitorAdapter<Object> {
     }
     System.out.println("\n" + title);
     for (int i = 0; i < title.length(); i++) {
-               System.out.print('=');
-       }
+      System.out.print('=');
+    }
     System.out.println("");
 
     try (BufferedWriter bw = Files.newBufferedWriter(makePath(outDirLog + 
fileName),
@@ -2775,8 +2773,8 @@ public class MigrateJCas extends 
VoidVisitorAdapter<Object> {
         List<Expression> args = ((ObjectCreationExpr) parent).getArguments();
         int i = args.indexOf(n);
         if (i < 0) {
-                       throw new RuntimeException();
-               }
+          throw new RuntimeException();
+        }
         args.set(i, v);
       } else {
         System.out.println(parent.getClass().getName());
@@ -2833,11 +2831,11 @@ public class MigrateJCas extends 
VoidVisitorAdapter<Object> {
             if (vd.getType().equals(intType)) {
               String n = vd.getNameAsString();
               if (n.equals("type")) {
-                               hasType = true;
-                       }
+                hasType = true;
+              }
               if (n.equals("typeIndexID")) {
-                               hasTypeId = true;
-                       }
+                hasTypeId = true;
+              }
               if (hasTypeId && hasType) {
                 return true;
               }
@@ -2874,8 +2872,8 @@ public class MigrateJCas extends 
VoidVisitorAdapter<Object> {
       if (bd instanceof ConstructorDeclaration) {
         List<Parameter> ps = ((ConstructorDeclaration) bd).getParameters();
         if (ps.size() == 0) {
-                       has0ArgConstructor = true;
-               }
+          has0ArgConstructor = true;
+        }
         if (ps.size() == 1 && getParmTypeName(ps, 0).equals("JCas")) {
           has1ArgJCasConstructor = true;
         }


Reply via email to