From 44ae885a96c19a7320983d2cf10956ca93c3644d Mon Sep 17 00:00:00 2001 From: simon816 Date: Wed, 15 Jul 2020 23:47:08 +0200 Subject: [PATCH] Ignore library classes when saving decompilation result PR #750 GitOrigin-RevId: 9751ed38b212a13022b0df9143dfa73c74a01929 --- src/org/jetbrains/java/decompiler/struct/ContextUnit.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/org/jetbrains/java/decompiler/struct/ContextUnit.java b/src/org/jetbrains/java/decompiler/struct/ContextUnit.java index f9cd2af..ef580de 100644 --- a/src/org/jetbrains/java/decompiler/struct/ContextUnit.java +++ b/src/org/jetbrains/java/decompiler/struct/ContextUnit.java @@ -1,4 +1,4 @@ -// Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. +// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.java.decompiler.struct; import org.jetbrains.java.decompiler.main.DecompilerContext; @@ -92,6 +92,9 @@ public class ContextUnit { // classes for (int i = 0; i < classes.size(); i++) { StructClass cl = classes.get(i); + if (!cl.isOwn()) { + continue; + } String entryName = decompiledData.getClassEntryName(cl, classEntries.get(i)); if (entryName != null) { String content = decompiledData.getClassContent(cl);