Skip to content

Commit c7445a5

Browse files
committed
#2 fixing tests
1 parent 51ab43b commit c7445a5

File tree

3 files changed

+3
-12
lines changed

3 files changed

+3
-12
lines changed

.github/workflows/gradle.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,3 @@ jobs:
3636
- name: Build Gradle
3737
run: |
3838
./gradlew build -DheaderVersion=$headerVersion
39-
- name: test
40-
if: always()
41-
run: ls -lah /tmp/libclang.so-*

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# Java Native Memory Processing
22
![](https://img.shields.io/badge/Java-22+-success)
3-
![Maven Central Version](https://img.shields.io/maven-central/v/io.github.digitalsmile.native/annotation?color=blue&link=https%3A%2F%2Fcentral.sonatype.com%2Fartifact%2Fio.github.digitalsmile.native%2Fannotation)
4-
![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/digitalsmile/annotation/gradle.yml)
3+
![Maven Central Version](https://img.shields.io/maven-central/v/io.github.digitalsmile.native/annotation?label=annotation)
4+
![Maven Central Version](https://img.shields.io/maven-central/v/io.github.digitalsmile.native/annotation-processor?label=annotation-processor)
5+
![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/digitalsmile/native-memory-processor/gradle.yml)
56
## Introduction
67
With the release of JDK 22 the new Foreign Function & Memory API (FFM API) has been introduced from preview phase.
78

annotation-processor/src/main/java/io/github/digitalsmile/NativeProcessor.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment
9393
processFunctions(rootElement, functionElements, packageName);
9494

9595
} catch (Throwable e) {
96-
e.printStackTrace();
9796
processingEnv.getMessager().printMessage(Diagnostic.Kind.ERROR, e.getMessage());
9897
}
9998
}
@@ -158,13 +157,10 @@ private void processHeaderFiles(Element element, String[] headerFiles, String pa
158157
var parsed = JextractTool.parse(Path.of(header.toFile().getAbsolutePath()), includes);
159158
allParsedHeaders.put(header, parsed);
160159
} catch (ExceptionInInitializerError | ClangException | TypeLayoutError | Index.ParsingFailedException e) {
161-
e.printStackTrace();
162160
processingEnv.getMessager().printMessage(Diagnostic.Kind.ERROR, e.getCause().getMessage());
163161
return;
164162
}
165163
}
166-
// /tmp/libclang.so-5383561861285695138
167-
// /tmp/libclang.so-5383561861285695138
168164
var parser = new Parser(processingEnv.getMessager());
169165
try {
170166
var parsed = parser.parse(structs, enums, unions, allParsedHeaders);
@@ -179,7 +175,6 @@ private void processHeaderFiles(Element element, String[] headerFiles, String pa
179175
}
180176
}
181177
} catch (Throwable e) {
182-
e.printStackTrace();
183178
processingEnv.getMessager().printMessage(Diagnostic.Kind.ERROR, e.getMessage());
184179
}
185180
}
@@ -280,7 +275,6 @@ private List<Path> getHeaderPaths(String[] headerFiles) {
280275

281276
rootPath = rootDirectory.toPath();
282277
} catch (IOException e) {
283-
e.printStackTrace();
284278
processingEnv.getMessager().printMessage(Diagnostic.Kind.ERROR, "Cannot create tmp resource " + e);
285279
continue;
286280
}
@@ -311,7 +305,6 @@ private void createGeneratedFile(String packageName, String fileName, String con
311305
writer.write(contents);
312306
writer.close();
313307
} catch (IOException e) {
314-
e.printStackTrace();
315308
processingEnv.getMessager().printMessage(Diagnostic.Kind.ERROR, "Exception occurred while processing file '" + fileName + "': " + e.getMessage());
316309
}
317310
}

0 commit comments

Comments
 (0)