Skip to content

Commit a808db1

Browse files
authored
Merge pull request #481 from ptidejteam/36-clean-test-outputs
Remove unnecessary test output logs from `AOLCreator` and `SubtypeLoader`.
2 parents b2739f0 + bf820f8 commit a808db1

File tree

4 files changed

+11
-41
lines changed

4 files changed

+11
-41
lines changed

CPL/src/main/java/util/io/SubtypeLoader.java

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -95,16 +95,16 @@ else if (new File(itemName).isDirectory()) {
9595
}
9696
}
9797

98+
// aliiimaher 2026/02/10:
99+
// I removed the logging part from the following method, which was not really useful,
100+
// it was just printing the name of the file being loaded.
101+
98102
// TODO: Make it private
99103
public static ClassFile[] loadSubtypeFromFile(final String aSuperTypeName,
100104
final String aFileName, final String aFileExtension) {
101105

102106
final List<ClassFile> aListOfClasses = new ArrayList<ClassFile>();
103107
if (aFileName.endsWith(aFileExtension)) {
104-
ProxyConsole.getInstance().debugOutput()
105-
.println(MultilingualManager.getString("LOADING_FROM",
106-
SubtypeLoader.class, new Object[] { aFileName }));
107-
108108
try {
109109
final InputStream anInputStream = new FileInputStream(
110110
aFileName);
@@ -362,6 +362,9 @@ public static ClassFile[] loadSubtypesFromJarInputStream(
362362
}
363363
}
364364

365+
// aliiimaher 2026/02/10:
366+
// I removed the logging part from the following method, which was not really useful,
367+
// it was just printing the name of the file being loaded.
365368
public static ClassFile[] loadSubtypesFromStreams(
366369
final String aSuperTypeName,
367370
final NamedInputStream[] someNamedInputStreams,
@@ -394,10 +397,6 @@ public static ClassFile[] loadSubtypesFromStreams(
394397
&& someNamedInputStreams[i].getName()
395398
.indexOf(aDirectoryName) > -1) {
396399

397-
ProxyConsole.getInstance().debugOutput()
398-
.println(MultilingualManager.getString("LOADING_FROM",
399-
SubtypeLoader.class, new Object[] {
400-
someNamedInputStreams[i].getName() }));
401400
try {
402401
SubtypeLoader.loadSubtypeFromStream(aSuperTypeName,
403402
aListOfClasses, someNamedInputStreams[i]);

CPL/src/main/java/util/multilingual/PtidejResourceBundle.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ public class PtidejResourceBundle extends ListResourceBundle {
3737
"Loader: No files found into {0}" },
3838
{ "util.io.SubtypeLoader::Err_READING_FILE",
3939
"Loader: Error while reading file {0}" },
40-
{ "util.io.SubtypeLoader::LOADING_FROM", "Loading from: {0}" },
4140
{ "util.lang.ClassLoader::Err_FILE",
4241
"The file {0} produces an error." },
4342

CPL/src/main/java/util/multilingual/PtidejResourceBundle_fr.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,6 @@ public class PtidejResourceBundle_fr extends ListResourceBundle {
4545
"CPL::SubtypeLoader::Err_READING_FILE",
4646
new String(
4747
"Loader: Erreur lors de la lecture du fichier {0}") },
48-
{ "CPL::SubtypeLoader::LOADING_FROM",
49-
new String("Chargement de : {0} \n") },
5048

5149
// *********** JChoco ***********
5250
{

PADL Creator AOL/src/main/java/padl/creator/aolfile/AOLCreator.java

Lines changed: 4 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1078,46 +1078,20 @@ else if (anAbstractLevelModel instanceof IIdiomLevelModel) {
10781078
return aLevelModel;
10791079
}
10801080

1081+
// aliiimaher 2026/02/09:
1082+
// I removed the logging part from the "replace" method,
1083+
// as it was only used for test output and was not necessary.
10811084
private void replace(
10821085
final StringBuffer buffer,
10831086
final String anOldString,
10841087
final String aNewString) {
10851088

1086-
ProxyConsole.getInstance().debugOutput().print("Replacing \"");
1087-
ProxyConsole
1088-
.getInstance()
1089-
.debugOutput()
1090-
.print(
1091-
anOldString.replaceAll("\\n", "\\n").substring(
1092-
0,
1093-
Math.min(anOldString.length(), 35)));
1094-
ProxyConsole.getInstance().debugOutput().print("\" with \"");
1095-
ProxyConsole
1096-
.getInstance()
1097-
.debugOutput()
1098-
.print(
1099-
aNewString.replaceAll("\\n", "\\n").substring(
1100-
0,
1101-
Math.min(aNewString.length(), 35)));
1102-
ProxyConsole.getInstance().debugOutput().print('\"');
1103-
11041089
final int length = anOldString.length();
11051090
int pos = 0;
1106-
int changeCount = 0;
11071091
while ((pos = buffer.indexOf(anOldString, pos)) > -1) {
11081092
buffer.replace(pos, pos + length, aNewString);
11091093
pos++;
1110-
changeCount++;
1111-
}
1112-
if (changeCount == 0) {
1113-
ProxyConsole.getInstance().debugOutput().println(" - Not found");
1114-
}
1115-
else {
1116-
ProxyConsole.getInstance().debugOutput().print(" - ");
1117-
ProxyConsole.getInstance().debugOutput().print(changeCount);
1118-
ProxyConsole.getInstance().debugOutput().println(" found");
11191094
}
1120-
ProxyConsole.getInstance().debugOutput().flush();
11211095
}
11221096
// private void updateModel(
11231097
// final IAbstractLevelModel originModel,
@@ -1163,4 +1137,4 @@ private void replace(
11631137
//
11641138
// originModel.addModelListeners(formerListeners);
11651139
// }
1166-
}
1140+
}

0 commit comments

Comments
 (0)