Re: Sepp has build issued (Was: semi-RFS: xenium - good enough for me (at the moment))
Hi Pranav,
Le 13/08/2020 à 10:14, Andreas Tille a écrit :
> Hi Pranav,
>
> On Thu, Aug 13, 2020 at 05:54:41AM +0530, Pranav Ballaney wrote:
>> Hi,
>> I was writing autopkgtests for busco and noticed that sepp is indeed a
>> dependency. I tried continuing the packaging work for sepp, and I found a
>> TODO in the changelog with the following:
>>
>> [javac] Note: Some input files use or override a deprecated API.
>> [javac] Note: Recompile with -Xlint:deprecation for details.
>> [javac] Note: Some input files use unchecked or unsafe operations.
>> [javac] Note: Recompile with -Xlint:unchecked for details.
>> [javac] Note: Some messages have been simplified; recompile with
>> -Xdiags:verbose to get full output
>> [javac] 3 errors
>> [javac] 5 warnings
>>
>> Is this because sun.java2d.SunGraphicsEnvironment API has been deprecated,
>> or is it just that it is missing a dependency so it can't import the API? I
>> don't know much about Java packages, but if someone could point me in the
>> right direction, I might be able to help.
>
> I admit I have no idea about those Java issues, but I've put Pierre
> Gruet in CC. If he can not help it might be sensible to ask at
> debian-java@lists.debian.org.
>
I had not heard of this deprecation issue and I don't think it matters
for us. It only causes warnings.
Concerning the errors, they happen because JSONArray objects are passed
to an function that needs a sub-interface of Collection<JSONArray>,
whereas JSONArray is a sub-interface of Collection<Object>. I have
written the patch json_collections.patch (enclosed), which solves the
errors by adding elements one by one instead of mistakingly calling a
global add function. I think this was the intent of upstream, but tell
me if you have build-time tests that fail.
The build can go on after using this patch.
Besides, I think you could use the other enclosed patch to build with a
more recent version of Java, this would suppress two other warnings.
Do not hesitate if you would like to discuss these issues more deeply.
Best regards,
Pierre
--- a/tools/merge/build.xml
+++ b/tools/merge/build.xml
@@ -29,7 +29,7 @@
<target name="compile">
<mkdir dir="${deploy.home}/classes"/>
- <javac srcdir="src" destdir="${deploy.home}/classes" source="1.6" target="1.6" debug="on" >
+ <javac srcdir="src" destdir="${deploy.home}/classes" source="1.8" target="1.8" debug="on" >
<classpath refid="classpath"/>
</javac>
</target>
--- a/tools/merge/src/phylolab/taxonamic/PPlacerJSONMerger.java
+++ b/tools/merge/src/phylolab/taxonamic/PPlacerJSONMerger.java
@@ -312,7 +312,9 @@
return name1.compareTo(name2);
}
});
- sortedPlacements.addAll(resultsPlacements);
+ for (int i=0 ; i<resultsPlacements.size() ; i++) {
+ sortedPlacements.add(resultsPlacements.getJSONObject(i));
+ }
resultsPlacements = new JSONArray();
resultsPlacements.addAll(sortedPlacements);
}
--- a/tools/merge/src/phylolab/taxonamic/JSONMerger.java
+++ b/tools/merge/src/phylolab/taxonamic/JSONMerger.java
@@ -388,7 +388,9 @@
return (int) o;
}
});
- sortedPlacements.addAll(placements);
+ for (Iterator<JSONArray> it=placements.iterator() ; it.hasNext() ;) {
+ sortedPlacements.add(it.next());
+ }
double total = 0;
ArrayList < JSONArray > list = new ArrayList < JSONArray > ();
for (Iterator < JSONArray > itp = sortedPlacements.iterator(); threshold > total && itp.hasNext();) {
@@ -559,7 +561,9 @@
return name1.compareTo(name2);
}
});
- sortedPlacements.addAll(resultsPlacements);
+ for (int i=0 ; i<resultsPlacements.size() ; i++) {
+ sortedPlacements.add(resultsPlacements.getJSONObject(i));
+ }
resultsPlacements = new JSONArray();
resultsPlacements.addAll(sortedPlacements);
}
@@ -735,4 +739,4 @@
System.exit(1);
}
}
-}
\ No newline at end of file
+}
Reply to: