Skip to content
Commits on Source (9)
jboss-jdeparser2 (2.0.3-1) unstable; urgency=medium
* New upstream version 2.0.3.
* Switch to debhelper-compat 12.
* Declare compliance with Debian Policy 4.4.0.
* Use canonical VCS URI.
* Remove get-orig-source target.
* Drop disable-apiviz-plugin.patch. Plugin was removed by upstream.
-- Markus Koschany <apo@debian.org> Thu, 18 Jul 2019 16:20:07 +0200
jboss-jdeparser2 (2.0.2-2) unstable; urgency=medium
* Fix FTBFS with Java 11. (Closes: #912295)
......
......@@ -5,15 +5,15 @@ Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.or
Uploaders:
Markus Koschany <apo@debian.org>
Build-Depends:
debhelper (>= 11),
debhelper-compat (= 12),
default-jdk,
default-jdk-doc,
junit4,
libmaven-javadoc-plugin-java,
maven-debian-helper (>= 1.5)
Standards-Version: 4.2.1
Vcs-Git: https://anonscm.debian.org/git/pkg-java/jboss-jdeparser2.git
Vcs-Browser: https://anonscm.debian.org/cgit/pkg-java/jboss-jdeparser2.git
Standards-Version: 4.4.0
Vcs-Git: https://salsa.debian.org/java-team/jboss-jdeparser2.git
Vcs-Browser: https://salsa.debian.org/java-team/jboss-jdeparser2
Homepage: https://github.com/jdeparser/jdeparser2
Package: libjboss-jdeparser2-java
......
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: jdeparser2
Source: https://github.com/jdeparser/jdeparser2
Comment:
pom.xml contains an outdated reference to the old LGPL license. Nowadays
jdeparser2 is licensed under Apache-2.0.
Files: *
Copyright: 2015-2016, Red Hat, Inc.
Copyright: 2015-2019, Red Hat, Inc.
License: Apache-2.0
Files: debian/*
Copyright: 2015-2018, Markus Koschany <apo@gambaru.de>
Copyright: 2015-2019, Markus Koschany <apo@gambaru.de>
License: Apache-2.0
License: Apache-2.0
......
From: Markus Koschany <apo@debian.org>
Date: Thu, 28 May 2015 15:08:20 +0200
Subject: disable apiviz plugin
Forwarded: not-needed
---
pom.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pom.xml b/pom.xml
index e5ac693..3d2e2ea 100644
--- a/pom.xml
+++ b/pom.xml
@@ -49,14 +49,14 @@
<plugins>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
- <configuration>
+ <!--<configuration>
<doclet>net.gleamynode.apiviz.APIviz</doclet>
<docletArtifact>
<groupId>org.jboss.apiviz</groupId>
<artifactId>apiviz</artifactId>
<version>1.3.2.GA</version>
</docletArtifact>
- </configuration>
+ </configuration>-->
</plugin>
</plugins>
</build>
disable-apiviz-plugin.patch
java11.patch
......@@ -2,6 +2,3 @@
%:
dh $@ --buildsystem=maven
get-orig-source:
uscan --verbose --download-current-version --force-download
......@@ -28,12 +28,12 @@
<groupId>org.jboss.jdeparser</groupId>
<artifactId>jdeparser</artifactId>
<version>2.0.2.Final</version>
<version>2.0.3.Final</version>
<parent>
<groupId>org.jboss</groupId>
<artifactId>jboss-parent</artifactId>
<version>14</version>
<version>34</version>
</parent>
<dependencies>
......@@ -44,20 +44,4 @@
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<doclet>net.gleamynode.apiviz.APIviz</doclet>
<docletArtifact>
<groupId>org.jboss.apiviz</groupId>
<artifactId>apiviz</artifactId>
<version>1.3.2.GA</version>
</docletArtifact>
</configuration>
</plugin>
</plugins>
</build>
</project>
......@@ -420,12 +420,13 @@ class BasicJBlock extends BasicJCommentable implements JBlock, BlockContent {
}
writer.write($PUNCT.BRACE.CLOSE);
} else {
if (beforeBrace != null && content.size() == 1 && ! (content.get(0) instanceof EmptyJStatement)) {
writer.sp();
}
for (BlockContent statement : content) {
statement.write(writer);
Iterator<BlockContent> iterator = content.iterator();
if (iterator.hasNext()) {
iterator.next().write(writer);
while (iterator.hasNext()) {
writer.nl();
iterator.next().write(writer);
}
}
}
}
......
......@@ -35,10 +35,9 @@ class ElseJBlock extends BasicJBlock {
super(_if.getParent(), braces);
}
public void write(final SourceFileWriter writer) throws IOException {
writeComments(writer);
void write(final SourceFileWriter writer, final FormatPreferences.Space beforeBrace, final Braces braces) throws IOException {
writer.write(FormatPreferences.Space.BEFORE_KEYWORD_ELSE);
writer.write($KW.ELSE);
super.write(writer, FormatPreferences.Space.BEFORE_BRACE_ELSE);
super.write(writer, beforeBrace, braces);
}
}
......@@ -30,6 +30,5 @@ class EmptyJStatement extends BasicJStatement implements BlockContent {
public void write(final SourceFileWriter writer) throws IOException {
writeComments(writer);
writer.write($PUNCT.SEMI);
writer.nl();
}
}
......@@ -39,7 +39,7 @@ class FieldRefJExpr extends AbstractJAssignableExpr {
public void write(final SourceFileWriter writer) throws IOException {
writer.write(expr);
writer.write($PUNCT.DOT);
writer.writeEscaped(refName);
writer.writeEscapedWord(refName);
}
AbstractJExpr getExpr() {
......
......@@ -515,8 +515,6 @@ public final class FormatPreferences {
/**
* The type of space to apply.
*
* @apiviz.exclude
*/
public enum SpaceType {
NONE,
......@@ -526,8 +524,6 @@ public final class FormatPreferences {
/**
* The location or position of a space.
*
* @apiviz.exclude
*/
public enum Space {
// default for all parens
......@@ -655,8 +651,6 @@ public final class FormatPreferences {
/**
* A category of indentation.
*
* @apiviz.exclude
*/
public enum Indentation {
MEMBERS_TOP_LEVEL,
......@@ -681,8 +675,6 @@ public final class FormatPreferences {
/**
* Categories for wrapping rules.
*
* @apiviz.exclude
*/
public enum Wrapping {
EXCEPTION_LIST,
......@@ -693,8 +685,6 @@ public final class FormatPreferences {
/**
* The wrapping mode.
*
* @apiviz.exclude
*/
public enum WrappingMode {
ALWAYS_WRAP,
......@@ -707,13 +697,12 @@ public final class FormatPreferences {
/**
* Option flags.
*
* @apiviz.exclude
*/
public enum Opt {
ENUM_TRAILING_COMMA,
ENUM_EMPTY_PARENS,
COMPACT_INIT_ONLY_CLASS,
DROP_UNUSED_LABELS,
}
......
......@@ -56,6 +56,9 @@ class ImplJIf extends ConditionJBlock implements JIf {
writer.write(getCondition());
writer.write(FormatPreferences.Space.WITHIN_PAREN_IF);
writer.write($PUNCT.PAREN.CLOSE);
if (! hasSingleItemOfType(EmptyJStatement.class)) {
writer.sp();
}
super.write(writer);
if (_else != null) {
if (hasSingleItemOfType(ImplJIf.class)) {
......
......@@ -113,7 +113,7 @@ class ImplJSourceFile extends BasicJCommentable implements JSourceFile {
}
public JSourceFile _import(final JType type) {
if (! (type instanceof ReferenceJType) && ! (type instanceof NestedJType)) {
if (! (type instanceof ReferenceJType) && ! (type instanceof NestedJType) && ! (type instanceof NarrowedJType)) {
// can't import this type
return this;
}
......@@ -122,7 +122,7 @@ class ImplJSourceFile extends BasicJCommentable implements JSourceFile {
return this;
}
checkPackage();
imports.put(type.simpleName(), (AbstractJType) type);
imports.put(type.simpleName(), (AbstractJType) type.erasure());
return this;
}
......
......@@ -45,6 +45,10 @@ class InstanceOfJExpr extends AbstractJExpr {
}
public void write(final SourceFileWriter writer) throws IOException {
final Token writerState = writer.getState();
if (writerState == $WORD || writerState == $NUMBER || writerState instanceof $KW) {
writer.sp();
}
writer.write(expr);
writer.write($KW.INSTANCEOF);
writer.write(type);
......
......@@ -673,8 +673,6 @@ public interface JBlock extends JStatement, JCommentable {
/**
* Braces mode.
*
* @apiviz.exclude
*/
enum Braces {
/**
......
......@@ -33,6 +33,7 @@ class NameJExpr extends AbstractJAssignableExpr {
}
public void write(final SourceFileWriter writer) throws IOException {
writer.writeEscaped(name);
writer.addWordSpace();
writer.writeEscapedWord(name);
}
}
......@@ -55,14 +55,14 @@ class StaticRefJExpr extends AbstractJAssignableExpr {
type.writeDirect(writer);
writer.write($PUNCT.DOT);
}
writer.writeEscaped(refName);
writer.writeEscapedWord(refName);
}
void writeForImport(final SourceFileWriter writer) throws IOException {
writer.processSpacing();
writer.writeClass(type.qualifiedName());
writer.write($PUNCT.DOT);
writer.writeEscaped(refName);
writer.writeEscapedWord(refName);
}
String getName() {
......
......@@ -62,6 +62,13 @@ public class SimpleExampleTestCase extends AbstractGeneratingTestCase {
JIf jIf = body._if(JExprs.$v(t).eq(JExpr.NULL));
jIf.assign(JExprs.$v(t), str("new Value"));
jIf._else().assign(JExprs.$v(t), str("other value"));
jIf = body._if(JExprs.$v(t).eq(JExpr.NULL));
jIf.assign(JExprs.$v(t), str("new Value"));
jIf = body._if(JExprs.$v(t).eq(JExpr.NULL));
jIf._else().assign(JExprs.$v(t), str("other value"));
jIf = body._if(JExprs.$v(t).eq(JExpr.NULL));
jIf.empty();
jIf._else().assign(JExprs.$v(t), str("other value"));
// static import and reference
body.call(JTypes.$t(Thread.State.class).$v("NEW"), "toString");
......