[Git][java-team/jboss-jdeparser2][master] 9 commits: Switch to debhelper-compat 12
Markus Koschany
gitlab at salsa.debian.org
Thu Jul 18 15:32:42 BST 2019
Markus Koschany pushed to branch master at Debian Java Maintainers / jboss-jdeparser2
Commits:
b0eefad5 by Markus Koschany at 2019-07-18T14:15:15Z
Switch to debhelper-compat 12
- - - - -
041b512a by Markus Koschany at 2019-07-18T14:15:34Z
Declare compliance with Debian Policy 4.4.0.
- - - - -
0bbd5c8a by Markus Koschany at 2019-07-18T14:16:14Z
Use canonical VCS URI.
- - - - -
6176cf83 by Markus Koschany at 2019-07-18T14:17:53Z
Remove get-orig-source target.
- - - - -
6047e7ce by Markus Koschany at 2019-07-18T14:18:42Z
New upstream version 2.0.3
- - - - -
86132364 by Markus Koschany at 2019-07-18T14:18:50Z
Update upstream source from tag 'upstream/2.0.3'
Update to upstream version '2.0.3'
with Debian dir f9687581ed821a926275f9320df1cfec37ce5c83
- - - - -
b11af4b3 by Markus Koschany at 2019-07-18T14:19:55Z
Update debian/copyright
- - - - -
b7bb359c by Markus Koschany at 2019-07-18T14:20:59Z
Update changelog
- - - - -
e932aab7 by Markus Koschany at 2019-07-18T14:23:12Z
Drop disable-apiviz-plugin.patch. Plugin was removed by upstream.
- - - - -
20 changed files:
- debian/changelog
- − debian/compat
- debian/control
- debian/copyright
- − debian/patches/disable-apiviz-plugin.patch
- debian/patches/series
- debian/rules
- pom.xml
- src/main/java/org/jboss/jdeparser/BasicJBlock.java
- src/main/java/org/jboss/jdeparser/ElseJBlock.java
- src/main/java/org/jboss/jdeparser/EmptyJStatement.java
- src/main/java/org/jboss/jdeparser/FieldRefJExpr.java
- src/main/java/org/jboss/jdeparser/FormatPreferences.java
- src/main/java/org/jboss/jdeparser/ImplJIf.java
- src/main/java/org/jboss/jdeparser/ImplJSourceFile.java
- src/main/java/org/jboss/jdeparser/InstanceOfJExpr.java
- src/main/java/org/jboss/jdeparser/JBlock.java
- src/main/java/org/jboss/jdeparser/NameJExpr.java
- src/main/java/org/jboss/jdeparser/StaticRefJExpr.java
- src/test/java/org/jboss/jdeparser/SimpleExampleTestCase.java
Changes:
=====================================
debian/changelog
=====================================
@@ -1,3 +1,14 @@
+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 at 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)
=====================================
debian/compat deleted
=====================================
@@ -1 +0,0 @@
-11
=====================================
debian/control
=====================================
@@ -5,15 +5,15 @@ Maintainer: Debian Java Maintainers <pkg-java-maintainers at lists.alioth.debian.or
Uploaders:
Markus Koschany <apo at 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
=====================================
debian/copyright
=====================================
@@ -1,16 +1,13 @@
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 at gambaru.de>
+Copyright: 2015-2019, Markus Koschany <apo at gambaru.de>
License: Apache-2.0
License: Apache-2.0
=====================================
debian/patches/disable-apiviz-plugin.patch deleted
=====================================
@@ -1,30 +0,0 @@
-From: Markus Koschany <apo at 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>
=====================================
debian/patches/series
=====================================
@@ -1,2 +1 @@
-disable-apiviz-plugin.patch
java11.patch
=====================================
debian/rules
=====================================
@@ -2,6 +2,3 @@
%:
dh $@ --buildsystem=maven
-
-get-orig-source:
- uscan --verbose --download-current-version --force-download
=====================================
pom.xml
=====================================
@@ -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>
=====================================
src/main/java/org/jboss/jdeparser/BasicJBlock.java
=====================================
@@ -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);
- writer.nl();
+ Iterator<BlockContent> iterator = content.iterator();
+ if (iterator.hasNext()) {
+ iterator.next().write(writer);
+ while (iterator.hasNext()) {
+ writer.nl();
+ iterator.next().write(writer);
+ }
}
}
}
=====================================
src/main/java/org/jboss/jdeparser/ElseJBlock.java
=====================================
@@ -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);
}
}
=====================================
src/main/java/org/jboss/jdeparser/EmptyJStatement.java
=====================================
@@ -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();
}
}
=====================================
src/main/java/org/jboss/jdeparser/FieldRefJExpr.java
=====================================
@@ -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() {
=====================================
src/main/java/org/jboss/jdeparser/FormatPreferences.java
=====================================
@@ -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,
}
=====================================
src/main/java/org/jboss/jdeparser/ImplJIf.java
=====================================
@@ -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)) {
=====================================
src/main/java/org/jboss/jdeparser/ImplJSourceFile.java
=====================================
@@ -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;
}
=====================================
src/main/java/org/jboss/jdeparser/InstanceOfJExpr.java
=====================================
@@ -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);
=====================================
src/main/java/org/jboss/jdeparser/JBlock.java
=====================================
@@ -673,8 +673,6 @@ public interface JBlock extends JStatement, JCommentable {
/**
* Braces mode.
- *
- * @apiviz.exclude
*/
enum Braces {
/**
=====================================
src/main/java/org/jboss/jdeparser/NameJExpr.java
=====================================
@@ -33,6 +33,7 @@ class NameJExpr extends AbstractJAssignableExpr {
}
public void write(final SourceFileWriter writer) throws IOException {
- writer.writeEscaped(name);
+ writer.addWordSpace();
+ writer.writeEscapedWord(name);
}
}
=====================================
src/main/java/org/jboss/jdeparser/StaticRefJExpr.java
=====================================
@@ -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() {
=====================================
src/test/java/org/jboss/jdeparser/SimpleExampleTestCase.java
=====================================
@@ -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");
View it on GitLab: https://salsa.debian.org/java-team/jboss-jdeparser2/compare/dcc7d2eb8f510b6d2a75c6e327b10d6fba8c1230...e932aab7ff69ab5d8607905a96582d3022717b6b
--
View it on GitLab: https://salsa.debian.org/java-team/jboss-jdeparser2/compare/dcc7d2eb8f510b6d2a75c6e327b10d6fba8c1230...e932aab7ff69ab5d8607905a96582d3022717b6b
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20190718/16a18873/attachment.html>
More information about the pkg-java-commits
mailing list